2018/11/15
- AWS Resource Access Manager -
16 new api methods
Changes
This is the initial release of AWS Resource Access Manager (RAM) which provides you the ability to share your resources across AWS accounts or within your AWS Organization. You can now create resources centrally and use AWS RAM to share those resources with other accounts, eliminating the need to provision and manage resources in every account. When you share a resource with another account, that account is granted access. Any policies and permissions in that account apply to the shared resource.
UntagResource (new)
Link ¶
Removes the specified tags from the specified resource share.
See also: AWS API Documentation
Request Syntax
client.untag_resource(
resourceShareArn='string',
tagKeys=[
'string',
]
)
- type resourceShareArn
string
- param resourceShareArn
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
- type tagKeys
list
- param tagKeys
[REQUIRED]
The tag keys of the tags to remove.
- rtype
dict
- returns
Response Syntax
{}
Response Structure
AcceptResourceShareInvitation (new)
Link ¶
Accepts an invitation to a resource share from another AWS account.
See also: AWS API Documentation
Request Syntax
client.accept_resource_share_invitation(
resourceShareInvitationArn='string',
clientToken='string'
)
- type resourceShareInvitationArn
string
- param resourceShareInvitationArn
[REQUIRED]
The Amazon Resource Name (ARN) of the invitation.
- type clientToken
string
- param clientToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- rtype
dict
- returns
Response Syntax
{
'resourceShareInvitation': {
'resourceShareInvitationArn': 'string',
'resourceShareName': 'string',
'resourceShareArn': 'string',
'senderAccountId': 'string',
'receiverAccountId': 'string',
'invitationTimestamp': datetime(2015, 1, 1),
'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'associatedEntity': 'string',
'associationType': 'PRINCIPAL'|'RESOURCE',
'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
]
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShareInvitation (dict) --
Information about the invitation.
resourceShareInvitationArn (string) --
The Amazon Resource Name (ARN) of the invitation.
resourceShareName (string) --
The name of the resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
senderAccountId (string) --
The ID of the AWS account that sent the invitation.
receiverAccountId (string) --
The ID of the AWS account that received the invitation.
invitationTimestamp (datetime) --
The date and time when the invitation was sent.
status (string) --
The status of the invitation.
resourceShareAssociations (list) --
The resources associated with the resource share.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
EnableSharingWithAwsOrganization (new)
Link ¶
Enables resource sharing within your organization.
See also: AWS API Documentation
Request Syntax
client.enable_sharing_with_aws_organization()
- rtype
dict
- returns
Response Syntax
{
'returnValue': True|False
}
Response Structure
UpdateResourceShare (new)
Link ¶
Updates the specified resource share.
See also: AWS API Documentation
Request Syntax
client.update_resource_share(
resourceShareArn='string',
name='string',
allowExternalPrincipals=True|False,
clientToken='string'
)
- type resourceShareArn
string
- param resourceShareArn
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
- type name
string
- param name
The name of the resource share.
- type allowExternalPrincipals
boolean
- param allowExternalPrincipals
Indicates whether principals outside your organization can be associated with a resource share.
- type clientToken
string
- param clientToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- rtype
dict
- returns
Response Syntax
{
'resourceShare': {
'resourceShareArn': 'string',
'name': 'string',
'owningAccountId': 'string',
'allowExternalPrincipals': True|False,
'status': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
'statusMessage': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1)
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShare (dict) --
Information about the resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
name (string) --
The name of the resource share.
owningAccountId (string) --
The ID of the AWS account that owns the resource share.
allowExternalPrincipals (boolean) --
Indicates whether principals outside your organization can be associated with a resource share.
status (string) --
The status of the resource share.
statusMessage (string) --
A message about the status of the resource share.
tags (list) --
The tags for the resource share.
(dict) --
Information about a tag.
key (string) --
The key of the tag.
value (string) --
The value of the tag.
creationTime (datetime) --
The time when the resource share was created.
lastUpdatedTime (datetime) --
The time when the resource share was last updated.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
GetResourceShares (new)
Link ¶
Gets the specified resource shares or all of your resource shares.
See also: AWS API Documentation
Request Syntax
client.get_resource_shares(
resourceShareArns=[
'string',
],
resourceShareStatus='PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
resourceOwner='SELF'|'OTHER-ACCOUNTS',
name='string',
tagFilters=[
{
'tagKey': 'string',
'tagValues': [
'string',
]
},
],
nextToken='string',
maxResults=123
)
- type resourceShareArns
list
- param resourceShareArns
The Amazon Resource Names (ARN) of the resource shares.
- type resourceShareStatus
string
- param resourceShareStatus
The status of the resource share.
- type resourceOwner
string
- param resourceOwner
[REQUIRED]
The type of owner.
- type name
string
- param name
The name of the resource share.
- type tagFilters
list
- param tagFilters
One or more tag filters.
- type nextToken
string
- param nextToken
The token for the next page of results.
- type maxResults
integer
- param maxResults
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
- rtype
dict
- returns
Response Syntax
{
'resourceShares': [
{
'resourceShareArn': 'string',
'name': 'string',
'owningAccountId': 'string',
'allowExternalPrincipals': True|False,
'status': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
'statusMessage': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
ListPrincipals (new)
Link ¶
Lists the principals with access to the specified resource.
See also: AWS API Documentation
Request Syntax
client.list_principals(
resourceOwner='SELF'|'OTHER-ACCOUNTS',
resourceArn='string',
principals=[
'string',
],
resourceType='string',
resourceShareArns=[
'string',
],
nextToken='string',
maxResults=123
)
- type resourceOwner
string
- param resourceOwner
[REQUIRED]
The type of owner.
- type resourceArn
string
- param resourceArn
The Amazon Resource Name (ARN) of the resource.
- type principals
list
- param principals
The principals.
- type resourceType
string
- param resourceType
The resource type.
- type resourceShareArns
list
- param resourceShareArns
The Amazon Resource Names (ARN) of the resource shares.
- type nextToken
string
- param nextToken
The token for the next page of results.
- type maxResults
integer
- param maxResults
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
- rtype
dict
- returns
Response Syntax
{
'principals': [
{
'id': 'string',
'resourceShareArn': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
],
'nextToken': 'string'
}
Response Structure
ListResources (new)
Link ¶
Lists the resources that the specified principal can access.
See also: AWS API Documentation
Request Syntax
client.list_resources(
resourceOwner='SELF'|'OTHER-ACCOUNTS',
principal='string',
resourceType='string',
resourceArns=[
'string',
],
resourceShareArns=[
'string',
],
nextToken='string',
maxResults=123
)
- type resourceOwner
string
- param resourceOwner
[REQUIRED]
The type of owner.
- type principal
string
- param principal
The principal.
- type resourceType
string
- param resourceType
The resource type.
- type resourceArns
list
- param resourceArns
The Amazon Resource Names (ARN) of the resources.
- type resourceShareArns
list
- param resourceShareArns
The Amazon Resource Names (ARN) of the resource shares.
- type nextToken
string
- param nextToken
The token for the next page of results.
- type maxResults
integer
- param maxResults
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
- rtype
dict
- returns
Response Syntax
{
'resources': [
{
'arn': 'string',
'type': 'string',
'resourceShareArn': 'string',
'status': 'AVAILABLE'|'ZONAL_RESOURCE_INACCESSIBLE'|'LIMIT_EXCEEDED'|'UNAVAILABLE',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
DeleteResourceShare (new)
Link ¶
Deletes the specified resource share.
See also: AWS API Documentation
Request Syntax
client.delete_resource_share(
resourceShareArn='string',
clientToken='string'
)
- type resourceShareArn
string
- param resourceShareArn
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
- type clientToken
string
- param clientToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- rtype
dict
- returns
Response Syntax
{
'returnValue': True|False,
'clientToken': 'string'
}
Response Structure
(dict) --
returnValue (boolean) --
Indicates whether the request succeeded.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
CreateResourceShare (new)
Link ¶
Creates a resource share.
See also: AWS API Documentation
Request Syntax
client.create_resource_share(
name='string',
resourceArns=[
'string',
],
principals=[
'string',
],
tags=[
{
'key': 'string',
'value': 'string'
},
],
allowExternalPrincipals=True|False,
clientToken='string'
)
- type name
string
- param name
[REQUIRED]
The name of the resource share.
- type resourceArns
list
- param resourceArns
The Amazon Resource Names (ARN) of the resources to associate with the resource share.
- type principals
list
- param principals
The principals to associate with the resource share. The possible values are IDs of AWS accounts, the ARN of an OU or organization from AWS Organizations.
- type tags
list
- param tags
One or more tags.
(dict) --
Information about a tag.
key (string) --
The key of the tag.
value (string) --
The value of the tag.
- type allowExternalPrincipals
boolean
- param allowExternalPrincipals
Indicates whether principals outside your organization can be associated with a resource share.
- type clientToken
string
- param clientToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- rtype
dict
- returns
Response Syntax
{
'resourceShare': {
'resourceShareArn': 'string',
'name': 'string',
'owningAccountId': 'string',
'allowExternalPrincipals': True|False,
'status': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
'statusMessage': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1)
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShare (dict) --
Information about the resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
name (string) --
The name of the resource share.
owningAccountId (string) --
The ID of the AWS account that owns the resource share.
allowExternalPrincipals (boolean) --
Indicates whether principals outside your organization can be associated with a resource share.
status (string) --
The status of the resource share.
statusMessage (string) --
A message about the status of the resource share.
tags (list) --
The tags for the resource share.
(dict) --
Information about a tag.
key (string) --
The key of the tag.
value (string) --
The value of the tag.
creationTime (datetime) --
The time when the resource share was created.
lastUpdatedTime (datetime) --
The time when the resource share was last updated.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
GetResourcePolicies (new)
Link ¶
Gets the policies for the specifies resources.
See also: AWS API Documentation
Request Syntax
client.get_resource_policies(
resourceArns=[
'string',
],
principal='string',
nextToken='string',
maxResults=123
)
- type resourceArns
list
- param resourceArns
[REQUIRED]
The Amazon Resource Names (ARN) of the resources.
- type principal
string
- param principal
The principal.
- type nextToken
string
- param nextToken
The token for the next page of results.
- type maxResults
integer
- param maxResults
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
- rtype
dict
- returns
Response Syntax
{
'policies': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
policies (list) --
A key policy document, in JSON format.
nextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
DisassociateResourceShare (new)
Link ¶
Disassociates the specified principals or resources from the specified resource share.
See also: AWS API Documentation
Request Syntax
client.disassociate_resource_share(
resourceShareArn='string',
resourceArns=[
'string',
],
principals=[
'string',
],
clientToken='string'
)
- type resourceShareArn
string
- param resourceShareArn
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
- type resourceArns
list
- param resourceArns
The Amazon Resource Names (ARN) of the resources.
- type principals
list
- param principals
The principals.
- type clientToken
string
- param clientToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- rtype
dict
- returns
Response Syntax
{
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'associatedEntity': 'string',
'associationType': 'PRINCIPAL'|'RESOURCE',
'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
],
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShareAssociations (list) --
Information about the associations.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
TagResource (new)
Link ¶
Adds the specified tags to the specified resource share.
See also: AWS API Documentation
Request Syntax
client.tag_resource(
resourceShareArn='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
- type resourceShareArn
string
- param resourceShareArn
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
- type tags
list
- param tags
[REQUIRED]
One or more tags.
(dict) --
Information about a tag.
key (string) --
The key of the tag.
value (string) --
The value of the tag.
- rtype
dict
- returns
Response Syntax
{}
Response Structure
GetResourceShareAssociations (new)
Link ¶
Gets the associations for the specified resource share.
See also: AWS API Documentation
Request Syntax
client.get_resource_share_associations(
associationType='PRINCIPAL'|'RESOURCE',
resourceShareArns=[
'string',
],
resourceArn='string',
principal='string',
associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
nextToken='string',
maxResults=123
)
- type associationType
string
- param associationType
[REQUIRED]
The association type.
- type resourceShareArns
list
- param resourceShareArns
The Amazon Resource Names (ARN) of the resource shares.
- type resourceArn
string
- param resourceArn
The Amazon Resource Name (ARN) of the resource.
- type principal
string
- param principal
The principal.
- type associationStatus
string
- param associationStatus
The status of the association.
- type nextToken
string
- param nextToken
The token for the next page of results.
- type maxResults
integer
- param maxResults
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
- rtype
dict
- returns
Response Syntax
{
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'associatedEntity': 'string',
'associationType': 'PRINCIPAL'|'RESOURCE',
'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
resourceShareAssociations (list) --
Information about the association.
nextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
GetResourceShareInvitations (new)
Link ¶
Gets the specified invitations for resource sharing.
See also: AWS API Documentation
Request Syntax
client.get_resource_share_invitations(
resourceShareInvitationArns=[
'string',
],
resourceShareArns=[
'string',
],
nextToken='string',
maxResults=123
)
- type resourceShareInvitationArns
list
- param resourceShareInvitationArns
The Amazon Resource Names (ARN) of the invitations.
- type resourceShareArns
list
- param resourceShareArns
The Amazon Resource Names (ARN) of the resource shares.
- type nextToken
string
- param nextToken
The token for the next page of results.
- type maxResults
integer
- param maxResults
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
- rtype
dict
- returns
Response Syntax
{
'resourceShareInvitations': [
{
'resourceShareInvitationArn': 'string',
'resourceShareName': 'string',
'resourceShareArn': 'string',
'senderAccountId': 'string',
'receiverAccountId': 'string',
'invitationTimestamp': datetime(2015, 1, 1),
'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'associatedEntity': 'string',
'associationType': 'PRINCIPAL'|'RESOURCE',
'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
]
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
resourceShareInvitations (list) --
Information about the invitations.
nextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
RejectResourceShareInvitation (new)
Link ¶
Rejects an invitation to a resource share from another AWS account.
See also: AWS API Documentation
Request Syntax
client.reject_resource_share_invitation(
resourceShareInvitationArn='string',
clientToken='string'
)
- type resourceShareInvitationArn
string
- param resourceShareInvitationArn
[REQUIRED]
The Amazon Resource Name (ARN) of the invitation.
- type clientToken
string
- param clientToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- rtype
dict
- returns
Response Syntax
{
'resourceShareInvitation': {
'resourceShareInvitationArn': 'string',
'resourceShareName': 'string',
'resourceShareArn': 'string',
'senderAccountId': 'string',
'receiverAccountId': 'string',
'invitationTimestamp': datetime(2015, 1, 1),
'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'associatedEntity': 'string',
'associationType': 'PRINCIPAL'|'RESOURCE',
'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
]
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShareInvitation (dict) --
Information about the invitation.
resourceShareInvitationArn (string) --
The Amazon Resource Name (ARN) of the invitation.
resourceShareName (string) --
The name of the resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
senderAccountId (string) --
The ID of the AWS account that sent the invitation.
receiverAccountId (string) --
The ID of the AWS account that received the invitation.
invitationTimestamp (datetime) --
The date and time when the invitation was sent.
status (string) --
The status of the invitation.
resourceShareAssociations (list) --
The resources associated with the resource share.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
AssociateResourceShare (new)
Link ¶
Associates the specified resource share with the specified principals and resources.
See also: AWS API Documentation
Request Syntax
client.associate_resource_share(
resourceShareArn='string',
resourceArns=[
'string',
],
principals=[
'string',
],
clientToken='string'
)
- type resourceShareArn
string
- param resourceShareArn
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
- type resourceArns
list
- param resourceArns
The Amazon Resource Names (ARN) of the resources.
- type principals
list
- param principals
The principals.
- type clientToken
string
- param clientToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- rtype
dict
- returns
Response Syntax
{
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'associatedEntity': 'string',
'associationType': 'PRINCIPAL'|'RESOURCE',
'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
],
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShareAssociations (list) --
Information about the associations.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.