Skip to content

get_delegation_request async

get_delegation_request(
    delegation_request_id: delegationRequestIdType,
    *,
    config_overrides: Optional[AsyncIAMClientConfig] = None,
    delegation_permission_check: Optional[booleanType] = None,
) -> GetDelegationRequestResponse

Retrieves information about a specific delegation request.

If a delegation request has no owner or owner account, GetDelegationRequest 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 GetDelegationRequest for the delegation 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, see Managing Permissions for Delegation Requests.

Parameters:

  • delegation_request_id (delegationRequestIdType) –

    The unique identifier of the delegation request to retrieve.

  • delegation_permission_check (Optional[booleanType], default: None ) –

    Specifies whether to perform a permission check for the delegation request.

    If set to true, the GetDelegationRequest API call will start a permission check process. This process calculates whether the caller has sufficient permissions to cover the asks from this delegation request.

    Setting this parameter to true does not guarantee an answer in the response. See the PermissionCheckStatus and the PermissionCheckResult response attributes for further details.

Raises:

  • 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_delegation_request(
    self,
    delegation_request_id: "capo_iam.types.delegation_request_id_type.delegationRequestIdType",
    *,
    config_overrides: Optional[AsyncIAMClientConfig] = None,
    delegation_permission_check: Optional[
        "capo_iam.types.boolean_type.booleanType"
    ] = None,
) -> "capo_iam.types.get_delegation_request_response.GetDelegationRequestResponse":
    """<p>Retrieves information about a specific delegation request.</p> <p> If a delegation request has no owner or owner account, <code>GetDelegationRequest</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>GetDelegationRequest</code> for the delegation 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, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-temporary-delegation.html#temporary-delegation-managing-permissions"> Managing Permissions for Delegation Requests</a>. </p>

    Args:
        delegation_request_id: <p>The unique identifier of the delegation request to retrieve.</p>
        delegation_permission_check: <p>Specifies whether to perform a permission check for the delegation request.</p> <p>If set to true, the <code>GetDelegationRequest</code> API call will start a permission check process. This process calculates whether the caller has sufficient permissions to cover the asks from this delegation request.</p> <p>Setting this parameter to true does not guarantee an answer in the response. See the <code>PermissionCheckStatus</code> and the <code>PermissionCheckResult</code> response attributes for further details.</p>

    Raises:
        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_delegation_request_request.GetDelegationRequestRequest]",
    ) -> AsyncOperationResponse[
        "capo_iam.types.get_delegation_request_response.GetDelegationRequestResponse"
    ]:
        import capo_iam._operations.aws_identity_management_v20100508.get_delegation_request

        (
            output,
            http_response,
        ) = await capo_iam._operations.aws_identity_management_v20100508.get_delegation_request.async_get_delegation_request(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDelegationRequest")
    )
    input_: capo_iam.types.get_delegation_request_request.GetDelegationRequestRequest = {
        "delegation_request_id": delegation_request_id
    }
    if delegation_permission_check is not None:
        input_["delegation_permission_check"] = delegation_permission_check

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output