# CfnPullThroughCacheRuleProps

Properties for defining a `CfnPullThroughCacheRule`.

Used as props by: [CfnPullThroughCacheRule](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr.CfnPullThroughCacheRule.html)

- Source: Generated at build time
- Type last changed: v2.185.0 · 19 Mar 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecr as ecr } from 'aws-cdk-lib';
const cfnPullThroughCacheRuleProps: ecr.CfnPullThroughCacheRuleProps = {
  credentialArn: 'credentialArn',
  customRoleArn: 'customRoleArn',
  ecrRepositoryPrefix: 'ecrRepositoryPrefix',
  upstreamRegistry: 'upstreamRegistry',
  upstreamRegistryUrl: 'upstreamRegistryUrl',
  upstreamRepositoryPrefix: 'upstreamRepositoryPrefix',
};
```

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_ecr as ecr

cfn_pull_through_cache_rule_props = ecr.CfnPullThroughCacheRuleProps(
    credential_arn="credentialArn",
    custom_role_arn="customRoleArn",
    ecr_repository_prefix="ecrRepositoryPrefix",
    upstream_registry="upstreamRegistry",
    upstream_registry_url="upstreamRegistryUrl",
    upstream_repository_prefix="upstreamRepositoryPrefix"
)
```

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

CfnPullThroughCacheRuleProps cfnPullThroughCacheRuleProps = CfnPullThroughCacheRuleProps.builder()
        .credentialArn("credentialArn")
        .customRoleArn("customRoleArn")
        .ecrRepositoryPrefix("ecrRepositoryPrefix")
        .upstreamRegistry("upstreamRegistry")
        .upstreamRegistryUrl("upstreamRegistryUrl")
        .upstreamRepositoryPrefix("upstreamRepositoryPrefix")
        .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.ECR;

var cfnPullThroughCacheRuleProps = new CfnPullThroughCacheRuleProps {
    CredentialArn = "credentialArn",
    CustomRoleArn = "customRoleArn",
    EcrRepositoryPrefix = "ecrRepositoryPrefix",
    UpstreamRegistry = "upstreamRegistry",
    UpstreamRegistryUrl = "upstreamRegistryUrl",
    UpstreamRepositoryPrefix = "upstreamRepositoryPrefix"
};
```

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"

cfnPullThroughCacheRuleProps := &CfnPullThroughCacheRuleProps{
	CredentialArn: jsii.String("credentialArn"),
	CustomRoleArn: jsii.String("customRoleArn"),
	EcrRepositoryPrefix: jsii.String("ecrRepositoryPrefix"),
	UpstreamRegistry: jsii.String("upstreamRegistry"),
	UpstreamRegistryUrl: jsii.String("upstreamRegistryUrl"),
	UpstreamRepositoryPrefix: jsii.String("upstreamRepositoryPrefix"),
}
```

## Properties

- `credentialArn`: string — The ARN of the Secrets Manager secret associated with the pull through cache rule.

- `customRoleArn`: string — The ARN of the IAM role associated with the pull through cache rule.

- `ecrRepositoryPrefix`: string — The Amazon ECR repository prefix associated with the pull through cache rule.

- `upstreamRegistry`: string — The name of the upstream source registry associated with the pull through cache rule.

- `upstreamRegistryUrl`: string — The upstream registry URL associated with the pull through cache rule.

- `upstreamRepositoryPrefix`: string — The upstream repository prefix associated with the pull through cache rule.
