Skip to content

Latest commit

 

History

History
479 lines (269 loc) · 24.6 KB

File metadata and controls

479 lines (269 loc) · 24.6 KB

API Reference

Classes

Name Description
DummyTaskDefinition No description
EcsDeploymentConfig No description
EcsDeploymentGroup No description
EcsService No description
PushImageProject No description

Structs

Name Description
DummyTaskDefinitionProps No description
EcsDeploymentConfigurationProps No description
EcsDeploymentGroupProps No description
EcsServiceProps No description
PushImageProjectProps No description
TrafficListener No description

Interfaces

Name Description
IDummyTaskDefinition No description
IEcsDeploymentConfig No description
IEcsDeploymentGroup Interface for an ECS deployment group.
IEcsService No description

Enums

Name Description
RollbackEvent No description
SchedulingStrategy No description

class DummyTaskDefinition

Implements: IConstruct, IConstruct, IConstruct, IDependable, IDummyTaskDefinition Extends: Construct

Initializer

new DummyTaskDefinition(scope: Construct, id: string, props: DummyTaskDefinitionProps)
  • scope (Construct) No description
  • id (string) No description
  • props (DummyTaskDefinitionProps) No description
    • image (string) The image used to start a container.
    • containerName (string) The name of the container. Default: sample-website
    • containerPort (number) No description Default: 80
    • family (string) The name of a family that this task definition is registered to. Default: Automatically generated name.

Properties

Name Type Description
containerName string
containerPort number
executionRole IRole
family string
taskDefinitionArn string

Methods

addToExecutionRolePolicy(statement)

Adds a policy statement to the task execution IAM role.

addToExecutionRolePolicy(statement: PolicyStatement): void

class EcsDeploymentConfig

Implements: IConstruct, IConstruct, IConstruct, IDependable, IResource, IConstruct, IDependable, IConstruct, IEcsDeploymentConfig Extends: Resource

Initializer

new EcsDeploymentConfig(scope: Construct, id: string, props: EcsDeploymentConfigurationProps)

Properties

Name Type Description
deploymentConfigArn string
deploymentConfigName string
static ALL_AT_ONCE IEcsDeploymentConfig
static CANARY_10PERCENT_15MINUTES IEcsDeploymentConfig
static CANARY_10PERCENT_5MINUTES IEcsDeploymentConfig
static LINEAR_10PERCENT_EVERY_1MINUTE IEcsDeploymentConfig
static LINEAR_10PERCENT_EVERY_3MINUTES IEcsDeploymentConfig

Methods

static fromEcsDeploymentConfigName(_scope, _id, ecsDeploymentConfigName)

Import a custom Deployment Configuration for an ECS Deployment Group defined outside the CDK.

static fromEcsDeploymentConfigName(_scope: Construct, _id: string, ecsDeploymentConfigName: string): IEcsDeploymentConfig
  • _scope (Construct) the parent Construct for this new Construct.
  • _id (string) the logical ID of this new Construct.
  • ecsDeploymentConfigName (string) the name of the referenced custom Deployment Configuration.

Returns:

class EcsDeploymentGroup

Implements: IConstruct, IConstruct, IConstruct, IDependable, IResource, IConstruct, IDependable, IConstruct, IEcsDeploymentGroup, IConstruct, IDependable, IConstruct, IResource Extends: Resource

Initializer

new EcsDeploymentGroup(scope: Construct, id: string, props: EcsDeploymentGroupProps)
  • scope (Construct) No description
  • id (string) No description
  • props (EcsDeploymentGroupProps) No description
    • deploymentGroupName (string) No description
    • ecsServices (Array<IEcsService>) No description
    • prodTrafficListener (TrafficListener) No description
    • targetGroupNames (Array) No description
    • testTrafficListener (TrafficListener) No description
    • applicationName (string) No description Optional
    • autoRollbackOnEvents (Array<RollbackEvent>) The event type or types that trigger a rollback. Optional
    • deploymentConfig (IEcsDeploymentConfig) No description Optional
    • terminationWaitTimeInMinutes (number) the number of minutes before deleting the original (blue) task set. Default: 60

Properties

Name Type Description
application IEcsApplication The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
deploymentConfig IEcsDeploymentConfig The Deployment Configuration this Group uses.
deploymentGroupArn string The ARN of this Deployment Group.
deploymentGroupName string The physical name of the CodeDeploy Deployment Group.

class EcsService

Implements: IConstruct, IConstruct, IConstruct, IDependable, IConnectable, IEcsService Extends: Construct

Initializer

new EcsService(scope: Construct, id: string, props: EcsServiceProps)
  • scope (Construct) No description
  • id (string) No description
  • props (EcsServiceProps) No description
    • cluster (ICluster) No description
    • prodTargetGroup (ITargetGroup) No description
    • serviceName (string) No description
    • taskDefinition (DummyTaskDefinition) No description
    • circuitBreaker (DeploymentCircuitBreaker) Whether to enable the deployment circuit breaker. Default: disabled
    • containerPort (number) No description Optional
    • desiredCount (number) No description Optional
    • healthCheckGracePeriod (Duration) The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: defaults to 60 seconds if at least one load balancer is in-use and it is not already set
    • launchType (LaunchType) No description Optional
    • maxHealthyPercent (number) The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: 100 if daemon, otherwise 200
    • minHealthyPercent (number) The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: 0 if daemon, otherwise 50
    • platformVersion (string) No description Optional
    • securityGroups (Array<SecurityGroup>) No description Optional

Properties

Name Type Description
clusterName string
connections Connections The network connections associated with this resource.
serviceName string

class PushImageProject

Implements: IConstruct, IConstruct, IConstruct, IDependable, IResource, IConstruct, IDependable, IConstruct, IProject, IConstruct, IDependable, IConstruct, IResource, IGrantable, IConnectable, INotificationRuleSource Extends: PipelineProject

Initializer

new PushImageProject(scope: Construct, id: string, props: PushImageProjectProps)

struct DummyTaskDefinitionProps

Name Type Description
image string The image used to start a container.
containerName? string The name of the container.
Default: sample-website
containerPort? number Default: 80
family? string The name of a family that this task definition is registered to.
Default: Automatically generated name.

struct EcsDeploymentConfigurationProps

Name Type Description
deploymentConfigName? string AWS::CodeDeploy::DeploymentConfig.DeploymentConfigName.
Optional
minimumHealthyHosts? CfnDeploymentConfig.MinimumHealthyHostsProperty | IResolvable AWS::CodeDeploy::DeploymentConfig.MinimumHealthyHosts.
Optional
trafficRoutingConfig? IResolvable | CfnDeploymentConfig.TrafficRoutingConfigProperty AWS::CodeDeploy::DeploymentConfig.TrafficRoutingConfig.
Optional

struct EcsDeploymentGroupProps

Name Type Description
deploymentGroupName string
ecsServices Array<IEcsService>
prodTrafficListener TrafficListener
targetGroupNames Array
testTrafficListener TrafficListener
applicationName? string Optional
autoRollbackOnEvents? Array<RollbackEvent> The event type or types that trigger a rollback.
Optional
deploymentConfig? IEcsDeploymentConfig Optional
terminationWaitTimeInMinutes? number the number of minutes before deleting the original (blue) task set.
Default: 60

struct EcsServiceProps

Name Type Description
cluster ICluster
prodTargetGroup ITargetGroup
serviceName string
taskDefinition DummyTaskDefinition
circuitBreaker? DeploymentCircuitBreaker Whether to enable the deployment circuit breaker.
Default: disabled
containerPort? number Optional
desiredCount? number Optional
healthCheckGracePeriod? Duration The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
Default: defaults to 60 seconds if at least one load balancer is in-use and it is not already set
launchType? LaunchType Optional
maxHealthyPercent? number The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
Default: 100 if daemon, otherwise 200
minHealthyPercent? number The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
Default: 0 if daemon, otherwise 50
platformVersion? string Optional
securityGroups? Array<SecurityGroup> Optional

interface IDummyTaskDefinition

Implemented by: DummyTaskDefinition

Properties

Name Type Description
containerName string
containerPort number
executionRole IRole
family string
taskDefinitionArn string

interface IEcsDeploymentConfig

Implemented by: EcsDeploymentConfig Obtainable from: EcsDeploymentConfig.fromEcsDeploymentConfigName()

Properties

Name Type Description
deploymentConfigArn string
deploymentConfigName string

interface IEcsDeploymentGroup

Implemented by: EcsDeploymentGroup

Interface for an ECS deployment group.

Properties

Name Type Description
application IEcsApplication The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
deploymentConfig IEcsDeploymentConfig The Deployment Configuration this Group uses.
deploymentGroupArn string The ARN of this Deployment Group.
deploymentGroupName string The physical name of the CodeDeploy Deployment Group.
env ResourceEnvironment The environment this resource belongs to.
node ConstructNode The construct tree node for this construct.
stack Stack The stack in which this resource is defined.

interface IEcsService

Implemented by: EcsService

Properties

Name Type Description
clusterName string
serviceName string

struct PushImageProjectProps

Name Type Description
imageRepository IRepository
taskDefinition IDummyTaskDefinition
buildSpec? BuildSpec Optional
cache? Cache Optional
computeType? ComputeType Optional
environmentVariables? Map<string, BuildEnvironmentVariable> Optional
projectName? string Optional

struct TrafficListener

Name Type Description
listenerArn string ARN of the listener.

enum RollbackEvent

Name Description
DEPLOYMENT_FAILURE
DEPLOYMENT_STOP_ON_ALARM
DEPLOYMENT_STOP_ON_REQUEST

enum SchedulingStrategy

Name Description
REPLICA
DAEMON