ExposedSecret

class aws_cdk.aws_batch.ExposedSecret(option_name, secret_arn)

Bases: object

(experimental) Exposed secret for log configuration.

Stability

experimental

ExampleMetadata

infused

Example:

import aws_cdk.aws_ssm as ssm


batch.JobDefinition(self, "job-def",
    container=batch.JobDefinitionContainer(
        image=ecs.EcrImage.from_registry("docker/whalesay"),
        log_configuration=batch.LogConfiguration(
            log_driver=batch.LogDriver.AWSLOGS,
            options={"awslogs-region": "us-east-1"},
            secret_options=[
                batch.ExposedSecret.from_parameters_store("xyz", ssm.StringParameter.from_string_parameter_name(self, "parameter", "xyz"))
            ]
        )
    )
)
Parameters
  • option_name (str) –

  • secret_arn (str) –

Stability

experimental

Attributes

option_name

(experimental) Name of the option.

Stability

experimental

Return type

str

secret_arn

(experimental) ARN of the secret option.

Stability

experimental

Return type

str

Static Methods

classmethod from_parameters_store(option_name, parameter)

(experimental) User Parameters Store Parameter.

Parameters
  • option_name (str) –

    • The name of the option.

  • parameter (IParameter) –

    • A parameter from parameters store.

Stability

experimental

Return type

ExposedSecret

classmethod from_secrets_manager(option_name, secret)

(experimental) Use Secrets Manager Secret.

Parameters
  • option_name (str) –

    • The name of the option.

  • secret (ISecret) –

    • A secret from secrets manager.

Stability

experimental

Return type

ExposedSecret