Class: AWSCDK::ECS::ServiceManagedVolume

Inherits:
Constructs::Construct
  • Object
show all
Defined in:
ecs/service_managed_volume.rb

Overview

Represents a service-managed volume and always configured at launch.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ ServiceManagedVolume

Returns a new instance of ServiceManagedVolume.

Parameters:



11
12
13
14
15
16
17
# File 'ecs/service_managed_volume.rb', line 11

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::ECS::ServiceManagedVolumeProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNlcnZpY2VNYW5hZ2VkVm9sdW1lUHJvcHMifQ==")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.jsii_overridable_methodsObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'ecs/service_managed_volume.rb', line 19

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :configured_at_launch => { kind: :property, name: "configuredAtLaunch", is_optional: false },
    :name => { kind: :property, name: "name", is_optional: false },
    :role => { kind: :property, name: "role", is_optional: false },
    :config => { kind: :property, name: "config", is_optional: true },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :mount_in => { kind: :method, name: "mountIn", is_optional: false },
  }
end

Instance Method Details

#configAWSCDK::ECS::ServiceManagedEBSVolumeConfiguration?

Volume configuration.



65
66
67
# File 'ecs/service_managed_volume.rb', line 65

def config()
  jsii_get_property("config")
end

#configured_at_launchBoolean

configuredAtLaunch indicates volume at launch time, referenced by taskdefinition volume.

Returns:

  • (Boolean)


42
43
44
# File 'ecs/service_managed_volume.rb', line 42

def configured_at_launch()
  jsii_get_property("configuredAtLaunch")
end

#mount_in(container, mount_point) ⇒ void

This method returns an undefined value.

Mounts the service managed volume to a specified container at a defined mount point.

Parameters:



97
98
99
100
101
102
# File 'ecs/service_managed_volume.rb', line 97

def mount_in(container, mount_point)
  Jsii::Type.check_type(container, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNvbnRhaW5lckRlZmluaXRpb24ifQ==")), "container")
  mount_point = mount_point.is_a?(Hash) ? ::AWSCDK::ECS::ContainerMountPoint.new(**mount_point.transform_keys(&:to_sym)) : mount_point
  Jsii::Type.check_type(mount_point, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNvbnRhaW5lck1vdW50UG9pbnQifQ==")), "mountPoint")
  jsii_call_method("mountIn", [container, mount_point])
end

#nameString

Name of the volume, referenced by task definition and mount point.

Returns:

  • (String)


49
50
51
# File 'ecs/service_managed_volume.rb', line 49

def name()
  jsii_get_property("name")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


35
36
37
# File 'ecs/service_managed_volume.rb', line 35

def node()
  jsii_get_property("node")
end

#roleAWSCDK::IAM::IRole

An IAM role that allows ECS to make calls to EBS APIs.

If not provided, a new role with appropriate permissions will be created by default.

Returns:



58
59
60
# File 'ecs/service_managed_volume.rb', line 58

def role()
  jsii_get_property("role")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


72
73
74
# File 'ecs/service_managed_volume.rb', line 72

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



85
86
87
88
89
90
# File 'ecs/service_managed_volume.rb', line 85

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end