CredentialSpec

class aws_cdk.aws_ecs.CredentialSpec(prefix_id, file_location)

Bases: object

Base construct for a credential specification (CredSpec).

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

credential_spec = ecs.CredentialSpec("prefixId", "fileLocation")
Parameters:
  • prefix_id (str) –

  • file_location (str) – Location or ARN from where to retrieve the CredSpec file.

Methods

bind()

Called when the container is initialized to allow this object to bind to the stack.

Return type:

CredentialSpecConfig

Attributes

file_location

Location or ARN from where to retrieve the CredSpec file.

prefix_id

Prefix string based on the type of CredSpec.

Static Methods

classmethod arn_for_s3_object(bucket, key)

Helper method to generate the ARN for a S3 object.

Used to avoid duplication of logic in derived classes.

Parameters:
  • bucket (IBucket) –

  • key (str) –

Return type:

str

classmethod arn_for_ssm_parameter(parameter)

Helper method to generate the ARN for a SSM parameter.

Used to avoid duplication of logic in derived classes.

Parameters:

parameter (IParameter) –

Return type:

str