2023/04/19 - AWS Resource Access Manager - 9 new 7 updated api methods
Changes This release adds support for customer managed permissions. Customer managed permissions enable customers to author and manage tailored permissions for resources shared using RAM.
Lists information about the managed permission and its associations to any resource shares that use this managed permission. This lets you see which resource shares use which versions of the specified managed permission.
See also: AWS API Documentation
Request Syntax
client.list_permission_associations( permissionArn='string', permissionVersion=123, associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED', resourceType='string', featureSet='CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', defaultVersion=True|False, nextToken='string', maxResults=123 )
string
Specifies the Amazon Resource Name (ARN) of the managed permission.
integer
Specifies that you want to list only those associations with resource shares that use this version of the managed permission. If you don't provide a value for this parameter, then the operation returns information about associations with resource shares that use any version of the managed permission.
string
Specifies that you want to list only those associations with resource shares that match this status.
string
Specifies that you want to list only those associations with resource shares that include at least one resource of this resource type.
string
Specifies that you want to list only those associations with resource shares that have a featureSet with this value.
boolean
When true , specifies that you want to list only those associations with resource shares that use the default version of the specified managed permission.
When false (the default value), lists associations with resource shares that use any version of the specified managed permission.
string
Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
integer
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
dict
Response Syntax
{ 'permissions': [ { 'arn': 'string', 'permissionVersion': 'string', 'defaultVersion': True|False, 'resourceType': 'string', 'status': 'string', 'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', 'lastUpdatedTime': datetime(2015, 1, 1), 'resourceShareArn': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
permissions (list) --
A structure with information about this customer managed permission.
(dict) --
An object that describes a managed permission associated with a resource share.
arn (string) --
The Amazon Resource Name (ARN) of the associated managed permission.
permissionVersion (string) --
The version of the permission currently associated with the resource share.
defaultVersion (boolean) --
Indicates whether the associated resource share is using the default version of the permission.
resourceType (string) --
The resource type to which this permission applies.
status (string) --
The current status of the association between the permission and the resource share. The following are the possible values:
ATTACHABLE – This permission or version can be associated with resource shares.
UNATTACHABLE – This permission or version can't currently be associated with resource shares.
DELETING – This permission or version is in the process of being deleted.
DELETED – This permission or version is deleted.
featureSet (string) --
Indicates what features are available for this resource share. This parameter can have one of the following values:
STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.
CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy .
PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY , but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.
lastUpdatedTime (datetime) --
The date and time when the association between the permission and the resource share was last updated.
resourceShareArn (string) --
The Amazon Resource Name (ARN) of a resource share associated with this permission.
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.
Deletes the specified customer managed permission in the Amazon Web Services Region in which you call this operation. You can delete a customer managed permission only if it isn't attached to any resource share. The operation deletes all versions associated with the customer managed permission.
See also: AWS API Documentation
Request Syntax
client.delete_permission( permissionArn='string', clientToken='string' )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the customer managed permission that you want to delete.
string
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.
If you retry the operation with the same ClientToken , but with different parameters, the retry fails with an IdempotentParameterMismatch error.
dict
Response Syntax
{ 'returnValue': True|False, 'clientToken': 'string', 'permissionStatus': 'ATTACHABLE'|'UNATTACHABLE'|'DELETING'|'DELETED' }
Response Structure
(dict) --
returnValue (boolean) --
A boolean that indicates whether the delete operations succeeded.
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.
permissionStatus (string) --
This operation is performed asynchronously, and this response parameter indicates the current status.
When you attach a resource-based policy to a resource, RAM automatically creates a resource share of featureSet =``CREATED_FROM_POLICY`` with a managed permission that has the same IAM permissions as the original resource-based policy. However, this type of managed permission is visible to only the resource share owner, and the associated resource share can't be modified by using RAM.
This operation creates a separate, fully manageable customer managed permission that has the same IAM permissions as the original resource-based policy. You can associate this customer managed permission to any resource shares.
Before you use PromoteResourceShareCreatedFromPolicy , you should first run this operation to ensure that you have an appropriate customer managed permission that can be associated with the promoted resource share.
Note
The original CREATED_FROM_POLICY policy isn't deleted, and resource shares using that original policy aren't automatically updated.
You can't modify a CREATED_FROM_POLICY resource share so you can't associate the new customer managed permission by using ReplacePermsissionAssociations . However, if you use PromoteResourceShareCreatedFromPolicy , that operation automatically associates the fully manageable customer managed permission to the newly promoted STANDARD resource share.
After you promote a resource share, if the original CREATED_FROM_POLICY managed permission has no other associations to A resource share, then RAM automatically deletes it.
See also: AWS API Documentation
Request Syntax
client.promote_permission_created_from_policy( permissionArn='string', name='string', clientToken='string' )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the CREATED_FROM_POLICY permission that you want to promote. You can get this Amazon Resource Name (ARN) by calling the ListResourceSharePermissions operation.
string
[REQUIRED]
Specifies a name for the promoted customer managed permission.
string
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.
If you retry the operation with the same ClientToken , but with different parameters, the retry fails with an IdempotentParameterMismatch error.
dict
Response Syntax
{ 'permission': { '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, 'permissionType': 'CUSTOMER_MANAGED'|'AWS_MANAGED', 'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, 'clientToken': 'string' }
Response Structure
(dict) --
permission (dict) --
Information about an RAM permission.
arn (string) --
The Amazon Resource Name (ARN) of the permission you want information about.
version (string) --
The version of the permission associated with this resource share.
defaultVersion (boolean) --
Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.
name (string) --
The name of this managed permission.
resourceType (string) --
The type of resource to which this permission applies. This takes the form of: service-code :resource-code , and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet .
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 managed permission associated with this resource share is the default managed permission for all resources of this resource type.
permissionType (string) --
The type of managed permission. This can be one of the following values:
AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.
CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.
featureSet (string) --
Indicates what features are available for this resource share. This parameter can have one of the following values:
STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.
CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy .
PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY , but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.
tags (list) --
A list of the tag key value pairs currently attached to the permission.
(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.
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.
Creates a customer managed permission for a specified resource type that you can attach to resource shares. It is created in the Amazon Web Services Region in which you call the operation.
See also: AWS API Documentation
Request Syntax
client.create_permission( name='string', resourceType='string', policyTemplate='string', clientToken='string', tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
Specifies the name of the customer managed permission. The name must be unique within the Amazon Web Services Region.
string
[REQUIRED]
Specifies the name of the resource type that this customer managed permission applies to.
The format is `` <service-code> :<resource-type> `` and is not case sensitive. For example, to specify an Amazon EC2 Subnet, you can use the string ec2:subnet . To see the list of valid values for this parameter, query the ListResourceTypes operation.
string
[REQUIRED]
A string in JSON format string that contains the following elements of a resource-based policy:
Effect : must be set to ALLOW .
Action : specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for Amazon Web Services services in the Identity and Access Management User Guide .
Condition : (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the Identity and Access Management User Guide .
This template can't include either the Resource or Principal elements. Those are both filled in by RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The Resource comes from the ARN of the specific resource that you are sharing. The Principal comes from the list of identities added to the resource share.
string
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.
If you retry the operation with the same ClientToken , but with different parameters, the retry fails with an IdempotentParameterMismatch error.
list
Specifies a list of one or more tag key and value pairs to attach to the permission.
(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.
dict
Response Syntax
{ 'permission': { '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, 'permissionType': 'CUSTOMER_MANAGED'|'AWS_MANAGED', 'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, 'clientToken': 'string' }
Response Structure
(dict) --
permission (dict) --
A structure with information about this customer managed permission.
arn (string) --
The Amazon Resource Name (ARN) of the permission you want information about.
version (string) --
The version of the permission associated with this resource share.
defaultVersion (boolean) --
Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.
name (string) --
The name of this managed permission.
resourceType (string) --
The type of resource to which this permission applies. This takes the form of: service-code :resource-code , and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet .
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 managed permission associated with this resource share is the default managed permission for all resources of this resource type.
permissionType (string) --
The type of managed permission. This can be one of the following values:
AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.
CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.
featureSet (string) --
Indicates what features are available for this resource share. This parameter can have one of the following values:
STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.
CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy .
PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY , but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.
tags (list) --
A list of the tag key value pairs currently attached to the permission.
(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.
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.
Designates the specified version number as the default version for the specified customer managed permission. New resource shares automatically use this new default permission. Existing resource shares continue to use their original permission version, but you can use ReplacePermissionAssociations to update them.
See also: AWS API Documentation
Request Syntax
client.set_default_permission_version( permissionArn='string', permissionVersion=123, clientToken='string' )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the customer managed permission whose default version you want to change.
integer
[REQUIRED]
Specifies the version number that you want to designate as the default for customer managed permission. To see a list of all available version numbers, use ListPermissionVersions .
string
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.
If you retry the operation with the same ClientToken , but with different parameters, the retry fails with an IdempotentParameterMismatch error.
dict
Response Syntax
{ 'returnValue': True|False, 'clientToken': 'string' }
Response Structure
(dict) --
returnValue (boolean) --
A boolean value that indicates whether the operation was successful.
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.
Deletes one version of a customer managed permission. The version you specify must not be attached to any resource share and must not be the default version for the permission.
If a customer managed permission has the maximum of 5 versions, then you must delete at least one version before you can create another.
See also: AWS API Documentation
Request Syntax
client.delete_permission_version( permissionArn='string', permissionVersion=123, clientToken='string' )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the permission with the version you want to delete.
integer
[REQUIRED]
Specifies the version number to delete.
You can't delete the default version for a customer managed permission.
You can't delete a version if it's the only version of the permission. You must either first create another version, or delete the permission completely.
You can't delete a version if it is attached to any resource shares. If the version is the default, you must first use SetDefaultPermissionVersion to set a different version as the default for the customer managed permission, and then use AssociateResourceSharePermission to update your resource shares to use the new default version.
string
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.
If you retry the operation with the same ClientToken , but with different parameters, the retry fails with an IdempotentParameterMismatch error.
dict
Response Syntax
{ 'returnValue': True|False, 'clientToken': 'string', 'permissionStatus': 'ATTACHABLE'|'UNATTACHABLE'|'DELETING'|'DELETED' }
Response Structure
(dict) --
returnValue (boolean) --
A boolean value that indicates whether the operation is successful.
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.
permissionStatus (string) --
This operation is performed asynchronously, and this response parameter indicates the current status.
Creates a new version of the specified customer managed permission. The new version is automatically set as the default version of the customer managed permission. New resource shares automatically use the default permission. Existing resource shares continue to use their original permission versions, but you can use ReplacePermissionAssociations to update them.
If the specified customer managed permission already has the maximum of 5 versions, then you must delete one of the existing versions before you can create a new one.
See also: AWS API Documentation
Request Syntax
client.create_permission_version( permissionArn='string', policyTemplate='string', clientToken='string' )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the customer managed permission you're creating a new version for.
string
[REQUIRED]
A string in JSON format string that contains the following elements of a resource-based policy:
Effect : must be set to ALLOW .
Action : specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for Amazon Web Services services in the Identity and Access Management User Guide .
Condition : (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the Identity and Access Management User Guide .
This template can't include either the Resource or Principal elements. Those are both filled in by RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The Resource comes from the ARN of the specific resource that you are sharing. The Principal comes from the list of identities added to the resource share.
string
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.
If you retry the operation with the same ClientToken , but with different parameters, the retry fails with an IdempotentParameterMismatch error.
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, 'permissionType': 'CUSTOMER_MANAGED'|'AWS_MANAGED', 'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', 'status': 'ATTACHABLE'|'UNATTACHABLE'|'DELETING'|'DELETED', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, 'clientToken': 'string' }
Response Structure
(dict) --
permission (dict) --
Information about a RAM managed permission.
arn (string) --
The Amazon Resource Name (ARN) of this RAM managed permission.
version (string) --
The version of the permission described in this response.
defaultVersion (boolean) --
Specifies whether the version of the permission represented in this response 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 response is the default version for all resources of this resource type.
permissionType (string) --
The type of managed permission. This can be one of the following values:
AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.
CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.
featureSet (string) --
Indicates what features are available for this resource share. This parameter can have one of the following values:
STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.
CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy .
PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY , but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.
status (string) --
The current status of the association between the permission and the resource share. The following are the possible values:
ATTACHABLE – This permission or version can be associated with resource shares.
UNATTACHABLE – This permission or version can't currently be associated with resource shares.
DELETING – This permission or version is in the process of being deleted.
DELETED – This permission or version is deleted.
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.
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.
Retrieves the current status of the asynchronous tasks performed by RAM when you perform the ReplacePermissionAssociationsWork operation.
See also: AWS API Documentation
Request Syntax
client.list_replace_permission_associations_work( workIds=[ 'string', ], status='IN_PROGRESS'|'COMPLETED'|'FAILED', nextToken='string', maxResults=123 )
list
A list of IDs. These values come from the id field of the replacePermissionAssociationsWork structure returned by the ReplacePermissionAssociations operation.
(string) --
string
Specifies that you want to see only the details about requests with a status that matches this value.
string
Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
integer
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
dict
Response Syntax
{ 'replacePermissionAssociationsWorks': [ { 'id': 'string', 'fromPermissionArn': 'string', 'fromPermissionVersion': 'string', 'toPermissionArn': 'string', 'toPermissionVersion': 'string', 'status': 'IN_PROGRESS'|'COMPLETED'|'FAILED', 'statusMessage': 'string', 'creationTime': datetime(2015, 1, 1), 'lastUpdatedTime': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
replacePermissionAssociationsWorks (list) --
An array of data structures that provide details of the matching work IDs.
(dict) --
A structure that represents the background work that RAM performs when you invoke the ReplacePermissionAssociations operation.
id (string) --
The unique identifier for the background task associated with one ReplacePermissionAssociations request.
fromPermissionArn (string) --
The Amazon Resource Name (ARN) of the managed permission that this background task is replacing.
fromPermissionVersion (string) --
The version of the managed permission that this background task is replacing.
toPermissionArn (string) --
The ARN of the managed permission that this background task is associating with the resource shares in place of the managed permission and version specified in fromPermissionArn and fromPermissionVersion .
toPermissionVersion (string) --
The version of the managed permission that this background task is associating with the resource shares. This is always the version that is currently the default for this managed permission.
status (string) --
Specifies the current status of the background tasks for the specified ID. The output is one of the following strings:
IN_PROGRESS
COMPLETED
FAILED
statusMessage (string) --
Specifies the reason for a FAILED status. This field is present only when there status is FAILED .
creationTime (datetime) --
The date and time when this asynchronous background task was created.
lastUpdatedTime (datetime) --
The date and time when the status of this background task was last updated.
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.
Updates all resource shares that use a managed permission to a different managed permission. This operation always applies the default version of the target managed permission. You can optionally specify that the update applies to only resource shares that currently use a specified version. This enables you to update to the latest version, without changing the which managed permission is used.
You can use this operation to update all of your resource shares to use the current default version of the permission by specifying the same value for the fromPermissionArn and toPermissionArn parameters.
You can use the optional fromPermissionVersion parameter to update only those resources that use a specified version of the managed permission to the new managed permission.
Warning
To successfully perform this operation, you must have permission to update the resource-based policy on all affected resource types.
See also: AWS API Documentation
Request Syntax
client.replace_permission_associations( fromPermissionArn='string', fromPermissionVersion=123, toPermissionArn='string', clientToken='string' )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the managed permission that you want to replace.
integer
Specifies that you want to updated the permissions for only those resource shares that use the specified version of the managed permission.
string
[REQUIRED]
Specifies the ARN of the managed permission that you want to associate with resource shares in place of the one specified by fromPerssionArn and fromPermissionVersion .
The operation always associates the version that is currently the default for the specified managed permission.
string
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.
If you retry the operation with the same ClientToken , but with different parameters, the retry fails with an IdempotentParameterMismatch error.
dict
Response Syntax
{ 'replacePermissionAssociationsWork': { 'id': 'string', 'fromPermissionArn': 'string', 'fromPermissionVersion': 'string', 'toPermissionArn': 'string', 'toPermissionVersion': 'string', 'status': 'IN_PROGRESS'|'COMPLETED'|'FAILED', 'statusMessage': 'string', 'creationTime': datetime(2015, 1, 1), 'lastUpdatedTime': datetime(2015, 1, 1) }, 'clientToken': 'string' }
Response Structure
(dict) --
replacePermissionAssociationsWork (dict) --
Specifies a data structure that you can use to track the asynchronous tasks that RAM performs to complete this operation. You can use the ListReplacePermissionAssociationsWork operation and pass the id value returned in this structure.
id (string) --
The unique identifier for the background task associated with one ReplacePermissionAssociations request.
fromPermissionArn (string) --
The Amazon Resource Name (ARN) of the managed permission that this background task is replacing.
fromPermissionVersion (string) --
The version of the managed permission that this background task is replacing.
toPermissionArn (string) --
The ARN of the managed permission that this background task is associating with the resource shares in place of the managed permission and version specified in fromPermissionArn and fromPermissionVersion .
toPermissionVersion (string) --
The version of the managed permission that this background task is associating with the resource shares. This is always the version that is currently the default for this managed permission.
status (string) --
Specifies the current status of the background tasks for the specified ID. The output is one of the following strings:
IN_PROGRESS
COMPLETED
FAILED
statusMessage (string) --
Specifies the reason for a FAILED status. This field is present only when there status is FAILED .
creationTime (datetime) --
The date and time when this asynchronous background task was created.
lastUpdatedTime (datetime) --
The date and time when the status of this background task was last updated.
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.
{'permission': {'featureSet': 'CREATED_FROM_POLICY | PROMOTING_TO_STANDARD | ' 'STANDARD', 'permissionType': 'CUSTOMER_MANAGED | AWS_MANAGED', 'status': 'ATTACHABLE | UNATTACHABLE | DELETING | DELETED', 'tags': [{'key': 'string', 'value': 'string'}]}}
Retrieves the contents of a managed permission in JSON format.
See also: AWS API Documentation
Request Syntax
client.get_permission( permissionArn='string', permissionVersion=123 )
string
[REQUIRED]
Specifies the Amazon Resource 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.
integer
Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.
To see the list of available versions, use ListPermissionVersions .
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, 'permissionType': 'CUSTOMER_MANAGED'|'AWS_MANAGED', 'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', 'status': 'ATTACHABLE'|'UNATTACHABLE'|'DELETING'|'DELETED', 'tags': [ { 'key': 'string', 'value': 'string' }, ] } }
Response Structure
(dict) --
permission (dict) --
An object with details about the permission.
arn (string) --
The Amazon Resource Name (ARN) of this RAM managed permission.
version (string) --
The version of the permission described in this response.
defaultVersion (boolean) --
Specifies whether the version of the permission represented in this response 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 response is the default version for all resources of this resource type.
permissionType (string) --
The type of managed permission. This can be one of the following values:
AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.
CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.
featureSet (string) --
Indicates what features are available for this resource share. This parameter can have one of the following values:
STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.
CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy .
PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY , but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.
status (string) --
The current status of the association between the permission and the resource share. The following are the possible values:
ATTACHABLE – This permission or version can be associated with resource shares.
UNATTACHABLE – This permission or version can't currently be associated with resource shares.
DELETING – This permission or version is in the process of being deleted.
DELETED – This permission or version is deleted.
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.
{'permissions': {'featureSet': 'CREATED_FROM_POLICY | PROMOTING_TO_STANDARD | ' 'STANDARD', 'permissionType': 'CUSTOMER_MANAGED | AWS_MANAGED', 'tags': [{'key': 'string', 'value': 'string'}]}}
Lists the available versions of the specified RAM permission.
See also: AWS API Documentation
Request Syntax
client.list_permission_versions( permissionArn='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
Specifies the Amazon Resource 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.
string
Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
integer
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
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, 'permissionType': 'CUSTOMER_MANAGED'|'AWS_MANAGED', 'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, ], '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.
arn (string) --
The Amazon Resource Name (ARN) of the permission you want information about.
version (string) --
The version of the permission associated with this resource share.
defaultVersion (boolean) --
Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.
name (string) --
The name of this managed permission.
resourceType (string) --
The type of resource to which this permission applies. This takes the form of: service-code :resource-code , and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet .
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 managed permission associated with this resource share is the default managed permission for all resources of this resource type.
permissionType (string) --
The type of managed permission. This can be one of the following values:
AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.
CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.
featureSet (string) --
Indicates what features are available for this resource share. This parameter can have one of the following values:
STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.
CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy .
PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY , but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.
tags (list) --
A list of the tag key value pairs currently attached to the permission.
(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.
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.
{'permissionType': 'ALL | AWS_MANAGED | CUSTOMER_MANAGED'}Response
{'permissions': {'featureSet': 'CREATED_FROM_POLICY | PROMOTING_TO_STANDARD | ' 'STANDARD', 'permissionType': 'CUSTOMER_MANAGED | AWS_MANAGED', 'tags': [{'key': 'string', 'value': 'string'}]}}
Retrieves a list of available RAM permissions that you can use for the supported resource types.
See also: AWS API Documentation
Request Syntax
client.list_permissions( resourceType='string', nextToken='string', maxResults=123, permissionType='ALL'|'AWS_MANAGED'|'CUSTOMER_MANAGED' )
string
Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.
For example, to list only permissions that apply to Amazon EC2 subnets, specify ec2:subnet . You can use the ListResourceTypes operation to get the specific string required.
string
Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
integer
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
string
Specifies that you want to list only permissions of this type:
AWS – returns only Amazon Web Services managed permissions.
LOCAL – returns only customer managed permissions
ALL – returns both Amazon Web Services managed permissions and customer managed permissions.
If you don't specify this parameter, the default is All .
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, 'permissionType': 'CUSTOMER_MANAGED'|'AWS_MANAGED', 'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, ], 'nextToken': 'string' }
Response Structure
(dict) --
permissions (list) --
An array of objects with information about the permissions.
(dict) --
Information about an RAM permission.
arn (string) --
The Amazon Resource Name (ARN) of the permission you want information about.
version (string) --
The version of the permission associated with this resource share.
defaultVersion (boolean) --
Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.
name (string) --
The name of this managed permission.
resourceType (string) --
The type of resource to which this permission applies. This takes the form of: service-code :resource-code , and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet .
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 managed permission associated with this resource share is the default managed permission for all resources of this resource type.
permissionType (string) --
The type of managed permission. This can be one of the following values:
AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.
CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.
featureSet (string) --
Indicates what features are available for this resource share. This parameter can have one of the following values:
STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.
CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy .
PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY , but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.
tags (list) --
A list of the tag key value pairs currently attached to the permission.
(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.
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.
{'resourceArn': 'string'}
Adds the specified tag keys and values to a resource share or managed permission. If you choose a resource share, the tags are attached to only the resource share, not to the resources that are in the resource share.
The tags on a managed permission are the same for all versions of the managed permission.
See also: AWS API Documentation
Request Syntax
client.tag_resource( resourceShareArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ], resourceArn='string' )
string
Specifies the Amazon Resource Name (ARN) of the resource share that you want to add tags to. You must specify either resourceShareArn , or resourceArn , but not both.
list
[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.
(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.
string
Specifies the Amazon Resource Name (ARN) of the managed permission that you want to add tags to. You must specify either resourceArn , or resourceShareArn , but not both.
dict
Response Syntax
{}
Response Structure
(dict) --
{'resourceArn': 'string'}
Removes the specified tag key and value pairs from the specified resource share or managed permission.
See also: AWS API Documentation
Request Syntax
client.untag_resource( resourceShareArn='string', tagKeys=[ 'string', ], resourceArn='string' )
string
Specifies the Amazon Resource 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. You must specify either resourceShareArn , or resourceArn , but not both.
list
[REQUIRED]
Specifies a list of one or more tag keys that you want to remove.
(string) --
string
Specifies the Amazon Resource Name (ARN) of the managed permission that you want to remove tags from. You must specify either resourceArn , or resourceShareArn , but not both.
dict
Response Syntax
{}
Response Structure
(dict) --