UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

235 lines (234 loc) • 9.19 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a CodeArtifact Repository Resource. * * ## Example Usage * * ```typescript * 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, * }); * ``` * * ### With Upstream Repository * * ```typescript * 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, * }], * }); * ``` * * ### With External Connection * * ```typescript * 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 * * Using `pulumi import`, import CodeArtifact Repository using the CodeArtifact Repository ARN. For example: * * ```sh * $ pulumi import aws:codeartifact/repository:Repository example arn:aws:codeartifact:us-west-2:012345678912:repository/tf-acc-test-6968272603913957763/tf-acc-test-6968272603913957763 * ``` */ export declare class Repository extends pulumi.CustomResource { /** * Get an existing Repository resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryState, opts?: pulumi.CustomResourceOptions): Repository; /** * Returns true if the given object is an instance of Repository. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Repository; /** * The account number of the AWS account that manages the repository. */ readonly administratorAccount: pulumi.Output<string>; /** * The ARN of the repository. */ readonly arn: pulumi.Output<string>; /** * The description of the repository. */ readonly description: pulumi.Output<string | undefined>; /** * The domain that contains the created repository. */ readonly domain: pulumi.Output<string>; /** * The account number of the AWS account that owns the domain. */ readonly domainOwner: pulumi.Output<string>; /** * An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections. */ readonly externalConnections: pulumi.Output<outputs.codeartifact.RepositoryExternalConnections | undefined>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * The name of the repository to create. */ readonly repository: pulumi.Output<string>; /** * Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * 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 */ readonly upstreams: pulumi.Output<outputs.codeartifact.RepositoryUpstream[] | undefined>; /** * Create a Repository resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RepositoryArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Repository resources. */ export interface RepositoryState { /** * The account number of the AWS account that manages the repository. */ administratorAccount?: pulumi.Input<string>; /** * The ARN of the repository. */ arn?: pulumi.Input<string>; /** * The description of the repository. */ description?: pulumi.Input<string>; /** * The domain that contains the created repository. */ domain?: pulumi.Input<string>; /** * The account number of the AWS account that owns the domain. */ domainOwner?: pulumi.Input<string>; /** * An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections. */ externalConnections?: pulumi.Input<inputs.codeartifact.RepositoryExternalConnections>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * The name of the repository to create. */ repository?: pulumi.Input<string>; /** * Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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 */ upstreams?: pulumi.Input<pulumi.Input<inputs.codeartifact.RepositoryUpstream>[]>; } /** * The set of arguments for constructing a Repository resource. */ export interface RepositoryArgs { /** * The description of the repository. */ description?: pulumi.Input<string>; /** * The domain that contains the created repository. */ domain: pulumi.Input<string>; /** * The account number of the AWS account that owns the domain. */ domainOwner?: pulumi.Input<string>; /** * An array of external connections associated with the repository. Only one external connection can be set per repository. see External Connections. */ externalConnections?: pulumi.Input<inputs.codeartifact.RepositoryExternalConnections>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * The name of the repository to create. */ repository: pulumi.Input<string>; /** * Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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 */ upstreams?: pulumi.Input<pulumi.Input<inputs.codeartifact.RepositoryUpstream>[]>; }