UNPKG

@pulumi/aws

Version:

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

146 lines (145 loc) 5.82 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an Elastic Container Registry Replication Configuration. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const example = aws.getRegions({}); * const exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration("example", {replicationConfiguration: { * rules: [{ * destinations: [{ * region: example.then(example => example.names?.[0]), * registryId: current.then(current => current.accountId), * }], * }], * }}); * ``` * * ## Multiple Region Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const example = aws.getRegions({}); * const exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration("example", {replicationConfiguration: { * rules: [{ * destinations: [ * { * region: example.then(example => example.names?.[0]), * registryId: current.then(current => current.accountId), * }, * { * region: example.then(example => example.names?.[1]), * registryId: current.then(current => current.accountId), * }, * ], * }], * }}); * ``` * * ## Repository Filter Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const example = aws.getRegions({}); * const exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration("example", {replicationConfiguration: { * rules: [{ * destinations: [{ * region: example.then(example => example.names?.[0]), * registryId: current.then(current => current.accountId), * }], * repositoryFilters: [{ * filter: "prod-microservice", * filterType: "PREFIX_MATCH", * }], * }], * }}); * ``` * * ## Import * * Using `pulumi import`, import ECR Replication Configuration using the `registry_id`. For example: * * ```sh * $ pulumi import aws:ecr/replicationConfiguration:ReplicationConfiguration service 012345678912 * ``` */ export declare class ReplicationConfiguration extends pulumi.CustomResource { /** * Get an existing ReplicationConfiguration 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?: ReplicationConfigurationState, opts?: pulumi.CustomResourceOptions): ReplicationConfiguration; /** * Returns true if the given object is an instance of ReplicationConfiguration. 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 ReplicationConfiguration; /** * 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 registry ID where the replication configuration was created. */ readonly registryId: pulumi.Output<string>; /** * Replication configuration for a registry. See Replication Configuration. */ readonly replicationConfiguration: pulumi.Output<outputs.ecr.ReplicationConfigurationReplicationConfiguration | undefined>; /** * Create a ReplicationConfiguration 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?: ReplicationConfigurationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ReplicationConfiguration resources. */ export interface ReplicationConfigurationState { /** * 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 registry ID where the replication configuration was created. */ registryId?: pulumi.Input<string>; /** * Replication configuration for a registry. See Replication Configuration. */ replicationConfiguration?: pulumi.Input<inputs.ecr.ReplicationConfigurationReplicationConfiguration>; } /** * The set of arguments for constructing a ReplicationConfiguration resource. */ export interface ReplicationConfigurationArgs { /** * 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>; /** * Replication configuration for a registry. See Replication Configuration. */ replicationConfiguration?: pulumi.Input<inputs.ecr.ReplicationConfigurationReplicationConfiguration>; }