Class: AWSCDK::ECS::CfnService::ServiceVolumeConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_service.rb

Overview

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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, managed_ebs_volume: nil) ⇒ ServiceVolumeConfigurationProperty

Returns a new instance of ServiceVolumeConfigurationProperty.

Parameters:



3193
3194
3195
3196
3197
3198
# File 'ecs/cfn_service.rb', line 3193

def initialize(name:, managed_ebs_volume: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @managed_ebs_volume = managed_ebs_volume.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::ServiceManagedEBSVolumeConfigurationProperty.new(**managed_ebs_volume.transform_keys(&:to_sym)) : managed_ebs_volume
  Jsii::Type.check_type(@managed_ebs_volume, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5TZXJ2aWNlTWFuYWdlZEVCU1ZvbHVtZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "managedEbsVolume") unless @managed_ebs_volume.nil?
end

Instance Attribute Details

#managed_ebs_volumeAWSCDK::IResolvable, ... (readonly)

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.



3213
3214
3215
# File 'ecs/cfn_service.rb', line 3213

def managed_ebs_volume
  @managed_ebs_volume
end

#nameString (readonly)

The name of the volume.

This value must match the volume name from the Volume object in the task definition.



3206
3207
3208
# File 'ecs/cfn_service.rb', line 3206

def name
  @name
end

Class Method Details

.jsii_propertiesObject



3215
3216
3217
3218
3219
3220
# File 'ecs/cfn_service.rb', line 3215

def self.jsii_properties
  {
    :name => "name",
    :managed_ebs_volume => "managedEbsVolume",
  }
end

Instance Method Details

#to_jsiiObject



3222
3223
3224
3225
3226
3227
3228
3229
# File 'ecs/cfn_service.rb', line 3222

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "managedEbsVolume" => @managed_ebs_volume,
  })
  result.compact
end