UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

86 lines 4.13 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ReplicationConfiguration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * The ``AWS::ECR::ReplicationConfiguration`` resource creates or updates the replication configuration for a private registry. The first time a replication configuration is applied to a private registry, a service-linked IAM role is created in your account for the replication process. For more information, see [Using Service-Linked Roles for Amazon ECR](https://docs.aws.amazon.com/AmazonECR/latest/userguide/using-service-linked-roles.html) in the *Amazon Elastic Container Registry User Guide*. * When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a private registry permissions policy. For more information, see ``AWS::ECR::RegistryPolicy``. * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const myReplicationConfig = new aws_native.ecr.ReplicationConfiguration("myReplicationConfig", {replicationConfiguration: { * rules: [{ * destinations: [ * { * region: "us-east-2", * registryId: "123456789012", * }, * { * region: "us-west-1", * registryId: "123456789012", * }, * ], * }], * }}); * * ``` */ 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new ReplicationConfiguration(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ReplicationConfiguration.__pulumiType; } /** * 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, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.replicationConfiguration === undefined) && !opts.urn) { throw new Error("Missing required property 'replicationConfiguration'"); } resourceInputs["replicationConfiguration"] = args ? args.replicationConfiguration : undefined; resourceInputs["registryId"] = undefined /*out*/; } else { resourceInputs["registryId"] = undefined /*out*/; resourceInputs["replicationConfiguration"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ReplicationConfiguration.__pulumiType, name, resourceInputs, opts); } } exports.ReplicationConfiguration = ReplicationConfiguration; /** @internal */ ReplicationConfiguration.__pulumiType = 'aws-native:ecr:ReplicationConfiguration'; //# sourceMappingURL=replicationConfiguration.js.map