Class: AWSCDK::ECS::CredentialSpec
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::ECS::CredentialSpec
- Defined in:
- ecs/credential_spec.rb
Overview
Base construct for a credential specification (CredSpec).
Direct Known Subclasses
Class Method Summary collapse
-
.arn_for_s3_object(bucket, key) ⇒ String
Helper method to generate the ARN for a S3 object.
-
.arn_for_ssm_parameter(parameter) ⇒ String
Helper method to generate the ARN for a SSM parameter.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#bind ⇒ AWSCDK::ECS::CredentialSpecConfig
Called when the container is initialized to allow this object to bind to the stack.
-
#file_location ⇒ String
Location or ARN from where to retrieve the CredSpec file.
-
#initialize(prefix_id, file_location) ⇒ CredentialSpec
constructor
A new instance of CredentialSpec.
-
#prefix_id ⇒ String
Prefix string based on the type of CredSpec.
Constructor Details
#initialize(prefix_id, file_location) ⇒ CredentialSpec
Returns a new instance of CredentialSpec.
10 11 12 13 14 |
# File 'ecs/credential_spec.rb', line 10 def initialize(prefix_id, file_location) Jsii::Type.check_type(prefix_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefixId") Jsii::Type.check_type(file_location, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fileLocation") Jsii::Object.instance_method(:initialize).bind(self).call(prefix_id, file_location) end |
Class Method Details
.arn_for_s3_object(bucket, key) ⇒ String
Helper method to generate the ARN for a S3 object.
Used to avoid duplication of logic in derived classes.
31 32 33 34 35 |
# File 'ecs/credential_spec.rb', line 31 def self.arn_for_s3_object(bucket, key) 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::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.CredentialSpec", "arnForS3Object", [bucket, key]) end |
.arn_for_ssm_parameter(parameter) ⇒ String
Helper method to generate the ARN for a SSM parameter.
Used to avoid duplication of logic in derived classes.
43 44 45 46 |
# File 'ecs/credential_spec.rb', line 43 def self.arn_for_ssm_parameter(parameter) Jsii::Type.check_type(parameter, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3NtLklQYXJhbWV0ZXIifQ==")), "parameter") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.CredentialSpec", "arnForSsmParameter", [parameter]) end |
.jsii_overridable_methods ⇒ Object
16 17 18 19 20 21 22 |
# File 'ecs/credential_spec.rb', line 16 def self.jsii_overridable_methods { :file_location => { kind: :property, name: "fileLocation", is_optional: false }, :prefix_id => { kind: :property, name: "prefixId", is_optional: false }, :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind ⇒ AWSCDK::ECS::CredentialSpecConfig
Called when the container is initialized to allow this object to bind to the stack.
65 66 67 |
# File 'ecs/credential_spec.rb', line 65 def bind() jsii_call_method("bind", []) end |
#file_location ⇒ String
Location or ARN from where to retrieve the CredSpec file.
51 52 53 |
# File 'ecs/credential_spec.rb', line 51 def file_location() jsii_get_property("fileLocation") end |
#prefix_id ⇒ String
Prefix string based on the type of CredSpec.
58 59 60 |
# File 'ecs/credential_spec.rb', line 58 def prefix_id() jsii_get_property("prefixId") end |