Class CfnCodeDeployBlueGreenHook
A CloudFormation Hook for CodeDeploy blue-green ECS deployments.
Inherited Members
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCodeDeployBlueGreenHook : CfnHook
Syntax (vb)
Public Class CfnCodeDeployBlueGreenHook Inherits CfnHook
Remarks
ExampleMetadata: infused
Examples
CfnInclude cfnTemplate;
// mutating the hook
Role myRole;
var hook = cfnTemplate.GetHook("MyOutput");
var codeDeployHook = (CfnCodeDeployBlueGreenHook)hook;
codeDeployHook.ServiceRole = myRole.RoleArn;
Synopsis
Constructors
| CfnCodeDeployBlueGreenHook(Construct, string, ICfnCodeDeployBlueGreenHookProps) | Creates a new CodeDeploy blue-green ECS Hook. |
Properties
| AdditionalOptions | Additional options for the blue/green deployment. |
| Applications | Properties of the Amazon ECS applications being deployed. |
| LifecycleEventHooks | Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment. |
| ServiceRole | The IAM Role for CloudFormation to use to perform blue-green deployments. |
| TrafficRoutingConfig | Traffic routing configuration settings. |
Methods
| RenderProperties(IDictionary<string, object>?) | A CloudFormation Hook for CodeDeploy blue-green ECS deployments. |
Constructors
CfnCodeDeployBlueGreenHook(Construct, string, ICfnCodeDeployBlueGreenHookProps)
Creates a new CodeDeploy blue-green ECS Hook.
public CfnCodeDeployBlueGreenHook(Construct scope, string id, ICfnCodeDeployBlueGreenHookProps props)
Parameters
- scope Construct
the scope to create the hook in (usually the containing Stack object).
- id string
the identifier of the construct - will be used to generate the logical ID of the Hook.
- props ICfnCodeDeployBlueGreenHookProps
the properties of the Hook.
Remarks
ExampleMetadata: infused
Properties
AdditionalOptions
Additional options for the blue/green deployment.
public virtual ICfnCodeDeployBlueGreenAdditionalOptions? AdditionalOptions { get; set; }
Property Value
ICfnCodeDeployBlueGreenAdditionalOptions
Remarks
Default: - no additional options
Applications
Properties of the Amazon ECS applications being deployed.
public virtual ICfnCodeDeployBlueGreenApplication[] Applications { get; set; }
Property Value
ICfnCodeDeployBlueGreenApplication[]
Remarks
ExampleMetadata: infused
LifecycleEventHooks
Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
public virtual ICfnCodeDeployBlueGreenLifecycleEventHooks? LifecycleEventHooks { get; set; }
Property Value
ICfnCodeDeployBlueGreenLifecycleEventHooks
Remarks
You can use the same function or a different one for deployment lifecycle events.
Following completion of the validation tests,
the Lambda CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic
function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
Default: - no lifecycle event hooks
ServiceRole
The IAM Role for CloudFormation to use to perform blue-green deployments.
public virtual string ServiceRole { get; set; }
Property Value
Remarks
ExampleMetadata: infused
TrafficRoutingConfig
Traffic routing configuration settings.
public virtual ICfnTrafficRoutingConfig? TrafficRoutingConfig { get; set; }
Property Value
Remarks
Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time
Methods
RenderProperties(IDictionary<string, object>?)
A CloudFormation Hook for CodeDeploy blue-green ECS deployments.
protected override IDictionary<string, object>? RenderProperties(IDictionary<string, object>? props = null)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
ExampleMetadata: infused