Class LambdaDeploymentGroup
Inherited Members
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.AWS.CodeDeploy.dll
Syntax (csharp)
public class LambdaDeploymentGroup : Resource, ILambdaDeploymentGroup, IResource, IConstruct, IDependable
Syntax (vb)
Public Class LambdaDeploymentGroup
Inherits Resource
Implements ILambdaDeploymentGroup, IResource, IConstruct, IDependable
Remarks
Resource: AWS::CodeDeploy::DeploymentGroup
ExampleMetadata: infused
Examples
LambdaApplication application;
Alias alias;
var config = new CustomLambdaDeploymentConfig(this, "CustomConfig", new CustomLambdaDeploymentConfigProps {
Type = CustomLambdaDeploymentConfigType.CANARY,
Interval = Duration.Minutes(1),
Percentage = 5
});
var deploymentGroup = new LambdaDeploymentGroup(this, "BlueGreenDeployment", new LambdaDeploymentGroupProps {
Application = application,
Alias = alias,
DeploymentConfig = config
});
Synopsis
Constructors
LambdaDeploymentGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LambdaDeploymentGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
LambdaDeploymentGroup(Construct, String, ILambdaDeploymentGroupProps) |
Properties
Application | The reference to the CodeDeploy Lambda Application that this Deployment Group belongs to. |
DeploymentConfig | The Deployment Configuration this Group uses. |
DeploymentGroupArn | The ARN of this Deployment Group. |
DeploymentGroupName | The physical name of the CodeDeploy Deployment Group. |
Role |
Methods
AddAlarm(IAlarm) | Associates an additional alarm with this Deployment Group. |
AddPostHook(IFunction) | Associate a function to run after deployment completes. |
AddPreHook(IFunction) | Associate a function to run before deployment begins. |
FromLambdaDeploymentGroupAttributes(Construct, String, ILambdaDeploymentGroupAttributes) | Import an Lambda Deployment Group defined either outside the CDK app, or in a different AWS region. |
GrantPutLifecycleEventHookExecutionStatus(IGrantable) | Grant a principal permission to codedeploy:PutLifecycleEventHookExecutionStatus on this deployment group resource. |
Validate() | Validate the current construct. |
Constructors
LambdaDeploymentGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LambdaDeploymentGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LambdaDeploymentGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LambdaDeploymentGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
LambdaDeploymentGroup(Construct, String, ILambdaDeploymentGroupProps)
public LambdaDeploymentGroup(Construct scope, string id, ILambdaDeploymentGroupProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ILambdaDeploymentGroupProps
Properties
Application
The reference to the CodeDeploy Lambda Application that this Deployment Group belongs to.
public virtual ILambdaApplication Application { get; }
Property Value
DeploymentConfig
The Deployment Configuration this Group uses.
public virtual ILambdaDeploymentConfig DeploymentConfig { get; }
Property Value
DeploymentGroupArn
The ARN of this Deployment Group.
public virtual string DeploymentGroupArn { get; }
Property Value
System.String
DeploymentGroupName
The physical name of the CodeDeploy Deployment Group.
public virtual string DeploymentGroupName { get; }
Property Value
System.String
Role
Methods
AddAlarm(IAlarm)
Associates an additional alarm with this Deployment Group.
public virtual void AddAlarm(IAlarm alarm)
Parameters
- alarm IAlarm
the alarm to associate with this Deployment Group.
AddPostHook(IFunction)
Associate a function to run after deployment completes.
public virtual void AddPostHook(IFunction postHook)
Parameters
- postHook IFunction
function to run after deployment completes.
Remarks
Throws: an error if a post-hook function is already configured
AddPreHook(IFunction)
Associate a function to run before deployment begins.
public virtual void AddPreHook(IFunction preHook)
Parameters
- preHook IFunction
function to run before deployment beings.
Remarks
Throws: an error if a pre-hook function is already configured
FromLambdaDeploymentGroupAttributes(Construct, String, ILambdaDeploymentGroupAttributes)
Import an Lambda Deployment Group defined either outside the CDK app, or in a different AWS region.
public static ILambdaDeploymentGroup FromLambdaDeploymentGroupAttributes(Construct scope, string id, ILambdaDeploymentGroupAttributes attrs)
Parameters
- scope Constructs.Construct
the parent Construct for this new Construct.
- id System.String
the logical ID of this new Construct.
- attrs ILambdaDeploymentGroupAttributes
the properties of the referenced Deployment Group.
Returns
a Construct representing a reference to an existing Deployment Group
GrantPutLifecycleEventHookExecutionStatus(IGrantable)
Grant a principal permission to codedeploy:PutLifecycleEventHookExecutionStatus on this deployment group resource.
public virtual Grant GrantPutLifecycleEventHookExecutionStatus(IGrantable grantee)
Parameters
- grantee IGrantable
to grant permission to.
Returns
Validate()
Validate the current construct.
protected override string[] Validate()
Returns
System.String[]
Overrides
Remarks
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.