LogConfiguration

class aws_cdk.aws_batch.LogConfiguration(*, log_driver, options=None, secret_options=None)

Bases: object

(experimental) Log configuration options to send to a custom log driver for the container.

Parameters
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"))
            ]
        )
    )
)

Attributes

log_driver

(experimental) The log driver to use for the container.

Stability

experimental

Return type

LogDriver

options

(experimental) The configuration options to send to the log driver.

Default
  • No configuration options are sent

Stability

experimental

Return type

Any

secret_options

(experimental) The secrets to pass to the log configuration as options.

For more information, see https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data-secrets.html#secrets-logconfig

Default
  • No secrets are passed

Stability

experimental

Return type

Optional[List[ExposedSecret]]