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::ResourceAssociation
Associates a specified resource with a resource share.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::RAM::ResourceAssociation", "Properties" : { "ResourceArn" :String, "ResourceShareArn" :String} }
YAML
Type: AWS::RAM::ResourceAssociation Properties: ResourceArn:StringResourceShareArn:String
Properties
ResourceArn-
Specifies the Amazon Resource Name (ARN) of the resource to associate with the resource share.
Required: Yes
Type: String
Update requires: Replacement
-
Specifies the Amazon Resource Name (ARN) of 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 resource ARN in the format resource-share-arn|resource-arn. For example: arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2|arn:aws:license-manager:us-east-1:999999999999:license-configuration:lic-36be0485f5ae379cc74cf8e9242ab143.
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.
AssociationType-
The type of entity included in this association. This value is always
RESOURCEfor this resource type. CreationTime-
The date and time when the association was created.
External-
Indicates whether the principal belongs to the same organization in AWS Organizations as the AWS account that owns the resource share.
LastUpdatedTime-
The date and time when the association was last updated.
Status-
The current status of the association. Possible values include
ASSOCIATING,ASSOCIATED,FAILED,DISASSOCIATING,DISASSOCIATED,SUSPENDED,SUSPENDING, andRESTORING.
Examples
Associating a resource with a resource share
The following example associates a resource with a resource share.
YAML
AWSTemplateFormatVersion: '2010-09-09' Resources: MyResourceAssociation: Type: AWS::RAM::ResourceAssociation Properties: ResourceShareArn: !Sub arn:aws:ram:${AWS::Region}:${AWS::AccountId}:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2 ResourceArn: !Sub arn:aws:license-manager:${AWS::Region}:${AWS::AccountId}:license-configuration:lic-36be0485f5ae379cc74cf8e9242ab143
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "MyResourceAssociation": { "Type": "AWS::RAM::ResourceAssociation", "Properties": { "ResourceShareArn": { "Fn::Sub": "arn:aws:ram:${AWS::Region}:${AWS::AccountId}:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2" }, "ResourceArn": { "Fn::Sub": "arn:aws:license-manager:${AWS::Region}:${AWS::AccountId}:license-configuration:lic-36be0485f5ae379cc74cf8e9242ab143" } } } } }
See also
-
AssociateResourceShare in the AWS Resource Access Manager API Reference