Retrieves a human readable summary for a given entity. At this time, the only supported entity type is delegation-request
This method uses a Large Language Model (LLM) to generate the summary.
If a delegation request has no owner or owner account, GetHumanReadableSummary for that delegation request can be called by any account. If the owner account is assigned but there is no owner id, only identities within that owner account can call GetHumanReadableSummary for the delegation request to retrieve a summary of that request. Once the delegation request is fully owned, the owner of the request gets a default permission to get that delegation request. For more details, read default permissions granted to delegation requests. These rules are identical to GetDelegationRequest API behavior, such that a party who has permissions to call GetDelegationRequest for a given delegation request will always be able to retrieve the human readable summary for that request.
Parameters:
-
entity_arn
(arnType)
–
Arn of the entity to be summarized. At this time, the only supported entity type is delegation-request
-
locale
(Optional[localeType], default:
None
)
–
Raises:
-
InvalidInputException
–
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
-
NoSuchEntityException
–
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException
–
The request processing has failed because of an unknown error, exception or failure.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_iam/_services/async_iam.py
| async def get_human_readable_summary(
self,
entity_arn: "capo_iam.types.arn_type.arnType",
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
locale: Optional["capo_iam.types.locale_type.localeType"] = None,
) -> "capo_iam.types.get_human_readable_summary_response.GetHumanReadableSummaryResponse":
"""<p>Retrieves a human readable summary for a given entity. At this time, the only supported entity type is <code>delegation-request</code> </p> <p>This method uses a Large Language Model (LLM) to generate the summary.</p> <p> If a delegation request has no owner or owner account, <code>GetHumanReadableSummary</code> for that delegation request can be called by any account. If the owner account is assigned but there is no owner id, only identities within that owner account can call <code>GetHumanReadableSummary</code> for the delegation request to retrieve a summary of that request. Once the delegation request is fully owned, the owner of the request gets a default permission to get that delegation request. For more details, read <a href="">default permissions granted to delegation requests</a>. These rules are identical to <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetDelegationRequest.html">GetDelegationRequest</a> API behavior, such that a party who has permissions to call <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetDelegationRequest.html">GetDelegationRequest</a> for a given delegation request will always be able to retrieve the human readable summary for that request. </p>
Args:
entity_arn: <p>Arn of the entity to be summarized. At this time, the only supported entity type is <code>delegation-request</code> </p>
locale: <p>A string representing the locale to use for the summary generation. The supported locale strings are based on the <a href="/awsconsolehelpdocs/latest/gsg/change-language.html#supported-languages"> Supported languages of the Amazon Web Services Management Console </a>.</p>
Raises:
capo_iam.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iam.types.get_human_readable_summary_request.GetHumanReadableSummaryRequest]",
) -> AsyncOperationResponse[
"capo_iam.types.get_human_readable_summary_response.GetHumanReadableSummaryResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.get_human_readable_summary
(
output,
http_response,
) = await capo_iam._operations.aws_identity_management_v20100508.get_human_readable_summary.async_get_human_readable_summary(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetHumanReadableSummary")
)
input_: capo_iam.types.get_human_readable_summary_request.GetHumanReadableSummaryRequest = {
"entity_arn": entity_arn
}
if locale is not None:
input_["locale"] = locale
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|