DeploymentPreferenceProperty Struct
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sam as sam } from 'aws-cdk-lib';
const deploymentPreferenceProperty: sam.CfnFunction.DeploymentPreferenceProperty = {
alarms: ['alarms'],
enabled: false,
hooks: {
postTraffic: 'postTraffic',
preTraffic: 'preTraffic',
},
role: 'role',
type: 'type',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sam as sam
deployment_preference_property = sam.CfnFunction.DeploymentPreferenceProperty(
alarms=["alarms"],
enabled=False,
hooks=sam.CfnFunction.HooksProperty(
post_traffic="postTraffic",
pre_traffic="preTraffic"
),
role="role",
type="type"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sam.*;
DeploymentPreferenceProperty deploymentPreferenceProperty = DeploymentPreferenceProperty.builder()
.alarms(List.of("alarms"))
.enabled(false)
.hooks(HooksProperty.builder()
.postTraffic("postTraffic")
.preTraffic("preTraffic")
.build())
.role("role")
.type("type")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SAM;
var deploymentPreferenceProperty = new DeploymentPreferenceProperty {
Alarms = new [] { "alarms" },
Enabled = false,
Hooks = new HooksProperty {
PostTraffic = "postTraffic",
PreTraffic = "preTraffic"
},
Role = "role",
Type = "type"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
deploymentPreferenceProperty := &DeploymentPreferenceProperty{
Alarms: []*string{
jsii.String("alarms"),
},
Enabled: jsii.Boolean(false),
Hooks: &HooksProperty{
PostTraffic: jsii.String("postTraffic"),
PreTraffic: jsii.String("preTraffic"),
},
Role: jsii.String("role"),
Type: jsii.String("type"),
}
Properties
alarmsoptionalstring[]alarmsoptionaltyping.List[str]alarmsoptionalList<String>Alarmsoptionalstring[]Alarmsoptional*[]*string#enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{}#hooksoptionalIResolvable | CfnFunction.HooksPropertyhooksoptionaltyping.Union[IResolvable, HooksProperty]hooksoptionalIResolvableHooksoptionalIResolvableHooksoptionalinterface{}#