Table of Contents
A low-level client representing AWS Resource Access Manager (RAM)
This is the Resource Access Manager API Reference . This documentation provides descriptions and syntax for each of the actions and data types in RAM. RAM is a service that helps you securely share your Amazon Web Services resources across Amazon Web Services accounts. If you have multiple Amazon Web Services accounts, you can use RAM to share those resources with other accounts. If you use Organizations to manage your accounts, then you share your resources with your organization or organizational units (OUs). For supported resource types, you can also share resources with individual Identity and Access Management (IAM) roles an users.
To learn more about RAM, see the following resources:
import boto3
client = boto3.client('ram')
These are the available methods:
Accepts an invitation to a resource share from another Amazon Web Services account. After you accept the invitation, the resources included in the resource share are available to interact with in the relevant Amazon Web Services Management Consoles and tools.
See also: AWS API Documentation
Request Syntax
response = client.accept_resource_share_invitation(
resourceShareInvitationArn='string',
clientToken='string'
)
[REQUIRED]
The Amazon Resoure Name (ARN) of the invitation that you want to accept.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
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',
'resourceShareName': '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
},
],
'receiverArn': 'string'
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShareInvitation (dict) --
An object that contains information about the specified invitation.
resourceShareInvitationArn (string) --
The Amazon Resoure Name (ARN) of the invitation.
resourceShareName (string) --
The name of the resource share.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
senderAccountId (string) --
The ID of the Amazon Web Services account that sent the invitation.
receiverAccountId (string) --
The ID of the Amazon Web Services account that received the invitation.
invitationTimestamp (datetime) --
The date and time when the invitation was sent.
status (string) --
The current status of the invitation.
resourceShareAssociations (list) --
To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources .
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
receiverArn (string) --
The Amazon Resoure Name (ARN) of the IAM user or role that received the invitation.
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
Adds the specified list of principals and list of resources to a resource share. Principals that already have access to this resource share immediately receive access to the added resources. Newly added principals immediately receive access to the resources shared in this resource share.
See also: AWS API Documentation
Request Syntax
response = client.associate_resource_share(
resourceShareArn='string',
resourceArns=[
'string',
],
principals=[
'string',
],
clientToken='string'
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add principals or resources to.
Specifies a list of Amazon Resource Names (ARNs) of the resources that you want to share. This can be null if you want to add only principals.
Specifies a list of principals to whom you want to the resource share. This can be null if you want to add only resources.
What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See AssociateResourceSharePermission .
You can include the following values:
Note
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide .
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
dict
Response Syntax
{
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'resourceShareName': '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) --
An array of objects that contain information about the associations.
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
Adds or replaces the RAM permission for a resource type included in a resource share. You can have exactly one permission associated with each resource type in the resource share. You can add a new RAM permission only if there are currently no resources of that resource type currently in the resource share.
See also: AWS API Documentation
Request Syntax
response = client.associate_resource_share_permission(
resourceShareArn='string',
permissionArn='string',
replace=True|False,
clientToken='string',
permissionVersion=123
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the resource share to which you want to add or replace permissions.
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.
Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to the current permission. The default value is false .
Note
A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set replace to true then the operation returns an error. This helps prevent accidental overwriting of a permission.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
dict
Response Syntax
{
'returnValue': True|False,
'clientToken': 'string'
}
Response Structure
(dict) --
returnValue (boolean) --
A return value of true indicates that the request succeeded. A value of false indicates that the request failed.
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
Check if an operation can be paginated.
Creates a resource share. You can provide a list of the Amazon Resource Names (ARNs) for the resources that you want to share, a list of principals you want to share the resources with, and the permissions to grant those principals.
Note
Sharing a resource makes it available for use by principals outside of the Amazon Web Services account that created the resource. Sharing doesn't change any permissions or quotas that apply to the resource in the account that created it.
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',
permissionArns=[
'string',
]
)
[REQUIRED]
Specifies the name of the resource share.
Specifies a list of one or more ARNs of the resources to associate with the resource share.
Specifies a list of one or more principals to associate with the resource share.
You can include the following values:
Note
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide .
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.
A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags .
For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide .
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
Specifies the Amazon Resource Names (ARNs) of the RAM permission to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in 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),
'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD'
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShare (dict) --
An object with information about the new resource share.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
name (string) --
The name of the resource share.
owningAccountId (string) --
The ID of the Amazon Web Services account that owns the resource share.
allowExternalPrincipals (boolean) --
Indicates whether principals outside your organization in Organizations can be associated with a resource share.
status (string) --
The current status of the resource share.
statusMessage (string) --
A message about the status of the resource share.
tags (list) --
The tag key and value pairs attached to the resource share.
(dict) --
A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags .
For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide .
key (string) --
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
value (string) --
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
creationTime (datetime) --
The date and time when the resource share was created.
lastUpdatedTime (datetime) --
The date and time when the resource share was last updated.
featureSet (string) --
Indicates how the resource share was created. Possible values include:
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
Deletes the specified resource share. This doesn't delete any of the resources that were associated with the resource share; it only stops the sharing of those resources outside of the Amazon Web Services account that created them.
See also: AWS API Documentation
Request Syntax
response = client.delete_resource_share(
resourceShareArn='string',
clientToken='string'
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the resource share to delete.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
dict
Response Syntax
{
'returnValue': True|False,
'clientToken': 'string'
}
Response Structure
(dict) --
returnValue (boolean) --
A return value of true indicates that the request succeeded. A value of false indicates that the request failed.
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
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]
Specifies Amazon Resoure Name (ARN) of the resource share that you want to remove resources from.
Specifies a list of Amazon Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account that created the resources.
Specifies a list of one or more principals that no longer are to have access to the resources in this resource share.
You can include the following values:
Note
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide .
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
dict
Response Syntax
{
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'resourceShareName': '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) --
An array of objects that contain information about the updated associations for this resource share.
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
Disassociates an RAM permission from a resource share. Permission changes take effect immediately. You can remove a RAM permission from a resource share only if there are currently no resources of the relevant resource type currently attached to the resource share.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_resource_share_permission(
resourceShareArn='string',
permissionArn='string',
clientToken='string'
)
[REQUIRED]
The Amazon Resoure Name (ARN) of the resource share from which you want to disassociate a permission.
[REQUIRED]
The Amazon Resoure Name (ARN) of the permission to disassociate from the resource share. Changes to permissions take effect immediately.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
dict
Response Syntax
{
'returnValue': True|False,
'clientToken': 'string'
}
Response Structure
(dict) --
returnValue (boolean) --
A return value of true indicates that the request succeeded. A value of false indicates that the request failed.
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
Enables resource sharing within your organization in Organizations. Calling this operation enables RAM to retrieve information about the organization and its structure. This lets you share resources with all of the accounts in an organization by specifying the organization's ID, or all of the accounts in an organizational unit (OU) by specifying the OU's ID. Until you enable sharing within the organization, you can specify only individual Amazon Web Services accounts, or for supported resource types, IAM users and roles.
You must call this operation from an IAM user or role in the organization's management account.
See also: AWS API Documentation
Request Syntax
response = client.enable_sharing_with_aws_organization()
{
'returnValue': True|False
}
Response Structure
A return value of true indicates that the request succeeded. A value of false indicates that the request failed.
Exceptions
Create a paginator for an operation.
Gets the contents of an RAM permission in JSON format.
See also: AWS API Documentation
Request Syntax
response = client.get_permission(
permissionArn='string',
permissionVersion=123
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.
dict
Response Syntax
{
'permission': {
'arn': 'string',
'version': 'string',
'defaultVersion': True|False,
'name': 'string',
'resourceType': 'string',
'permission': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'isResourceTypeDefault': True|False
}
}
Response Structure
(dict) --
permission (dict) --
An object that contains information about the permission.
arn (string) --
The Amazon Resoure Name (ARN) of this RAM permission.
version (string) --
The version of the permission represented in this structure.
defaultVersion (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for this permission.
name (string) --
The name of this permission.
resourceType (string) --
The resource type to which this permission applies.
permission (string) --
The permission's effect and actions in JSON format. The effect indicates whether the specified actions are allowed or denied. The actions list the operations to which the principal is granted or denied access.
creationTime (datetime) --
The date and time when the permission was created.
lastUpdatedTime (datetime) --
The date and time when the permission was last updated.
isResourceTypeDefault (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for all resources of this resource type.
Exceptions
Retrieves the resource policies for the specified resources that you own and have shared.
See also: AWS API Documentation
Request Syntax
response = client.get_resource_policies(
resourceArns=[
'string',
],
principal='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
Specifies the Amazon Resource Names (ARNs) of the resources whose policies you want to retrieve.
dict
Response Syntax
{
'policies': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
policies (list) --
An array of resource policy documents in JSON format.
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Retrieves the resource and principal associations for resource shares that you own.
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]
Specifies whether you want to retrieve the associations that involve a specified resource or principal.
Specifies a list of Amazon Resource Names (ARNs) of the resource share whose associations you want to retrieve.
Specifies the Amazon Resoure Name (ARN) of the resource whose resource shares you want to retrieve.
You cannot specify this parameter if the association type is PRINCIPAL .
Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the Amazon Resoure Name (ARN) of an individual IAM user or role.
You cannot specify this parameter if the association type is RESOURCE .
dict
Response Syntax
{
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'resourceShareName': '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) --
An array of objects that contain the details about the associations.
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Retrieves details about invitations that you have received for resource shares.
See also: AWS API Documentation
Request Syntax
response = client.get_resource_share_invitations(
resourceShareInvitationArns=[
'string',
],
resourceShareArns=[
'string',
],
nextToken='string',
maxResults=123
)
Specifies the Amazon Resource Names (ARNs) of the resource share invitations you want information about.
Specifies that you want details about invitations only for the resource shares described by this list of Amazon Resource Names (ARNs)
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',
'resourceShareName': '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
},
],
'receiverArn': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
resourceShareInvitations (list) --
An array of objects that contain the details about the invitations.
(dict) --
Describes an invitation for an Amazon Web Services account to join a resource share.
resourceShareInvitationArn (string) --
The Amazon Resoure Name (ARN) of the invitation.
resourceShareName (string) --
The name of the resource share.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
senderAccountId (string) --
The ID of the Amazon Web Services account that sent the invitation.
receiverAccountId (string) --
The ID of the Amazon Web Services account that received the invitation.
invitationTimestamp (datetime) --
The date and time when the invitation was sent.
status (string) --
The current status of the invitation.
resourceShareAssociations (list) --
To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources .
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
receiverArn (string) --
The Amazon Resoure Name (ARN) of the IAM user or role that received the invitation.
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Retrieves details about the resource shares that you own or that are shared with you.
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,
permissionArn='string'
)
Specifies the Amazon Resource Names (ARNs) of individual resource shares that you want information about.
[REQUIRED]
Specifies that you want to retrieve details of only those resource shares that match the following:
Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.
A tag key and optional list of possible values that you can use to filter results for tagged resources.
The tag key. This must have a valid string value and can't be empty.
A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.
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),
'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
resourceShares (list) --
An array of objects that contain the information about the resource shares.
(dict) --
Describes a resource share in RAM.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
name (string) --
The name of the resource share.
owningAccountId (string) --
The ID of the Amazon Web Services account that owns the resource share.
allowExternalPrincipals (boolean) --
Indicates whether principals outside your organization in Organizations can be associated with a resource share.
status (string) --
The current status of the resource share.
statusMessage (string) --
A message about the status of the resource share.
tags (list) --
The tag key and value pairs attached to the resource share.
(dict) --
A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags .
For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide .
key (string) --
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
value (string) --
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
creationTime (datetime) --
The date and time when the resource share was created.
lastUpdatedTime (datetime) --
The date and time when the resource share was last updated.
featureSet (string) --
Indicates how the resource share was created. Possible values include:
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Returns an object that can wait for some condition.
Lists the resources in a resource share that is shared with you but for which the invitation is still PENDING . That means that you haven't accepted or rejected the invitation and the invitation hasn't expired.
See also: AWS API Documentation
Request Syntax
response = client.list_pending_invitation_resources(
resourceShareInvitationArn='string',
nextToken='string',
maxResults=123,
resourceRegionScope='ALL'|'REGIONAL'|'GLOBAL'
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the invitation. You can use GetResourceShareInvitations to find the ARN of the invitation.
Specifies that you want the results to include only resources that have the specified scope.
The default value is ALL .
dict
Response Syntax
{
'resources': [
{
'arn': 'string',
'type': 'string',
'resourceShareArn': 'string',
'resourceGroupArn': 'string',
'status': 'AVAILABLE'|'ZONAL_RESOURCE_INACCESSIBLE'|'LIMIT_EXCEEDED'|'UNAVAILABLE'|'PENDING',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'resourceRegionScope': 'REGIONAL'|'GLOBAL'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
resources (list) --
An array of objects that contain the information about the resources included the specified resource share.
(dict) --
Describes a resource associated with a resource share in RAM.
arn (string) --
The Amazon Resoure Name (ARN) of the resource.
type (string) --
The resource type. This takes the form of: service-code :resource-code
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share this resource is associated with.
resourceGroupArn (string) --
The Amazon Resoure Name (ARN) of the resource group. This value is available only if the resource is part of a resource group.
status (string) --
The current status of the resource.
statusMessage (string) --
A message about the status of the resource.
creationTime (datetime) --
The date and time when the resource was associated with the resource share.
lastUpdatedTime (datetime) --
The date an time when the association was last updated.
resourceRegionScope (string) --
Specifies the scope of visibility of this resource:
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Lists the available versions of the specified RAM permission.
See also: AWS API Documentation
Request Syntax
response = client.list_permission_versions(
permissionArn='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the RAM permission whose versions you want to list. You can use the permissionVersion parameter on the AssociateResourceSharePermission operation to specify a non-default version to attach.
dict
Response Syntax
{
'permissions': [
{
'arn': 'string',
'version': 'string',
'defaultVersion': True|False,
'name': 'string',
'resourceType': 'string',
'status': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'isResourceTypeDefault': True|False
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
permissions (list) --
An array of objects that contain details for each of the available versions.
(dict) --
Information about an RAM permission that is associated with a resource share and any of its resources of a specified type.
arn (string) --
The Amazon Resoure Name (ARN) of the permission you want information about.
version (string) --
The version of the permission represented in this structure.
defaultVersion (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for this permission.
name (string) --
The name of this permission.
resourceType (string) --
The type of resource to which this permission applies.
status (string) --
The current status of the permission.
creationTime (datetime) --
The date and time when the permission was created.
lastUpdatedTime (datetime) --
The date and time when the permission was last updated.
isResourceTypeDefault (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for all resources of this resource type.
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Retrieves a list of available RAM permissions that you can use for the supported resource types.
See also: AWS API Documentation
Request Syntax
response = client.list_permissions(
resourceType='string',
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'permissions': [
{
'arn': 'string',
'version': 'string',
'defaultVersion': True|False,
'name': 'string',
'resourceType': 'string',
'status': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'isResourceTypeDefault': True|False
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
permissions (list) --
An array of objects with information about the permissions.
(dict) --
Information about an RAM permission that is associated with a resource share and any of its resources of a specified type.
arn (string) --
The Amazon Resoure Name (ARN) of the permission you want information about.
version (string) --
The version of the permission represented in this structure.
defaultVersion (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for this permission.
name (string) --
The name of this permission.
resourceType (string) --
The type of resource to which this permission applies.
status (string) --
The current status of the permission.
creationTime (datetime) --
The date and time when the permission was created.
lastUpdatedTime (datetime) --
The date and time when the permission was last updated.
isResourceTypeDefault (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for all resources of this resource type.
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Lists the principals that you are sharing resources with or that are sharing resources with you.
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]
Specifies that you want to list information for only resource shares that match the following:
Specifies that you want to list information for only the listed principals.
You can include the following values:
Note
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide .
Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.
For a list of valid values, query the ListResourceTypes operation.
Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs) .
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) --
An array of objects that contain the details about the principals.
(dict) --
Describes a principal for use with Resource Access Manager.
id (string) --
The ID of the principal.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of a resource share the principal is associated with.
creationTime (datetime) --
The date and time when the principal was associated with the resource share.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Lists the RAM permissions that are associated with a resource share.
See also: AWS API Documentation
Request Syntax
response = client.list_resource_share_permissions(
resourceShareArn='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the resource share for which you want to retrieve the associated permissions.
dict
Response Syntax
{
'permissions': [
{
'arn': 'string',
'version': 'string',
'defaultVersion': True|False,
'name': 'string',
'resourceType': 'string',
'status': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'isResourceTypeDefault': True|False
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
permissions (list) --
An array of objects that describe the permissions associated with the resource share.
(dict) --
Information about an RAM permission that is associated with a resource share and any of its resources of a specified type.
arn (string) --
The Amazon Resoure Name (ARN) of the permission you want information about.
version (string) --
The version of the permission represented in this structure.
defaultVersion (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for this permission.
name (string) --
The name of this permission.
resourceType (string) --
The type of resource to which this permission applies.
status (string) --
The current status of the permission.
creationTime (datetime) --
The date and time when the permission was created.
lastUpdatedTime (datetime) --
The date and time when the permission was last updated.
isResourceTypeDefault (boolean) --
Specifies whether the version of the permission represented in this structure is the default version for all resources of this resource type.
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Lists the resource types that can be shared by RAM.
See also: AWS API Documentation
Request Syntax
response = client.list_resource_types(
nextToken='string',
maxResults=123,
resourceRegionScope='ALL'|'REGIONAL'|'GLOBAL'
)
Specifies that you want the results to include only resources that have the specified scope.
The default value is ALL .
dict
Response Syntax
{
'resourceTypes': [
{
'resourceType': 'string',
'serviceName': 'string',
'resourceRegionScope': 'REGIONAL'|'GLOBAL'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
resourceTypes (list) --
An array of objects that contain information about the resource types that can be shared using RAM.
(dict) --
Information about a shareable resource type and the Amazon Web Services service to which resources of that type belong.
resourceType (string) --
The type of the resource.
serviceName (string) --
The name of the Amazon Web Services service to which resources of this type belong.
resourceRegionScope (string) --
Specifies the scope of visibility of resources of this type:
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
Lists the resources that you added to a resource shares or the resources that are shared with you.
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,
resourceRegionScope='ALL'|'REGIONAL'|'GLOBAL'
)
[REQUIRED]
Specifies that you want to list only the resource shares that match the following:
Specifies that you want to list only the resource shares that include resources of the specified resource type.
For valid values, query the ListResourceTypes operation.
Specifies that you want to list only the resource shares that include resources with the specified Amazon Resource Names (ARNs) .
Specifies that you want to list only resources in the resource shares identified by the specified Amazon Resource Names (ARNs) .
Specifies that you want the results to include only resources that have the specified scope.
The default value is ALL .
dict
Response Syntax
{
'resources': [
{
'arn': 'string',
'type': 'string',
'resourceShareArn': 'string',
'resourceGroupArn': 'string',
'status': 'AVAILABLE'|'ZONAL_RESOURCE_INACCESSIBLE'|'LIMIT_EXCEEDED'|'UNAVAILABLE'|'PENDING',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'resourceRegionScope': 'REGIONAL'|'GLOBAL'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
resources (list) --
An array of objects that contain information about the resources.
(dict) --
Describes a resource associated with a resource share in RAM.
arn (string) --
The Amazon Resoure Name (ARN) of the resource.
type (string) --
The resource type. This takes the form of: service-code :resource-code
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share this resource is associated with.
resourceGroupArn (string) --
The Amazon Resoure Name (ARN) of the resource group. This value is available only if the resource is part of a resource group.
status (string) --
The current status of the resource.
statusMessage (string) --
A message about the status of the resource.
creationTime (datetime) --
The date and time when the resource was associated with the resource share.
lastUpdatedTime (datetime) --
The date an time when the association was last updated.
resourceRegionScope (string) --
Specifies the scope of visibility of this resource:
nextToken (string) --
If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.
Exceptions
When you attach a resource-based permission policy to a resource, it automatically creates a resource share. However, resource shares created this way are visible only to the resource share owner, and the resource share can't be modified in RAM.
You can use this operation to promote the resource share to a full RAM resource share. When you promote a resource share, you can then manage the resource share in RAM and it becomes visible to all of the principals you shared it with.
See also: AWS API Documentation
Request Syntax
response = client.promote_resource_share_created_from_policy(
resourceShareArn='string'
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the resource share to promote.
{
'returnValue': True|False
}
Response Structure
A return value of true indicates that the request succeeded. A value of false indicates that the request failed.
Exceptions
Rejects an invitation to a resource share from another Amazon Web Services account.
See also: AWS API Documentation
Request Syntax
response = client.reject_resource_share_invitation(
resourceShareInvitationArn='string',
clientToken='string'
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the invitation that you want to reject.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
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',
'resourceShareName': '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
},
],
'receiverArn': 'string'
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShareInvitation (dict) --
An object that contains the details about the rejected invitation.
resourceShareInvitationArn (string) --
The Amazon Resoure Name (ARN) of the invitation.
resourceShareName (string) --
The name of the resource share.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
senderAccountId (string) --
The ID of the Amazon Web Services account that sent the invitation.
receiverAccountId (string) --
The ID of the Amazon Web Services account that received the invitation.
invitationTimestamp (datetime) --
The date and time when the invitation was sent.
status (string) --
The current status of the invitation.
resourceShareAssociations (list) --
To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources .
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
receiverArn (string) --
The Amazon Resoure Name (ARN) of the IAM user or role that received the invitation.
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
Adds the specified tag keys and values to the specified resource share. The tags are attached only to the resource share, not to the resources that are in the resource share.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceShareArn='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add tags to.
[REQUIRED]
A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.
A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags .
For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide .
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
dict
Response Syntax
{}
Response Structure
Exceptions
Removes the specified tag key and value pairs from the specified resource share.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceShareArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
Specifies the Amazon Resoure Name (ARN) of the resource share that you want to remove tags from. The tags are removed from the resource share, not the resources in the resource share.
[REQUIRED]
Specifies a list of one or more tag keys that you want to remove.
dict
Response Syntax
{}
Response Structure
Exceptions
Modifies some of the properties of 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]
Specifies the Amazon Resoure Name (ARN) of the resource share that you want to modify.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. .
If you don't provide this value, then Amazon Web Services generates a random one for you.
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),
'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD'
},
'clientToken': 'string'
}
Response Structure
(dict) --
resourceShare (dict) --
Information about the resource share.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
name (string) --
The name of the resource share.
owningAccountId (string) --
The ID of the Amazon Web Services account that owns the resource share.
allowExternalPrincipals (boolean) --
Indicates whether principals outside your organization in Organizations can be associated with a resource share.
status (string) --
The current status of the resource share.
statusMessage (string) --
A message about the status of the resource share.
tags (list) --
The tag key and value pairs attached to the resource share.
(dict) --
A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags .
For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide .
key (string) --
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
value (string) --
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
creationTime (datetime) --
The date and time when the resource share was created.
lastUpdatedTime (datetime) --
The date and time when the resource share was last updated.
featureSet (string) --
Indicates how the resource share was created. Possible values include:
clientToken (string) --
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.
Exceptions
The available paginators are:
paginator = client.get_paginator('get_resource_policies')
Creates an iterator that will paginate through responses from RAM.Client.get_resource_policies().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
resourceArns=[
'string',
],
principal='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
Specifies the Amazon Resource Names (ARNs) of the resources whose policies you want to retrieve.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'policies': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
policies (list) --
An array of resource policy documents in JSON format.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_resource_share_associations')
Creates an iterator that will paginate through responses from RAM.Client.get_resource_share_associations().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
associationType='PRINCIPAL'|'RESOURCE',
resourceShareArns=[
'string',
],
resourceArn='string',
principal='string',
associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
Specifies whether you want to retrieve the associations that involve a specified resource or principal.
Specifies a list of Amazon Resource Names (ARNs) of the resource share whose associations you want to retrieve.
Specifies the Amazon Resoure Name (ARN) of the resource whose resource shares you want to retrieve.
You cannot specify this parameter if the association type is PRINCIPAL .
Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the Amazon Resoure Name (ARN) of an individual IAM user or role.
You cannot specify this parameter if the association type is RESOURCE .
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'resourceShareAssociations': [
{
'resourceShareArn': 'string',
'resourceShareName': '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) --
An array of objects that contain the details about the associations.
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_resource_share_invitations')
Creates an iterator that will paginate through responses from RAM.Client.get_resource_share_invitations().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
resourceShareInvitationArns=[
'string',
],
resourceShareArns=[
'string',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Specifies the Amazon Resource Names (ARNs) of the resource share invitations you want information about.
Specifies that you want details about invitations only for the resource shares described by this list of Amazon Resource Names (ARNs)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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',
'resourceShareName': '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
},
],
'receiverArn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
resourceShareInvitations (list) --
An array of objects that contain the details about the invitations.
(dict) --
Describes an invitation for an Amazon Web Services account to join a resource share.
resourceShareInvitationArn (string) --
The Amazon Resoure Name (ARN) of the invitation.
resourceShareName (string) --
The name of the resource share.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
senderAccountId (string) --
The ID of the Amazon Web Services account that sent the invitation.
receiverAccountId (string) --
The ID of the Amazon Web Services account that received the invitation.
invitationTimestamp (datetime) --
The date and time when the invitation was sent.
status (string) --
The current status of the invitation.
resourceShareAssociations (list) --
To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources .
(dict) --
Describes an association with a resource share and either a principal or a resource.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share.
resourceShareName (string) --
The name of the resource share.
associatedEntity (string) --
The associated entity. This can be either of the following:
associationType (string) --
The type of entity included in this association.
status (string) --
The current status of the association.
statusMessage (string) --
A message about the status of the association.
creationTime (datetime) --
The date and time when the association was created.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
receiverArn (string) --
The Amazon Resoure Name (ARN) of the IAM user or role that received the invitation.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_resource_shares')
Creates an iterator that will paginate through responses from RAM.Client.get_resource_shares().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
resourceShareArns=[
'string',
],
resourceShareStatus='PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
resourceOwner='SELF'|'OTHER-ACCOUNTS',
name='string',
tagFilters=[
{
'tagKey': 'string',
'tagValues': [
'string',
]
},
],
permissionArn='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Specifies the Amazon Resource Names (ARNs) of individual resource shares that you want information about.
[REQUIRED]
Specifies that you want to retrieve details of only those resource shares that match the following:
Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.
A tag key and optional list of possible values that you can use to filter results for tagged resources.
The tag key. This must have a valid string value and can't be empty.
A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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),
'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
resourceShares (list) --
An array of objects that contain the information about the resource shares.
(dict) --
Describes a resource share in RAM.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share
name (string) --
The name of the resource share.
owningAccountId (string) --
The ID of the Amazon Web Services account that owns the resource share.
allowExternalPrincipals (boolean) --
Indicates whether principals outside your organization in Organizations can be associated with a resource share.
status (string) --
The current status of the resource share.
statusMessage (string) --
A message about the status of the resource share.
tags (list) --
The tag key and value pairs attached to the resource share.
(dict) --
A structure containing a tag. A tag is metadata that you can attach to your resources to help organize and categorize them. You can also use them to help you secure your resources. For more information, see Controlling access to Amazon Web Services resources using tags .
For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide .
key (string) --
The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
value (string) --
The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
creationTime (datetime) --
The date and time when the resource share was created.
lastUpdatedTime (datetime) --
The date and time when the resource share was last updated.
featureSet (string) --
Indicates how the resource share was created. Possible values include:
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_principals')
Creates an iterator that will paginate through responses from RAM.Client.list_principals().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
resourceOwner='SELF'|'OTHER-ACCOUNTS',
resourceArn='string',
principals=[
'string',
],
resourceType='string',
resourceShareArns=[
'string',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
Specifies that you want to list information for only resource shares that match the following:
Specifies that you want to list information for only the listed principals.
You can include the following values:
Note
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide .
Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.
For a list of valid values, query the ListResourceTypes operation.
Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs) .
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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) --
An array of objects that contain the details about the principals.
(dict) --
Describes a principal for use with Resource Access Manager.
id (string) --
The ID of the principal.
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of a resource share the principal is associated with.
creationTime (datetime) --
The date and time when the principal was associated with the resource share.
lastUpdatedTime (datetime) --
The date and time when the association was last updated.
external (boolean) --
Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_resources')
Creates an iterator that will paginate through responses from RAM.Client.list_resources().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
resourceOwner='SELF'|'OTHER-ACCOUNTS',
principal='string',
resourceType='string',
resourceArns=[
'string',
],
resourceShareArns=[
'string',
],
resourceRegionScope='ALL'|'REGIONAL'|'GLOBAL',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
Specifies that you want to list only the resource shares that match the following:
Specifies that you want to list only the resource shares that include resources of the specified resource type.
For valid values, query the ListResourceTypes operation.
Specifies that you want to list only the resource shares that include resources with the specified Amazon Resource Names (ARNs) .
Specifies that you want to list only resources in the resource shares identified by the specified Amazon Resource Names (ARNs) .
Specifies that you want the results to include only resources that have the specified scope.
The default value is ALL .
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'resources': [
{
'arn': 'string',
'type': 'string',
'resourceShareArn': 'string',
'resourceGroupArn': 'string',
'status': 'AVAILABLE'|'ZONAL_RESOURCE_INACCESSIBLE'|'LIMIT_EXCEEDED'|'UNAVAILABLE'|'PENDING',
'statusMessage': 'string',
'creationTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'resourceRegionScope': 'REGIONAL'|'GLOBAL'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
resources (list) --
An array of objects that contain information about the resources.
(dict) --
Describes a resource associated with a resource share in RAM.
arn (string) --
The Amazon Resoure Name (ARN) of the resource.
type (string) --
The resource type. This takes the form of: service-code :resource-code
resourceShareArn (string) --
The Amazon Resoure Name (ARN) of the resource share this resource is associated with.
resourceGroupArn (string) --
The Amazon Resoure Name (ARN) of the resource group. This value is available only if the resource is part of a resource group.
status (string) --
The current status of the resource.
statusMessage (string) --
A message about the status of the resource.
creationTime (datetime) --
The date and time when the resource was associated with the resource share.
lastUpdatedTime (datetime) --
The date an time when the association was last updated.
resourceRegionScope (string) --
Specifies the scope of visibility of this resource:
NextToken (string) --
A token to resume pagination.