CfnCodeDeployBlueGreenHook L1 construct
A CloudFormation Hook for CodeDeploy blue-green ECS deployments.
Example
declare const cfnTemplate: cfn_inc.CfnInclude;
const hook: core.CfnHook = cfnTemplate.getHook('MyOutput');
// mutating the hook
declare const myRole: iam.Role;
const codeDeployHook = hook as core.CfnCodeDeployBlueGreenHook;
codeDeployHook.serviceRole = myRole.roleArn;
# 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
CfnInclude cfnTemplate;
// mutating the hook
Role myRole;
CfnHook hook = cfnTemplate.getHook("MyOutput");
CfnCodeDeployBlueGreenHook codeDeployHook = (CfnCodeDeployBlueGreenHook)hook;
codeDeployHook.getServiceRole() = myRole.getRoleArn();
// Install: dotnet add package Amazon.CDK.Lib
CfnInclude cfnTemplate;
// mutating the hook
Role myRole;
var hook = cfnTemplate.GetHook("MyOutput");
var codeDeployHook = (CfnCodeDeployBlueGreenHook)hook;
codeDeployHook.ServiceRole = myRole.RoleArn;
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cfnTemplate CfnInclude
// mutating the hook
var myRole Role
hook := cfnTemplate.GetHook(jsii.String("MyOutput"))
codeDeployHook := hook.(CfnCodeDeployBlueGreenHook)
codeDeployHook.serviceRole = myRole.roleArn
Initializer
new CfnCodeDeployBlueGreenHook(scope: Construct, id: string, props: CfnCodeDeployBlueGreenHookProps)
CfnCodeDeployBlueGreenHook(scope: Construct, id: str, props: CfnCodeDeployBlueGreenHookProps)
new CfnCodeDeployBlueGreenHook(Construct scope, String id, CfnCodeDeployBlueGreenHookProps props)
new CfnCodeDeployBlueGreenHook(Construct scope, string id, CfnCodeDeployBlueGreenHookProps props)
NewCfnCodeDeployBlueGreenHook(Scope Construct, Id *string, Props CfnCodeDeployBlueGreenHookProps)
Construct Props
additionalOptionsoptionalCfnCodeDeployBlueGreenAdditionalOptionsadditional_optionsoptionalCfnCodeDeployBlueGreenAdditionalOptionsadditionalOptionsoptionalCfnCodeDeployBlueGreenAdditionalOptionsAdditionalOptionsoptionalCfnCodeDeployBlueGreenAdditionalOptionsAdditionalOptionsoptionalCfnCodeDeployBlueGreenAdditionalOptions#Default: no additional options
applicationsCfnCodeDeployBlueGreenApplication[]applicationstyping.List[CfnCodeDeployBlueGreenApplication]applicationsList<CfnCodeDeployBlueGreenApplication>ApplicationsCfnCodeDeployBlueGreenApplication[]Applications*[]CfnCodeDeployBlueGreenApplicationrequired#lifecycleEventHooksoptionalCfnCodeDeployBlueGreenLifecycleEventHookslifecycle_event_hooksoptionalCfnCodeDeployBlueGreenLifecycleEventHookslifecycleEventHooksoptionalCfnCodeDeployBlueGreenLifecycleEventHooksLifecycleEventHooksoptionalCfnCodeDeployBlueGreenLifecycleEventHooksLifecycleEventHooksoptionalCfnCodeDeployBlueGreenLifecycleEventHooks#Default: no lifecycle event hooks
notes
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'.
trafficRoutingConfigoptionalCfnTrafficRoutingConfigtraffic_routing_configoptionalCfnTrafficRoutingConfigtrafficRoutingConfigoptionalCfnTrafficRoutingConfigTrafficRoutingConfigoptionalCfnTrafficRoutingConfigTrafficRoutingConfigoptionalCfnTrafficRoutingConfig#Default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time
Properties
additionalOptionsmay be undefinedCfnCodeDeployBlueGreenAdditionalOptionsadditional_optionsmay be undefinedCfnCodeDeployBlueGreenAdditionalOptionsadditionalOptionsmay be undefinedCfnCodeDeployBlueGreenAdditionalOptionsAdditionalOptionsmay be undefinedCfnCodeDeployBlueGreenAdditionalOptionsAdditionalOptionsmay be undefinedCfnCodeDeployBlueGreenAdditionalOptions#Default: no additional options
applicationsCfnCodeDeployBlueGreenApplication[]applicationstyping.List[CfnCodeDeployBlueGreenApplication]applicationsList<CfnCodeDeployBlueGreenApplication>ApplicationsCfnCodeDeployBlueGreenApplication[]Applications*[]CfnCodeDeployBlueGreenApplicationrequired#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#lifecycleEventHooksmay be undefinedCfnCodeDeployBlueGreenLifecycleEventHookslifecycle_event_hooksmay be undefinedCfnCodeDeployBlueGreenLifecycleEventHookslifecycleEventHooksmay be undefinedCfnCodeDeployBlueGreenLifecycleEventHooksLifecycleEventHooksmay be undefinedCfnCodeDeployBlueGreenLifecycleEventHooksLifecycleEventHooksmay be undefinedCfnCodeDeployBlueGreenLifecycleEventHooks#Default: no lifecycle event hooks
notes
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'.
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).
CfnElements must be defined within a stack scope (directly or indirectly).
trafficRoutingConfigmay be undefinedCfnTrafficRoutingConfigtraffic_routing_configmay be undefinedCfnTrafficRoutingConfigtrafficRoutingConfigmay be undefinedCfnTrafficRoutingConfigTrafficRoutingConfigmay be undefinedCfnTrafficRoutingConfigTrafficRoutingConfigmay be undefinedCfnTrafficRoutingConfig#Default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time
Methods
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.
returns
Returns: The construct as a stack element or undefined if it is not a stack element.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#1 parameter
Parameters
newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId— The new logical ID to use for this stack element.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.