1. Packages
  2. AWS Classic
  3. API Docs
  4. codeartifact
  5. Repository

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

aws.codeartifact.Repository

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

    Provides a CodeArtifact Repository Resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.kms.Key("example", {description: "domain key"});
    const exampleDomain = new aws.codeartifact.Domain("example", {
        domain: "example",
        encryptionKey: example.arn,
    });
    const test = new aws.codeartifact.Repository("test", {
        repository: "example",
        domain: exampleDomain.domain,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.kms.Key("example", description="domain key")
    example_domain = aws.codeartifact.Domain("example",
        domain="example",
        encryption_key=example.arn)
    test = aws.codeartifact.Repository("test",
        repository="example",
        domain=example_domain.domain)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codeartifact"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := kms.NewKey(ctx, "example", &kms.KeyArgs{
    			Description: pulumi.String("domain key"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleDomain, err := codeartifact.NewDomain(ctx, "example", &codeartifact.DomainArgs{
    			Domain:        pulumi.String("example"),
    			EncryptionKey: example.Arn,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "test", &codeartifact.RepositoryArgs{
    			Repository: pulumi.String("example"),
    			Domain:     exampleDomain.Domain,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Kms.Key("example", new()
        {
            Description = "domain key",
        });
    
        var exampleDomain = new Aws.CodeArtifact.Domain("example", new()
        {
            DomainName = "example",
            EncryptionKey = example.Arn,
        });
    
        var test = new Aws.CodeArtifact.Repository("test", new()
        {
            RepositoryName = "example",
            Domain = exampleDomain.DomainName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.kms.Key;
    import com.pulumi.aws.kms.KeyArgs;
    import com.pulumi.aws.codeartifact.Domain;
    import com.pulumi.aws.codeartifact.DomainArgs;
    import com.pulumi.aws.codeartifact.Repository;
    import com.pulumi.aws.codeartifact.RepositoryArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Key("example", KeyArgs.builder()        
                .description("domain key")
                .build());
    
            var exampleDomain = new Domain("exampleDomain", DomainArgs.builder()        
                .domain("example")
                .encryptionKey(example.arn())
                .build());
    
            var test = new Repository("test", RepositoryArgs.builder()        
                .repository("example")
                .domain(exampleDomain.domain())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:kms:Key
        properties:
          description: domain key
      exampleDomain:
        type: aws:codeartifact:Domain
        name: example
        properties:
          domain: example
          encryptionKey: ${example.arn}
      test:
        type: aws:codeartifact:Repository
        properties:
          repository: example
          domain: ${exampleDomain.domain}
    

    With Upstream Repository

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const upstream = new aws.codeartifact.Repository("upstream", {
        repository: "upstream",
        domain: testAwsCodeartifactDomain.domain,
    });
    const test = new aws.codeartifact.Repository("test", {
        repository: "example",
        domain: example.domain,
        upstreams: [{
            repositoryName: upstream.repository,
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    upstream = aws.codeartifact.Repository("upstream",
        repository="upstream",
        domain=test_aws_codeartifact_domain["domain"])
    test = aws.codeartifact.Repository("test",
        repository="example",
        domain=example["domain"],
        upstreams=[aws.codeartifact.RepositoryUpstreamArgs(
            repository_name=upstream.repository,
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		upstream, err := codeartifact.NewRepository(ctx, "upstream", &codeartifact.RepositoryArgs{
    			Repository: pulumi.String("upstream"),
    			Domain:     pulumi.Any(testAwsCodeartifactDomain.Domain),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "test", &codeartifact.RepositoryArgs{
    			Repository: pulumi.String("example"),
    			Domain:     pulumi.Any(example.Domain),
    			Upstreams: codeartifact.RepositoryUpstreamArray{
    				&codeartifact.RepositoryUpstreamArgs{
    					RepositoryName: upstream.Repository,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var upstream = new Aws.CodeArtifact.Repository("upstream", new()
        {
            RepositoryName = "upstream",
            Domain = testAwsCodeartifactDomain.Domain,
        });
    
        var test = new Aws.CodeArtifact.Repository("test", new()
        {
            RepositoryName = "example",
            Domain = example.Domain,
            Upstreams = new[]
            {
                new Aws.CodeArtifact.Inputs.RepositoryUpstreamArgs
                {
                    RepositoryName = upstream.RepositoryName,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.codeartifact.Repository;
    import com.pulumi.aws.codeartifact.RepositoryArgs;
    import com.pulumi.aws.codeartifact.inputs.RepositoryUpstreamArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var upstream = new Repository("upstream", RepositoryArgs.builder()        
                .repository("upstream")
                .domain(testAwsCodeartifactDomain.domain())
                .build());
    
            var test = new Repository("test", RepositoryArgs.builder()        
                .repository("example")
                .domain(example.domain())
                .upstreams(RepositoryUpstreamArgs.builder()
                    .repositoryName(upstream.repository())
                    .build())
                .build());
    
        }
    }
    
    resources:
      upstream:
        type: aws:codeartifact:Repository
        properties:
          repository: upstream
          domain: ${testAwsCodeartifactDomain.domain}
      test:
        type: aws:codeartifact:Repository
        properties:
          repository: example
          domain: ${example.domain}
          upstreams:
            - repositoryName: ${upstream.repository}
    

    With External Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const upstream = new aws.codeartifact.Repository("upstream", {
        repository: "upstream",
        domain: testAwsCodeartifactDomain.domain,
    });
    const test = new aws.codeartifact.Repository("test", {
        repository: "example",
        domain: example.domain,
        externalConnections: {
            externalConnectionName: "public:npmjs",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    upstream = aws.codeartifact.Repository("upstream",
        repository="upstream",
        domain=test_aws_codeartifact_domain["domain"])
    test = aws.codeartifact.Repository("test",
        repository="example",
        domain=example["domain"],
        external_connections=aws.codeartifact.RepositoryExternalConnectionsArgs(
            external_connection_name="public:npmjs",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codeartifact.NewRepository(ctx, "upstream", &codeartifact.RepositoryArgs{
    			Repository: pulumi.String("upstream"),
    			Domain:     pulumi.Any(testAwsCodeartifactDomain.Domain),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "test", &codeartifact.RepositoryArgs{
    			Repository: pulumi.String("example"),
    			Domain:     pulumi.Any(example.Domain),
    			ExternalConnections: &codeartifact.RepositoryExternalConnectionsArgs{
    				ExternalConnectionName: pulumi.String("public:npmjs"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var upstream = new Aws.CodeArtifact.Repository("upstream", new()
        {
            RepositoryName = "upstream",
            Domain = testAwsCodeartifactDomain.Domain,
        });
    
        var test = new Aws.CodeArtifact.Repository("test", new()
        {
            RepositoryName = "example",
            Domain = example.Domain,
            ExternalConnections = new Aws.CodeArtifact.Inputs.RepositoryExternalConnectionsArgs
            {
                ExternalConnectionName = "public:npmjs",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.codeartifact.Repository;
    import com.pulumi.aws.codeartifact.RepositoryArgs;
    import com.pulumi.aws.codeartifact.inputs.RepositoryExternalConnectionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var upstream = new Repository("upstream", RepositoryArgs.builder()        
                .repository("upstream")
                .domain(testAwsCodeartifactDomain.domain())
                .build());
    
            var test = new Repository("test", RepositoryArgs.builder()        
                .repository("example")
                .domain(example.domain())
                .externalConnections(RepositoryExternalConnectionsArgs.builder()
                    .externalConnectionName("public:npmjs")
                    .build())
                .build());
    
        }
    }
    
    resources:
      upstream:
        type: aws:codeartifact:Repository
        properties:
          repository: upstream
          domain: ${testAwsCodeartifactDomain.domain}
      test:
        type: aws:codeartifact:Repository
        properties:
          repository: example
          domain: ${example.domain}
          externalConnections:
            externalConnectionName: public:npmjs
    

    Create Repository Resource

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

    Constructor syntax

    new Repository(name: string, args: RepositoryArgs, opts?: CustomResourceOptions);
    @overload
    def Repository(resource_name: str,
                   args: RepositoryArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Repository(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   domain: Optional[str] = None,
                   repository: Optional[str] = None,
                   description: Optional[str] = None,
                   domain_owner: Optional[str] = None,
                   external_connections: Optional[RepositoryExternalConnectionsArgs] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   upstreams: Optional[Sequence[RepositoryUpstreamArgs]] = None)
    func NewRepository(ctx *Context, name string, args RepositoryArgs, opts ...ResourceOption) (*Repository, error)
    public Repository(string name, RepositoryArgs args, CustomResourceOptions? opts = null)
    public Repository(String name, RepositoryArgs args)
    public Repository(String name, RepositoryArgs args, CustomResourceOptions options)
    
    type: aws:codeartifact:Repository
    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 RepositoryArgs
    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 RepositoryArgs
    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 RepositoryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var repositoryResource = new Aws.CodeArtifact.Repository("repositoryResource", new()
    {
        Domain = "string",
        RepositoryName = "string",
        Description = "string",
        DomainOwner = "string",
        ExternalConnections = new Aws.CodeArtifact.Inputs.RepositoryExternalConnectionsArgs
        {
            ExternalConnectionName = "string",
            PackageFormat = "string",
            Status = "string",
        },
        Tags = 
        {
            { "string", "string" },
        },
        Upstreams = new[]
        {
            new Aws.CodeArtifact.Inputs.RepositoryUpstreamArgs
            {
                RepositoryName = "string",
            },
        },
    });
    
    example, err := codeartifact.NewRepository(ctx, "repositoryResource", &codeartifact.RepositoryArgs{
    	Domain:      pulumi.String("string"),
    	Repository:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	DomainOwner: pulumi.String("string"),
    	ExternalConnections: &codeartifact.RepositoryExternalConnectionsArgs{
    		ExternalConnectionName: pulumi.String("string"),
    		PackageFormat:          pulumi.String("string"),
    		Status:                 pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Upstreams: codeartifact.RepositoryUpstreamArray{
    		&codeartifact.RepositoryUpstreamArgs{
    			RepositoryName: pulumi.String("string"),
    		},
    	},
    })
    
    var repositoryResource = new Repository("repositoryResource", RepositoryArgs.builder()        
        .domain("string")
        .repository("string")
        .description("string")
        .domainOwner("string")
        .externalConnections(RepositoryExternalConnectionsArgs.builder()
            .externalConnectionName("string")
            .packageFormat("string")
            .status("string")
            .build())
        .tags(Map.of("string", "string"))
        .upstreams(RepositoryUpstreamArgs.builder()
            .repositoryName("string")
            .build())
        .build());
    
    repository_resource = aws.codeartifact.Repository("repositoryResource",
        domain="string",
        repository="string",
        description="string",
        domain_owner="string",
        external_connections=aws.codeartifact.RepositoryExternalConnectionsArgs(
            external_connection_name="string",
            package_format="string",
            status="string",
        ),
        tags={
            "string": "string",
        },
        upstreams=[aws.codeartifact.RepositoryUpstreamArgs(
            repository_name="string",
        )])
    
    const repositoryResource = new aws.codeartifact.Repository("repositoryResource", {
        domain: "string",
        repository: "string",
        description: "string",
        domainOwner: "string",
        externalConnections: {
            externalConnectionName: "string",
            packageFormat: "string",
            status: "string",
        },
        tags: {
            string: "string",
        },
        upstreams: [{
            repositoryName: "string",
        }],
    });
    
    type: aws:codeartifact:Repository
    properties:
        description: string
        domain: string
        domainOwner: string
        externalConnections:
            externalConnectionName: string
            packageFormat: string
            status: string
        repository: string
        tags:
            string: string
        upstreams:
            - repositoryName: string
    

    Repository 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 Repository resource accepts the following input properties:

    Domain string
    The domain that contains the created repository.
    RepositoryName string
    The name of the repository to create.
    Description string
    The description of the repository.
    DomainOwner string
    The account number of the AWS account that owns the domain.
    ExternalConnections RepositoryExternalConnections
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Upstreams List<RepositoryUpstream>
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    Domain string
    The domain that contains the created repository.
    Repository string
    The name of the repository to create.
    Description string
    The description of the repository.
    DomainOwner string
    The account number of the AWS account that owns the domain.
    ExternalConnections RepositoryExternalConnectionsArgs
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Upstreams []RepositoryUpstreamArgs
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    domain String
    The domain that contains the created repository.
    repository String
    The name of the repository to create.
    description String
    The description of the repository.
    domainOwner String
    The account number of the AWS account that owns the domain.
    externalConnections RepositoryExternalConnections
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    upstreams List<RepositoryUpstream>
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    domain string
    The domain that contains the created repository.
    repository string
    The name of the repository to create.
    description string
    The description of the repository.
    domainOwner string
    The account number of the AWS account that owns the domain.
    externalConnections RepositoryExternalConnections
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    upstreams RepositoryUpstream[]
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    domain str
    The domain that contains the created repository.
    repository str
    The name of the repository to create.
    description str
    The description of the repository.
    domain_owner str
    The account number of the AWS account that owns the domain.
    external_connections RepositoryExternalConnectionsArgs
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    upstreams Sequence[RepositoryUpstreamArgs]
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    domain String
    The domain that contains the created repository.
    repository String
    The name of the repository to create.
    description String
    The description of the repository.
    domainOwner String
    The account number of the AWS account that owns the domain.
    externalConnections Property Map
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    upstreams List<Property Map>
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream

    Outputs

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

    AdministratorAccount string
    The account number of the AWS account that manages the repository.
    Arn string
    The ARN of the repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    AdministratorAccount string
    The account number of the AWS account that manages the repository.
    Arn string
    The ARN of the repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    administratorAccount String
    The account number of the AWS account that manages the repository.
    arn String
    The ARN of the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    administratorAccount string
    The account number of the AWS account that manages the repository.
    arn string
    The ARN of the repository.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    administrator_account str
    The account number of the AWS account that manages the repository.
    arn str
    The ARN of the repository.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    administratorAccount String
    The account number of the AWS account that manages the repository.
    arn String
    The ARN of the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Repository Resource

    Get an existing Repository resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RepositoryState, opts?: CustomResourceOptions): Repository
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            administrator_account: Optional[str] = None,
            arn: Optional[str] = None,
            description: Optional[str] = None,
            domain: Optional[str] = None,
            domain_owner: Optional[str] = None,
            external_connections: Optional[RepositoryExternalConnectionsArgs] = None,
            repository: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            upstreams: Optional[Sequence[RepositoryUpstreamArgs]] = None) -> Repository
    func GetRepository(ctx *Context, name string, id IDInput, state *RepositoryState, opts ...ResourceOption) (*Repository, error)
    public static Repository Get(string name, Input<string> id, RepositoryState? state, CustomResourceOptions? opts = null)
    public static Repository get(String name, Output<String> id, RepositoryState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdministratorAccount string
    The account number of the AWS account that manages the repository.
    Arn string
    The ARN of the repository.
    Description string
    The description of the repository.
    Domain string
    The domain that contains the created repository.
    DomainOwner string
    The account number of the AWS account that owns the domain.
    ExternalConnections RepositoryExternalConnections
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    RepositoryName string
    The name of the repository to create.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Upstreams List<RepositoryUpstream>
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    AdministratorAccount string
    The account number of the AWS account that manages the repository.
    Arn string
    The ARN of the repository.
    Description string
    The description of the repository.
    Domain string
    The domain that contains the created repository.
    DomainOwner string
    The account number of the AWS account that owns the domain.
    ExternalConnections RepositoryExternalConnectionsArgs
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    Repository string
    The name of the repository to create.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Upstreams []RepositoryUpstreamArgs
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    administratorAccount String
    The account number of the AWS account that manages the repository.
    arn String
    The ARN of the repository.
    description String
    The description of the repository.
    domain String
    The domain that contains the created repository.
    domainOwner String
    The account number of the AWS account that owns the domain.
    externalConnections RepositoryExternalConnections
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    repository String
    The name of the repository to create.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    upstreams List<RepositoryUpstream>
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    administratorAccount string
    The account number of the AWS account that manages the repository.
    arn string
    The ARN of the repository.
    description string
    The description of the repository.
    domain string
    The domain that contains the created repository.
    domainOwner string
    The account number of the AWS account that owns the domain.
    externalConnections RepositoryExternalConnections
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    repository string
    The name of the repository to create.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    upstreams RepositoryUpstream[]
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    administrator_account str
    The account number of the AWS account that manages the repository.
    arn str
    The ARN of the repository.
    description str
    The description of the repository.
    domain str
    The domain that contains the created repository.
    domain_owner str
    The account number of the AWS account that owns the domain.
    external_connections RepositoryExternalConnectionsArgs
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    repository str
    The name of the repository to create.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    upstreams Sequence[RepositoryUpstreamArgs]
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream
    administratorAccount String
    The account number of the AWS account that manages the repository.
    arn String
    The ARN of the repository.
    description String
    The description of the repository.
    domain String
    The domain that contains the created repository.
    domainOwner String
    The account number of the AWS account that owns the domain.
    externalConnections Property Map
    An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections.
    repository String
    The name of the repository to create.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    upstreams List<Property Map>
    A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. see Upstream

    Supporting Types

    RepositoryExternalConnections, RepositoryExternalConnectionsArgs

    ExternalConnectionName string
    The name of the external connection associated with a repository.
    PackageFormat string
    Status string
    ExternalConnectionName string
    The name of the external connection associated with a repository.
    PackageFormat string
    Status string
    externalConnectionName String
    The name of the external connection associated with a repository.
    packageFormat String
    status String
    externalConnectionName string
    The name of the external connection associated with a repository.
    packageFormat string
    status string
    external_connection_name str
    The name of the external connection associated with a repository.
    package_format str
    status str
    externalConnectionName String
    The name of the external connection associated with a repository.
    packageFormat String
    status String

    RepositoryUpstream, RepositoryUpstreamArgs

    RepositoryName string
    The name of an upstream repository.
    RepositoryName string
    The name of an upstream repository.
    repositoryName String
    The name of an upstream repository.
    repositoryName string
    The name of an upstream repository.
    repository_name str
    The name of an upstream repository.
    repositoryName String
    The name of an upstream repository.

    Import

    Using pulumi import, import CodeArtifact Repository using the CodeArtifact Repository ARN. For example:

    $ pulumi import aws:codeartifact/repository:Repository example arn:aws:codeartifact:us-west-2:012345678912:repository/tf-acc-test-6968272603913957763/tf-acc-test-6968272603913957763
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi