CfnSnapshotProps Struct Added in v2.276.0
Properties for defining a CfnSnapshot.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnSnapshotProps: ec2.CfnSnapshotProps = {
volumeId: 'volumeId',
// the properties below are optional
description: 'description',
tags: [{
key: 'key',
value: 'value',
}],
};
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_ec2 as ec2
cfn_snapshot_props = ec2.CfnSnapshotProps(
volume_id="volumeId",
# the properties below are optional
description="description",
tags=[ec2.CfnSnapshot.TagsItemsProperty(
key="key",
value="value"
)]
)
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.ec2.*;
CfnSnapshotProps cfnSnapshotProps = CfnSnapshotProps.builder()
.volumeId("volumeId")
// the properties below are optional
.description("description")
.tags(List.of(TagsItemsProperty.builder()
.key("key")
.value("value")
.build()))
.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.EC2;
var cfnSnapshotProps = new CfnSnapshotProps {
VolumeId = "volumeId",
// the properties below are optional
Description = "description",
Tags = new [] { new TagsItemsProperty {
Key = "key",
Value = "value"
} }
};
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"
cfnSnapshotProps := &CfnSnapshotProps{
VolumeId: jsii.String("volumeId"),
// the properties below are optional
Description: jsii.String("description"),
Tags: []TagsItemsProperty{
&TagsItemsProperty{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#A description for the snapshot.
tagsoptionalCfnSnapshot.TagsItemsProperty[]tagsoptionaltyping.List[TagsItemsProperty]tagsoptionalList<TagsItemsProperty>TagsoptionalTagsItemsProperty[]Tagsoptional*[]TagsItemsProperty#Any tags assigned to the snapshot.
The ID of the Amazon EBS volume.