class DeploymentStrategy (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppConfig.DeploymentStrategy |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappconfig#DeploymentStrategy |
![]() | software.amazon.awscdk.services.appconfig.DeploymentStrategy |
![]() | aws_cdk.aws_appconfig.DeploymentStrategy |
![]() | aws-cdk-lib » aws_appconfig » DeploymentStrategy |
Implements
IConstruct
, IDependable
, IResource
, IDeployment
An AWS AppConfig deployment strategy.
Example
new appconfig.DeploymentStrategy(this, 'MyDeploymentStrategy', {
rolloutStrategy: appconfig.RolloutStrategy.linear({
growthFactor: 20,
deploymentDuration: Duration.minutes(30),
finalBakeTime: Duration.minutes(30),
}),
});
Initializer
new DeploymentStrategy(scope: Construct, id: string, props: DeploymentStrategyProps)
Parameters
- scope
Construct
- id
string
- props
Deployment
Strategy Props
Construct Props
Name | Type | Description |
---|---|---|
rollout | Rollout | The rollout strategy for the deployment strategy. |
deployment | string | A name for the deployment strategy. |
description? | string | A description of the deployment strategy. |
rolloutStrategy
Type:
Rollout
The rollout strategy for the deployment strategy.
You can use predefined deployment strategies, such as RolloutStrategy.ALL_AT_ONCE, RolloutStrategy.LINEAR_50_PERCENT_EVERY_30_SECONDS, or RolloutStrategy.CANARY_10_PERCENT_20_MINUTES.
deploymentStrategyName?
Type:
string
(optional, default: A name is generated.)
A name for the deployment strategy.
description?
Type:
string
(optional, default: No description.)
A description of the deployment strategy.
Properties
Name | Type | Description |
---|---|---|
deployment | string | The Amazon Resource Name (ARN) of the deployment strategy. |
deployment | string | The ID of the deployment strategy. |
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
deployment | number | The deployment duration in minutes of the deployment strategy. |
description? | string | The description of the deployment strategy. |
final | number | The final bake time in minutes of the deployment strategy. |
growth | number | The growth factor of the deployment strategy. |
growth | Growth | The growth type of the deployment strategy. |
name? | string | The name of the deployment strategy. |
deploymentStrategyArn
Type:
string
The Amazon Resource Name (ARN) of the deployment strategy.
deploymentStrategyId
Type:
string
The ID of the deployment strategy.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
deploymentDurationInMinutes?
Type:
number
(optional)
The deployment duration in minutes of the deployment strategy.
description?
Type:
string
(optional)
The description of the deployment strategy.
finalBakeTimeInMinutes?
Type:
number
(optional)
The final bake time in minutes of the deployment strategy.
growthFactor?
Type:
number
(optional)
The growth factor of the deployment strategy.
growthType?
Type:
Growth
(optional)
The growth type of the deployment strategy.
name?
Type:
string
(optional)
The name of the deployment strategy.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Imports a deployment strategy into the CDK using its Amazon Resource Name (ARN). |
static from | Imports a deployment strategy into the CDK using its ID. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
static fromDeploymentStrategyArn(scope, id, deploymentStrategyArn)
public static fromDeploymentStrategyArn(scope: Construct, id: string, deploymentStrategyArn: string): IDeploymentStrategy
Parameters
- scope
Construct
— The parent construct. - id
string
— The name of the deployment strategy construct. - deploymentStrategyArn
string
— The Amazon Resource Name (ARN) of the deployment strategy.
Returns
Imports a deployment strategy into the CDK using its Amazon Resource Name (ARN).
static fromDeploymentStrategyId(scope, id, deploymentStrategyId)
public static fromDeploymentStrategyId(scope: Construct, id: string, deploymentStrategyId: DeploymentStrategyId): IDeploymentStrategy
Parameters
- scope
Construct
— The parent construct. - id
string
— The name of the deployment strategy construct. - deploymentStrategyId
Deployment
— The ID of the deployment strategy.Strategy Id
Returns
Imports a deployment strategy into the CDK using its ID.