# ImageConfigProperty

Specifies whether the model container is in Amazon ECR or a private Docker registry accessible from your Amazon Virtual Private Cloud (VPC).

- 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_sagemaker as sagemaker } from 'aws-cdk-lib';
const imageConfigProperty: sagemaker.CfnModel.ImageConfigProperty = {
  repositoryAccessMode: 'repositoryAccessMode',

  // the properties below are optional
  repositoryAuthConfig: {
    repositoryCredentialsProviderArn: 'repositoryCredentialsProviderArn',
  },
};
```

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_sagemaker as sagemaker

image_config_property = sagemaker.CfnModel.ImageConfigProperty(
    repository_access_mode="repositoryAccessMode",

    # the properties below are optional
    repository_auth_config=sagemaker.CfnModel.RepositoryAuthConfigProperty(
        repository_credentials_provider_arn="repositoryCredentialsProviderArn"
    )
)
```

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

ImageConfigProperty imageConfigProperty = ImageConfigProperty.builder()
        .repositoryAccessMode("repositoryAccessMode")

        // the properties below are optional
        .repositoryAuthConfig(RepositoryAuthConfigProperty.builder()
                .repositoryCredentialsProviderArn("repositoryCredentialsProviderArn")
                .build())
        .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.Sagemaker;

var imageConfigProperty = new ImageConfigProperty {
    RepositoryAccessMode = "repositoryAccessMode",

    // the properties below are optional
    RepositoryAuthConfig = new RepositoryAuthConfigProperty {
        RepositoryCredentialsProviderArn = "repositoryCredentialsProviderArn"
    }
};
```

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"

imageConfigProperty := &ImageConfigProperty{
	RepositoryAccessMode: jsii.String("repositoryAccessMode"),

	// the properties below are optional
	RepositoryAuthConfig: &RepositoryAuthConfigProperty{
		RepositoryCredentialsProviderArn: jsii.String("repositoryCredentialsProviderArn"),
	},
}
```

## Properties

- `repositoryAccessMode`: string (required) — Set this to one of the following values:.

  - `Platform` - The model image is hosted in Amazon ECR.
  - `Vpc` - The model image is hosted in a private Docker registry in your VPC.

- `repositoryAuthConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnModel.RepositoryAuthConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnModel.RepositoryAuthConfigProperty.html) — (Optional) Specifies an authentication configuration for the private docker registry where your model image is hosted.

  Specify a value for this property only if you specified `Vpc` as the value for the `RepositoryAccessMode` field, and the private Docker registry where the model image is hosted requires authentication.
