This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::RAM::SourceAssociation
Associates a specified source account with a resource share.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::RAM::SourceAssociation", "Properties" : { "ResourceShareArn" :String, "SourceId" :String} }
YAML
Type: AWS::RAM::SourceAssociation Properties: ResourceShareArn:StringSourceId:String
Properties
-
Specifies the Amazon Resource Name (ARN) of the resource share.
Required: Yes
Type: String
Update requires: Replacement
SourceId-
Specifies the ID of the source account to associate with the resource share.
Required: Yes
Type: String
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource share ARN and source ID in the format resource-share-arn|source-id. For example: arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2|999999999999.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
CreationTime-
The date and time when the association was created.
LastUpdatedTime-
The date and time when the association was last updated.
SourceType-
The type of the source. This value is always
SOURCEfor this resource type. Status-
The current status of the association. Possible values include
ASSOCIATING,ASSOCIATED,FAILED,DISASSOCIATING,DISASSOCIATED,SUSPENDED,SUSPENDING, andRESTORING.
Examples
Associating a source account with a resource share
The following example associates a source account with a resource share.
YAML
AWSTemplateFormatVersion: '2010-09-09' Resources: MySourceAssociation: Type: AWS::RAM::SourceAssociation Properties: ResourceShareArn: !Sub arn:aws:ram:${AWS::Region}:${AWS::AccountId}:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2 SourceId: '999999999999'
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "MySourceAssociation": { "Type": "AWS::RAM::SourceAssociation", "Properties": { "ResourceShareArn": { "Fn::Sub": "arn:aws:ram:${AWS::Region}:${AWS::AccountId}:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2" }, "SourceId": "999999999999" } } } }
See also
-
AssociateResourceShare in the AWS Resource Access Manager API Reference