API Reference
Submodules
The following submodules are available:
Constructs
AssignOnLaunch
- Implements: IAssignOnLaunch
Enables the “assignIpv6AddressOnCreation” attribute on selected subnets.
Initializers
import { AssignOnLaunch } from 'shady-island'
new AssignOnLaunch(scope: Construct, id: string, options: AssignOnLaunchProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- The construct scope. |
id |
string |
- The construct ID. |
options |
AssignOnLaunchProps |
- The constructor options. |
scope
Required
- Type: constructs.Construct
The construct scope.
id
Required
- Type: string
The construct ID.
options
Required
- Type: AssignOnLaunchProps
The constructor options.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { AssignOnLaunch } from 'shady-island'
AssignOnLaunch.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The IPv6-enabled VPC. |
vpcPlacement |
aws-cdk-lib.aws_ec2.SelectedSubnets |
The chosen subnets for address assignment on ENI launch. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The IPv6-enabled VPC.
vpcPlacement
Required
public readonly vpcPlacement: SelectedSubnets;
- Type: aws-cdk-lib.aws_ec2.SelectedSubnets
The chosen subnets for address assignment on ENI launch.
BaseDatabase
- Implements: IDatabase
A database.
Initializers
import { BaseDatabase } from 'shady-island'
new BaseDatabase(scope: IConstruct, id: string, props: BaseDatabaseProps)
Name | Type | Description |
---|---|---|
scope |
constructs.IConstruct |
- The Construct that contains this one. |
id |
string |
- The identifier of this construct. |
props |
BaseDatabaseProps |
- The configuration properties for this construct. |
scope
Required
- Type: constructs.IConstruct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
props
Required
- Type: BaseDatabaseProps
The configuration properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addUserAsOwner |
Declares a new database user to be assigned ownership permissions. |
addUserAsReader |
Declares a new database user to be assigned read-only permissions. |
addUserAsUnprivileged |
Declares a new database user with no permissions. |
toString
public toString(): string
Returns a string representation of this construct.
addUserAsOwner
public addUserAsOwner(secret: ISecret): void
Declares a new database user to be assigned ownership permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
addUserAsReader
public addUserAsReader(secret: ISecret): void
Declares a new database user to be assigned read-only permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
addUserAsUnprivileged
public addUserAsUnprivileged(secret: ISecret): void
Declares a new database user with no permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { BaseDatabase } from 'shady-island'
BaseDatabase.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
databaseName |
string |
The name of the database/catalog. |
endpoint |
aws-cdk-lib.aws_rds.Endpoint |
The cluster or instance endpoint. |
trigger |
aws-cdk-lib.triggers.ITrigger |
The CDK Trigger that kicks off the process. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog.
endpoint
Required
public readonly endpoint: Endpoint;
- Type: aws-cdk-lib.aws_rds.Endpoint
The cluster or instance endpoint.
trigger
Required
public readonly trigger: ITrigger;
- Type: aws-cdk-lib.triggers.ITrigger
The CDK Trigger that kicks off the process.
You can further customize when the trigger fires using executeAfter
.
CidrContext
- Implements: ICidrContext
Allocates IPv6 CIDRs and routes for subnets in a VPC.
Initializers
import { CidrContext } from 'shady-island'
new CidrContext(scope: Construct, id: string, options: CidrContextProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- The construct scope. |
id |
string |
- The construct ID. |
options |
CidrContextProps |
- The constructor options. |
scope
Required
- Type: constructs.Construct
The construct scope.
id
Required
- Type: string
The construct ID.
options
Required
- Type: CidrContextProps
The constructor options.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { CidrContext } from 'shady-island'
CidrContext.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The IPv6-enabled VPC. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The IPv6-enabled VPC.
ContextLoadingStage
A Stage that can load context values from a JSON file.
Initializers
import { ContextLoadingStage } from 'shady-island'
new ContextLoadingStage(scope: Construct, id: string, props: ContextLoadingStageProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- The scope in which to define this construct. |
id |
string |
- The scoped construct ID. |
props |
ContextLoadingStageProps |
- Initialization properties for this construct. |
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
id
Required
- Type: string
The scoped construct ID.
props
Required
- Type: ContextLoadingStageProps
Initialization properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synth |
Synthesize this stage into a cloud assembly. |
toString
public toString(): string
Returns a string representation of this construct.
synth
public synth(options?: StageSynthesisOptions): CloudAssembly
Synthesize this stage into a cloud assembly.
Once an assembly has been synthesized, it cannot be modified. Subsequent calls will return the same assembly.
options
Optional
- Type: aws-cdk-lib.StageSynthesisOptions
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isStage |
Test whether the given construct is a stage. |
of |
Return the stage this construct is contained with, if available. |
isConstruct
isConstruct
import { ContextLoadingStage } from 'shady-island'
ContextLoadingStage.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
isStage
import { ContextLoadingStage } from 'shady-island'
ContextLoadingStage.isStage(x: any)
Test whether the given construct is a stage.
x
Required
- Type: any
of
import { ContextLoadingStage } from 'shady-island'
ContextLoadingStage.of(construct: IConstruct)
Return the stage this construct is contained with, if available.
If called on a nested stage, returns its parent.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
artifactId |
string |
Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string. |
assetOutdir |
string |
The cloud assembly asset output directory. |
outdir |
string |
The cloud assembly output directory. |
policyValidationBeta1 |
aws-cdk-lib.IPolicyValidationPluginBeta1[] |
Validation plugins to run during synthesis. |
stageName |
string |
The name of the stage. |
account |
string |
The default account for all resources defined within this stage. |
parentStage |
aws-cdk-lib.Stage |
The parent stage or undefined if this is the app. |
region |
string |
The default region for all resources defined within this stage. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
artifactId
Required
public readonly artifactId: string;
- Type: string
Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string.
Derived from the construct path.
assetOutdir
Required
public readonly assetOutdir: string;
- Type: string
The cloud assembly asset output directory.
outdir
Required
public readonly outdir: string;
- Type: string
The cloud assembly output directory.
policyValidationBeta1
Required
public readonly policyValidationBeta1: IPolicyValidationPluginBeta1[];
- Type: aws-cdk-lib.IPolicyValidationPluginBeta1[]
- Default: no validation plugins are used
Validation plugins to run during synthesis.
If any plugin reports any violation, synthesis will be interrupted and the report displayed to the user.
stageName
Required
public readonly stageName: string;
- Type: string
The name of the stage.
Based on names of the parent stages separated by hypens.
account
Optional
public readonly account: string;
- Type: string
The default account for all resources defined within this stage.
parentStage
Optional
public readonly parentStage: Stage;
- Type: aws-cdk-lib.Stage
The parent stage or undefined
if this is the app.
*
region
Optional
public readonly region: string;
- Type: string
The default region for all resources defined within this stage.
DeploymentTierStage
A Stage whose stacks are part of a single deployment tier.
Initializers
import { DeploymentTierStage } from 'shady-island'
new DeploymentTierStage(scope: Construct, id: string, props: DeploymentTierStageProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- The scope in which to define this construct. |
id |
string |
- The scoped construct ID. |
props |
DeploymentTierStageProps |
- Initialization properties for this construct. |
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
id
Required
- Type: string
The scoped construct ID.
props
Required
- Type: DeploymentTierStageProps
Initialization properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synth |
Synthesize this stage into a cloud assembly. |
toString
public toString(): string
Returns a string representation of this construct.
synth
public synth(options?: StageSynthesisOptions): CloudAssembly
Synthesize this stage into a cloud assembly.
Once an assembly has been synthesized, it cannot be modified. Subsequent calls will return the same assembly.
options
Optional
- Type: aws-cdk-lib.StageSynthesisOptions
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isStage |
Test whether the given construct is a stage. |
of |
Return the stage this construct is contained with, if available. |
isConstruct
isConstruct
import { DeploymentTierStage } from 'shady-island'
DeploymentTierStage.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
isStage
import { DeploymentTierStage } from 'shady-island'
DeploymentTierStage.isStage(x: any)
Test whether the given construct is a stage.
x
Required
- Type: any
of
import { DeploymentTierStage } from 'shady-island'
DeploymentTierStage.of(construct: IConstruct)
Return the stage this construct is contained with, if available.
If called on a nested stage, returns its parent.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
artifactId |
string |
Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string. |
assetOutdir |
string |
The cloud assembly asset output directory. |
outdir |
string |
The cloud assembly output directory. |
policyValidationBeta1 |
aws-cdk-lib.IPolicyValidationPluginBeta1[] |
Validation plugins to run during synthesis. |
stageName |
string |
The name of the stage. |
account |
string |
The default account for all resources defined within this stage. |
parentStage |
aws-cdk-lib.Stage |
The parent stage or undefined if this is the app. |
region |
string |
The default region for all resources defined within this stage. |
inProduction |
boolean |
Whether this stage is considered a production deployment. |
tier |
Tier |
No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
artifactId
Required
public readonly artifactId: string;
- Type: string
Artifact ID of the assembly if it is a nested stage. The root stage (app) will return an empty string.
Derived from the construct path.
assetOutdir
Required
public readonly assetOutdir: string;
- Type: string
The cloud assembly asset output directory.
outdir
Required
public readonly outdir: string;
- Type: string
The cloud assembly output directory.
policyValidationBeta1
Required
public readonly policyValidationBeta1: IPolicyValidationPluginBeta1[];
- Type: aws-cdk-lib.IPolicyValidationPluginBeta1[]
- Default: no validation plugins are used
Validation plugins to run during synthesis.
If any plugin reports any violation, synthesis will be interrupted and the report displayed to the user.
stageName
Required
public readonly stageName: string;
- Type: string
The name of the stage.
Based on names of the parent stages separated by hypens.
account
Optional
public readonly account: string;
- Type: string
The default account for all resources defined within this stage.
parentStage
Optional
public readonly parentStage: Stage;
- Type: aws-cdk-lib.Stage
The parent stage or undefined
if this is the app.
*
region
Optional
public readonly region: string;
- Type: string
The default region for all resources defined within this stage.
inProduction
Required
public readonly inProduction: boolean;
- Type: boolean
Whether this stage is considered a production deployment.
tier
Required
public readonly tier: Tier;
- Type: Tier
EncryptedFileSystem
- Implements: IEncryptedFileSystem
An EncryptedFileSystem.
Initializers
import { EncryptedFileSystem } from 'shady-island'
new EncryptedFileSystem(scope: IConstruct, id: string, props: EncryptedFileSystemProps)
Name | Type | Description |
---|---|---|
scope |
constructs.IConstruct |
- The Construct that contains this one. |
id |
string |
- The identifier of this construct. |
props |
EncryptedFileSystemProps |
- The configuration properties for this construct. |
scope
Required
- Type: constructs.IConstruct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
props
Required
- Type: EncryptedFileSystemProps
The configuration properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { EncryptedFileSystem } from 'shady-island'
EncryptedFileSystem.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
fileSystem |
aws-cdk-lib.aws_efs.IFileSystem |
The EFS file system. |
key |
aws-cdk-lib.aws_kms.IKey |
The KMS encryption key. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
fileSystem
Required
public readonly fileSystem: IFileSystem;
- Type: aws-cdk-lib.aws_efs.IFileSystem
The EFS file system.
key
Required
public readonly key: IKey;
- Type: aws-cdk-lib.aws_kms.IKey
The KMS encryption key.
EncryptedLogGroup
- Implements: IEncryptedLogGroup
A log group encrypted by a KMS customer managed key.
Initializers
import { EncryptedLogGroup } from 'shady-island'
new EncryptedLogGroup(scope: Construct, id: string, props: EncryptedLogGroupProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
EncryptedLogGroupProps |
No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Required
- Type: EncryptedLogGroupProps
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { EncryptedLogGroup } from 'shady-island'
EncryptedLogGroup.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
key |
aws-cdk-lib.aws_kms.IKey |
The KMS encryption key. |
logGroup |
aws-cdk-lib.aws_logs.ILogGroup |
The log group. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
key
Required
public readonly key: IKey;
- Type: aws-cdk-lib.aws_kms.IKey
The KMS encryption key.
logGroup
Required
public readonly logGroup: ILogGroup;
- Type: aws-cdk-lib.aws_logs.ILogGroup
The log group.
FargateTask
- Implements: IFargateTask
An ECS Fargate Task.
If vpcSubnets
is blank but assignPublicIp
is set, the task will launch
in Public subnets, otherwise the first available one of Private, Isolated,
Public, in that order.
Initializers
import { FargateTask } from 'shady-island'
new FargateTask(scope: Construct, id: string, props: FargateTaskProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
FargateTaskProps |
No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Required
- Type: FargateTaskProps
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
createRuleTarget |
Create a new EventBridge Rule Target that launches this ECS task. |
createStateMachineTask |
Create a new Step Functions task that launches this ECS task. |
grantRun |
Grants permission to invoke ecs:RunTask on this task’s cluster. |
toString
public toString(): string
Returns a string representation of this construct.
createRuleTarget
public createRuleTarget(props: EventTargetProps): EcsTask
Create a new EventBridge Rule Target that launches this ECS task.
props
Required
- Type: EventTargetProps
createStateMachineTask
public createStateMachineTask(id: string, props: StateMachineTaskProps): EcsRunTask
Create a new Step Functions task that launches this ECS task.
id
Required
- Type: string
props
Required
- Type: StateMachineTaskProps
grantRun
public grantRun(grantee: IGrantable): Grant
Grants permission to invoke ecs:RunTask on this task’s cluster.
grantee
Required
- Type: aws-cdk-lib.aws_iam.IGrantable
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { FargateTask } from 'shady-island'
FargateTask.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
awsVpcNetworkConfig |
FargateAwsVpcConfiguration |
Get the networkConfiguration.awsvpcConfiguration property to run this task. |
cluster |
aws-cdk-lib.aws_ecs.ICluster |
The name of the cluster that hosts the service. |
connections |
aws-cdk-lib.aws_ec2.Connections |
The network connections associated with this resource. |
taskDefinition |
aws-cdk-lib.aws_ecs.FargateTaskDefinition |
The task definition that can be launched. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
awsVpcNetworkConfig
Required
public readonly awsVpcNetworkConfig: FargateAwsVpcConfiguration;
Get the networkConfiguration.awsvpcConfiguration property to run this task.
cluster
Required
public readonly cluster: ICluster;
- Type: aws-cdk-lib.aws_ecs.ICluster
The name of the cluster that hosts the service.
connections
Required
public readonly connections: Connections;
- Type: aws-cdk-lib.aws_ec2.Connections
The network connections associated with this resource.
taskDefinition
Required
public readonly taskDefinition: FargateTaskDefinition;
- Type: aws-cdk-lib.aws_ecs.FargateTaskDefinition
The task definition that can be launched.
MysqlDatabase
A MySQL database.
Initializers
import { MysqlDatabase } from 'shady-island'
new MysqlDatabase(scope: IConstruct, id: string, props: MysqlDatabaseProps)
Name | Type | Description |
---|---|---|
scope |
constructs.IConstruct |
- The Construct that contains this one. |
id |
string |
- The identifier of this construct. |
props |
MysqlDatabaseProps |
- The configuration properties for this construct. |
scope
Required
- Type: constructs.IConstruct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
props
Required
- Type: MysqlDatabaseProps
The configuration properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addUserAsOwner |
Declares a new database user to be assigned ownership permissions. |
addUserAsReader |
Declares a new database user to be assigned read-only permissions. |
addUserAsUnprivileged |
Declares a new database user with no permissions. |
toString
public toString(): string
Returns a string representation of this construct.
addUserAsOwner
public addUserAsOwner(secret: ISecret): void
Declares a new database user to be assigned ownership permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
addUserAsReader
public addUserAsReader(secret: ISecret): void
Declares a new database user to be assigned read-only permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
addUserAsUnprivileged
public addUserAsUnprivileged(secret: ISecret): void
Declares a new database user with no permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
forCluster |
Create a new MysqlDatabase inside a DatabaseCluster. |
forClusterFromSnapshot |
Create a new MysqlDatabase inside a DatabaseClusterFromSnapshot. |
forInstance |
Create a new MysqlDatabase inside a DatabaseInstance. |
forInstanceFromSnapshot |
Create a new MysqlDatabase inside a DatabaseInstanceFromSnapshot. |
forServerlessCluster |
Create a new MysqlDatabase inside a DatabaseCluster. |
forServerlessClusterFromSnapshot |
Create a new MysqlDatabase inside a DatabaseClusterFromSnapshot. |
isConstruct
isConstruct
import { MysqlDatabase } from 'shady-island'
MysqlDatabase.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
forCluster
import { MysqlDatabase } from 'shady-island'
MysqlDatabase.forCluster(scope: Construct, id: string, cluster: DatabaseCluster, options: MysqlDatabaseForClusterOptions)
Create a new MysqlDatabase inside a DatabaseCluster.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.DatabaseCluster
The database cluster construct.
options
Required
The configuration properties for this construct.
forClusterFromSnapshot
import { MysqlDatabase } from 'shady-island'
MysqlDatabase.forClusterFromSnapshot(scope: Construct, id: string, cluster: DatabaseClusterFromSnapshot, options: MysqlDatabaseForClusterOptions)
Create a new MysqlDatabase inside a DatabaseClusterFromSnapshot.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.DatabaseClusterFromSnapshot
The database cluster construct.
options
Required
The configuration properties for this construct.
forInstance
import { MysqlDatabase } from 'shady-island'
MysqlDatabase.forInstance(scope: Construct, id: string, instance: DatabaseInstance, options: MysqlDatabaseForClusterOptions)
Create a new MysqlDatabase inside a DatabaseInstance.
This method automatically adds the instance to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
instance
Required
- Type: aws-cdk-lib.aws_rds.DatabaseInstance
The database cluster construct.
options
Required
The configuration properties for this construct.
forInstanceFromSnapshot
import { MysqlDatabase } from 'shady-island'
MysqlDatabase.forInstanceFromSnapshot(scope: Construct, id: string, instance: DatabaseInstanceFromSnapshot, options: MysqlDatabaseForClusterOptions)
Create a new MysqlDatabase inside a DatabaseInstanceFromSnapshot.
This method automatically adds the instance to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
instance
Required
- Type: aws-cdk-lib.aws_rds.DatabaseInstanceFromSnapshot
The database cluster construct.
options
Required
The configuration properties for this construct.
forServerlessCluster
import { MysqlDatabase } from 'shady-island'
MysqlDatabase.forServerlessCluster(scope: Construct, id: string, cluster: ServerlessCluster, options: MysqlDatabaseForServerlessClusterOptions)
Create a new MysqlDatabase inside a DatabaseCluster.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.ServerlessCluster
The database cluster construct.
options
Required
The configuration properties for this construct.
forServerlessClusterFromSnapshot
import { MysqlDatabase } from 'shady-island'
MysqlDatabase.forServerlessClusterFromSnapshot(scope: Construct, id: string, cluster: ServerlessClusterFromSnapshot, options: MysqlDatabaseForServerlessClusterOptions)
Create a new MysqlDatabase inside a DatabaseClusterFromSnapshot.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.ServerlessClusterFromSnapshot
The database cluster construct.
options
Required
The configuration properties for this construct.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
databaseName |
string |
The name of the database/catalog. |
endpoint |
aws-cdk-lib.aws_rds.Endpoint |
The cluster or instance endpoint. |
trigger |
aws-cdk-lib.triggers.ITrigger |
The CDK Trigger that kicks off the process. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog.
endpoint
Required
public readonly endpoint: Endpoint;
- Type: aws-cdk-lib.aws_rds.Endpoint
The cluster or instance endpoint.
trigger
Required
public readonly trigger: ITrigger;
- Type: aws-cdk-lib.triggers.ITrigger
The CDK Trigger that kicks off the process.
You can further customize when the trigger fires using executeAfter
.
PostgresqlDatabase
A PostgreSQL database.
Initializers
import { PostgresqlDatabase } from 'shady-island'
new PostgresqlDatabase(scope: IConstruct, id: string, props: PostgresqlDatabaseProps)
Name | Type | Description |
---|---|---|
scope |
constructs.IConstruct |
- The Construct that contains this one. |
id |
string |
- The identifier of this construct. |
props |
PostgresqlDatabaseProps |
- The configuration properties for this construct. |
scope
Required
- Type: constructs.IConstruct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
props
Required
- Type: PostgresqlDatabaseProps
The configuration properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addUserAsOwner |
Declares a new database user to be assigned ownership permissions. |
addUserAsReader |
Declares a new database user to be assigned read-only permissions. |
addUserAsUnprivileged |
Declares a new database user with no permissions. |
toString
public toString(): string
Returns a string representation of this construct.
addUserAsOwner
public addUserAsOwner(secret: ISecret): void
Declares a new database user to be assigned ownership permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
addUserAsReader
public addUserAsReader(secret: ISecret): void
Declares a new database user to be assigned read-only permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
addUserAsUnprivileged
public addUserAsUnprivileged(secret: ISecret): void
Declares a new database user with no permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
forCluster |
Create a new PostgresqlDatabase inside a DatabaseCluster. |
forClusterFromSnapshot |
Create a new PostgresqlDatabase inside a DatabaseClusterFromSnapshot. |
forInstance |
Create a new PostgresqlDatabase inside a DatabaseInstance. |
forInstanceFromSnapshot |
Create a new PostgresqlDatabase inside a DatabaseInstanceFromSnapshot. |
forServerlessCluster |
Create a new PostgresqlDatabase inside a DatabaseCluster. |
forServerlessClusterFromSnapshot |
Create a new PostgresqlDatabase inside a DatabaseClusterFromSnapshot. |
isConstruct
isConstruct
import { PostgresqlDatabase } from 'shady-island'
PostgresqlDatabase.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
forCluster
import { PostgresqlDatabase } from 'shady-island'
PostgresqlDatabase.forCluster(scope: Construct, id: string, cluster: DatabaseCluster, options: PostgresqlDatabaseForClusterOptions)
Create a new PostgresqlDatabase inside a DatabaseCluster.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.DatabaseCluster
The database cluster construct.
options
Required
The configuration properties for this construct.
forClusterFromSnapshot
import { PostgresqlDatabase } from 'shady-island'
PostgresqlDatabase.forClusterFromSnapshot(scope: Construct, id: string, cluster: DatabaseClusterFromSnapshot, options: PostgresqlDatabaseForClusterOptions)
Create a new PostgresqlDatabase inside a DatabaseClusterFromSnapshot.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.DatabaseClusterFromSnapshot
The database cluster construct.
options
Required
The configuration properties for this construct.
forInstance
import { PostgresqlDatabase } from 'shady-island'
PostgresqlDatabase.forInstance(scope: Construct, id: string, instance: DatabaseInstance, options: PostgresqlDatabaseForClusterOptions)
Create a new PostgresqlDatabase inside a DatabaseInstance.
This method automatically adds the instance to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
instance
Required
- Type: aws-cdk-lib.aws_rds.DatabaseInstance
The database cluster construct.
options
Required
The configuration properties for this construct.
forInstanceFromSnapshot
import { PostgresqlDatabase } from 'shady-island'
PostgresqlDatabase.forInstanceFromSnapshot(scope: Construct, id: string, instance: DatabaseInstanceFromSnapshot, options: PostgresqlDatabaseForClusterOptions)
Create a new PostgresqlDatabase inside a DatabaseInstanceFromSnapshot.
This method automatically adds the instance to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
instance
Required
- Type: aws-cdk-lib.aws_rds.DatabaseInstanceFromSnapshot
The database cluster construct.
options
Required
The configuration properties for this construct.
forServerlessCluster
import { PostgresqlDatabase } from 'shady-island'
PostgresqlDatabase.forServerlessCluster(scope: Construct, id: string, cluster: ServerlessCluster, options: PostgresqlDatabaseForServerlessClusterOptions)
Create a new PostgresqlDatabase inside a DatabaseCluster.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.ServerlessCluster
The database cluster construct.
options
Required
The configuration properties for this construct.
forServerlessClusterFromSnapshot
import { PostgresqlDatabase } from 'shady-island'
PostgresqlDatabase.forServerlessClusterFromSnapshot(scope: Construct, id: string, cluster: ServerlessClusterFromSnapshot, options: PostgresqlDatabaseForServerlessClusterOptions)
Create a new PostgresqlDatabase inside a DatabaseClusterFromSnapshot.
This method automatically adds the cluster to the CloudFormation dependencies of the CDK Trigger.
scope
Required
- Type: constructs.Construct
The Construct that contains this one.
id
Required
- Type: string
The identifier of this construct.
cluster
Required
- Type: aws-cdk-lib.aws_rds.ServerlessClusterFromSnapshot
The database cluster construct.
options
Required
The configuration properties for this construct.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
databaseName |
string |
The name of the database/catalog. |
endpoint |
aws-cdk-lib.aws_rds.Endpoint |
The cluster or instance endpoint. |
trigger |
aws-cdk-lib.triggers.ITrigger |
The CDK Trigger that kicks off the process. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog.
endpoint
Required
public readonly endpoint: Endpoint;
- Type: aws-cdk-lib.aws_rds.Endpoint
The cluster or instance endpoint.
trigger
Required
public readonly trigger: ITrigger;
- Type: aws-cdk-lib.triggers.ITrigger
The CDK Trigger that kicks off the process.
You can further customize when the trigger fires using executeAfter
.
RunnableFargateTask
- Implements: IRunnableFargateTask
An RunnableFargateTask construct.
Initializers
import { RunnableFargateTask } from 'shady-island'
new RunnableFargateTask(scope: Construct, id: string, props: RunnableFargateTaskProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- The scope in which to define this construct. |
id |
string |
- The scoped construct ID. |
props |
RunnableFargateTaskProps |
- Initialization properties for this construct. |
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
id
Required
- Type: string
The scoped construct ID.
props
Required
- Type: RunnableFargateTaskProps
Initialization properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { RunnableFargateTask } from 'shady-island'
RunnableFargateTask.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
task |
IFargateTask |
The FargateTask in this construct. |
taskDefinition |
aws-cdk-lib.aws_ecs.FargateTaskDefinition |
The FargateTaskDefinition in this construct. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
task
Required
public readonly task: IFargateTask;
- Type: IFargateTask
The FargateTask in this construct.
taskDefinition
Required
public readonly taskDefinition: FargateTaskDefinition;
- Type: aws-cdk-lib.aws_ecs.FargateTaskDefinition
The FargateTaskDefinition in this construct.
Workload
A collection of Stacks in an Environment representing a deployment Tier.
Consider deriving a subclass of Workload
and creating your Stack
objects
within its constructor.
The difference between this class and a Stage
is that a Stage
is meant to
be deployed with CDK Pipelines. This class can be used with cdk deploy
.
This class also provides context loading capabilities.
It is an anti-pattern to provide a Workload
instance as the parent scope to
the aws-cdk-lib.Stack
constructor. You should either use the
createStack()
method, create your own sub-class of Stack
and provide a
Workload
instance as the parent scope, or use the import()
method to
essentially import a Stack
and its constructs into a Workload
without
changing its scope.
Initializers
import { Workload } from 'shady-island'
new Workload(scope: Construct, id: string, props: WorkloadProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- The construct scope. |
id |
string |
- The construct ID. |
props |
WorkloadProps |
- The constructor options. |
scope
Required
- Type: constructs.Construct
The construct scope.
id
Required
- Type: string
The construct ID.
props
Required
- Type: WorkloadProps
The constructor options.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
createStack |
Adds a stack to the Workload. |
import |
Forces a return value for Workload.of for one or more Stack objects. |
toString
public toString(): string
Returns a string representation of this construct.
createStack
public createStack(id: string, props?: StackProps): Stack
Adds a stack to the Workload.
This method will return a Stack
with this Workload as its scope. By
default, the stackName
property provided to the Stack
will be this
Workload’s workloadName
, its tier
, and the value of the id
parameter separated by hyphens, all in lowercase.
Example
const exampleDev = new Workload(app, 'Example', {
tier: Tier.DEVELOPMENT,
env: { account: '123456789012', region: 'us-east-1' },
});
const networkStack = exampleDev.createStack('Network', {});
assert.strictEqual(networkStack.stackName, 'example-dev-network').
You can override the `env` and `stackName` properties in the `props`
argument if desired.
The stack will have a `DeploymentTier` tag added, set to the tier label.
id
Required
- Type: string
The Stack construct id (e.g. “Network”).
props
Optional
- Type: aws-cdk-lib.StackProps
The new Stack properties.
import
public import(stacks: ...Stack[]): void
Forces a return value for Workload.of
for one or more Stack
objects.
Normally, a construct must be within the scope of the Workload
instance,
such as a construct that is a descendant of a Stack
returned from
createStack()
.
That means that any Stack
instances you created in your CDK application
before installing the shady-island
library would not be able to be part
of a Workload
unless you changed the scope
argument of the Stack
constructor from the App
or Stage
to the desired Workload
instance.
However, that’s bad news for a Stack
that has already been deployed to
CloudFormation because the resource identifier of persistent child
constructs (e.g. RDS databases, S3 buckets) would change.
A successful call to this method will register the provided Stack
objects
and all their construct descendants as members of that Workload
instance.
Calling Workload.of()
with any of the provided Stack
objects or their
descendant constructs will return that Workload
instance.
If any of the Stack
objects provided to this method already belong to a
different Workload
object, or whose parent scope is not identical to the
parent scope of this Workload
(i.e. the Stage
or the App
), an error
will be thrown.
stacks
Required
- Type: …aws-cdk-lib.Stack[]
The Stack
instances to import to this Workload
.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isWorkload |
Test whether the given construct is a Workload. |
of |
Return the Workload the construct is contained within, fails if there is no workload up the tree. |
isConstruct
isConstruct
import { Workload } from 'shady-island'
Workload.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
isWorkload
import { Workload } from 'shady-island'
Workload.isWorkload(x: any)
Test whether the given construct is a Workload.
x
Required
- Type: any
The value to test.
of
import { Workload } from 'shady-island'
Workload.of(construct: IConstruct)
Return the Workload the construct is contained within, fails if there is no workload up the tree.
construct
Required
- Type: constructs.IConstruct
The construct whose parent nodes will be searched.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
stacks |
aws-cdk-lib.Stack[] |
No description. |
tier |
Tier |
The deployment tier. |
workloadName |
string |
The prefix used in the default stackName provided to child Stacks. |
account |
string |
The default account for all resources defined within this workload. |
publicDomainName |
string |
The domain name to use for resources that expose public endpoints. |
region |
string |
The default region for all resources defined within this workload. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stacks
Required
public readonly stacks: Stack[];
- Type: aws-cdk-lib.Stack[]
tier
Required
public readonly tier: Tier;
- Type: Tier
The deployment tier.
workloadName
Required
public readonly workloadName: string;
- Type: string
The prefix used in the default stackName
provided to child Stacks.
account
Optional
public readonly account: string;
- Type: string
The default account for all resources defined within this workload.
publicDomainName
Optional
public readonly publicDomainName: string;
- Type: string
- Default: If
baseDomainName
was empty, this will beundefined
The domain name to use for resources that expose public endpoints.
You can use Workload.of(this).publicDomainName
as the zoneName
of a
Route 53 hosted zone.
Any construct that creates public DNS resources (e.g. those of API Gateway, Application Load Balancing, CloudFront) can use this property to format a FQDN for itself by adding a subdomain.
Example
const app = new App();
const workload = new Workload(app, "Foobar", {
tier: Tier.PRODUCTION,
baseDomainName: 'example.com'
});
assert.strictEqual(workload.publicDomainName, 'prod.foobar.example.com');
const stack = workload.createStack("DNS");
const hostedZone = new HostedZone(stack, "HostedZone", {
zoneName: `${workload.publicDomainName}`
});
const api = new RestApi(stack, "API", {
restApiName: "foobar",
domainName: { domainName: `api.${workload.publicDomainName}` },
});
region
Optional
public readonly region: string;
- Type: string
The default region for all resources defined within this workload.
Structs
AssignOnLaunchProps
Properties for creating a new {@link AssignOnLaunch}.
Initializer
import { AssignOnLaunchProps } from 'shady-island'
const assignOnLaunchProps: AssignOnLaunchProps = { ... }
Properties
Name | Type | Description |
---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC whose subnets will be configured. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
Which subnets to assign IPv6 addresses upon ENI creation. |
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC whose subnets will be configured.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
Which subnets to assign IPv6 addresses upon ENI creation.
BaseDatabaseOptions
These options cannot be determined from existing Database constructs.
Initializer
import { BaseDatabaseOptions } from 'shady-island'
const baseDatabaseOptions: BaseDatabaseOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
BaseDatabaseProps
The properties for a database.
Initializer
import { BaseDatabaseProps } from 'shady-island'
const baseDatabaseProps: BaseDatabaseProps = { ... }
Properties
Name | Type | Description |
---|---|---|
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
adminSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
A Secrets Manager secret that contains administrative credentials. |
endpoint |
aws-cdk-lib.aws_rds.Endpoint |
The cluster or instance endpoint. |
target |
aws-cdk-lib.aws_ec2.IConnectable |
The target service or database. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC where the Lambda function will run. |
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
adminSecret
Required
public readonly adminSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
A Secrets Manager secret that contains administrative credentials.
endpoint
Required
public readonly endpoint: Endpoint;
- Type: aws-cdk-lib.aws_rds.Endpoint
The cluster or instance endpoint.
target
Required
public readonly target: IConnectable;
- Type: aws-cdk-lib.aws_ec2.IConnectable
The target service or database.
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC where the Lambda function will run.
BaseFargateTaskProps
Common parameters for Fargate Tasks.
Initializer
import { BaseFargateTaskProps } from 'shady-island'
const baseFargateTaskProps: BaseFargateTaskProps = { ... }
Properties
Name | Type | Description |
---|---|---|
assignPublicIp |
boolean |
Specifies whether the task’s elastic network interface receives a public IP address. |
securityGroups |
aws-cdk-lib.aws_ec2.ISecurityGroup[] |
Existing security groups to use for your task. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The subnets to associate with the task. |
assignPublicIp
Optional
public readonly assignPublicIp: boolean;
- Type: boolean
- Default: false
Specifies whether the task’s elastic network interface receives a public IP address.
If true, the task will receive a public IP address.
securityGroups
Optional
public readonly securityGroups: ISecurityGroup[];
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup[]
- Default: a new security group will be created.
Existing security groups to use for your task.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: Public subnets if
assignPublicIp
is set, otherwise the first available one of Private, Isolated, Public, in that order.
The subnets to associate with the task.
CidrContextProps
Properties for creating a new {@link CidrContext}.
Initializer
import { CidrContextProps } from 'shady-island'
const cidrContextProps: CidrContextProps = { ... }
Properties
Name | Type | Description |
---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC whose subnets will be configured. |
addressPool |
string |
The ID of a BYOIP IPv6 address pool from which to allocate the CIDR block. |
assignAddressOnLaunch |
boolean |
Whether this VPC should auto-assign an IPv6 address to launched ENIs. |
cidrBlock |
string |
An IPv6 CIDR block from the IPv6 address pool to use for this VPC. |
cidrCount |
number |
Split the CIDRs into this many groups (by default one for each subnet). |
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC whose subnets will be configured.
addressPool
Optional
public readonly addressPool: string;
- Type: string
The ID of a BYOIP IPv6 address pool from which to allocate the CIDR block.
If this parameter is not specified or is undefined, the CIDR block will be provided by AWS.
assignAddressOnLaunch
Optional
assignAddressOnLaunch
- Deprecated: - Launch templates now support specifying IPv6 addresses
public readonly assignAddressOnLaunch: boolean;
- Type: boolean
Whether this VPC should auto-assign an IPv6 address to launched ENIs.
True by default.
cidrBlock
Optional
public readonly cidrBlock: string;
- Type: string
An IPv6 CIDR block from the IPv6 address pool to use for this VPC.
The {@link EnableIpv6Props#addressPool } attribute is required if this parameter is specified.
cidrCount
Optional
public readonly cidrCount: number;
- Type: number
Split the CIDRs into this many groups (by default one for each subnet).
ContextLoadingStageProps
Constructor properties for ContextLoadingStage.
Initializer
import { ContextLoadingStageProps } from 'shady-island'
const contextLoadingStageProps: ContextLoadingStageProps = { ... }
Properties
Name | Type | Description |
---|---|---|
env |
aws-cdk-lib.Environment |
Default AWS environment (account/region) for Stack s in this Stage . |
outdir |
string |
The output directory into which to emit synthesized artifacts. |
permissionsBoundary |
aws-cdk-lib.PermissionsBoundary |
Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. |
policyValidationBeta1 |
aws-cdk-lib.IPolicyValidationPluginBeta1[] |
Validation plugins to run during synthesis. |
stageName |
string |
Name of this stage. |
contextFile |
string |
The filesystem path to a JSON file that contains context values to load. |
env
Optional
public readonly env: Environment;
- Type: aws-cdk-lib.Environment
- Default: The environments should be configured on the
Stack
s.
Default AWS environment (account/region) for Stack
s in this Stage
.
Stacks defined inside this Stage
with either region
or account
missing
from its env will use the corresponding field given here.
If either region
or account
is is not configured for Stack
(either on
the Stack
itself or on the containing Stage
), the Stack will be
environment-agnostic.
Environment-agnostic stacks can be deployed to any environment, may not be able to take advantage of all features of the CDK. For example, they will not be able to use environmental context lookups, will not automatically translate Service Principals to the right format based on the environment’s AWS partition, and other such enhancements.
Example
// Use a concrete account and region to deploy this Stage to
new Stage(app, 'Stage1', {
env: { account: '123456789012', region: 'us-east-1' },
});
// Use the CLI's current credentials to determine the target environment
new Stage(app, 'Stage2', {
env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },
});
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: for nested stages, outdir will be determined as a relative directory to the outdir of the app. For apps, if outdir is not specified, a temporary directory will be created.
The output directory into which to emit synthesized artifacts.
Can only be specified if this stage is the root stage (the app). If this is specified and this stage is nested within another stage, an error will be thrown.
permissionsBoundary
Optional
public readonly permissionsBoundary: PermissionsBoundary;
- Type: aws-cdk-lib.PermissionsBoundary
- Default: no permissions boundary is applied
Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
policyValidationBeta1
Optional
public readonly policyValidationBeta1: IPolicyValidationPluginBeta1[];
- Type: aws-cdk-lib.IPolicyValidationPluginBeta1[]
- Default: no validation plugins are used
Validation plugins to run during synthesis.
If any plugin reports any violation, synthesis will be interrupted and the report displayed to the user.
stageName
Optional
public readonly stageName: string;
- Type: string
- Default: Derived from the id.
Name of this stage.
contextFile
Optional
public readonly contextFile: string;
- Type: string
The filesystem path to a JSON file that contains context values to load.
Using this property allows you to load different context values within each Stage, directly from a file you can check into source control.
DeploymentTierStageProps
Constructor properties for DeploymentTierStage.
Initializer
import { DeploymentTierStageProps } from 'shady-island'
const deploymentTierStageProps: DeploymentTierStageProps = { ... }
Properties
Name | Type | Description |
---|---|---|
env |
aws-cdk-lib.Environment |
Default AWS environment (account/region) for Stack s in this Stage . |
outdir |
string |
The output directory into which to emit synthesized artifacts. |
permissionsBoundary |
aws-cdk-lib.PermissionsBoundary |
Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. |
policyValidationBeta1 |
aws-cdk-lib.IPolicyValidationPluginBeta1[] |
Validation plugins to run during synthesis. |
stageName |
string |
Name of this stage. |
contextFile |
string |
The filesystem path to a JSON file that contains context values to load. |
tier |
Tier |
The deployment tier. |
addTag |
boolean |
Whether a DeploymentTier tag is added to nested constructs. |
env
Optional
public readonly env: Environment;
- Type: aws-cdk-lib.Environment
- Default: The environments should be configured on the
Stack
s.
Default AWS environment (account/region) for Stack
s in this Stage
.
Stacks defined inside this Stage
with either region
or account
missing
from its env will use the corresponding field given here.
If either region
or account
is is not configured for Stack
(either on
the Stack
itself or on the containing Stage
), the Stack will be
environment-agnostic.
Environment-agnostic stacks can be deployed to any environment, may not be able to take advantage of all features of the CDK. For example, they will not be able to use environmental context lookups, will not automatically translate Service Principals to the right format based on the environment’s AWS partition, and other such enhancements.
Example
// Use a concrete account and region to deploy this Stage to
new Stage(app, 'Stage1', {
env: { account: '123456789012', region: 'us-east-1' },
});
// Use the CLI's current credentials to determine the target environment
new Stage(app, 'Stage2', {
env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },
});
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: for nested stages, outdir will be determined as a relative directory to the outdir of the app. For apps, if outdir is not specified, a temporary directory will be created.
The output directory into which to emit synthesized artifacts.
Can only be specified if this stage is the root stage (the app). If this is specified and this stage is nested within another stage, an error will be thrown.
permissionsBoundary
Optional
public readonly permissionsBoundary: PermissionsBoundary;
- Type: aws-cdk-lib.PermissionsBoundary
- Default: no permissions boundary is applied
Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
policyValidationBeta1
Optional
public readonly policyValidationBeta1: IPolicyValidationPluginBeta1[];
- Type: aws-cdk-lib.IPolicyValidationPluginBeta1[]
- Default: no validation plugins are used
Validation plugins to run during synthesis.
If any plugin reports any violation, synthesis will be interrupted and the report displayed to the user.
stageName
Optional
public readonly stageName: string;
- Type: string
- Default: Derived from the id.
Name of this stage.
contextFile
Optional
public readonly contextFile: string;
- Type: string
The filesystem path to a JSON file that contains context values to load.
Using this property allows you to load different context values within each Stage, directly from a file you can check into source control.
tier
Required
public readonly tier: Tier;
- Type: Tier
The deployment tier.
addTag
Optional
public readonly addTag: boolean;
- Type: boolean
- Default: true
Whether a DeploymentTier
tag is added to nested constructs.
EncryptedFileSystemProps
Constructor parameters for EncryptedFileSystem.
The encrypted
argument is ignored.
Initializer
import { EncryptedFileSystemProps } from 'shady-island'
const encryptedFileSystemProps: EncryptedFileSystemProps = { ... }
Properties
Name | Type | Description |
---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
VPC to launch the file system in. |
allowAnonymousAccess |
boolean |
Allow access from anonymous client that doesn’t use IAM authentication. |
enableAutomaticBackups |
boolean |
Whether to enable automatic backups for the file system. |
encrypted |
boolean |
Defines if the data at rest in the file system is encrypted or not. |
fileSystemName |
string |
The file system’s name. |
fileSystemPolicy |
aws-cdk-lib.aws_iam.PolicyDocument |
File system policy is an IAM resource policy used to control NFS access to an EFS file system. |
kmsKey |
aws-cdk-lib.aws_kms.IKey |
The KMS key used for encryption. |
lifecyclePolicy |
aws-cdk-lib.aws_efs.LifecyclePolicy |
A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class. |
oneZone |
boolean |
Whether this is a One Zone file system. |
outOfInfrequentAccessPolicy |
aws-cdk-lib.aws_efs.OutOfInfrequentAccessPolicy |
A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class. |
performanceMode |
aws-cdk-lib.aws_efs.PerformanceMode |
The performance mode that the file system will operate under. |
provisionedThroughputPerSecond |
aws-cdk-lib.Size |
Provisioned throughput for the file system. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
The removal policy to apply to the file system. |
replicationOverwriteProtection |
aws-cdk-lib.aws_efs.ReplicationOverwriteProtection |
Whether to enable the filesystem’s replication overwrite protection or not. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
Security Group to assign to this file system. |
throughputMode |
aws-cdk-lib.aws_efs.ThroughputMode |
Enum to mention the throughput mode of the file system. |
transitionToArchivePolicy |
aws-cdk-lib.aws_efs.LifecyclePolicy |
The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
Which subnets to place the mount target in the VPC. |
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
VPC to launch the file system in.
allowAnonymousAccess
Optional
public readonly allowAnonymousAccess: boolean;
- Type: boolean
- Default: false when using
grantRead
,grantWrite
,grantRootAccess
or set@aws-cdk/aws-efs:denyAnonymousAccess
feature flag, otherwise true
Allow access from anonymous client that doesn’t use IAM authentication.
enableAutomaticBackups
Optional
public readonly enableAutomaticBackups: boolean;
- Type: boolean
- Default: false
Whether to enable automatic backups for the file system.
encrypted
Optional
public readonly encrypted: boolean;
- Type: boolean
- Default: If your application has the ‘@aws-cdk/aws-efs:defaultEncryptionAtRest’ feature flag set, the default is true, otherwise, the default is false.
Defines if the data at rest in the file system is encrypted or not.
https://docs.aws.amazon.com/cdk/latest/guide/featureflags.html
fileSystemName
Optional
public readonly fileSystemName: string;
- Type: string
- Default: CDK generated name
The file system’s name.
fileSystemPolicy
Optional
public readonly fileSystemPolicy: PolicyDocument;
- Type: aws-cdk-lib.aws_iam.PolicyDocument
- Default: none
File system policy is an IAM resource policy used to control NFS access to an EFS file system.
kmsKey
Optional
public readonly kmsKey: IKey;
- Type: aws-cdk-lib.aws_kms.IKey
- Default: if ‘encrypted’ is true, the default key for EFS (/aws/elasticfilesystem) is used
The KMS key used for encryption.
This is required to encrypt the data at rest if
lifecyclePolicy
Optional
public readonly lifecyclePolicy: LifecyclePolicy;
- Type: aws-cdk-lib.aws_efs.LifecyclePolicy
- Default: None. EFS will not transition files to the IA storage class.
A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.
oneZone
Optional
public readonly oneZone: boolean;
- Type: boolean
- Default: false
Whether this is a One Zone file system.
If enabled, performanceMode
must be set to GENERAL_PURPOSE
and vpcSubnets
cannot be set.
https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html#file-system-type
outOfInfrequentAccessPolicy
Optional
public readonly outOfInfrequentAccessPolicy: OutOfInfrequentAccessPolicy;
- Type: aws-cdk-lib.aws_efs.OutOfInfrequentAccessPolicy
- Default: None. EFS will not transition files from IA storage to primary storage.
A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.
performanceMode
Optional
public readonly performanceMode: PerformanceMode;
- Type: aws-cdk-lib.aws_efs.PerformanceMode
- Default: PerformanceMode.GENERAL_PURPOSE
The performance mode that the file system will operate under.
An Amazon EFS file system’s performance mode can’t be changed after the file system has been created. Updating this property will replace the file system.
provisionedThroughputPerSecond
Optional
public readonly provisionedThroughputPerSecond: Size;
- Type: aws-cdk-lib.Size
- Default: none, errors out
Provisioned throughput for the file system.
This is a required property if the throughput mode is set to PROVISIONED. Must be at least 1MiB/s.
removalPolicy
Optional
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.RETAIN
The removal policy to apply to the file system.
replicationOverwriteProtection
Optional
public readonly replicationOverwriteProtection: ReplicationOverwriteProtection;
- Type: aws-cdk-lib.aws_efs.ReplicationOverwriteProtection
- Default: ReplicationOverwriteProtection.ENABLED
Whether to enable the filesystem’s replication overwrite protection or not.
Set false if you want to create a read-only filesystem for use as a replication destination.
https://docs.aws.amazon.com/efs/latest/ug/replication-use-cases.html#replicate-existing-destination
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: creates new security group which allows all outbound traffic
Security Group to assign to this file system.
throughputMode
Optional
public readonly throughputMode: ThroughputMode;
- Type: aws-cdk-lib.aws_efs.ThroughputMode
- Default: ThroughputMode.BURSTING
Enum to mention the throughput mode of the file system.
transitionToArchivePolicy
Optional
public readonly transitionToArchivePolicy: LifecyclePolicy;
- Type: aws-cdk-lib.aws_efs.LifecyclePolicy
- Default: None. EFS will not transition files to Archive storage class.
The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage.
Metadata operations such as listing the contents of a directory don’t count as file access events.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified
Which subnets to place the mount target in the VPC.
EncryptedLogGroupProps
Constructor properties for EncryptedLogGroup.
Initializer
import { EncryptedLogGroupProps } from 'shady-island'
const encryptedLogGroupProps: EncryptedLogGroupProps = { ... }
Properties
Name | Type | Description |
---|---|---|
logGroupName |
string |
Name of the log group. |
encryptionKey |
aws-cdk-lib.aws_kms.IKey |
The KMS Key to encrypt the log group with. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
Whether the key and group should be retained when they are removed from the Stack. |
retention |
aws-cdk-lib.aws_logs.RetentionDays |
How long, in days, the log contents will be retained. |
logGroupName
Required
public readonly logGroupName: string;
- Type: string
Name of the log group.
We need a log group name ahead of time because otherwise the key policy would create a cyclical dependency.
encryptionKey
Optional
public readonly encryptionKey: IKey;
- Type: aws-cdk-lib.aws_kms.IKey
- Default: A new KMS key will be created
The KMS Key to encrypt the log group with.
removalPolicy
Optional
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.RETAIN
Whether the key and group should be retained when they are removed from the Stack.
retention
Optional
public readonly retention: RetentionDays;
- Type: aws-cdk-lib.aws_logs.RetentionDays
- Default: RetentionDays.TWO_YEARS
How long, in days, the log contents will be retained.
EventTargetProps
Properties to create a new EventBridge Rule Target.
Initializer
import { EventTargetProps } from 'shady-island'
const eventTargetProps: EventTargetProps = { ... }
Properties
Name | Type | Description |
---|---|---|
deadLetterQueue |
aws-cdk-lib.aws_sqs.IQueue |
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue. |
maxEventAge |
aws-cdk-lib.Duration |
The maximum age of a request that Lambda sends to a function for processing. |
retryAttempts |
number |
The maximum number of times to retry when the function returns an error. |
containerOverrides |
aws-cdk-lib.aws_events_targets.ContainerOverride[] |
Container setting overrides. |
enableExecuteCommand |
boolean |
Whether or not to enable the execute command functionality for the containers in this task. |
launchType |
aws-cdk-lib.aws_ecs.LaunchType |
Specifies the launch type on which your task is running. |
propagateTags |
aws-cdk-lib.aws_ecs.PropagatedTagSource |
Specifies whether to propagate the tags from the task definition to the task. |
role |
aws-cdk-lib.aws_iam.IRole |
Existing IAM role to run the ECS task. |
tags |
aws-cdk-lib.aws_events_targets.Tag[] |
The metadata that you apply to the task to help you categorize and organize them. |
taskCount |
number |
How many tasks should be started when this event is triggered. |
deadLetterQueue
Optional
public readonly deadLetterQueue: IQueue;
- Type: aws-cdk-lib.aws_sqs.IQueue
- Default: no dead-letter queue
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
maxEventAge
Optional
public readonly maxEventAge: Duration;
- Type: aws-cdk-lib.Duration
- Default: Duration.hours(24)
The maximum age of a request that Lambda sends to a function for processing.
Minimum value of 60. Maximum value of 86400.
retryAttempts
Optional
public readonly retryAttempts: number;
- Type: number
- Default: 185
The maximum number of times to retry when the function returns an error.
Minimum value of 0. Maximum value of 185.
containerOverrides
Optional
public readonly containerOverrides: ContainerOverride[];
- Type: aws-cdk-lib.aws_events_targets.ContainerOverride[]
Container setting overrides.
Key is the name of the container to override, value is the values you want to override.
enableExecuteCommand
Optional
public readonly enableExecuteCommand: boolean;
- Type: boolean
- Default: false
Whether or not to enable the execute command functionality for the containers in this task.
If true, this enables execute command functionality on all containers in the task.
launchType
Optional
public readonly launchType: LaunchType;
- Type: aws-cdk-lib.aws_ecs.LaunchType
- Default: ‘EC2’ if
isEc2Compatible
for thetaskDefinition
is true, otherwise ‘FARGATE’
Specifies the launch type on which your task is running.
The launch type that you specify here must match one of the launch type (compatibilities) of the target task.
propagateTags
Optional
public readonly propagateTags: PropagatedTagSource;
- Type: aws-cdk-lib.aws_ecs.PropagatedTagSource
- Default: Tags will not be propagated
Specifies whether to propagate the tags from the task definition to the task.
If no value is specified, the tags are not propagated.
role
Optional
public readonly role: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
- Default: A new IAM role is created
Existing IAM role to run the ECS task.
tags
Optional
public readonly tags: Tag[];
- Type: aws-cdk-lib.aws_events_targets.Tag[]
- Default: No additional tags are applied to the task
The metadata that you apply to the task to help you categorize and organize them.
Each tag consists of a key and an optional value, both of which you define.
taskCount
Optional
public readonly taskCount: number;
- Type: number
- Default: 1
How many tasks should be started when this event is triggered.
FargateAwsVpcConfiguration
The networkConfiguration.awsvpcConfiguration
values for ecs.RunTask
.
Initializer
import { FargateAwsVpcConfiguration } from 'shady-island'
const fargateAwsVpcConfiguration: FargateAwsVpcConfiguration = { ... }
Properties
Name | Type | Description |
---|---|---|
assignPublicIp |
string |
Whether the task’s elastic network interface receives a public IP address. |
securityGroups |
string[] |
The IDs of the security groups associated with the task or service. |
subnets |
string[] |
The IDs of the subnets associated with the task or service. |
assignPublicIp
Optional
public readonly assignPublicIp: string;
- Type: string
Whether the task’s elastic network interface receives a public IP address.
The default value is DISABLED
.
securityGroups
Optional
public readonly securityGroups: string[];
- Type: string[]
The IDs of the security groups associated with the task or service.
If you don’t specify a security group, the default security group for the VPC is used. There’s a limit of 5 security groups that can be specified per AwsVpcConfiguration
.
All specified security groups must be from the same VPC.
subnets
Optional
public readonly subnets: string[];
- Type: string[]
The IDs of the subnets associated with the task or service.
There’s a limit of 16 subnets that can be specified per AwsVpcConfiguration
.
All specified subnets must be from the same VPC.
FargateTaskImageOptions
The properties for the FargateTask using an image.
Initializer
import { FargateTaskImageOptions } from 'shady-island'
const fargateTaskImageOptions: FargateTaskImageOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
image |
aws-cdk-lib.aws_ecs.ContainerImage |
The image used to start a container. |
command |
string[] |
The command that’s passed to the container. |
containerName |
string |
The container name value to be specified in the task definition. |
containerPort |
number |
The port number on the container that is bound to the user-specified or automatically assigned host port. |
dockerLabels |
{[ key: string ]: string} |
A key/value map of labels to add to the container. |
enableLogging |
boolean |
Flag to indicate whether to enable logging. |
entryPoint |
string[] |
The entry point that’s passed to the container. |
environment |
{[ key: string ]: string} |
The environment variables to pass to the container. |
executionRole |
aws-cdk-lib.aws_iam.IRole |
The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf. |
family |
string |
The name of a family that this task definition is registered to. |
logDriver |
aws-cdk-lib.aws_ecs.LogDriver |
The log driver to use. |
secrets |
{[ key: string ]: aws-cdk-lib.aws_ecs.Secret} |
The secret to expose to the container as an environment variable. |
taskRole |
aws-cdk-lib.aws_iam.IRole |
The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf. |
image
Required
public readonly image: ContainerImage;
- Type: aws-cdk-lib.aws_ecs.ContainerImage
- Default: none
The image used to start a container.
Image or taskDefinition must be specified, not both.
command
Optional
public readonly command: string[];
- Type: string[]
- Default: none
The command that’s passed to the container.
If there are multiple arguments, make sure that each argument is a separated string in the array.
This parameter maps to Cmd
in the Create a container section
of the Docker Remote API and the COMMAND
parameter to
docker run.
For more information about the Docker CMD
parameter, see https://docs.docker.com/engine/reference/builder/#cmd.
containerName
Optional
public readonly containerName: string;
- Type: string
- Default: none
The container name value to be specified in the task definition.
containerPort
Optional
public readonly containerPort: number;
- Type: number
- Default: 80
The port number on the container that is bound to the user-specified or automatically assigned host port.
If you are using containers in a task with the awsvpc or host network mode, exposed ports should be specified using containerPort. If you are using containers in a task with the bridge network mode and you specify a container port and not a host port, your container automatically receives a host port in the ephemeral port range.
Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
For more information, see hostPort.
dockerLabels
Optional
public readonly dockerLabels: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: No labels.
A key/value map of labels to add to the container.
enableLogging
Optional
public readonly enableLogging: boolean;
- Type: boolean
- Default: true
Flag to indicate whether to enable logging.
entryPoint
Optional
public readonly entryPoint: string[];
- Type: string[]
- Default: none
The entry point that’s passed to the container.
This parameter maps to Entrypoint
in the Create a container section
of the Docker Remote API and the --entrypoint
option to
docker run.
For more information about the Docker ENTRYPOINT
parameter, see https://docs.docker.com/engine/reference/builder/#entrypoint.
environment
Optional
public readonly environment: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: No environment variables.
The environment variables to pass to the container.
executionRole
Optional
public readonly executionRole: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
- Default: No value
The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
family
Optional
public readonly family: string;
- Type: string
- Default: Automatically generated name.
The name of a family that this task definition is registered to.
A family groups multiple versions of a task definition.
logDriver
Optional
public readonly logDriver: LogDriver;
- Type: aws-cdk-lib.aws_ecs.LogDriver
- Default: AwsLogDriver if enableLogging is true
The log driver to use.
secrets
Optional
public readonly secrets: {[ key: string ]: Secret};
- Type: {[ key: string ]: aws-cdk-lib.aws_ecs.Secret}
- Default: No secret environment variables.
The secret to expose to the container as an environment variable.
taskRole
Optional
public readonly taskRole: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
- Default: A task role is automatically created for you.
The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
FargateTaskProps
Constructor parameters for FargateTask.
Initializer
import { FargateTaskProps } from 'shady-island'
const fargateTaskProps: FargateTaskProps = { ... }
Properties
Name | Type | Description |
---|---|---|
assignPublicIp |
boolean |
Specifies whether the task’s elastic network interface receives a public IP address. |
securityGroups |
aws-cdk-lib.aws_ec2.ISecurityGroup[] |
Existing security groups to use for your task. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The subnets to associate with the task. |
cluster |
aws-cdk-lib.aws_ecs.ICluster |
The name of the cluster that hosts the service. |
taskDefinition |
aws-cdk-lib.aws_ecs.FargateTaskDefinition |
The task definition that can be launched. |
assignPublicIp
Optional
public readonly assignPublicIp: boolean;
- Type: boolean
- Default: false
Specifies whether the task’s elastic network interface receives a public IP address.
If true, the task will receive a public IP address.
securityGroups
Optional
public readonly securityGroups: ISecurityGroup[];
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup[]
- Default: a new security group will be created.
Existing security groups to use for your task.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: Public subnets if
assignPublicIp
is set, otherwise the first available one of Private, Isolated, Public, in that order.
The subnets to associate with the task.
cluster
Required
public readonly cluster: ICluster;
- Type: aws-cdk-lib.aws_ecs.ICluster
The name of the cluster that hosts the service.
taskDefinition
Required
public readonly taskDefinition: FargateTaskDefinition;
- Type: aws-cdk-lib.aws_ecs.FargateTaskDefinition
The task definition that can be launched.
MysqlDatabaseForClusterOptions
Properties to specify when using MysqlDatabase.forCluster().
Initializer
import { MysqlDatabaseForClusterOptions } from 'shady-island'
const mysqlDatabaseForClusterOptions: MysqlDatabaseForClusterOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
characterSet |
string |
The database default character set to use. |
collation |
string |
The database default collation to use. |
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
adminSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
A Secrets Manager secret that contains administrative credentials. |
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
characterSet
Optional
public readonly characterSet: string;
- Type: string
- Default: “utf8mb4”
The database default character set to use.
collation
Optional
public readonly collation: string;
- Type: string
- Default: rely on MySQL to choose the default collation.
The database default collation to use.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
adminSecret
Optional
public readonly adminSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
A Secrets Manager secret that contains administrative credentials.
MysqlDatabaseForServerlessClusterOptions
Properties to specify when using MysqlDatabase.forServerlessCluster().
Initializer
import { MysqlDatabaseForServerlessClusterOptions } from 'shady-island'
const mysqlDatabaseForServerlessClusterOptions: MysqlDatabaseForServerlessClusterOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
characterSet |
string |
The database default character set to use. |
collation |
string |
The database default collation to use. |
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
adminSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
A Secrets Manager secret that contains administrative credentials. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC where the Lambda function will run. |
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
characterSet
Optional
public readonly characterSet: string;
- Type: string
- Default: “utf8mb4”
The database default character set to use.
collation
Optional
public readonly collation: string;
- Type: string
- Default: rely on MySQL to choose the default collation.
The database default collation to use.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
adminSecret
Optional
public readonly adminSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
A Secrets Manager secret that contains administrative credentials.
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC where the Lambda function will run.
MysqlDatabaseOptions
MySQL-specific options.
Initializer
import { MysqlDatabaseOptions } from 'shady-island'
const mysqlDatabaseOptions: MysqlDatabaseOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
characterSet |
string |
The database default character set to use. |
collation |
string |
The database default collation to use. |
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
characterSet
Optional
public readonly characterSet: string;
- Type: string
- Default: “utf8mb4”
The database default character set to use.
collation
Optional
public readonly collation: string;
- Type: string
- Default: rely on MySQL to choose the default collation.
The database default collation to use.
MysqlDatabaseProps
Constructor properties for MysqlDatabase.
Initializer
import { MysqlDatabaseProps } from 'shady-island'
const mysqlDatabaseProps: MysqlDatabaseProps = { ... }
Properties
Name | Type | Description |
---|---|---|
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
adminSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
A Secrets Manager secret that contains administrative credentials. |
endpoint |
aws-cdk-lib.aws_rds.Endpoint |
The cluster or instance endpoint. |
target |
aws-cdk-lib.aws_ec2.IConnectable |
The target service or database. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC where the Lambda function will run. |
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
characterSet |
string |
The database default character set to use. |
collation |
string |
The database default collation to use. |
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
adminSecret
Required
public readonly adminSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
A Secrets Manager secret that contains administrative credentials.
endpoint
Required
public readonly endpoint: Endpoint;
- Type: aws-cdk-lib.aws_rds.Endpoint
The cluster or instance endpoint.
target
Required
public readonly target: IConnectable;
- Type: aws-cdk-lib.aws_ec2.IConnectable
The target service or database.
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC where the Lambda function will run.
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
characterSet
Optional
public readonly characterSet: string;
- Type: string
- Default: “utf8mb4”
The database default character set to use.
collation
Optional
public readonly collation: string;
- Type: string
- Default: rely on MySQL to choose the default collation.
The database default collation to use.
PostgresqlDatabaseForClusterOptions
Properties to specify when using PostgresqlDatabase.forCluster().
Initializer
import { PostgresqlDatabaseForClusterOptions } from 'shady-island'
const postgresqlDatabaseForClusterOptions: PostgresqlDatabaseForClusterOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
ownerSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
The Secrets Manager secret for the owner of the schema. |
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
encoding |
string |
The database default encoding set to use. |
locale |
string |
The database default locale to use. |
schemaName |
string |
The name of the schema to create. |
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
adminSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
A Secrets Manager secret that contains administrative credentials. |
ownerSecret
Required
public readonly ownerSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The Secrets Manager secret for the owner of the schema.
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
encoding
Optional
public readonly encoding: string;
- Type: string
- Default: “UTF8”
The database default encoding set to use.
locale
Optional
public readonly locale: string;
- Type: string
- Default: rely on PostgreSQL to choose the default locale.
The database default locale to use.
schemaName
Optional
public readonly schemaName: string;
- Type: string
- Default: The username of the ownerSecret.
The name of the schema to create.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
adminSecret
Optional
public readonly adminSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
A Secrets Manager secret that contains administrative credentials.
PostgresqlDatabaseForServerlessClusterOptions
Properties to specify when using PostgresqlDatabase.forServerlessCluster().
Initializer
import { PostgresqlDatabaseForServerlessClusterOptions } from 'shady-island'
const postgresqlDatabaseForServerlessClusterOptions: PostgresqlDatabaseForServerlessClusterOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
ownerSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
The Secrets Manager secret for the owner of the schema. |
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
encoding |
string |
The database default encoding set to use. |
locale |
string |
The database default locale to use. |
schemaName |
string |
The name of the schema to create. |
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
adminSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
A Secrets Manager secret that contains administrative credentials. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC where the Lambda function will run. |
ownerSecret
Required
public readonly ownerSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The Secrets Manager secret for the owner of the schema.
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
encoding
Optional
public readonly encoding: string;
- Type: string
- Default: “UTF8”
The database default encoding set to use.
locale
Optional
public readonly locale: string;
- Type: string
- Default: rely on PostgreSQL to choose the default locale.
The database default locale to use.
schemaName
Optional
public readonly schemaName: string;
- Type: string
- Default: The username of the ownerSecret.
The name of the schema to create.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
adminSecret
Optional
public readonly adminSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
A Secrets Manager secret that contains administrative credentials.
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC where the Lambda function will run.
PostgresqlDatabaseOptions
PostgreSQL-specific options.
Initializer
import { PostgresqlDatabaseOptions } from 'shady-island'
const postgresqlDatabaseOptions: PostgresqlDatabaseOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
ownerSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
The Secrets Manager secret for the owner of the schema. |
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
encoding |
string |
The database default encoding set to use. |
locale |
string |
The database default locale to use. |
schemaName |
string |
The name of the schema to create. |
ownerSecret
Required
public readonly ownerSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The Secrets Manager secret for the owner of the schema.
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
encoding
Optional
public readonly encoding: string;
- Type: string
- Default: “UTF8”
The database default encoding set to use.
locale
Optional
public readonly locale: string;
- Type: string
- Default: rely on PostgreSQL to choose the default locale.
The database default locale to use.
schemaName
Optional
public readonly schemaName: string;
- Type: string
- Default: The username of the ownerSecret.
The name of the schema to create.
PostgresqlDatabaseProps
Constructor properties for PostgresqlDatabase.
Initializer
import { PostgresqlDatabaseProps } from 'shady-island'
const postgresqlDatabaseProps: PostgresqlDatabaseProps = { ... }
Properties
Name | Type | Description |
---|---|---|
databaseName |
string |
The name of the database/catalog to create. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
The security group for the Lambda function. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The type of subnets in the VPC where the Lambda function will run. |
adminSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
A Secrets Manager secret that contains administrative credentials. |
endpoint |
aws-cdk-lib.aws_rds.Endpoint |
The cluster or instance endpoint. |
target |
aws-cdk-lib.aws_ec2.IConnectable |
The target service or database. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC where the Lambda function will run. |
ownerSecret |
aws-cdk-lib.aws_secretsmanager.ISecret |
The Secrets Manager secret for the owner of the schema. |
certificateAuthoritiesUrl |
string |
The URL to the PEM-encoded Certificate Authority file. |
encoding |
string |
The database default encoding set to use. |
locale |
string |
The database default locale to use. |
schemaName |
string |
The name of the schema to create. |
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog to create.
securityGroup
Optional
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: a new security group is created
The security group for the Lambda function.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified.
The type of subnets in the VPC where the Lambda function will run.
adminSecret
Required
public readonly adminSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
A Secrets Manager secret that contains administrative credentials.
endpoint
Required
public readonly endpoint: Endpoint;
- Type: aws-cdk-lib.aws_rds.Endpoint
The cluster or instance endpoint.
target
Required
public readonly target: IConnectable;
- Type: aws-cdk-lib.aws_ec2.IConnectable
The target service or database.
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC where the Lambda function will run.
ownerSecret
Required
public readonly ownerSecret: ISecret;
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The Secrets Manager secret for the owner of the schema.
certificateAuthoritiesUrl
Optional
public readonly certificateAuthoritiesUrl: string;
- Type: string
- Default: https://truststore.pki.rds.amazonaws.com/REGION/REGION-bundle.pem
The URL to the PEM-encoded Certificate Authority file.
Normally, we would just assume the Lambda runtime has the certificates to trust already installed. Since the current Lambda runtime environments lack the newer RDS certificate authority certificates, this option can be used to specify a URL to a remote file containing the CAs.
encoding
Optional
public readonly encoding: string;
- Type: string
- Default: “UTF8”
The database default encoding set to use.
locale
Optional
public readonly locale: string;
- Type: string
- Default: rely on PostgreSQL to choose the default locale.
The database default locale to use.
schemaName
Optional
public readonly schemaName: string;
- Type: string
- Default: The username of the ownerSecret.
The name of the schema to create.
PrioritizedLines
A container for lines of a User Data script, sortable by priority
.
Initializer
import { PrioritizedLines } from 'shady-island'
const prioritizedLines: PrioritizedLines = { ... }
Properties
Name | Type | Description |
---|---|---|
lines |
string[] |
The command lines. |
priority |
number |
The priority for this set of commands. |
lines
Required
public readonly lines: string[];
- Type: string[]
The command lines.
priority
Required
public readonly priority: number;
- Type: number
The priority for this set of commands.
RunnableFargateTaskProps
Constructor properties for RunnableFargateTask.
Initializer
import { RunnableFargateTaskProps } from 'shady-island'
const runnableFargateTaskProps: RunnableFargateTaskProps = { ... }
Properties
Name | Type | Description |
---|---|---|
assignPublicIp |
boolean |
Specifies whether the task’s elastic network interface receives a public IP address. |
securityGroups |
aws-cdk-lib.aws_ec2.ISecurityGroup[] |
Existing security groups to use for your task. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
The subnets to associate with the task. |
cpu |
number |
The number of cpu units used by the task. |
memoryLimitMiB |
number |
The amount (in MiB) of memory used by the task. |
platformVersion |
aws-cdk-lib.aws_ecs.FargatePlatformVersion |
The platform version on which to run your service. |
runtimePlatform |
aws-cdk-lib.aws_ecs.RuntimePlatform |
The runtime platform of the task definition. |
taskDefinition |
aws-cdk-lib.aws_ecs.FargateTaskDefinition |
The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both. |
cluster |
aws-cdk-lib.aws_ecs.ICluster |
The cluster that hosts the service. |
taskImageOptions |
FargateTaskImageOptions |
The properties to define if the construct is to create a TaskDefinition. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed. |
assignPublicIp
Optional
public readonly assignPublicIp: boolean;
- Type: boolean
- Default: false
Specifies whether the task’s elastic network interface receives a public IP address.
If true, the task will receive a public IP address.
securityGroups
Optional
public readonly securityGroups: ISecurityGroup[];
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup[]
- Default: a new security group will be created.
Existing security groups to use for your task.
vpcSubnets
Optional
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: Public subnets if
assignPublicIp
is set, otherwise the first available one of Private, Isolated, Public, in that order.
The subnets to associate with the task.
cpu
Optional
public readonly cpu: number;
- Type: number
- Default: 256
The number of cpu units used by the task.
Valid values, which determines your range of valid values for the memory parameter:
256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
8192 (8 vCPU) - Available memory values: Between 16GB and 60GB in 4GB increments
16384 (16 vCPU) - Available memory values: Between 32GB and 120GB in 8GB increments
This default is set in the underlying FargateTaskDefinition construct.
memoryLimitMiB
Optional
public readonly memoryLimitMiB: number;
- Type: number
- Default: 512
The amount (in MiB) of memory used by the task.
This field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter:
512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU)
Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU)
This default is set in the underlying FargateTaskDefinition construct.
platformVersion
Optional
public readonly platformVersion: FargatePlatformVersion;
- Type: aws-cdk-lib.aws_ecs.FargatePlatformVersion
- Default: Latest
The platform version on which to run your service.
If one is not specified, the LATEST platform version is used by default. For more information, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
runtimePlatform
Optional
public readonly runtimePlatform: RuntimePlatform;
- Type: aws-cdk-lib.aws_ecs.RuntimePlatform
- Default: If the property is undefined,
operatingSystemFamily
is LINUX andcpuArchitecture
is X86_64
The runtime platform of the task definition.
taskDefinition
Optional
public readonly taskDefinition: FargateTaskDefinition;
- Type: aws-cdk-lib.aws_ecs.FargateTaskDefinition
- Default: none
The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both.
[disable-awslint:ref-via-interface]
cluster
Optional
public readonly cluster: ICluster;
- Type: aws-cdk-lib.aws_ecs.ICluster
- Default: create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
The cluster that hosts the service.
If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
taskImageOptions
Optional
public readonly taskImageOptions: FargateTaskImageOptions;
- Type: FargateTaskImageOptions
- Default: none
The properties to define if the construct is to create a TaskDefinition.
taskDefinition or image must be defined, but not both.
vpc
Optional
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: uses the VPC defined in the cluster or creates a new VPC.
The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
StateMachineTaskProps
Properties to create a new State Machine EcsRunTask step.
Initializer
import { StateMachineTaskProps } from 'shady-island'
const stateMachineTaskProps: StateMachineTaskProps = { ... }
Properties
Name | Type | Description |
---|---|---|
comment |
string |
An optional description for this state. |
credentials |
aws-cdk-lib.aws_stepfunctions.Credentials |
Credentials for an IAM Role that the State Machine assumes for executing the task. |
heartbeat |
aws-cdk-lib.Duration |
Timeout for the heartbeat. |
heartbeatTimeout |
aws-cdk-lib.aws_stepfunctions.Timeout |
Timeout for the heartbeat. |
inputPath |
string |
JSONPath expression to select part of the state to be the input to this state. |
integrationPattern |
aws-cdk-lib.aws_stepfunctions.IntegrationPattern |
AWS Step Functions integrates with services directly in the Amazon States Language. |
outputPath |
string |
JSONPath expression to select select a portion of the state output to pass to the next state. |
resultPath |
string |
JSONPath expression to indicate where to inject the state’s output. |
resultSelector |
{[ key: string ]: any} |
The JSON that will replace the state’s raw result and become the effective result before ResultPath is applied. |
stateName |
string |
Optional name for this state. |
taskTimeout |
aws-cdk-lib.aws_stepfunctions.Timeout |
Timeout for the task. |
timeout |
aws-cdk-lib.Duration |
Timeout for the task. |
containerOverrides |
aws-cdk-lib.aws_stepfunctions_tasks.ContainerOverride[] |
Container setting overrides. |
enableExecuteCommand |
boolean |
Whether ECS Exec should be enabled. |
propagatedTagSource |
aws-cdk-lib.aws_ecs.PropagatedTagSource |
Specifies whether to propagate the tags from the task definition to the task. |
revisionNumber |
number |
The revision number of ECS task definition family. |
comment
Optional
public readonly comment: string;
- Type: string
- Default: No comment
An optional description for this state.
credentials
Optional
public readonly credentials: Credentials;
- Type: aws-cdk-lib.aws_stepfunctions.Credentials
- Default: None (Task is executed using the State Machine’s execution role)
Credentials for an IAM Role that the State Machine assumes for executing the task.
This enables cross-account resource invocations.
https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html
heartbeat
Optional
heartbeat
- Deprecated: use
heartbeatTimeout
public readonly heartbeat: Duration;
- Type: aws-cdk-lib.Duration
- Default: None
Timeout for the heartbeat.
heartbeatTimeout
Optional
public readonly heartbeatTimeout: Timeout;
- Type: aws-cdk-lib.aws_stepfunctions.Timeout
- Default: None
Timeout for the heartbeat.
[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
inputPath
Optional
public readonly inputPath: string;
- Type: string
- Default: The entire task input (JSON path ‘$’)
JSONPath expression to select part of the state to be the input to this state.
May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
integrationPattern
Optional
public readonly integrationPattern: IntegrationPattern;
- Type: aws-cdk-lib.aws_stepfunctions.IntegrationPattern
- Default:
IntegrationPattern.REQUEST_RESPONSE
for most tasks.IntegrationPattern.RUN_JOB
for the following exceptions:BatchSubmitJob
,EmrAddStep
,EmrCreateCluster
,EmrTerminationCluster
, andEmrContainersStartJobRun
.
AWS Step Functions integrates with services directly in the Amazon States Language.
You can control these AWS services using service integration patterns.
Depending on the AWS Service, the Service Integration Pattern availability will vary.
https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html
outputPath
Optional
public readonly outputPath: string;
- Type: string
- Default: The entire JSON node determined by the state input, the task result, and resultPath is passed to the next state (JSON path ‘$’)
JSONPath expression to select select a portion of the state output to pass to the next state.
May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
resultPath
Optional
public readonly resultPath: string;
- Type: string
- Default: Replaces the entire input with the result (JSON path ‘$’)
JSONPath expression to indicate where to inject the state’s output.
May also be the special value JsonPath.DISCARD, which will cause the state’s input to become its output.
resultSelector
Optional
public readonly resultSelector: {[ key: string ]: any};
- Type: {[ key: string ]: any}
- Default: None
The JSON that will replace the state’s raw result and become the effective result before ResultPath is applied.
You can use ResultSelector to create a payload with values that are static or selected from the state’s raw result.
stateName
Optional
public readonly stateName: string;
- Type: string
- Default: The construct ID will be used as state name
Optional name for this state.
taskTimeout
Optional
public readonly taskTimeout: Timeout;
- Type: aws-cdk-lib.aws_stepfunctions.Timeout
- Default: None
Timeout for the task.
[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
timeout
Optional
timeout
- Deprecated: use
taskTimeout
public readonly timeout: Duration;
- Type: aws-cdk-lib.Duration
- Default: None
Timeout for the task.
containerOverrides
Optional
public readonly containerOverrides: ContainerOverride[];
- Type: aws-cdk-lib.aws_stepfunctions_tasks.ContainerOverride[]
- Default: No overrides
Container setting overrides.
Specify the container to use and the overrides to apply.
enableExecuteCommand
Optional
public readonly enableExecuteCommand: boolean;
- Type: boolean
- Default: false
Whether ECS Exec should be enabled.
propagatedTagSource
Optional
public readonly propagatedTagSource: PropagatedTagSource;
- Type: aws-cdk-lib.aws_ecs.PropagatedTagSource
- Default: No tags are propagated.
Specifies whether to propagate the tags from the task definition to the task.
An error will be received if you specify the SERVICE option when running a task.
revisionNumber
Optional
public readonly revisionNumber: number;
- Type: number
- Default: ‘$latest’
The revision number of ECS task definition family.
WorkloadProps
Constructor properties for a Workload.
Initializer
import { WorkloadProps } from 'shady-island'
const workloadProps: WorkloadProps = { ... }
Properties
Name | Type | Description |
---|---|---|
tier |
Tier |
The deployment tier. |
baseDomainName |
string |
The base domain name used to create the FQDN for public resources. |
contextFile |
string |
The filesystem path to a JSON file that contains context values to load. |
env |
aws-cdk-lib.Environment |
The AWS environment (account/region) where this stack will be deployed. |
workloadName |
string |
The machine identifier for this workload. |
tier
Required
public readonly tier: Tier;
- Type: Tier
The deployment tier.
baseDomainName
Optional
public readonly baseDomainName: string;
- Type: string
The base domain name used to create the FQDN for public resources.
contextFile
Optional
public readonly contextFile: string;
- Type: string
The filesystem path to a JSON file that contains context values to load.
Using this property allows you to load different context values within each
instantiated Workload
, directly from a file you can check into source
control.
env
Optional
public readonly env: Environment;
- Type: aws-cdk-lib.Environment
The AWS environment (account/region) where this stack will be deployed.
workloadName
Optional
public readonly workloadName: string;
- Type: string
- Default: The id passed to the
Workload
constructor, but in lowercase
The machine identifier for this workload.
This value will be used to create the publicDomainName
property.
By default, the stackName
property used to create Stack
constructs in
the createStack
method will begin with this Workload’s workloadName
and
its tier
separated by hyphens.
Consider providing a constant workloadName
value to the superclass
constructor in your derived class.
Example
class MyWorkload extends Workload {
constructor(scope: Construct, id: string, props: WorkloadProps) {
super(scope, id, { ...props, workloadName: 'my-workload' });
}
}
Classes
ContextLoader
A utility to load context values into a construct node.
If you want to use this utility in your own construct, make sure to invoke it before you create any child constructs.
Initializers
import { ContextLoader } from 'shady-island'
new ContextLoader()
| Name | Type | Description | | — | — | — |
Static Functions
Name | Description |
---|---|
loadContext |
Parses JSON file contents, then provides the values to a Node’s context. |
loadContext
import { ContextLoader } from 'shady-island'
ContextLoader.loadContext(filename: string, node: Node)
Parses JSON file contents, then provides the values to a Node’s context.
filename
Required
- Type: string
The JSON file with an object to use as context values.
node
Required
- Type: constructs.Node
The constructs node to receive the context values.
Tier
A deployment environment with a specific purpose and audience.
You can create any Tier you like, but we include those explained by DTAP.
https://en.wikipedia.org/wiki/Development,_testing,_acceptance_and_production
Initializers
import { Tier } from 'shady-island'
new Tier(id: string, label: string)
Name | Type | Description |
---|---|---|
id |
string |
- The machine-readable identifier for this tier (e.g. prod). |
label |
string |
- The human-readable label for this tier (e.g. Production). |
id
Required
- Type: string
The machine-readable identifier for this tier (e.g. prod).
label
Required
- Type: string
The human-readable label for this tier (e.g. Production).
Methods
Name | Description |
---|---|
applyTags |
Adds the label of this tier as a tag to the provided construct. |
assignTo |
Assigns this tier to a construct. |
matches |
Compares this tier to the provided value and tests for equality. |
applyTags
public applyTags(construct: IConstruct): void
Adds the label of this tier as a tag to the provided construct.
construct
Required
- Type: constructs.IConstruct
assignTo
public assignTo(construct: IConstruct): void
Assigns this tier to a construct.
This method will register an error annotation on the construct if any of the constructs in its parent scopes have a different tier assigned.
construct
Required
- Type: constructs.IConstruct
The construct to receive the tier assignment.
matches
public matches(other: Tier): boolean
Compares this tier to the provided value and tests for equality.
other
Required
- Type: Tier
The value to compare.
Static Functions
Name | Description |
---|---|
of |
Finds the deployment tier of the given construct. |
parse |
Return the deployment tier that corresponds to the provided value. |
of
import { Tier } from 'shady-island'
Tier.of(construct: IConstruct)
Finds the deployment tier of the given construct.
construct
Required
- Type: constructs.IConstruct
The construct to inspect.
parse
import { Tier } from 'shady-island'
Tier.parse(value: string)
Return the deployment tier that corresponds to the provided value.
Production: “live”, “prod”, or “production”. Acceptance: “uat”, “stage”, “staging”, or “acceptance”. Testing: “qc”, “qa”, “test”, or “testing”. Development: anything else.
value
Required
- Type: string
The value to parse, case-insensitive.
Properties
Name | Type | Description |
---|---|---|
id |
string |
The machine-readable identifier for this tier (e.g. prod). |
label |
string |
The human-readable label for this tier (e.g. Production). |
id
Required
public readonly id: string;
- Type: string
The machine-readable identifier for this tier (e.g. prod).
label
Required
public readonly label: string;
- Type: string
The human-readable label for this tier (e.g. Production).
Constants
Name | Type | Description |
---|---|---|
ACCEPTANCE |
Tier |
A tier that represents an acceptance environment. |
DEVELOPMENT |
Tier |
A tier that represents a development environment. |
PRODUCTION |
Tier |
A tier that represents a production environment. |
TESTING |
Tier |
A tier that represents a testing environment. |
ACCEPTANCE
Required
public readonly ACCEPTANCE: Tier;
- Type: Tier
A tier that represents an acceptance environment.
DEVELOPMENT
Required
public readonly DEVELOPMENT: Tier;
- Type: Tier
A tier that represents a development environment.
PRODUCTION
Required
public readonly PRODUCTION: Tier;
- Type: Tier
A tier that represents a production environment.
TESTING
Required
public readonly TESTING: Tier;
- Type: Tier
A tier that represents a testing environment.
TierTagger
- Implements: aws-cdk-lib.IAspect
A CDK Aspect to apply the DeploymentTier
tag to Stacks.
Initializers
import { TierTagger } from 'shady-island'
new TierTagger(tier: Tier)
Name | Type | Description |
---|---|---|
tier |
Tier |
- The deployment tier. |
tier
Required
- Type: Tier
The deployment tier.
Methods
Name | Description |
---|---|
visit |
All aspects can visit an IConstruct. |
visit
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
node
Required
- Type: constructs.IConstruct
UserDataBuilder
A utility class to assist with composing instance User Data.
This class allows multiple observers in code to add lines to the same end
result UserData without clobbering each other. Just like conf.d
directories
with priority number prefixes, you can declare the proper execution order of
your UserData commands without having to add them in that order.
Initializers
import { UserDataBuilder } from 'shady-island'
new UserDataBuilder()
| Name | Type | Description | | — | — | — |
Methods
Name | Description |
---|---|
addCommands |
Add one or more commands to the user data with a priority of 0 . |
buildUserData |
Produces the User Data script with all lines sorted in priority order. |
insertCommands |
Add one or more commands to the user data at a specific priority. |
addCommands
public addCommands(commands: ...string[]): void
Add one or more commands to the user data with a priority of 0
.
commands
Required
- Type: …string[]
The lines to add.
buildUserData
public buildUserData(): UserData
Produces the User Data script with all lines sorted in priority order.
insertCommands
public insertCommands(priority: number, commands: ...string[]): void
Add one or more commands to the user data at a specific priority.
priority
Required
- Type: number
The priority of these lines (lower executes earlier).
commands
Required
- Type: …string[]
The lines to add.
Static Functions
Name | Description |
---|---|
forLinux |
Returns a user data builder for GNU/Linux operating systems. |
forWindows |
Returns a user data builder for Windows operating systems. |
forLinux
import { UserDataBuilder } from 'shady-island'
UserDataBuilder.forLinux(options?: LinuxUserDataOptions)
Returns a user data builder for GNU/Linux operating systems.
options
Optional
- Type: aws-cdk-lib.aws_ec2.LinuxUserDataOptions
The Linux UserData constructor options.
forWindows
import { UserDataBuilder } from 'shady-island'
UserDataBuilder.forWindows()
Returns a user data builder for Windows operating systems.
Protocols
IAssignOnLaunch
- Implemented By: AssignOnLaunch, IAssignOnLaunch
Interface for the AssignOnLaunch class.
Properties
Name | Type | Description |
---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The IPv6-enabled VPC. |
vpcPlacement |
aws-cdk-lib.aws_ec2.SelectedSubnets |
The chosen subnets for address assignment on ENI launch. |
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The IPv6-enabled VPC.
vpcPlacement
Required
public readonly vpcPlacement: SelectedSubnets;
- Type: aws-cdk-lib.aws_ec2.SelectedSubnets
The chosen subnets for address assignment on ENI launch.
ICidrContext
- Implemented By: CidrContext, ICidrContext
Interface for the CidrContext class.
Properties
Name | Type | Description |
---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The IPv6-enabled VPC. |
vpc
Required
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The IPv6-enabled VPC.
IDatabase
-
Extends: constructs.IConstruct
-
Implemented By: BaseDatabase, MysqlDatabase, PostgresqlDatabase, IDatabase
The definition used to create a database.
Methods
Name | Description |
---|---|
addUserAsOwner |
Declares a new database user to be assigned ownership permissions. |
addUserAsReader |
Declares a new database user to be assigned read-only permissions. |
addUserAsUnprivileged |
Declares a new database user with no permissions. |
addUserAsOwner
public addUserAsOwner(secret: ISecret): void
Declares a new database user to be assigned ownership permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The Secrets Manager secret containing credentials.
addUserAsReader
public addUserAsReader(secret: ISecret): void
Declares a new database user to be assigned read-only permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The Secrets Manager secret containing credentials.
addUserAsUnprivileged
public addUserAsUnprivileged(secret: ISecret): void
Declares a new database user with no permissions.
secret
Required
- Type: aws-cdk-lib.aws_secretsmanager.ISecret
The Secrets Manager secret containing credentials.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
databaseName |
string |
The name of the database/catalog. |
endpoint |
aws-cdk-lib.aws_rds.Endpoint |
The cluster or instance endpoint. |
trigger |
aws-cdk-lib.triggers.ITrigger |
The CDK Trigger that kicks off the process. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
databaseName
Required
public readonly databaseName: string;
- Type: string
The name of the database/catalog.
endpoint
Required
public readonly endpoint: Endpoint;
- Type: aws-cdk-lib.aws_rds.Endpoint
The cluster or instance endpoint.
trigger
Required
public readonly trigger: ITrigger;
- Type: aws-cdk-lib.triggers.ITrigger
The CDK Trigger that kicks off the process.
You can further customize when the trigger fires using executeAfter
.
IEncryptedFileSystem
-
Extends: constructs.IConstruct
-
Implemented By: EncryptedFileSystem, IEncryptedFileSystem
Interface for EncryptedFileSystem.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
fileSystem |
aws-cdk-lib.aws_efs.IFileSystem |
The EFS file system. |
key |
aws-cdk-lib.aws_kms.IKey |
The KMS encryption key. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
fileSystem
Required
public readonly fileSystem: IFileSystem;
- Type: aws-cdk-lib.aws_efs.IFileSystem
The EFS file system.
key
Required
public readonly key: IKey;
- Type: aws-cdk-lib.aws_kms.IKey
The KMS encryption key.
IEncryptedLogGroup
- Implemented By: EncryptedLogGroup, IEncryptedLogGroup
A log group encrypted by a KMS customer managed key.
Properties
Name | Type | Description |
---|---|---|
key |
aws-cdk-lib.aws_kms.IKey |
The KMS encryption key. |
logGroup |
aws-cdk-lib.aws_logs.ILogGroup |
The log group. |
key
Required
public readonly key: IKey;
- Type: aws-cdk-lib.aws_kms.IKey
The KMS encryption key.
logGroup
Required
public readonly logGroup: ILogGroup;
- Type: aws-cdk-lib.aws_logs.ILogGroup
The log group.
IFargateTask
-
Extends: aws-cdk-lib.aws_ec2.IConnectable, constructs.IConstruct
-
Implemented By: FargateTask, IFargateTask
Interface for FargateTask.
Methods
Name | Description |
---|---|
createRuleTarget |
Create a new EventBridge Rule Target that launches this ECS task. |
createStateMachineTask |
Create a new Step Functions task that launches this ECS task. |
grantRun |
Grants permission to invoke ecs:RunTask on this task’s cluster. |
createRuleTarget
public createRuleTarget(props: EventTargetProps): EcsTask
Create a new EventBridge Rule Target that launches this ECS task.
props
Required
- Type: EventTargetProps
The properties to create the EcsTask object.
createStateMachineTask
public createStateMachineTask(id: string, props: StateMachineTaskProps): EcsRunTask
Create a new Step Functions task that launches this ECS task.
id
Required
- Type: string
The construct ID.
props
Required
- Type: StateMachineTaskProps
The properties to create the EcsRunTask object.
grantRun
public grantRun(grantee: IGrantable): Grant
Grants permission to invoke ecs:RunTask on this task’s cluster.
grantee
Required
- Type: aws-cdk-lib.aws_iam.IGrantable
The recipient of the permissions.
Properties
Name | Type | Description |
---|---|---|
connections |
aws-cdk-lib.aws_ec2.Connections |
The network connections associated with this resource. |
node |
constructs.Node |
The tree node. |
awsVpcNetworkConfig |
FargateAwsVpcConfiguration |
Get the networkConfiguration.awsvpcConfiguration property to run this task. |
cluster |
aws-cdk-lib.aws_ecs.ICluster |
The name of the cluster that hosts the service. |
taskDefinition |
aws-cdk-lib.aws_ecs.FargateTaskDefinition |
The task definition that can be launched. |
connections
Required
public readonly connections: Connections;
- Type: aws-cdk-lib.aws_ec2.Connections
The network connections associated with this resource.
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
awsVpcNetworkConfig
Required
public readonly awsVpcNetworkConfig: FargateAwsVpcConfiguration;
Get the networkConfiguration.awsvpcConfiguration property to run this task.
cluster
Required
public readonly cluster: ICluster;
- Type: aws-cdk-lib.aws_ecs.ICluster
The name of the cluster that hosts the service.
taskDefinition
Required
public readonly taskDefinition: FargateTaskDefinition;
- Type: aws-cdk-lib.aws_ecs.FargateTaskDefinition
The task definition that can be launched.
IRunnableFargateTask
-
Extends: constructs.IConstruct
-
Implemented By: RunnableFargateTask, IRunnableFargateTask
Interface for RunnableFargateTask.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
task |
IFargateTask |
The FargateTask in this construct. |
taskDefinition |
aws-cdk-lib.aws_ecs.FargateTaskDefinition |
The FargateTaskDefinition in this construct. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
task
Required
public readonly task: IFargateTask;
- Type: IFargateTask
The FargateTask in this construct.
taskDefinition
Required
public readonly taskDefinition: FargateTaskDefinition;
- Type: aws-cdk-lib.aws_ecs.FargateTaskDefinition
The FargateTaskDefinition in this construct.