Skip to content
v2.277.0

RepositoryCredentialsProperty Struct ​

The repository credentials for private registry authentication.

Example ​

ts
// 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 repositoryCredentialsProperty: ecs.CfnTaskDefinition.RepositoryCredentialsProperty = {
  credentialsParameter: 'credentialsParameter',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

repository_credentials_property = ecs.CfnTaskDefinition.RepositoryCredentialsProperty(
    credentials_parameter="credentialsParameter"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

RepositoryCredentialsProperty repositoryCredentialsProperty = RepositoryCredentialsProperty.builder()
        .credentialsParameter("credentialsParameter")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var repositoryCredentialsProperty = new RepositoryCredentialsProperty {
    CredentialsParameter = "credentialsParameter"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

repositoryCredentialsProperty := &RepositoryCredentialsProperty{
	CredentialsParameter: jsii.String("credentialsParameter"),
}

Properties ​

credentialsParameteroptionalstringcredentials_parameteroptionalstrcredentialsParameteroptionalStringCredentialsParameteroptionalstringCredentialsParameteroptional*string#
The Amazon Resource Name (ARN) of the secret containing the private repository credentials.
notes

When you use the Amazon ECS API, AWS CLI , or AWS SDK, if the secret exists in the same Region as the task that you're launching then you can use either the full ARN or the name of the secret. When you use the AWS Management Console, you must specify the full ARN of the secret.