@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
153 lines (152 loc) • 6.57 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manage accepting a Resource Access Manager (RAM) Resource Share invitation. From a _receiver_ AWS account, accept an invitation to share resources that were shared by a _sender_ AWS account. To create a resource share in the _sender_, see the `aws.ram.ResourceShare` resource.
*
* > **Note:** If both AWS accounts are in the same Organization and [RAM Sharing with AWS Organizations is enabled](https://docs.aws.amazon.com/ram/latest/userguide/getting-started-sharing.html#getting-started-sharing-orgs), this resource is not necessary as RAM Resource Share invitations are not used.
*
* ## Example Usage
*
* This configuration provides an example of using multiple AWS providers to configure two different AWS accounts. In the _sender_ account, the configuration creates a `aws.ram.ResourceShare` and uses a data source in the _receiver_ account to create a `aws.ram.PrincipalAssociation` resource with the _receiver's_ account ID. In the _receiver_ account, the configuration accepts the invitation to share resources with the `aws.ram.ResourceShareAccepter`.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const senderShare = new aws.ram.ResourceShare("sender_share", {
* name: "tf-test-resource-share",
* allowExternalPrincipals: true,
* tags: {
* Name: "tf-test-resource-share",
* },
* });
* const receiver = aws.getCallerIdentity({});
* const senderInvite = new aws.ram.PrincipalAssociation("sender_invite", {
* principal: receiver.then(receiver => receiver.accountId),
* resourceShareArn: senderShare.arn,
* });
* const receiverAccept = new aws.ram.ResourceShareAccepter("receiver_accept", {shareArn: senderInvite.resourceShareArn});
* ```
*
* ## Import
*
* Using `pulumi import`, import resource share accepters using the resource share ARN. For example:
*
* ```sh
* $ pulumi import aws:ram/resourceShareAccepter:ResourceShareAccepter example arn:aws:ram:us-east-1:123456789012:resource-share/c4b56393-e8d9-89d9-6dc9-883752de4767
* ```
*/
export declare class ResourceShareAccepter extends pulumi.CustomResource {
/**
* Get an existing ResourceShareAccepter 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?: ResourceShareAccepterState, opts?: pulumi.CustomResourceOptions): ResourceShareAccepter;
/**
* Returns true if the given object is an instance of ResourceShareAccepter. 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 ResourceShareAccepter;
/**
* The ARN of the resource share invitation.
*/
readonly invitationArn: pulumi.Output<string>;
/**
* The account ID of the receiver account which accepts the invitation.
*/
readonly receiverAccountId: pulumi.Output<string>;
/**
* 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>;
/**
* A list of the resource ARNs shared via the resource share.
*/
readonly resources: pulumi.Output<string[]>;
/**
* The account ID of the sender account which submits the invitation.
*/
readonly senderAccountId: pulumi.Output<string>;
/**
* The ARN of the resource share.
*/
readonly shareArn: pulumi.Output<string>;
/**
* The ID of the resource share as displayed in the console.
*/
readonly shareId: pulumi.Output<string>;
/**
* The name of the resource share.
*/
readonly shareName: pulumi.Output<string>;
/**
* The status of the resource share (ACTIVE, PENDING, FAILED, DELETING, DELETED).
*/
readonly status: pulumi.Output<string>;
/**
* Create a ResourceShareAccepter 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: ResourceShareAccepterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ResourceShareAccepter resources.
*/
export interface ResourceShareAccepterState {
/**
* The ARN of the resource share invitation.
*/
invitationArn?: pulumi.Input<string>;
/**
* The account ID of the receiver account which accepts the invitation.
*/
receiverAccountId?: pulumi.Input<string>;
/**
* 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>;
/**
* A list of the resource ARNs shared via the resource share.
*/
resources?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The account ID of the sender account which submits the invitation.
*/
senderAccountId?: pulumi.Input<string>;
/**
* The ARN of the resource share.
*/
shareArn?: pulumi.Input<string>;
/**
* The ID of the resource share as displayed in the console.
*/
shareId?: pulumi.Input<string>;
/**
* The name of the resource share.
*/
shareName?: pulumi.Input<string>;
/**
* The status of the resource share (ACTIVE, PENDING, FAILED, DELETING, DELETED).
*/
status?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ResourceShareAccepter resource.
*/
export interface ResourceShareAccepterArgs {
/**
* 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 ARN of the resource share.
*/
shareArn: pulumi.Input<string>;
}