class DomainJoinedCredentialSpec
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.DomainJoinedCredentialSpec |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#DomainJoinedCredentialSpec |
![]() | software.amazon.awscdk.services.ecs.DomainJoinedCredentialSpec |
![]() | aws_cdk.aws_ecs.DomainJoinedCredentialSpec |
![]() | aws-cdk-lib » aws_ecs » DomainJoinedCredentialSpec |
Extends
Credential
Credential specification (CredSpec) file.
Example
// Make sure the task definition's execution role has permissions to read from the S3 bucket or SSM parameter where the CredSpec file is stored.
declare const parameter: ssm.IParameter;
declare const taskDefinition: ecs.TaskDefinition;
// Domain-joined gMSA container from a SSM parameter
taskDefinition.addContainer('gmsa-domain-joined-container', {
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
cpu: 128,
memoryLimitMiB: 256,
credentialSpecs: [ecs.DomainJoinedCredentialSpec.fromSsmParameter(parameter)],
});
Initializer
new DomainJoinedCredentialSpec(fileLocation: string)
Parameters
- fileLocation
string
— Location or ARN from where to retrieve the CredSpec file.
Properties
Name | Type | Description |
---|---|---|
file | string | Location or ARN from where to retrieve the CredSpec file. |
prefix | string | Prefix string based on the type of CredSpec. |
fileLocation
Type:
string
Location or ARN from where to retrieve the CredSpec file.
prefixId
Type:
string
Prefix string based on the type of CredSpec.
Methods
Name | Description |
---|---|
bind() | Called when the container is initialized to allow this object to bind to the stack. |
static from | Loads the CredSpec from a S3 bucket object. |
static from | Loads the CredSpec from a SSM parameter. |
bind()
public bind(): CredentialSpecConfig
Returns
Called when the container is initialized to allow this object to bind to the stack.
static fromS3Bucket(bucket, key)
public static fromS3Bucket(bucket: IBucket, key: string): DomainJoinedCredentialSpec
Parameters
- bucket
IBucket
— The S3 bucket. - key
string
— The object key.
Returns
Loads the CredSpec from a S3 bucket object.
static fromSsmParameter(parameter)
public static fromSsmParameter(parameter: IParameter): DomainJoinedCredentialSpec
Parameters
- parameter
IParameter
— The SSM parameter.
Returns
Loads the CredSpec from a SSM parameter.