Lists all profiles in the authenticated account and Amazon Web Services Region.
Required permissions: rolesanywhere:ListProfiles.
Parameters:
-
next_token
(Optional[str], default:
None
)
–
A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.
-
page_size
(Optional[int], default:
None
)
–
The number of resources in the paginated list.
Raises:
Source code in docs_src/capo_rolesanywhere/_services/roles_anywhere.py
| def list_profiles(
self,
*,
config_overrides: Optional[RolesAnywhereClientConfig] = None,
next_token: Optional[str] = None,
page_size: Optional[int] = None,
) -> "capo_rolesanywhere.types.list_profiles_response.ListProfilesResponse":
"""<p>Lists all profiles in the authenticated account and Amazon Web Services Region.</p> <p> <b>Required permissions: </b> <code>rolesanywhere:ListProfiles</code>. </p>
Args:
next_token: <p>A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.</p>
page_size: <p>The number of resources in the paginated list. </p>
Raises:
capo_rolesanywhere.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_rolesanywhere.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_rolesanywhere.types.list_request.ListRequest]",
) -> OperationResponse[
"capo_rolesanywhere.types.list_profiles_response.ListProfilesResponse"
]:
import capo_rolesanywhere._operations.roles_anywhere.list_profiles
output, http_response = (
capo_rolesanywhere._operations.roles_anywhere.list_profiles.list_profiles(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListProfiles")
)
input_: capo_rolesanywhere.types.list_request.ListRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if page_size is not None:
input_["page_size"] = page_size
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|