AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::RAM::ResourceShare

The AWS::RAM::ResourceShare resource is used to create, update, and delete an Amazon ResourceShare. For more information, see ResourceShare in the AWS RAM API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::RAM::ResourceShare", "Properties" : { "AllowExternalPrincipals" : Boolean, "Name" : String, "Principals" : [ String, ... ], "ResourceArns" : [ String, ... ], "Tags" : [ Tag, ... ] } }

YAML

Type: "AWS::RAM::ResourceShare" Properties: AllowExternalPrincipals: Boolean Name: String Principals: - String ResourceArns: - String Tags: - Tag

Properties

AllowExternalPrincipals

Indicates whether principals outside of your organization are allowed in this ResourceShare.

Required: No

Type: Boolean

Update requires: No interruption

Name

A descriptive name for the ResourceShare.

Required: Yes

Type: String

Update requires: No interruption

Principals

A list of account IDs, organizational unit ARNs, and organization ARN to put into the ResourceShare.

Required: No

Type: List of String values

Update requires: No interruption

ResourceArns

The resource ARNs to put into the ResourceShare.

Required: No

Type: List of String values

Update requires: No interruption

Tags

The tags on this ResourceShare.

Required: No

Type: List of Resource Tag

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of an AWS::RAM::ResourceShare resource to the intrinsic Ref function, the function returns the ARN of the created Amazon ResourceShare, such as arn:aws:ram:us-east-1:123456789012:resource-share/12345678-1234-1234-1234-12345678.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

Arn

The Amazon Resource Name (ARN) of the resource share, such as arn:aws:ram:us-east-1:123456789012:resource-share/12345678-1234-1234-1234-12345678.

For more information about using Fn::GetAtt, see Fn::GetAtt.

Examples

ResourceShare creation example

The following example creates a new ResourceShare.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09T00:00:00.000Z", "Resources": { "myresourceshare": { "Type": "AWS::RAM::ResourceShare", "Properties": { "Name": "My Resource Share", "ResourceArns": [ "arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678" ], "Principals": [ "210987654321" ], "Tags": [ { "Key": "Key1", "Value": "Value1" }, { "Key": "Key2", "Value": "Value2" } ] } } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: myresourceshare: Type: "AWS::RAM::ResourceShare" Properties: Name: "My Resource Share" ResourceArns: - "arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678" Principals: - "210987654321" Tags: - Key: "Key1" Value: "Value1" - Key: "Key2" Value: "Value2"

See Also