Class: AWSCDK::ECS::ServiceManagedVolume
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::ECS::ServiceManagedVolume
- 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
-
#config ⇒ AWSCDK::ECS::ServiceManagedEBSVolumeConfiguration?
Volume configuration.
-
#configured_at_launch ⇒ Boolean
configuredAtLaunch indicates volume at launch time, referenced by taskdefinition volume.
-
#initialize(scope, id, props) ⇒ ServiceManagedVolume
constructor
A new instance of ServiceManagedVolume.
-
#mount_in(container, mount_point) ⇒ void
Mounts the service managed volume to a specified container at a defined mount point.
-
#name ⇒ String
Name of the volume, referenced by task definition and mount point.
-
#node ⇒ Constructs::Node
The tree node.
-
#role ⇒ AWSCDK::IAM::IRole
An IAM role that allows ECS to make calls to EBS APIs.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ ServiceManagedVolume
Returns a new instance of ServiceManagedVolume.
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_methods ⇒ Object
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
#config ⇒ AWSCDK::ECS::ServiceManagedEBSVolumeConfiguration?
Volume configuration.
65 66 67 |
# File 'ecs/service_managed_volume.rb', line 65 def config() jsii_get_property("config") end |
#configured_at_launch ⇒ Boolean
configuredAtLaunch indicates volume at launch time, referenced by taskdefinition volume.
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.
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 |
#name ⇒ String
Name of the volume, referenced by task definition and mount point.
49 50 51 |
# File 'ecs/service_managed_volume.rb', line 49 def name() jsii_get_property("name") end |
#node ⇒ Constructs::Node
The tree node.
35 36 37 |
# File 'ecs/service_managed_volume.rb', line 35 def node() jsii_get_property("node") end |
#role ⇒ AWSCDK::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.
58 59 60 |
# File 'ecs/service_managed_volume.rb', line 58 def role() jsii_get_property("role") end |
#to_string ⇒ String
Returns a string representation of this construct.
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.
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 |