Class: AWSCDK::ECS::ServiceManagedEBSVolumeConfiguration
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::ServiceManagedEBSVolumeConfiguration
- Defined in:
- ecs/service_managed_ebs_volume_configuration.rb
Overview
Represents the configuration for an ECS Service managed EBS volume.
Instance Attribute Summary collapse
-
#encrypted ⇒ Boolean?
readonly
Indicates whether the volume should be encrypted.
-
#file_system_type ⇒ AWSCDK::ECS::FileSystemType?
readonly
The Linux filesystem type for the volume.
-
#iops ⇒ Numeric?
readonly
The number of I/O operations per second (IOPS).
-
#kms_key_id ⇒ AWSCDK::KMS::IKey?
readonly
AWS Key Management Service key to use for Amazon EBS encryption.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role that allows ECS to make calls to EBS APIs on your behalf.
-
#size ⇒ AWSCDK::Size?
readonly
The size of the volume in GiB.
-
#snap_shot_id ⇒ String?
readonly
The snapshot that Amazon ECS uses to create the volume.
-
#tag_specifications ⇒ Array<AWSCDK::ECS::EBSTagSpecification>?
readonly
Specifies the tags to apply to the volume and whether to propagate those tags to the volume.
-
#throughput ⇒ Numeric?
readonly
The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
-
#volume_initialization_rate ⇒ AWSCDK::Size?
readonly
Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), at which to download the snapshot blocks from Amazon S3 to the volume.
-
#volume_type ⇒ AWSCDK::EC2::EbsDeviceVolumeType?
readonly
The volume type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(encrypted: nil, file_system_type: nil, iops: nil, kms_key_id: nil, role: nil, size: nil, snap_shot_id: nil, tag_specifications: nil, throughput: nil, volume_initialization_rate: nil, volume_type: nil) ⇒ ServiceManagedEBSVolumeConfiguration
constructor
A new instance of ServiceManagedEBSVolumeConfiguration.
- #to_jsii ⇒ Object
Constructor Details
#initialize(encrypted: nil, file_system_type: nil, iops: nil, kms_key_id: nil, role: nil, size: nil, snap_shot_id: nil, tag_specifications: nil, throughput: nil, volume_initialization_rate: nil, volume_type: nil) ⇒ ServiceManagedEBSVolumeConfiguration
Returns a new instance of ServiceManagedEBSVolumeConfiguration.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 18 def initialize(encrypted: nil, file_system_type: nil, iops: nil, kms_key_id: nil, role: nil, size: nil, snap_shot_id: nil, tag_specifications: nil, throughput: nil, volume_initialization_rate: nil, volume_type: nil) @encrypted = encrypted Jsii::Type.check_type(@encrypted, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "encrypted") unless @encrypted.nil? @file_system_type = file_system_type Jsii::Type.check_type(@file_system_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkZpbGVTeXN0ZW1UeXBlIn0=")), "fileSystemType") unless @file_system_type.nil? @iops = iops Jsii::Type.check_type(@iops, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "iops") unless @iops.nil? @kms_key_id = kms_key_id Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "kmsKeyId") unless @kms_key_id.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? @size = size Jsii::Type.check_type(@size, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "size") unless @size.nil? @snap_shot_id = snap_shot_id Jsii::Type.check_type(@snap_shot_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snapShotId") unless @snap_shot_id.nil? @tag_specifications = tag_specifications.is_a?(Array) ? tag_specifications.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::ECS::EBSTagSpecification.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tag_specifications Jsii::Type.check_type(@tag_specifications, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuRUJTVGFnU3BlY2lmaWNhdGlvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "tagSpecifications") unless @tag_specifications.nil? @throughput = throughput Jsii::Type.check_type(@throughput, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "throughput") unless @throughput.nil? @volume_initialization_rate = volume_initialization_rate Jsii::Type.check_type(@volume_initialization_rate, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "volumeInitializationRate") unless @volume_initialization_rate.nil? @volume_type = volume_type Jsii::Type.check_type(@volume_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkVic0RldmljZVZvbHVtZVR5cGUifQ==")), "volumeType") unless @volume_type.nil? end |
Instance Attribute Details
#encrypted ⇒ Boolean? (readonly)
Default: - Default Amazon EBS encryption.
Indicates whether the volume should be encrypted.
47 48 49 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 47 def encrypted @encrypted end |
#file_system_type ⇒ AWSCDK::ECS::FileSystemType? (readonly)
Default: - FileSystemType.XFS
The Linux filesystem type for the volume.
For volumes created from a snapshot, you must specify the same filesystem type that the volume was using when the snapshot was created. The available filesystem types are ext3, ext4, and xfs.
56 57 58 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 56 def file_system_type @file_system_type end |
#iops ⇒ Numeric? (readonly)
Default: - undefined
The number of I/O operations per second (IOPS).
For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.
The following are the supported values for each volume type.
- gp3: 3,000 - 16,000 IOPS
- io1: 100 - 64,000 IOPS
- io2: 100 - 256,000 IOPS
This parameter is required for io1 and io2 volume types. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for st1, sc1, or standard volume types.
74 75 76 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 74 def iops @iops end |
#kms_key_id ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - When encryption is turned on and no kmsKey is specified, the default AWS managed key for Amazon EBS volumes is used.
AWS Key Management Service key to use for Amazon EBS encryption.
79 80 81 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 79 def kms_key_id @kms_key_id end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - automatically generated role.
An IAM role that allows ECS to make calls to EBS APIs on your behalf.
This role is required to create and manage the Amazon EBS volume.
86 87 88 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 86 def role @role end |
#size ⇒ AWSCDK::Size? (readonly)
Default: - The snapshot size is used for the volume size if you specify snapshotId, otherwise this parameter is required.
The size of the volume in GiB.
You must specify either size or snapshot_id.
You can optionally specify a volume size greater than or equal to the snapshot size.
The following are the supported volume size values for each volume type.
- gp2 and gp3: 1-16,384
- io1 and io2: 4-16,384
- st1 and sc1: 125-16,384
- standard: 1-1,024
101 102 103 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 101 def size @size end |
#snap_shot_id ⇒ String? (readonly)
Default: - No snapshot.
The snapshot that Amazon ECS uses to create the volume.
You must specify either size or snapshot_id.
108 109 110 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 108 def snap_shot_id @snap_shot_id end |
#tag_specifications ⇒ Array<AWSCDK::ECS::EBSTagSpecification>? (readonly)
Default: - No tags are specified.
Specifies the tags to apply to the volume and whether to propagate those tags to the volume.
113 114 115 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 113 def tag_specifications @tag_specifications end |
#throughput ⇒ Numeric? (readonly)
Default: - No throughput.
The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
This parameter is only supported for the gp3 volume type.
120 121 122 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 120 def throughput @throughput end |
#volume_initialization_rate ⇒ AWSCDK::Size? (readonly)
Default: undefined - The volume initialization rate is not set.
Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), at which to download the snapshot blocks from Amazon S3 to the volume.
Valid range is between 100 and 300 MiB/s.
127 128 129 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 127 def volume_initialization_rate @volume_initialization_rate end |
#volume_type ⇒ AWSCDK::EC2::EbsDeviceVolumeType? (readonly)
Default: - ec2.EbsDeviceVolumeType.GP2
The volume type.
132 133 134 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 132 def volume_type @volume_type end |
Class Method Details
.jsii_properties ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 134 def self.jsii_properties { :encrypted => "encrypted", :file_system_type => "fileSystemType", :iops => "iops", :kms_key_id => "kmsKeyId", :role => "role", :size => "size", :snap_shot_id => "snapShotId", :tag_specifications => "tagSpecifications", :throughput => "throughput", :volume_initialization_rate => "volumeInitializationRate", :volume_type => "volumeType", } end |
Instance Method Details
#to_jsii ⇒ Object
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'ecs/service_managed_ebs_volume_configuration.rb', line 150 def to_jsii result = {} result.merge!({ "encrypted" => @encrypted, "fileSystemType" => @file_system_type, "iops" => @iops, "kmsKeyId" => @kms_key_id, "role" => @role, "size" => @size, "snapShotId" => @snap_shot_id, "tagSpecifications" => @tag_specifications, "throughput" => @throughput, "volumeInitializationRate" => @volume_initialization_rate, "volumeType" => @volume_type, }) result.compact end |