# ImageRepositoryProperty

Describes a source image repository.

- 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_apprunner as apprunner } from 'aws-cdk-lib';
const imageRepositoryProperty: apprunner.CfnService.ImageRepositoryProperty = {
  imageIdentifier: 'imageIdentifier',
  imageRepositoryType: 'imageRepositoryType',

  // the properties below are optional
  imageConfiguration: {
    port: 'port',
    runtimeEnvironmentSecrets: [{
      name: 'name',
      value: 'value',
    }],
    runtimeEnvironmentVariables: [{
      name: 'name',
      value: 'value',
    }],
    startCommand: 'startCommand',
  },
};
```

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_apprunner as apprunner

image_repository_property = apprunner.CfnService.ImageRepositoryProperty(
    image_identifier="imageIdentifier",
    image_repository_type="imageRepositoryType",

    # the properties below are optional
    image_configuration=apprunner.CfnService.ImageConfigurationProperty(
        port="port",
        runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        start_command="startCommand"
    )
)
```

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

ImageRepositoryProperty imageRepositoryProperty = ImageRepositoryProperty.builder()
        .imageIdentifier("imageIdentifier")
        .imageRepositoryType("imageRepositoryType")

        // the properties below are optional
        .imageConfiguration(ImageConfigurationProperty.builder()
                .port("port")
                .runtimeEnvironmentSecrets(List.of(KeyValuePairProperty.builder()
                        .name("name")
                        .value("value")
                        .build()))
                .runtimeEnvironmentVariables(List.of(KeyValuePairProperty.builder()
                        .name("name")
                        .value("value")
                        .build()))
                .startCommand("startCommand")
                .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.AppRunner;

var imageRepositoryProperty = new ImageRepositoryProperty {
    ImageIdentifier = "imageIdentifier",
    ImageRepositoryType = "imageRepositoryType",

    // the properties below are optional
    ImageConfiguration = new ImageConfigurationProperty {
        Port = "port",
        RuntimeEnvironmentSecrets = new [] { new KeyValuePairProperty {
            Name = "name",
            Value = "value"
        } },
        RuntimeEnvironmentVariables = new [] { new KeyValuePairProperty {
            Name = "name",
            Value = "value"
        } },
        StartCommand = "startCommand"
    }
};
```

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"

imageRepositoryProperty := &ImageRepositoryProperty{
	ImageIdentifier: jsii.String("imageIdentifier"),
	ImageRepositoryType: jsii.String("imageRepositoryType"),

	// the properties below are optional
	ImageConfiguration: &ImageConfigurationProperty{
		Port: jsii.String("port"),
		RuntimeEnvironmentSecrets: []interface{}{
			&KeyValuePairProperty{
				Name: jsii.String("name"),
				Value: jsii.String("value"),
			},
		},
		RuntimeEnvironmentVariables: []interface{}{
			&KeyValuePairProperty{
				Name: jsii.String("name"),
				Value: jsii.String("value"),
			},
		},
		StartCommand: jsii.String("startCommand"),
	},
}
```

## Properties

- `imageConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnService.ImageConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_apprunner.CfnService.ImageConfigurationProperty.html) — Configuration for running the identified image.

- `imageIdentifier`: string (required) — The identifier of an image.

  For an image in Amazon Elastic Container Registry (Amazon ECR), this is an image name. For the image name format, see [Pulling an image](https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-pull-ecr-image.html) in the *Amazon ECR User Guide* .

- `imageRepositoryType`: string (required) — The type of the image repository.

  This reflects the repository provider and whether the repository is private or public.
