Show / Hide Table of Contents

Class ResourceShareAccepter

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, this resource is not necessary as RAM Resource Share invitations are not used.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var alternate = new Aws.Provider("alternate", new Aws.ProviderArgs
    {
        Profile = "profile1",
    });
    var senderShare = new Aws.Ram.ResourceShare("senderShare", new Aws.Ram.ResourceShareArgs
    {
        AllowExternalPrincipals = true,
        Tags = 
        {
            { "Name", "tf-test-resource-share" },
        },
    });
    var receiver = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
    var senderInvite = new Aws.Ram.PrincipalAssociation("senderInvite", new Aws.Ram.PrincipalAssociationArgs
    {
        Principal = receiver.Apply(receiver => receiver.AccountId),
        ResourceShareArn = senderShare.Arn,
    });
    var receiverAccept = new Aws.Ram.ResourceShareAccepter("receiverAccept", new Aws.Ram.ResourceShareAccepterArgs
    {
        ShareArn = senderInvite.ResourceShareArn,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ResourceShareAccepter
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ram
Assembly: Pulumi.Aws.dll
Syntax
public class ResourceShareAccepter : CustomResource

Constructors

View Source

ResourceShareAccepter(String, ResourceShareAccepterArgs, CustomResourceOptions)

Create a ResourceShareAccepter resource with the given unique name, arguments, and options.

Declaration
public ResourceShareAccepter(string name, ResourceShareAccepterArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ResourceShareAccepterArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

InvitationArn

The ARN of the resource share invitation.

Declaration
public Output<string> InvitationArn { get; }
Property Value
Type Description
Output<System.String>
View Source

ReceiverAccountId

The account ID of the receiver account which accepts the invitation.

Declaration
public Output<string> ReceiverAccountId { get; }
Property Value
Type Description
Output<System.String>
View Source

Resources

A list of the resource ARNs shared via the resource share.

Declaration
public Output<ImmutableArray<string>> Resources { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SenderAccountId

The account ID of the sender account which submits the invitation.

Declaration
public Output<string> SenderAccountId { get; }
Property Value
Type Description
Output<System.String>
View Source

ShareArn

The ARN of the resource share.

Declaration
public Output<string> ShareArn { get; }
Property Value
Type Description
Output<System.String>
View Source

ShareId

The ID of the resource share as displayed in the console.

Declaration
public Output<string> ShareId { get; }
Property Value
Type Description
Output<System.String>
View Source

ShareName

The name of the resource share.

Declaration
public Output<string> ShareName { get; }
Property Value
Type Description
Output<System.String>
View Source

Status

The status of the resource share (ACTIVE, PENDING, FAILED, DELETING, DELETED).

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ResourceShareAccepterState, CustomResourceOptions)

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

Declaration
public static ResourceShareAccepter Get(string name, Input<string> id, ResourceShareAccepterState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ResourceShareAccepterState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ResourceShareAccepter
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.