ServiceVolumeConfigurationProperty Struct
The configuration for a volume specified in the task definition as a volume that is configured at launch time.
Currently, the only supported volume type is an Amazon EBS volume.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const serviceVolumeConfigurationProperty: ecs.CfnService.ServiceVolumeConfigurationProperty = {
name: 'name',
// the properties below are optional
managedEbsVolume: {
roleArn: 'roleArn',
// the properties below are optional
encrypted: false,
filesystemType: 'filesystemType',
iops: 123,
kmsKeyId: 'kmsKeyId',
sizeInGiB: 123,
snapshotId: 'snapshotId',
tagSpecifications: [{
resourceType: 'resourceType',
// the properties below are optional
propagateTags: 'propagateTags',
tags: [{
key: 'key',
value: 'value',
}],
}],
throughput: 123,
volumeInitializationRate: 123,
volumeType: 'volumeType',
},
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
service_volume_configuration_property = ecs.CfnService.ServiceVolumeConfigurationProperty(
name="name",
# the properties below are optional
managed_ebs_volume=ecs.CfnService.ServiceManagedEBSVolumeConfigurationProperty(
role_arn="roleArn",
# the properties below are optional
encrypted=False,
filesystem_type="filesystemType",
iops=123,
kms_key_id="kmsKeyId",
size_in_gi_b=123,
snapshot_id="snapshotId",
tag_specifications=[ecs.CfnService.EBSTagSpecificationProperty(
resource_type="resourceType",
# the properties below are optional
propagate_tags="propagateTags",
tags=[CfnTag(
key="key",
value="value"
)]
)],
throughput=123,
volume_initialization_rate=123,
volume_type="volumeType"
)
)
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.ecs.*;
ServiceVolumeConfigurationProperty serviceVolumeConfigurationProperty = ServiceVolumeConfigurationProperty.builder()
.name("name")
// the properties below are optional
.managedEbsVolume(ServiceManagedEBSVolumeConfigurationProperty.builder()
.roleArn("roleArn")
// the properties below are optional
.encrypted(false)
.filesystemType("filesystemType")
.iops(123)
.kmsKeyId("kmsKeyId")
.sizeInGiB(123)
.snapshotId("snapshotId")
.tagSpecifications(List.of(EBSTagSpecificationProperty.builder()
.resourceType("resourceType")
// the properties below are optional
.propagateTags("propagateTags")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build()))
.throughput(123)
.volumeInitializationRate(123)
.volumeType("volumeType")
.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.ECS;
var serviceVolumeConfigurationProperty = new ServiceVolumeConfigurationProperty {
Name = "name",
// the properties below are optional
ManagedEbsVolume = new ServiceManagedEBSVolumeConfigurationProperty {
RoleArn = "roleArn",
// the properties below are optional
Encrypted = false,
FilesystemType = "filesystemType",
Iops = 123,
KmsKeyId = "kmsKeyId",
SizeInGiB = 123,
SnapshotId = "snapshotId",
TagSpecifications = new [] { new EBSTagSpecificationProperty {
ResourceType = "resourceType",
// the properties below are optional
PropagateTags = "propagateTags",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
} },
Throughput = 123,
VolumeInitializationRate = 123,
VolumeType = "volumeType"
}
};
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"
serviceVolumeConfigurationProperty := &ServiceVolumeConfigurationProperty{
Name: jsii.String("name"),
// the properties below are optional
ManagedEbsVolume: &ServiceManagedEBSVolumeConfigurationProperty{
RoleArn: jsii.String("roleArn"),
// the properties below are optional
Encrypted: jsii.Boolean(false),
FilesystemType: jsii.String("filesystemType"),
Iops: jsii.Number(123),
KmsKeyId: jsii.String("kmsKeyId"),
SizeInGiB: jsii.Number(123),
SnapshotId: jsii.String("snapshotId"),
TagSpecifications: []interface{}{
&EBSTagSpecificationProperty{
ResourceType: jsii.String("resourceType"),
// the properties below are optional
PropagateTags: jsii.String("propagateTags"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
},
},
Throughput: jsii.Number(123),
VolumeInitializationRate: jsii.Number(123),
VolumeType: jsii.String("volumeType"),
},
}
Properties
managedEbsVolumeoptionalIResolvable | CfnService.managed_ebs_volumeoptionaltyping.Union[IResolvable, ServiceManagedEBSVolumeConfigurationProperty]managedEbsVolumeoptionalIResolvableManagedEbsVolumeoptionalIResolvableManagedEbsVolumeoptionalinterface{} #The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf.
These settings are used to create each Amazon EBS volume, with one volume created for each task in the service. The Amazon EBS volumes are visible in your account in the Amazon EC2 console once they are created.
The name of the volume.
This value must match the volume name from the Volume object in the task definition.