Class: AWSCDK::ECS::ServiceManagedVolumeProps

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

Overview

Represents the Volume configuration for an ECS service.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ServiceManagedVolumeProps.

Parameters:



9
10
11
12
13
14
# File 'ecs/service_managed_volume_props.rb', line 9

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::ServiceManagedEBSVolumeConfiguration.new(**managed_ebs_volume.transform_keys(&:to_sym)) : managed_ebs_volume
  Jsii::Type.check_type(@managed_ebs_volume, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNlcnZpY2VNYW5hZ2VkRUJTVm9sdW1lQ29uZmlndXJhdGlvbiJ9")), "managedEBSVolume") unless @managed_ebs_volume.nil?
end

Instance Attribute Details

#managed_ebs_volumeAWSCDK::ECS::ServiceManagedEBSVolumeConfiguration? (readonly)

Note:

Default: - undefined

Configuration for an Amazon Elastic Block Store (EBS) volume managed by ECS.



26
27
28
# File 'ecs/service_managed_volume_props.rb', line 26

def managed_ebs_volume
  @managed_ebs_volume
end

#nameString (readonly)

The name of the volume.

This corresponds to the name provided in the ECS TaskDefinition.

Returns:

  • (String)


21
22
23
# File 'ecs/service_managed_volume_props.rb', line 21

def name
  @name
end

Class Method Details

.jsii_propertiesObject



28
29
30
31
32
33
# File 'ecs/service_managed_volume_props.rb', line 28

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

Instance Method Details

#to_jsiiObject



35
36
37
38
39
40
41
42
# File 'ecs/service_managed_volume_props.rb', line 35

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