Skip to main content

Class: IStageDepotEnvironment

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:793

Extends​

  • Construct

Extended by​

Constructors​

Constructor​

new IStageDepotEnvironment(scope, id): IStageDepotEnvironment

Defined in: node_modules/constructs/lib/construct.d.ts:334

Creates a new construct node.

Parameters​

scope​

Construct

The scope in which to define this construct

id​

string

The scoped construct ID. Must be unique amongst siblings. If the ID includes a path separator (/) or a newline, then it will be replaced by double dash --.

Returns​

IStageDepotEnvironment

Inherited from​

Construct.constructor

Properties​

accountId​

readonly accountId: string

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:794


node​

readonly node: Node

Defined in: node_modules/constructs/lib/construct.d.ts:325

The tree node.

Inherited from​

Construct.node


s3TablesTableBucketName?​

readonly optional s3TablesTableBucketName?: string

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:801

Environment-level bucket name for all S3Tables locations. Overrides the default sdp-${environmentId}-data for every Location.S3Tables in this environment. Strongly discouraged — see S3TablesLocationProps.tableBucketName.

Accessors​

alertsTopicArn​

Get Signature​

get alertsTopicArn(): string

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:948

Returns the alert topic SNS ARN. Assumes that Alerts have been configured in the environment using StageDepotOpsAlarmsProps.

Returns​

string


environmentId​

Get Signature​

get environmentId(): string

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:805

Returns​

string

Set Signature​

set environmentId(id): void

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:809

Parameters​
id​

string

Returns​

void


gatewayEndpoints​

Get Signature​

get gatewayEndpoints(): EnvironmentGateways

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:841

Provides Depot Environment gateway accessors.

Returns​

EnvironmentGateways


iamEndpoint​

Get Signature​

get iamEndpoint(): string

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:822

Returns​

string


transactionOutputPattern​

Get Signature​

get transactionOutputPattern(): string

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:818

Returns​

string


transactionQueue​

Get Signature​

get transactionQueue(): IQueue

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:813

Returns​

IQueue

Methods​

getStaticGatewayEndpoints()​

protected getStaticGatewayEndpoints(): StaticEnvironmentGateways

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:826

Returns​

StaticEnvironmentGateways


onUpdate()​

onUpdate(scope, id, ruleTargets): Rule

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:965

Parameters​

scope​

Construct

CDK Construct scope

id​

string

rule id

ruleTargets​

IRuleTarget[]

rule targets that will be invoked

Returns​

Rule

aws rule cdk node.

Example​

// Create on update rule:
import * as targets from '@aws-cdk/aws-events-targets';
...
const resourceUpdateHandler = new targets.LambdaFunction(new lambda.Function(....));
depotEnvironment.onUpdate(this, '-e2e-invoker', [resourceUpdateHandler]);

runTransaction()​

runTransaction(scope, id, props): StepFunctionsStartExecution

Defined in: packages/depot-cdk/src/stage-depot-environment.ts:905

Run a Depot Transaction from a step function context, as a sfnTasks.StepFunctionsStartExecution task to be made part of a sfn.StateMachine you own.

Parameters​

scope​

Construct

the CDK Construct into which to build the task

id​

string

the ID of the task (must be unique within scope)

props​

TransactionRequest & Omit<TaskStateBaseProps, "timeout" | "heartbeat"> & object

parameters for the task. This is a combination of Depot's TransactionRequest and CDK step functions' sfn.TaskStateBaseProps.

You can override all the standard Task properties if you need, but you most likely don't except perhaps for resultPath. By default, the task will be started synchronously and associated with the parent step function.

Returns​

StepFunctionsStartExecution

Example​

const doSomething = depot.runTransaction(this, "My Transaction", {
datasetId: "my-dataset",
actions: [
{
operation: TransactionRequest.Operation.MERGE,
source: "my.Source",
target: "my.Target",
}
],
resultPath: '$.myTransactionResult'
});

const myProcess = new sfn.StateMachine(this, 'My Process', {
stateMachineName: 'my-process',
definitionBody: sfn.Definition.fromChainable(doSomething)
});

toString()​

toString(): string

Defined in: node_modules/constructs/lib/construct.d.ts:350

Returns a string representation of this construct.

Returns​

string

Inherited from​

Construct.toString


with()​

with(...mixins): IConstruct

Defined in: node_modules/constructs/lib/construct.d.ts:346

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters​

mixins​

...IMixin[]

The mixins to apply

Returns​

IConstruct

This construct for chaining

Inherited from​

Construct.with


isConstruct()​

static isConstruct(x): x is Construct

Defined in: node_modules/constructs/lib/construct.d.ts:321

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters​

x​

any

Any object

Returns​

x is Construct

true if x is an object created from a class which extends Construct.

Inherited from​

Construct.isConstruct