Gets a profile.
Required permissions: rolesanywhere:GetProfile.
Parameters:
-
profile_id
(Uuid)
–
The unique identifier of the profile.
Raises:
Source code in docs_src/capo_rolesanywhere/_services/roles_anywhere.py
| def get_profile(
self,
profile_id: "capo_rolesanywhere.types.uuid.Uuid",
*,
config_overrides: Optional[RolesAnywhereClientConfig] = None,
) -> "capo_rolesanywhere.types.profile_detail_response.ProfileDetailResponse":
"""<p>Gets a profile.</p> <p> <b>Required permissions: </b> <code>rolesanywhere:GetProfile</code>. </p>
Args:
profile_id: <p>The unique identifier of the profile.</p>
Raises:
capo_rolesanywhere.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_rolesanywhere.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_rolesanywhere.types.scalar_profile_request.ScalarProfileRequest]",
) -> OperationResponse[
"capo_rolesanywhere.types.profile_detail_response.ProfileDetailResponse"
]:
import capo_rolesanywhere._operations.roles_anywhere.get_profile
output, http_response = (
capo_rolesanywhere._operations.roles_anywhere.get_profile.get_profile(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetProfile")
)
input_: capo_rolesanywhere.types.scalar_profile_request.ScalarProfileRequest = {
"profile_id": profile_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|