Class: AWSCDK::Batch::ECSVolume
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Batch::ECSVolume
- Defined in:
- batch/ecs_volume.rb
Overview
Represents a Volume that can be mounted to a container that uses ECS.
Direct Known Subclasses
Class Method Summary collapse
-
.efs(options) ⇒ AWSCDK::Batch::EFSVolume
Creates a Volume that uses an AWS Elastic File System (EFS);.
-
.host(options) ⇒ AWSCDK::Batch::HostVolume
Creates a Host volume.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#container_path ⇒ String
The path on the container that this volume will be mounted to.
-
#initialize(options) ⇒ ECSVolume
constructor
A new instance of ECSVolume.
-
#name ⇒ String
The name of this volume.
-
#readonly ⇒ Boolean?
Whether or not the container has readonly access to this volume.
Constructor Details
#initialize(options) ⇒ ECSVolume
Returns a new instance of ECSVolume.
9 10 11 12 13 |
# File 'batch/ecs_volume.rb', line 9 def initialize() = .is_a?(Hash) ? ::AWSCDK::Batch::ECSVolumeOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guRWNzVm9sdW1lT3B0aW9ucyJ9")), "options") Jsii::Object.instance_method(:initialize).bind(self).call() end |
Class Method Details
.efs(options) ⇒ AWSCDK::Batch::EFSVolume
Creates a Volume that uses an AWS Elastic File System (EFS);
this volume can grow and shrink as needed
30 31 32 33 34 |
# File 'batch/ecs_volume.rb', line 30 def self.efs() = .is_a?(Hash) ? ::AWSCDK::Batch::EFSVolumeOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guRWZzVm9sdW1lT3B0aW9ucyJ9")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.EcsVolume", "efs", []) end |
.host(options) ⇒ AWSCDK::Batch::HostVolume
Creates a Host volume.
This volume will persist on the host at the specified host_path.
If the host_path is not specified, Docker will choose the host path. In this case,
the data may not persist after the containers that use it stop running.
44 45 46 47 48 |
# File 'batch/ecs_volume.rb', line 44 def self.host() = .is_a?(Hash) ? ::AWSCDK::Batch::HostVolumeOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSG9zdFZvbHVtZU9wdGlvbnMifQ==")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.EcsVolume", "host", []) end |
.jsii_overridable_methods ⇒ Object
15 16 17 18 19 20 21 |
# File 'batch/ecs_volume.rb', line 15 def self.jsii_overridable_methods { :container_path => { kind: :property, name: "containerPath", is_optional: false }, :name => { kind: :property, name: "name", is_optional: false }, :readonly => { kind: :property, name: "readonly", is_optional: true }, } end |
Instance Method Details
#container_path ⇒ String
The path on the container that this volume will be mounted to.
53 54 55 |
# File 'batch/ecs_volume.rb', line 53 def container_path() jsii_get_property("containerPath") end |
#name ⇒ String
The name of this volume.
60 61 62 |
# File 'batch/ecs_volume.rb', line 60 def name() jsii_get_property("name") end |
#readonly ⇒ Boolean?
Default: false
Whether or not the container has readonly access to this volume.
68 69 70 |
# File 'batch/ecs_volume.rb', line 68 def readonly() jsii_get_property("readonly") end |