2026/11/06 - AWS Resource Access Manager - 1 new14 updated api methods
Changes Adds support for using managed permission template parameters, discovering shared customer-managed permissions, and managing customer-managed permission deprecation.
Updates the status of the specified customer managed permission.
Setting the status to DEPRECATED prevents new resource share associations. Setting it to ATTACHABLE restores a previously deprecated permission. Existing resource shares that use the permission continue to function.
See also: AWS API Documentation
Request Syntax
client.update_permission(
permissionArn='string',
status='ATTACHABLE'|'DEPRECATED',
clientToken='string'
)
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the customer managed permission that you want to update.
string
[REQUIRED]
Specifies the new status for the permission. This can be one of the following values:
ATTACHABLE – Restores a previously deprecated permission so it can be associated with resource shares again.
DEPRECATED – Deprecates the permission so it can no longer be associated with new resource shares.
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
{
'clientToken': 'string',
'permissionStatus': 'ATTACHABLE'|'DEPRECATED'
}
Response Structure
(dict) --
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) --
The updated status of the permission.
{'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | STRING_LIST'}]}
Response {'permission': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | '
'STRING_LIST',
'values': ['string']}],
'resourceOwner': 'SELF | OTHER-ACCOUNTS'}}
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',
permissionTemplateParameters=[
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': '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 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. This value must match the display name of the resource (available in ListResourceTypes).
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.
list
Specifies a list of template parameter declarations for this permission. Each declaration defines a named placeholder that can be used in the policy template using the syntax @{parameterName}. Template parameters can only appear in Condition Key and Condition Value fields of the policy. When you associate this permission with a resource share, you must provide values for all declared parameters.
(dict) --
Describes a template parameter declaration for a customer managed permission. Each declaration defines a named placeholder that can be used in the permission's policy template.
name (string) --
The name of the template parameter. This name is used as the placeholder in the policy template using the syntax @{parameterName}.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value that is substituted directly into the template.
STRING_LIST – One or more string values that expand to an array in the rendered policy.
description (string) --
A description of the template parameter that helps consumers understand what value to provide.
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',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': 'string',
'values': [
'string',
]
},
],
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'resourceOwner': 'SELF'|'OTHER-ACCOUNTS'
},
'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.
permissionTemplateParameters (list) --
The list of template parameters defined for this permission, including their names, types, descriptions, and values. This field is present only if the permission is a template with declared parameters. When returned in the context of a permission association, the values are also included.
(dict) --
Contains the declaration of a template parameter for a customer managed permission. When returned in the context of a permission association, it also includes the values assigned to that parameter.
name (string) --
The name of the template parameter.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value.
STRING_LIST – One or more string values.
description (string) --
A description of the template parameter.
values (list) --
The values assigned to this template parameter in the context of a permission association. This field is present only when the parameter has been assigned values (for example, in the response from ListPermissionAssociations or ListResourceSharePermissions).
(string) --
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.
resourceOwner (string) --
The owner of the permission. This can be one of the following values:
SELF – The permission is owned by the current account.
OTHER-ACCOUNTS – The permission is owned by another account and shared with the current account.
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.
{'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | STRING_LIST'}]}
Response {'permission': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | '
'STRING_LIST'}],
'resourceOwner': 'SELF | OTHER-ACCOUNTS',
'status': {'DEPRECATED'}}}
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',
permissionTemplateParameters=[
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': '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.
list
Specifies a list of template parameter declarations for this version of the permission. Each declaration defines a named placeholder that can be used in the policy template. Because each version is independent, you can define the same or a different set of template parameters for each version.
(dict) --
Describes a template parameter declaration for a customer managed permission. Each declaration defines a named placeholder that can be used in the permission's policy template.
name (string) --
The name of the template parameter. This name is used as the placeholder in the policy template using the syntax @{parameterName}.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value that is substituted directly into the template.
STRING_LIST – One or more string values that expand to an array in the rendered policy.
description (string) --
A description of the template parameter that helps consumers understand what value to provide.
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',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': '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'|'DEPRECATED',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'resourceOwner': 'SELF'|'OTHER-ACCOUNTS'
},
'clientToken': 'string'
}
Response Structure
(dict) --
permission (dict) --
The details of the new permission version, including its Amazon Resource Name (ARN), version number, status, and policy document.
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.
permissionTemplateParameters (list) --
The list of template parameter declarations defined for this permission. Each declaration includes the parameter name, type, and description. This field is present only if the permission is a template with declared parameters.
(dict) --
Describes a template parameter declaration for a customer managed permission. Each declaration defines a named placeholder that can be used in the permission's policy template.
name (string) --
The name of the template parameter. This name is used as the placeholder in the policy template using the syntax @{parameterName}.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value that is substituted directly into the template.
STRING_LIST – One or more string values that expand to an array in the rendered policy.
description (string) --
A description of the template parameter that helps consumers understand what value to provide.
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.
DEPRECATED – The permission owner deprecated this permission. It can't be associated with new resource shares, but existing associations continue to function.
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.
resourceOwner (string) --
The owner of the permission. This can be one of the following values:
SELF – The permission is owned by the current account.
OTHER-ACCOUNTS – The permission is owned by another account and shared with the current account.
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': {'DEPRECATED'}}
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'|'DEPRECATED'
}
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.
{'permissionStatus': {'DEPRECATED'}}
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'|'DEPRECATED'
}
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.
{'permissionTemplateParameters': [{'name': 'string', 'values': ['string']}]}
Response {'permission': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | '
'STRING_LIST'}],
'resourceOwner': 'SELF | OTHER-ACCOUNTS',
'status': {'DEPRECATED'}}}
Retrieves the contents of a managed permission in JSON format.
If the permission has template parameters, you can include the permissionTemplateParameters parameter in your request. The operation then renders the returned policy with the specified values in place of the template parameter placeholders. If you omit permissionTemplateParameters, the operation returns the raw policy template with @{parameterName} placeholders unchanged.
See also: AWS API Documentation
Request Syntax
client.get_permission(
permissionArn='string',
permissionVersion=123,
permissionTemplateParameters=[
{
'name': 'string',
'values': [
'string',
]
},
]
)
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.
list
Specifies the template parameter values to use when rendering the permission's policy template. Each entry supplies a parameter name and its values. When you provide this parameter, the response contains the rendered policy with the specified values in place of the template parameter placeholders.
For STRING type parameters, provide a single value. For STRING_LIST type parameters, provide one or more values.
You can specify this parameter only for permissions that declare template parameters. You must provide values for all parameters declared in the permission template.
(dict) --
Contains the name and values to assign to a template parameter when associating a permission template with a resource share.
name (string) --
The name of the template parameter to assign a value to. This must match a parameter name declared in the permission template.
values (list) --
The values to assign to the template parameter. For STRING type parameters, provide a single value. For STRING_LIST type parameters, provide one or more values.
(string) --
dict
Response Syntax
{
'permission': {
'arn': 'string',
'version': 'string',
'defaultVersion': True|False,
'name': 'string',
'resourceType': 'string',
'permission': 'string',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': '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'|'DEPRECATED',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'resourceOwner': 'SELF'|'OTHER-ACCOUNTS'
}
}
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.
permissionTemplateParameters (list) --
The list of template parameter declarations defined for this permission. Each declaration includes the parameter name, type, and description. This field is present only if the permission is a template with declared parameters.
(dict) --
Describes a template parameter declaration for a customer managed permission. Each declaration defines a named placeholder that can be used in the permission's policy template.
name (string) --
The name of the template parameter. This name is used as the placeholder in the policy template using the syntax @{parameterName}.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value that is substituted directly into the template.
STRING_LIST – One or more string values that expand to an array in the rendered policy.
description (string) --
A description of the template parameter that helps consumers understand what value to provide.
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.
DEPRECATED – The permission owner deprecated this permission. It can't be associated with new resource shares, but existing associations continue to function.
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.
resourceOwner (string) --
The owner of the permission. This can be one of the following values:
SELF – The permission is owned by the current account.
OTHER-ACCOUNTS – The permission is owned by another account and shared with the current account.
{'resourceOwner': 'SELF | OTHER-ACCOUNTS', 'resourceShareArn': 'string'}
Response {'permissions': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | '
'STRING_LIST',
'values': ['string']}]}}
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'|'SUSPENDED'|'SUSPENDING'|'RESTORING',
resourceType='string',
featureSet='CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD',
defaultVersion=True|False,
resourceOwner='SELF'|'OTHER-ACCOUNTS',
resourceShareArn='string',
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 list only those associations with resource shares owned by a specific entity:
SELF – returns only associations with resource shares owned by the calling account.
OTHER-ACCOUNTS – returns only associations with resource shares owned by other Amazon Web Services accounts.
If you don't specify this parameter, the default is SELF.
string
Specifies the Amazon Resource Name (ARN) of the resource share for which you want to retrieve permission associations.
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',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': 'string',
'values': [
'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.
DEPRECATED – The permission owner deprecated this permission. It can't be associated with new resource shares, but existing associations continue to function.
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.
permissionTemplateParameters (list) --
The template parameter values provided when the permission was associated with this resource share. If the permission has no declared template parameters, this member doesn't appear in the response.
(dict) --
Contains the declaration of a template parameter for a customer managed permission. When returned in the context of a permission association, it also includes the values assigned to that parameter.
name (string) --
The name of the template parameter.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value.
STRING_LIST – One or more string values.
description (string) --
A description of the template parameter.
values (list) --
The values assigned to this template parameter in the context of a permission association. This field is present only when the parameter has been assigned values (for example, in the response from ListPermissionAssociations or ListResourceSharePermissions).
(string) --
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.
{'permissions': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | '
'STRING_LIST',
'values': ['string']}],
'resourceOwner': 'SELF | OTHER-ACCOUNTS'}}
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',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': 'string',
'values': [
'string',
]
},
],
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'resourceOwner': 'SELF'|'OTHER-ACCOUNTS'
},
],
'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.
permissionTemplateParameters (list) --
The list of template parameters defined for this permission, including their names, types, descriptions, and values. This field is present only if the permission is a template with declared parameters. When returned in the context of a permission association, the values are also included.
(dict) --
Contains the declaration of a template parameter for a customer managed permission. When returned in the context of a permission association, it also includes the values assigned to that parameter.
name (string) --
The name of the template parameter.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value.
STRING_LIST – One or more string values.
description (string) --
A description of the template parameter.
values (list) --
The values assigned to this template parameter in the context of a permission association. This field is present only when the parameter has been assigned values (for example, in the response from ListPermissionAssociations or ListResourceSharePermissions).
(string) --
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.
resourceOwner (string) --
The owner of the permission. This can be one of the following values:
SELF – The permission is owned by the current account.
OTHER-ACCOUNTS – The permission is owned by another account and shared with the current account.
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.
{'permissionStatus': 'ATTACHABLE | UNATTACHABLE | DELETING | DELETED | '
'DEPRECATED',
'resourceOwner': 'SELF | OTHER-ACCOUNTS'}
Response {'permissions': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | '
'STRING_LIST',
'values': ['string']}],
'resourceOwner': 'SELF | OTHER-ACCOUNTS'}}
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',
resourceOwner='SELF'|'OTHER-ACCOUNTS',
nextToken='string',
maxResults=123,
permissionType='ALL'|'AWS_MANAGED'|'CUSTOMER_MANAGED',
permissionStatus='ATTACHABLE'|'UNATTACHABLE'|'DELETING'|'DELETED'|'DEPRECATED'
)
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 list only permissions owned by a specific entity:
SELF – returns only permissions owned by the calling account.
OTHER-ACCOUNTS – returns only permissions shared with the calling account by other accounts.
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.
string
Specifies that you want to filter the results to include only permissions with the specified status. For example, use ATTACHABLE to list only permissions that can be associated with resource shares, or DEPRECATED to list only deprecated 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,
'permissionType': 'CUSTOMER_MANAGED'|'AWS_MANAGED',
'featureSet': 'CREATED_FROM_POLICY'|'PROMOTING_TO_STANDARD'|'STANDARD',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': 'string',
'values': [
'string',
]
},
],
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'resourceOwner': 'SELF'|'OTHER-ACCOUNTS'
},
],
'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.
permissionTemplateParameters (list) --
The list of template parameters defined for this permission, including their names, types, descriptions, and values. This field is present only if the permission is a template with declared parameters. When returned in the context of a permission association, the values are also included.
(dict) --
Contains the declaration of a template parameter for a customer managed permission. When returned in the context of a permission association, it also includes the values assigned to that parameter.
name (string) --
The name of the template parameter.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value.
STRING_LIST – One or more string values.
description (string) --
A description of the template parameter.
values (list) --
The values assigned to this template parameter in the context of a permission association. This field is present only when the parameter has been assigned values (for example, in the response from ListPermissionAssociations or ListResourceSharePermissions).
(string) --
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.
resourceOwner (string) --
The owner of the permission. This can be one of the following values:
SELF – The permission is owned by the current account.
OTHER-ACCOUNTS – The permission is owned by another account and shared with the current account.
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.
{'replacePermissionAssociationsWorks': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING '
'| '
'STRING_LIST',
'values': ['string']}]}}
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',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': 'string',
'values': [
'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.
permissionTemplateParameters (list) --
The template parameter values to apply when replacing the permission. This field is present only if the target permission is a template with declared parameters.
(dict) --
Contains the declaration of a template parameter for a customer managed permission. When returned in the context of a permission association, it also includes the values assigned to that parameter.
name (string) --
The name of the template parameter.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value.
STRING_LIST – One or more string values.
description (string) --
A description of the template parameter.
values (list) --
The values assigned to this template parameter in the context of a permission association. This field is present only when the parameter has been assigned values (for example, in the response from ListPermissionAssociations or ListResourceSharePermissions).
(string) --
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.
{'permission': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING | '
'STRING_LIST',
'values': ['string']}],
'resourceOwner': 'SELF | OTHER-ACCOUNTS'}}
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.
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',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': 'string',
'values': [
'string',
]
},
],
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'resourceOwner': 'SELF'|'OTHER-ACCOUNTS'
},
'clientToken': 'string'
}
Response Structure
(dict) --
permission (dict) --
The details of the promoted customer managed permission, including its Amazon Resource Name (ARN), version, and status.
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.
permissionTemplateParameters (list) --
The list of template parameters defined for this permission, including their names, types, descriptions, and values. This field is present only if the permission is a template with declared parameters. When returned in the context of a permission association, the values are also included.
(dict) --
Contains the declaration of a template parameter for a customer managed permission. When returned in the context of a permission association, it also includes the values assigned to that parameter.
name (string) --
The name of the template parameter.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value.
STRING_LIST – One or more string values.
description (string) --
A description of the template parameter.
values (list) --
The values assigned to this template parameter in the context of a permission association. This field is present only when the parameter has been assigned values (for example, in the response from ListPermissionAssociations or ListResourceSharePermissions).
(string) --
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.
resourceOwner (string) --
The owner of the permission. This can be one of the following values:
SELF – The permission is owned by the current account.
OTHER-ACCOUNTS – The permission is owned by another account and shared with the current account.
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.
{'permissionTemplateParameters': [{'name': 'string', 'values': ['string']}]}
Response {'replacePermissionAssociationsWork': {'permissionTemplateParameters': [{'description': 'string',
'name': 'string',
'type': 'STRING '
'| '
'STRING_LIST',
'values': ['string']}]}}
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.
See also: AWS API Documentation
Request Syntax
client.replace_permission_associations(
fromPermissionArn='string',
fromPermissionVersion=123,
toPermissionArn='string',
permissionTemplateParameters=[
{
'name': 'string',
'values': [
'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.
list
Specifies the template parameter values to apply when replacing the permission. You must provide values for all parameters declared in the target permission template. This parameter is required only if the target permission ( toPermissionArn) has template parameters.
(dict) --
Contains the name and values to assign to a template parameter when associating a permission template with a resource share.
name (string) --
The name of the template parameter to assign a value to. This must match a parameter name declared in the permission template.
values (list) --
The values to assign to the template parameter. For STRING type parameters, provide a single value. For STRING_LIST type parameters, provide one or more values.
(string) --
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',
'permissionTemplateParameters': [
{
'name': 'string',
'type': 'STRING'|'STRING_LIST',
'description': 'string',
'values': [
'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.
permissionTemplateParameters (list) --
The template parameter values to apply when replacing the permission. This field is present only if the target permission is a template with declared parameters.
(dict) --
Contains the declaration of a template parameter for a customer managed permission. When returned in the context of a permission association, it also includes the values assigned to that parameter.
name (string) --
The name of the template parameter.
type (string) --
The type of the template parameter. This can be one of the following values:
STRING – A single string value.
STRING_LIST – One or more string values.
description (string) --
A description of the template parameter.
values (list) --
The values assigned to this template parameter in the context of a permission association. This field is present only when the parameter has been assigned values (for example, in the response from ListPermissionAssociations or ListResourceSharePermissions).
(string) --
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.