get_resource_policies
(**kwargs)¶Returns an array of the Policy
object.
See also: AWS API Documentation
Request Syntax
response = client.get_resource_policies(
ResourceArn='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
Amazon Resource Name (ARN) of the resource to which the policies are attached.
dict
Response Syntax
{
'NextToken': 'string',
'Policies': [
{
'PolicyId': 'string',
'PolicyHash': 'string',
'Policy': 'string'
},
]
}
Response Structure
(dict) --
NextToken (string) --
The token for the next set of items to return. Use this token to get the next set of results.
Policies (list) --
An array of the Policy
object.
(dict) --
A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently, OpsItemGroup
is the only resource that supports Systems Manager resource policies. The resource policy for OpsItemGroup
enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).
PolicyId (string) --
A policy ID.
PolicyHash (string) --
ID of the current policy version. The hash helps to prevent a situation where multiple users attempt to overwrite a policy. You must provide this hash when updating or deleting a policy.
Policy (string) --
A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently, OpsItemGroup
is the only resource that supports Systems Manager resource policies. The resource policy for OpsItemGroup
enables Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).
Exceptions
SSM.Client.exceptions.InternalServerError
SSM.Client.exceptions.ResourcePolicyInvalidParameterException