Show / Hide Table of Contents

Class PrincipalAssociation

Provides a Resource Access Manager (RAM) principal association. Depending if RAM Sharing with AWS Organizations is enabled, the RAM behavior with different principal types changes.

When RAM Sharing with AWS Organizations is enabled:

  • For AWS Account ID, Organization, and Organizational Unit principals within the same AWS Organization, no resource share invitation is sent and resources become available automatically after creating the association.
  • For AWS Account ID principals outside the AWS Organization, a resource share invitation is sent and must be accepted before resources become available. See the aws.ram.ResourceShareAccepter resource to accept these invitations.

When RAM Sharing with AWS Organizations is not enabled:

  • Organization and Organizational Unit principals cannot be used.
  • For AWS Account ID principals, a resource share invitation is sent and must be accepted before resources become available. See the aws.ram.ResourceShareAccepter resource to accept these invitations.

Example Usage

AWS Account ID

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var exampleResourceShare = new Aws.Ram.ResourceShare("exampleResourceShare", new Aws.Ram.ResourceShareArgs
    {
        AllowExternalPrincipals = true,
    });
    var examplePrincipalAssociation = new Aws.Ram.PrincipalAssociation("examplePrincipalAssociation", new Aws.Ram.PrincipalAssociationArgs
    {
        Principal = "111111111111",
        ResourceShareArn = exampleResourceShare.Arn,
    });
}

}

AWS Organization

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.Ram.PrincipalAssociation("example", new Aws.Ram.PrincipalAssociationArgs
    {
        Principal = aws_organizations_organization.Example.Arn,
        ResourceShareArn = aws_ram_resource_share.Example.Arn,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
PrincipalAssociation
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 PrincipalAssociation : CustomResource

Constructors

View Source

PrincipalAssociation(String, PrincipalAssociationArgs, CustomResourceOptions)

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

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

The unique name of the resource

PrincipalAssociationArgs 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

Principal

The principal to associate with the resource share. Possible values are an AWS account ID, an AWS Organizations Organization ARN, or an AWS Organizations Organization Unit ARN.

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

ResourceShareArn

The Amazon Resource Name (ARN) of the resource share.

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

Methods

View Source

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

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

Declaration
public static PrincipalAssociation Get(string name, Input<string> id, PrincipalAssociationState 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.

PrincipalAssociationState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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