class CredentialSpec
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.CredentialSpec |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#CredentialSpec |
![]() | software.amazon.awscdk.services.ecs.CredentialSpec |
![]() | aws_cdk.aws_ecs.CredentialSpec |
![]() | aws-cdk-lib » aws_ecs » CredentialSpec |
Base construct for a credential specification (CredSpec).
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const credentialSpec = new ecs.CredentialSpec('prefixId', 'fileLocation');
Initializer
new CredentialSpec(prefixId: string, fileLocation: string)
Parameters
- prefixId
string
- 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. |
protected static arn | Helper method to generate the ARN for a S3 object. |
protected static arn | Helper method to generate the ARN for a SSM parameter. |
bind()
public bind(): CredentialSpecConfig
Returns
Called when the container is initialized to allow this object to bind to the stack.
protected static arnForS3Object(bucket, key)
protected static arnForS3Object(bucket: IBucket, key: string): string
Parameters
- bucket
IBucket
- key
string
Returns
string
Helper method to generate the ARN for a S3 object.
Used to avoid duplication of logic in derived classes.
protected static arnForSsmParameter(parameter)
protected static arnForSsmParameter(parameter: IParameter): string
Parameters
- parameter
IParameter
Returns
string
Helper method to generate the ARN for a SSM parameter.
Used to avoid duplication of logic in derived classes.