# RegistryCredentialProperty

`RegistryCredential` is a property of the [AWS CodeBuild Project Environment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html) property type that specifies information about credentials that provide access to a private Docker registry. When this is set:.

- `imagePullCredentialsType` must be set to `SERVICE_ROLE` .
- images cannot be curated or an Amazon ECR image.

For more information, see [Private Registry with AWS Secrets Manager Sample for AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-private-registry.html) .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
const registryCredentialProperty: codebuild.CfnProject.RegistryCredentialProperty = {
  credential: 'credential',
  credentialProvider: 'credentialProvider',
};
```

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_codebuild as codebuild

registry_credential_property = codebuild.CfnProject.RegistryCredentialProperty(
    credential="credential",
    credential_provider="credentialProvider"
)
```

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.codebuild.*;

RegistryCredentialProperty registryCredentialProperty = RegistryCredentialProperty.builder()
        .credential("credential")
        .credentialProvider("credentialProvider")
        .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.CodeBuild;

var registryCredentialProperty = new RegistryCredentialProperty {
    Credential = "credential",
    CredentialProvider = "credentialProvider"
};
```

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"

registryCredentialProperty := &RegistryCredentialProperty{
	Credential: jsii.String("credential"),
	CredentialProvider: jsii.String("credentialProvider"),
}
```

## Properties

- `credential`: string (required) — The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager .

  > The `credential` can use the name of the credentials only if they exist in your current AWS Region .

- `credentialProvider`: string (required) — The service that created the credentials to access a private Docker registry.

  The valid value, SECRETS_MANAGER, is for AWS Secrets Manager .
