Skip to content

get_entitlement

get_entitlement(
    application_arn: ApplicationArn,
    entitlement_id: str,
    *,
    config_overrides: Optional[AccountAccessClientConfig] = None,
) -> GetEntitlementResponse

Retrieves details about a specific entitlement for an account access manager application, including the principal, IAM role, and target account.

Parameters:

  • application_arn (ApplicationArn) –

    Specifies the ARN of the application that the entitlement belongs to.

  • entitlement_id (str) –

    Specifies the unique identifier of the entitlement to retrieve.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this operation.

  • InternalServerException –

    An internal service error occurred. Try your request again later.

  • ResourceNotFoundException –

    The specified resource does not exist. Verify that the resource identifier is correct and that the resource exists in the current Region.

  • ThrottlingException –

    The request was denied due to request throttling. Try your request again later.

  • ValidationException –

    The input does not satisfy the constraints specified by the service. Check your request parameters and retry the request.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_account_access/_services/account_access.py
def get_entitlement(
    self,
    application_arn: "capo_account_access.types.application_arn.ApplicationArn",
    entitlement_id: str,
    *,
    config_overrides: Optional[AccountAccessClientConfig] = None,
) -> "capo_account_access.types.get_entitlement_response.GetEntitlementResponse":
    """<p>Retrieves details about a specific entitlement for an account access manager application, including the principal, IAM role, and target account.</p>

    Args:
        application_arn: <p>Specifies the ARN of the application that the entitlement belongs to.</p>
        entitlement_id: <p>Specifies the unique identifier of the entitlement to retrieve.</p>

    Raises:
        capo_account_access.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this operation.</p>
        capo_account_access.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred. Try your request again later.</p>
        capo_account_access.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist. Verify that the resource identifier is correct and that the resource exists in the current Region.</p>
        capo_account_access.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Try your request again later.</p>
        capo_account_access.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service. Check your request parameters and retry the request.</p>
        capo_account_access.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_account_access.types.get_entitlement_request.GetEntitlementRequest]",
    ) -> OperationResponse[
        "capo_account_access.types.get_entitlement_response.GetEntitlementResponse"
    ]:
        import capo_account_access._operations.aws_account_access.get_entitlement

        output, http_response = (
            capo_account_access._operations.aws_account_access.get_entitlement.get_entitlement(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetEntitlement")
    )
    input_: capo_account_access.types.get_entitlement_request.GetEntitlementRequest = {
        "application_arn": application_arn,
        "entitlement_id": entitlement_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output