CfnCodeDeployBlueGreenHook¶
-
class
aws_cdk.core.
CfnCodeDeployBlueGreenHook
(scope, id, *, applications, service_role, additional_options=None, lifecycle_event_hooks=None, traffic_routing_config=None)¶ Bases:
aws_cdk.core.CfnHook
A CloudFormation Hook for CodeDeploy blue-green ECS deployments.
- See
- ExampleMetadata
infused
Example:
# cfn_template: cfn_inc.CfnInclude # mutating the hook # my_role: iam.Role hook = cfn_template.get_hook("MyOutput") code_deploy_hook = hook code_deploy_hook.service_role = my_role.role_arn
Creates a new CodeDeploy blue-green ECS Hook.
- Parameters
scope (
Construct
) – the scope to create the hook in (usually the containing Stack object).id (
str
) – the identifier of the construct - will be used to generate the logical ID of the Hook.applications (
Sequence
[CfnCodeDeployBlueGreenApplication
]) – Properties of the Amazon ECS applications being deployed.service_role (
str
) – The IAM Role for CloudFormation to use to perform blue-green deployments.additional_options (
Optional
[CfnCodeDeployBlueGreenAdditionalOptions
]) – Additional options for the blue/green deployment. Default: - no additional optionslifecycle_event_hooks (
Optional
[CfnCodeDeployBlueGreenLifecycleEventHooks
]) – Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment. You can use the same function or a different one for deployment lifecycle events. Following completion of the validation tests, the Lambda {@link CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic} function calls back CodeDeploy and delivers a result of ‘Succeeded’ or ‘Failed’. Default: - no lifecycle event hookstraffic_routing_config (
Optional
[CfnTrafficRoutingConfig
]) – Traffic routing configuration settings. Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time
Methods
-
override_logical_id
(new_logical_id)¶ Overrides the auto-generated logical ID with a specific ID.
- Parameters
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type
None
-
to_string
()¶ Returns a string representation of this construct.
- Return type
str
Attributes
-
additional_options
¶ Additional options for the blue/green deployment.
- Default
no additional options
- Return type
Optional
[CfnCodeDeployBlueGreenAdditionalOptions
]
-
applications
¶ Properties of the Amazon ECS applications being deployed.
- Return type
-
creation_stack
¶ return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- Return type
List
[str
]
-
lifecycle_event_hooks
¶ Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
You can use the same function or a different one for deployment lifecycle events. Following completion of the validation tests, the Lambda {@link CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic} function calls back CodeDeploy and delivers a result of ‘Succeeded’ or ‘Failed’.
- Default
no lifecycle event hooks
- Return type
-
logical_id
¶ The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Return type
str
- Returns
the logical ID as a stringified token. This value will only get resolved during synthesis.
-
node
¶ The construct tree node associated with this construct.
- Return type
-
service_role
¶ The IAM Role for CloudFormation to use to perform blue-green deployments.
- Return type
str
-
stack
¶ The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- Return type
-
traffic_routing_config
¶ Traffic routing configuration settings.
- Default
time-based canary traffic shifting, with a 15% step percentage and a five minute bake time
- Return type
Optional
[CfnTrafficRoutingConfig
]
-
type
¶ The type of the hook (for example, “AWS::CodeDeploy::BlueGreen”).
- Return type
str
Static Methods
-
classmethod
is_cfn_element
(x)¶ Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters
x (
Any
) –- Return type
bool
- Returns
The construct as a stack element or undefined if it is not a stack element.
-
classmethod
is_construct
(x)¶ Return whether the given object is a Construct.
- Parameters
x (
Any
) –- Return type
bool