list_permissions
¶
list_permissions(
*,
config_overrides: Optional[RAMClientConfig] = None,
resource_type: Optional[String] = None,
next_token: Optional[String] = None,
max_results: Optional[MaxResults] = None,
permission_type: Optional[PermissionTypeFilter] = None,
) -> ListPermissionsResponse
Retrieves a list of available RAM permissions that you can use for the supported resource types.
Always check the NextToken response parameter for a null value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display.
Parameters:
-
resource_type(Optional[String], default:None) –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. -
next_token(Optional[String], default:None) –Specifies that you want to receive the next page of results. Valid only if you received a
NextTokenresponse 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'sNextTokenresponse to request the next page of results. -
max_results(Optional[MaxResults], default:None) –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
NextTokenresponse element is returned with a value (not null). Include the specified value as theNextTokenrequest 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 checkNextTokenafter every operation to ensure that you receive all of the results. -
permission_type(Optional[PermissionTypeFilter], default:None) –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. -
Raises:
-
InvalidNextTokenException–The operation failed because the specified value for
NextTokenisn't valid. You must specify a value you received in theNextTokenresponse of a previous call to this operation. -
InvalidParameterException–The operation failed because a parameter you specified isn't valid.
-
OperationNotPermittedException–The operation failed because the requested operation isn't permitted.
-
ServerInternalException–The operation failed because the service could not respond to the request due to an internal problem. Try again later.
-
ServiceUnavailableException–The operation failed because the service isn't available. Try again later.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ram/_services/ram.py
1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 | |