class DomainlessCredentialSpec
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.DomainlessCredentialSpec |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#DomainlessCredentialSpec |
Java | software.amazon.awscdk.services.ecs.DomainlessCredentialSpec |
Python | aws_cdk.aws_ecs.DomainlessCredentialSpec |
TypeScript (source) | aws-cdk-lib » aws_ecs » DomainlessCredentialSpec |
Extends
Credential
Credential specification for domainless gMSA.
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 bucket: s3.Bucket;
declare const taskDefinition: ecs.TaskDefinition;
// Domainless gMSA container from a S3 bucket object.
taskDefinition.addContainer('gmsa-domainless-container', {
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
cpu: 128,
memoryLimitMiB: 256,
credentialSpecs: [ecs.DomainlessCredentialSpec.fromS3Bucket(bucket, 'credSpec')],
});
Initializer
new DomainlessCredentialSpec(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): DomainlessCredentialSpec
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): DomainlessCredentialSpec
Parameters
- parameter
IParameter— The SSM parameter.
Returns
Loads the CredSpec from a SSM parameter.

.NET
Go
Java
Python
TypeScript (