Class: AWSCDK::ECS::EnvironmentFile
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::ECS::EnvironmentFile
- Defined in:
- ecs/environment_file.rb
Overview
Constructs for types of environment files.
Direct Known Subclasses
Class Method Summary collapse
-
.from_asset(path, options = nil) ⇒ AWSCDK::ECS::AssetEnvironmentFile
Loads the environment file from a local disk path.
-
.from_bucket(bucket, key, object_version = nil) ⇒ AWSCDK::ECS::S3EnvironmentFile
Loads the environment file from an S3 bucket.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#bind(scope) ⇒ AWSCDK::ECS::EnvironmentFileConfig
Called when the container is initialized to allow this object to bind to the stack.
-
#initialize ⇒ EnvironmentFile
constructor
A new instance of EnvironmentFile.
Constructor Details
#initialize ⇒ EnvironmentFile
Returns a new instance of EnvironmentFile.
8 9 10 |
# File 'ecs/environment_file.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.from_asset(path, options = nil) ⇒ AWSCDK::ECS::AssetEnvironmentFile
Loads the environment file from a local disk path.
23 24 25 26 27 28 |
# File 'ecs/environment_file.rb', line 23 def self.from_asset(path, = nil) Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") = .is_a?(Hash) ? ::AWSCDK::S3Assets::AssetOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczNfYXNzZXRzLkFzc2V0T3B0aW9ucyJ9")), "options") unless .nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.EnvironmentFile", "fromAsset", [path, ]) end |
.from_bucket(bucket, key, object_version = nil) ⇒ AWSCDK::ECS::S3EnvironmentFile
Loads the environment file from an S3 bucket.
36 37 38 39 40 41 |
# File 'ecs/environment_file.rb', line 36 def self.from_bucket(bucket, key, object_version = nil) Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Type.check_type(object_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectVersion") unless object_version.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.EnvironmentFile", "fromBucket", [bucket, key, object_version]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'ecs/environment_file.rb', line 12 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(scope) ⇒ AWSCDK::ECS::EnvironmentFileConfig
Called when the container is initialized to allow this object to bind to the stack.
47 48 49 50 |
# File 'ecs/environment_file.rb', line 47 def bind(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") jsii_call_method("bind", [scope]) end |