1. Packages
  2. AWS Native
  3. API Docs
  4. ecr
  5. PullThroughCacheRule

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

aws-native.ecr.PullThroughCacheRule

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

    The AWS::ECR::PullThroughCacheRule resource configures the upstream registry configuration details for an Amazon Elastic Container Registry (Amazon Private ECR) pull-through cache.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myECRPullThroughCacheRule = new AwsNative.Ecr.PullThroughCacheRule("myECRPullThroughCacheRule", new()
        {
            EcrRepositoryPrefix = "my-ecr",
            UpstreamRegistryUrl = "public.ecr.aws",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ecr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecr.NewPullThroughCacheRule(ctx, "myECRPullThroughCacheRule", &ecr.PullThroughCacheRuleArgs{
    			EcrRepositoryPrefix: pulumi.String("my-ecr"),
    			UpstreamRegistryUrl: pulumi.String("public.ecr.aws"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_ecr_pull_through_cache_rule = aws_native.ecr.PullThroughCacheRule("myECRPullThroughCacheRule",
        ecr_repository_prefix="my-ecr",
        upstream_registry_url="public.ecr.aws")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myECRPullThroughCacheRule = new aws_native.ecr.PullThroughCacheRule("myECRPullThroughCacheRule", {
        ecrRepositoryPrefix: "my-ecr",
        upstreamRegistryUrl: "public.ecr.aws",
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myECRPullThroughCacheRule = new AwsNative.Ecr.PullThroughCacheRule("myECRPullThroughCacheRule", new()
        {
            EcrRepositoryPrefix = "my-ecr",
            UpstreamRegistryUrl = "public.ecr.aws",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ecr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecr.NewPullThroughCacheRule(ctx, "myECRPullThroughCacheRule", &ecr.PullThroughCacheRuleArgs{
    			EcrRepositoryPrefix: pulumi.String("my-ecr"),
    			UpstreamRegistryUrl: pulumi.String("public.ecr.aws"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_ecr_pull_through_cache_rule = aws_native.ecr.PullThroughCacheRule("myECRPullThroughCacheRule",
        ecr_repository_prefix="my-ecr",
        upstream_registry_url="public.ecr.aws")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myECRPullThroughCacheRule = new aws_native.ecr.PullThroughCacheRule("myECRPullThroughCacheRule", {
        ecrRepositoryPrefix: "my-ecr",
        upstreamRegistryUrl: "public.ecr.aws",
    });
    

    Coming soon!

    Create PullThroughCacheRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PullThroughCacheRule(name: string, args?: PullThroughCacheRuleArgs, opts?: CustomResourceOptions);
    @overload
    def PullThroughCacheRule(resource_name: str,
                             args: Optional[PullThroughCacheRuleArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def PullThroughCacheRule(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             credential_arn: Optional[str] = None,
                             ecr_repository_prefix: Optional[str] = None,
                             upstream_registry: Optional[str] = None,
                             upstream_registry_url: Optional[str] = None)
    func NewPullThroughCacheRule(ctx *Context, name string, args *PullThroughCacheRuleArgs, opts ...ResourceOption) (*PullThroughCacheRule, error)
    public PullThroughCacheRule(string name, PullThroughCacheRuleArgs? args = null, CustomResourceOptions? opts = null)
    public PullThroughCacheRule(String name, PullThroughCacheRuleArgs args)
    public PullThroughCacheRule(String name, PullThroughCacheRuleArgs args, CustomResourceOptions options)
    
    type: aws-native:ecr:PullThroughCacheRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PullThroughCacheRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PullThroughCacheRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PullThroughCacheRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PullThroughCacheRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PullThroughCacheRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    PullThroughCacheRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PullThroughCacheRule resource accepts the following input properties:

    CredentialArn string
    The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    EcrRepositoryPrefix string
    The ECRRepositoryPrefix is a custom alias for upstream registry url.
    UpstreamRegistry string
    The name of the upstream registry.
    UpstreamRegistryUrl string
    The upstreamRegistryUrl is the endpoint of upstream registry url of the public repository to be cached
    CredentialArn string
    The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    EcrRepositoryPrefix string
    The ECRRepositoryPrefix is a custom alias for upstream registry url.
    UpstreamRegistry string
    The name of the upstream registry.
    UpstreamRegistryUrl string
    The upstreamRegistryUrl is the endpoint of upstream registry url of the public repository to be cached
    credentialArn String
    The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    ecrRepositoryPrefix String
    The ECRRepositoryPrefix is a custom alias for upstream registry url.
    upstreamRegistry String
    The name of the upstream registry.
    upstreamRegistryUrl String
    The upstreamRegistryUrl is the endpoint of upstream registry url of the public repository to be cached
    credentialArn string
    The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    ecrRepositoryPrefix string
    The ECRRepositoryPrefix is a custom alias for upstream registry url.
    upstreamRegistry string
    The name of the upstream registry.
    upstreamRegistryUrl string
    The upstreamRegistryUrl is the endpoint of upstream registry url of the public repository to be cached
    credential_arn str
    The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    ecr_repository_prefix str
    The ECRRepositoryPrefix is a custom alias for upstream registry url.
    upstream_registry str
    The name of the upstream registry.
    upstream_registry_url str
    The upstreamRegistryUrl is the endpoint of upstream registry url of the public repository to be cached
    credentialArn String
    The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    ecrRepositoryPrefix String
    The ECRRepositoryPrefix is a custom alias for upstream registry url.
    upstreamRegistry String
    The name of the upstream registry.
    upstreamRegistryUrl String
    The upstreamRegistryUrl is the endpoint of upstream registry url of the public repository to be cached

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PullThroughCacheRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi