Module ram

This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

Resources

Functions

Others

Resources

Resource PrincipalAssociation

class PrincipalAssociation extends CustomResource

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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleResourceShare = new aws.ram.ResourceShare("example", {
    // ... other configuration ...
    allowExternalPrincipals: true,
});
const examplePrincipalAssociation = new aws.ram.PrincipalAssociation("example", {
    principal: "111111111111",
    resourceShareArn: exampleResourceShare.arn,
});
AWS Organization
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ram.PrincipalAssociation("example", {
    principal: aws_organizations_organization_example.arn,
    resourceShareArn: aws_ram_resource_share_example.arn,
});

constructor

new PrincipalAssociation(name: string, args: PrincipalAssociationArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PrincipalAssociationState, opts?: pulumi.CustomResourceOptions): PrincipalAssociation

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is PrincipalAssociation

Returns true if the given object is an instance of PrincipalAssociation. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property principal

public principal: pulumi.Output<string>;

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.

property resourceShareArn

public resourceShareArn: pulumi.Output<string>;

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

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ResourceAssociation

class ResourceAssociation extends CustomResource

Manages a Resource Access Manager (RAM) Resource Association.

NOTE: Certain AWS resources (e.g. EC2 Subnets) can only be shared in an AWS account that is a member of an AWS Organizations organization with organization-wide Resource Access Manager functionality enabled. See the Resource Access Manager User Guide and AWS service specific documentation for additional information.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ram.ResourceAssociation("example", {
    resourceArn: aws_subnet_example.arn,
    resourceShareArn: aws_ram_resource_share_example.arn,
});

constructor

new ResourceAssociation(name: string, args: ResourceAssociationArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceAssociationState, opts?: pulumi.CustomResourceOptions): ResourceAssociation

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ResourceAssociation

Returns true if the given object is an instance of ResourceAssociation. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property resourceArn

public resourceArn: pulumi.Output<string>;

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

property resourceShareArn

public resourceShareArn: pulumi.Output<string>;

Amazon Resource Name (ARN) of the RAM Resource Share.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ResourceShare

class ResourceShare extends CustomResource

Manages a Resource Access Manager (RAM) Resource Share. To associate principals with the share, see the aws.ram.PrincipalAssociation resource. To associate resources with the share, see the aws.ram.ResourceAssociation resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ram.ResourceShare("example", {
    allowExternalPrincipals: true,
    tags: {
        Environment: "Production",
    },
});

constructor

new ResourceShare(name: string, args?: ResourceShareArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceShareState, opts?: pulumi.CustomResourceOptions): ResourceShare

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ResourceShare

Returns true if the given object is an instance of ResourceShare. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property allowExternalPrincipals

public allowExternalPrincipals: pulumi.Output<boolean | undefined>;

Indicates whether principals outside your organization can be associated with a resource share.

property arn

public arn: pulumi.Output<string>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the resource share.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A map of tags to assign to the resource share.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ResourceShareAccepter

class ResourceShareAccepter extends CustomResource

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

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const alternate = new aws.Provider("alternate", {
    profile: "profile1",
});
const senderShare = new aws.ram.ResourceShare("sender_share", {
    allowExternalPrincipals: true,
    tags: {
        Name: "tf-test-resource-share",
    },
}, { provider: alternate });
const receiver = pulumi.output(aws.getCallerIdentity({ async: true }));
const senderInvite = new aws.ram.PrincipalAssociation("sender_invite", {
    principal: receiver.accountId,
    resourceShareArn: senderShare.arn,
}, { provider: alternate });
const receiverAccept = new aws.ram.ResourceShareAccepter("receiver_accept", {
    shareArn: senderInvite.resourceShareArn,
});

constructor

new ResourceShareAccepter(name: string, args: ResourceShareAccepterArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceShareAccepterState, opts?: pulumi.CustomResourceOptions): ResourceShareAccepter

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is 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.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property invitationArn

public invitationArn: pulumi.Output<string>;

The ARN of the resource share invitation.

property receiverAccountId

public receiverAccountId: pulumi.Output<string>;

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

property resources

public resources: pulumi.Output<string[]>;

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

property senderAccountId

public senderAccountId: pulumi.Output<string>;

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

property shareArn

public shareArn: pulumi.Output<string>;

The ARN of the resource share.

property shareId

public shareId: pulumi.Output<string>;

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

property shareName

public shareName: pulumi.Output<string>;

The name of the resource share.

property status

public status: pulumi.Output<string>;

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

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Functions

Function getResourceShare

getResourceShare(args: GetResourceShareArgs, opts?: pulumi.InvokeOptions): Promise<GetResourceShareResult>

aws.ram.ResourceShare Retrieve information about a RAM Resource Share.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ram.getResourceShare({
    name: "example",
    resourceOwner: "SELF",
}, { async: true }));

Search by filters

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const tagFilter = pulumi.output(aws.ram.getResourceShare({
    filters: [{
        name: "NameOfTag",
        values: ["exampleNameTagValue"],
    }],
    name: "MyResourceName",
    resourceOwner: "SELF",
}, { async: true }));

Others

interface GetResourceShareArgs

interface GetResourceShareArgs

A collection of arguments for invoking getResourceShare.

property filters

filters?: GetResourceShareFilter[];

A filter used to scope the list e.g. by tags. See related docs.

property name

name: string;

The name of the tag key to filter on.

property resourceOwner

resourceOwner: string;

The owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS

property tags

tags?: undefined | {[key: string]: any};

The Tags attached to the RAM share

interface GetResourceShareResult

interface GetResourceShareResult

A collection of values returned by getResourceShare.

property arn

arn: string;

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

property filters

filters?: GetResourceShareFilter[];

property id

id: string;

The provider-assigned unique ID for this managed resource.

property name

name: string;

property owningAccountId

owningAccountId: string;

The ID of the AWS account that owns the resource share.

property resourceOwner

resourceOwner: string;

property status

status: string;

The Status of the RAM share.

property tags

tags: {[key: string]: any};

The Tags attached to the RAM share

interface PrincipalAssociationArgs

interface PrincipalAssociationArgs

The set of arguments for constructing a PrincipalAssociation resource.

property principal

principal: pulumi.Input<string>;

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.

property resourceShareArn

resourceShareArn: pulumi.Input<string>;

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

interface PrincipalAssociationState

interface PrincipalAssociationState

Input properties used for looking up and filtering PrincipalAssociation resources.

property principal

principal?: pulumi.Input<string>;

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.

property resourceShareArn

resourceShareArn?: pulumi.Input<string>;

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

interface ResourceAssociationArgs

interface ResourceAssociationArgs

The set of arguments for constructing a ResourceAssociation resource.

property resourceArn

resourceArn: pulumi.Input<string>;

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

property resourceShareArn

resourceShareArn: pulumi.Input<string>;

Amazon Resource Name (ARN) of the RAM Resource Share.

interface ResourceAssociationState

interface ResourceAssociationState

Input properties used for looking up and filtering ResourceAssociation resources.

property resourceArn

resourceArn?: pulumi.Input<string>;

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

property resourceShareArn

resourceShareArn?: pulumi.Input<string>;

Amazon Resource Name (ARN) of the RAM Resource Share.

interface ResourceShareAccepterArgs

interface ResourceShareAccepterArgs

The set of arguments for constructing a ResourceShareAccepter resource.

property shareArn

shareArn: pulumi.Input<string>;

The ARN of the resource share.

interface ResourceShareAccepterState

interface ResourceShareAccepterState

Input properties used for looking up and filtering ResourceShareAccepter resources.

property invitationArn

invitationArn?: pulumi.Input<string>;

The ARN of the resource share invitation.

property receiverAccountId

receiverAccountId?: pulumi.Input<string>;

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

property resources

resources?: pulumi.Input<pulumi.Input<string>[]>;

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

property senderAccountId

senderAccountId?: pulumi.Input<string>;

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

property shareArn

shareArn?: pulumi.Input<string>;

The ARN of the resource share.

property shareId

shareId?: pulumi.Input<string>;

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

property shareName

shareName?: pulumi.Input<string>;

The name of the resource share.

property status

status?: pulumi.Input<string>;

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

interface ResourceShareArgs

interface ResourceShareArgs

The set of arguments for constructing a ResourceShare resource.

property allowExternalPrincipals

allowExternalPrincipals?: pulumi.Input<boolean>;

Indicates whether principals outside your organization can be associated with a resource share.

property name

name?: pulumi.Input<string>;

The name of the resource share.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A map of tags to assign to the resource share.

interface ResourceShareState

interface ResourceShareState

Input properties used for looking up and filtering ResourceShare resources.

property allowExternalPrincipals

allowExternalPrincipals?: pulumi.Input<boolean>;

Indicates whether principals outside your organization can be associated with a resource share.

property arn

arn?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

The name of the resource share.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A map of tags to assign to the resource share.