Table of Contents
A low-level client representing AWS Resource Access Manager (RAM):
import boto3
client = boto3.client('ram')
These are the available methods:
Accepts an invitation to a resource share from another AWS account.
See also: AWS API Documentation
Request Syntax
response = client.accept_resource_share_invitation(
resourceShareInvitationArn='string',
clientToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the invitation.
dict
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.
(dict) --
Describes an association with a resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
associatedEntity (string) --
The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.
associationType (string) --
The association type.
status (string) --
The status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The time when the association was created.
lastUpdatedTime (datetime) --
The time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Associates the specified resource share with the specified principals and resources.
See also: AWS API Documentation
Request Syntax
response = client.associate_resource_share(
resourceShareArn='string',
resourceArns=[
'string',
],
principals=[
'string',
],
clientToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
The Amazon Resource Names (ARN) of the resources.
The principals.
dict
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.
(dict) --
Describes an association with a resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
associatedEntity (string) --
The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.
associationType (string) --
The association type.
status (string) --
The status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The time when the association was created.
lastUpdatedTime (datetime) --
The time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Check if an operation can be paginated.
Creates a resource share.
See also: AWS API Documentation
Request Syntax
response = client.create_resource_share(
name='string',
resourceArns=[
'string',
],
principals=[
'string',
],
tags=[
{
'key': 'string',
'value': 'string'
},
],
allowExternalPrincipals=True|False,
clientToken='string'
)
[REQUIRED]
The name of the resource share.
The Amazon Resource Names (ARN) of the resources to associate with the resource share.
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.
One or more tags.
Information about a tag.
The key of the tag.
The value of the tag.
dict
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.
Deletes the specified resource share.
See also: AWS API Documentation
Request Syntax
response = client.delete_resource_share(
resourceShareArn='string',
clientToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
dict
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.
Disassociates the specified principals or resources from the specified resource share.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_resource_share(
resourceShareArn='string',
resourceArns=[
'string',
],
principals=[
'string',
],
clientToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
The Amazon Resource Names (ARN) of the resources.
The principals.
dict
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.
(dict) --
Describes an association with a resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
associatedEntity (string) --
The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.
associationType (string) --
The association type.
status (string) --
The status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The time when the association was created.
lastUpdatedTime (datetime) --
The time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Enables resource sharing within your organization.
See also: AWS API Documentation
Request Syntax
response = client.enable_sharing_with_aws_organization()
{
'returnValue': True|False
}
Response Structure
Indicates whether the request succeeded.
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Gets the policies for the specifies resources.
See also: AWS API Documentation
Request Syntax
response = client.get_resource_policies(
resourceArns=[
'string',
],
principal='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The Amazon Resource Names (ARN) of the resources.
dict
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.
Gets the associations for the specified resource share.
See also: AWS API Documentation
Request Syntax
response = client.get_resource_share_associations(
associationType='PRINCIPAL'|'RESOURCE',
resourceShareArns=[
'string',
],
resourceArn='string',
principal='string',
associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
nextToken='string',
maxResults=123
)
[REQUIRED]
The association type.
The Amazon Resource Names (ARN) of the resource shares.
dict
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.
(dict) --
Describes an association with a resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
associatedEntity (string) --
The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.
associationType (string) --
The association type.
status (string) --
The status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The time when the association was created.
lastUpdatedTime (datetime) --
The time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.
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.
Gets the specified invitations for resource sharing.
See also: AWS API Documentation
Request Syntax
response = client.get_resource_share_invitations(
resourceShareInvitationArns=[
'string',
],
resourceShareArns=[
'string',
],
nextToken='string',
maxResults=123
)
The Amazon Resource Names (ARN) of the invitations.
The Amazon Resource Names (ARN) of the resource shares.
dict
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.
(dict) --
Describes an invitation to join a resource share.
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.
(dict) --
Describes an association with a resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
associatedEntity (string) --
The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.
associationType (string) --
The association type.
status (string) --
The status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The time when the association was created.
lastUpdatedTime (datetime) --
The time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.
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.
Gets the specified resource shares or all of your resource shares.
See also: AWS API Documentation
Request Syntax
response = 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
)
The Amazon Resource Names (ARN) of the resource shares.
[REQUIRED]
The type of owner.
One or more tag filters.
Used to filter information based on tags.
The tag key.
The tag values.
dict
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
(dict) --
resourceShares (list) --
Information about the resource shares.
(dict) --
Describes a 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.
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.
Returns an object that can wait for some condition.
Lists the principals with access to the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.list_principals(
resourceOwner='SELF'|'OTHER-ACCOUNTS',
resourceArn='string',
principals=[
'string',
],
resourceType='string',
resourceShareArns=[
'string',
],
nextToken='string',
maxResults=123
)
[REQUIRED]
The type of owner.
The principals.
The Amazon Resource Names (ARN) of the resource shares.
dict
Response Syntax
{
'principals': [
{
'id': 'string',
'resourceShareArn': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'external': True|False
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
principals (list) --
The principals.
(dict) --
Describes a principal for use with AWS Resource Access Manager.
id (string) --
The ID of the principal.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
creationTime (datetime) --
The time when the principal was associated with the resource share.
lastUpdatedTime (datetime) --
The time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.
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.
Lists the resources that the specified principal can access.
See also: AWS API Documentation
Request Syntax
response = client.list_resources(
resourceOwner='SELF'|'OTHER-ACCOUNTS',
principal='string',
resourceType='string',
resourceArns=[
'string',
],
resourceShareArns=[
'string',
],
nextToken='string',
maxResults=123
)
[REQUIRED]
The type of owner.
The Amazon Resource Names (ARN) of the resources.
The Amazon Resource Names (ARN) of the resource shares.
dict
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
(dict) --
resources (list) --
Information about the resources.
(dict) --
Describes a resource associated with a resource share.
arn (string) --
The Amazon Resource Name (ARN) of the resource.
type (string) --
The resource type.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
status (string) --
The status of the resource.
statusMessage (string) --
A message about the status of the resource.
creationTime (datetime) --
The time when the resource was associated with the resource share.
lastUpdatedTime (datetime) --
The time when the association was last updated.
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.
Rejects an invitation to a resource share from another AWS account.
See also: AWS API Documentation
Request Syntax
response = client.reject_resource_share_invitation(
resourceShareInvitationArn='string',
clientToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the invitation.
dict
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.
(dict) --
Describes an association with a resource share.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of the resource share.
associatedEntity (string) --
The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.
associationType (string) --
The association type.
status (string) --
The status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The time when the association was created.
lastUpdatedTime (datetime) --
The time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.
clientToken (string) --
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Adds the specified tags to the specified resource share.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceShareArn='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
[REQUIRED]
One or more tags.
Information about a tag.
The key of the tag.
The value of the tag.
dict
Response Syntax
{}
Response Structure
Removes the specified tags from the specified resource share.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceShareArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
[REQUIRED]
The tag keys of the tags to remove.
dict
Response Syntax
{}
Response Structure
Updates the specified resource share.
See also: AWS API Documentation
Request Syntax
response = client.update_resource_share(
resourceShareArn='string',
name='string',
allowExternalPrincipals=True|False,
clientToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource share.
dict
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.
The available paginators are: