class ExposedSecret
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Batch.ExposedSecret |
Java | software.amazon.awscdk.services.batch.ExposedSecret |
Python | aws_cdk.aws_batch.ExposedSecret |
TypeScript (source) | @aws-cdk/aws-batch » ExposedSecret |
Exposed secret for log configuration.
Example
import * as ssm from '@aws-cdk/aws-ssm';
new batch.JobDefinition(this, 'job-def', {
container: {
image: ecs.EcrImage.fromRegistry('docker/whalesay'),
logConfiguration: {
logDriver: batch.LogDriver.AWSLOGS,
options: { 'awslogs-region': 'us-east-1' },
secretOptions: [
batch.ExposedSecret.fromParametersStore('xyz', ssm.StringParameter.fromStringParameterName(this, 'parameter', 'xyz')),
],
},
},
});
Initializer
new ExposedSecret(optionName: string, secretArn: string)
Parameters
- optionName
string
- secretArn
string
Properties
Name | Type | Description |
---|---|---|
option | string | Name of the option. |
secret | string | ARN of the secret option. |
optionName
Type:
string
Name of the option.
secretArn
Type:
string
ARN of the secret option.
Methods
Name | Description |
---|---|
static from | User Parameters Store Parameter. |
static from | Use Secrets Manager Secret. |
ParametersStore(optionName, parameter)
static frompublic static fromParametersStore(optionName: string, parameter: IParameter): ExposedSecret
Parameters
- optionName
string
— - The name of the option. - parameter
IParameter
— - A parameter from parameters store.
Returns
User Parameters Store Parameter.
SecretsManager(optionName, secret)
static frompublic static fromSecretsManager(optionName: string, secret: ISecret): ExposedSecret
Parameters
- optionName
string
— - The name of the option. - secret
ISecret
— - A secret from secrets manager.
Returns
Use Secrets Manager Secret.