# RepositoryImageProps

The properties for an image hosted in a public or private repository.

Used as props by: [RepositoryImage](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.RepositoryImage.html)
Used as argument in: [ContainerImage.fromRegistry](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerImage.html#fromregistry)

- Source: [`aws-ecs/lib/images/repository.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/images/repository.ts#L17)

## Example

TypeScript:

```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';
import { aws_secretsmanager as secretsmanager } from 'aws-cdk-lib';

declare const secret: secretsmanager.Secret;
const repositoryImageProps: ecs.RepositoryImageProps = {
  credentials: secret,
};
```

Python:

```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
from aws_cdk import aws_secretsmanager as secretsmanager

# secret: secretsmanager.Secret

repository_image_props = ecs.RepositoryImageProps(
    credentials=secret
)
```

Java:

```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.*;
import software.amazon.awscdk.services.secretsmanager.*;

Secret secret;

RepositoryImageProps repositoryImageProps = RepositoryImageProps.builder()
        .credentials(secret)
        .build();
```

C# / .NET:

```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;
using Amazon.CDK.AWS.SecretsManager;

Secret secret;

var repositoryImageProps = new RepositoryImageProps {
    Credentials = secret
};
```

Golang:

```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"
import "github.com/aws/aws-cdk-go/awscdk"

var secret Secret

repositoryImageProps := &RepositoryImageProps{
	Credentials: secret,
}
```

## Properties

- `credentials`: [ISecret](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.ISecret.html) — The secret to expose to the container that contains the credentials for the image repository.

  The supported value is the full ARN of an AWS Secrets Manager secret.
