Retrieves detailed information about a specific agreement approval, including its approval levels, the approvers at each level, and the decision of each approver. The acceptor, or the management account or a delegated administrator of the acceptor's AWS organization, can call this operation.
Parameters:
-
agreement_approval_id
(AgreementApprovalId)
–
The unique identifier of the agreement approval to retrieve.
Raises:
Examples:
Get an agreement approval
>>> await client.get_agreement_approval(agreement_approval_id='apr-EXAMPLE9s0t1u2v3w4x')
Source code in docs_src/capo_marketplace_agreement/_services/async_marketplace_agreement.py
| async def get_agreement_approval(
self,
agreement_approval_id: "capo_marketplace_agreement.types.agreement_approval_id.AgreementApprovalId",
*,
config_overrides: Optional[AsyncMarketplaceAgreementClientConfig] = None,
) -> "capo_marketplace_agreement.types.get_agreement_approval_output.GetAgreementApprovalOutput":
"""<p>Retrieves detailed information about a specific agreement approval, including its approval levels, the approvers at each level, and the decision of each approver. The acceptor, or the management account or a delegated administrator of the acceptor's AWS organization, can call this operation.</p>
Args:
agreement_approval_id: <p>The unique identifier of the agreement approval to retrieve.</p>
Raises:
capo_marketplace_agreement.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_marketplace_agreement.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_marketplace_agreement.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_marketplace_agreement.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_marketplace_agreement.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
capo_marketplace_agreement.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Get an agreement approval
>>> await client.get_agreement_approval(agreement_approval_id='apr-EXAMPLE9s0t1u2v3w4x')
"""
async def _handler(
req: "AsyncOperationRequest[capo_marketplace_agreement.types.get_agreement_approval_input.GetAgreementApprovalInput]",
) -> AsyncOperationResponse[
"capo_marketplace_agreement.types.get_agreement_approval_output.GetAgreementApprovalOutput"
]:
if req.options.protocol == "awsJson1_0":
import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.aws_json1_0.get_agreement_approval
(
output,
http_response,
) = await capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.aws_json1_0.get_agreement_approval.async_get_agreement_approval(
req.options, req.input
)
elif req.options.protocol == "rpcv2Cbor":
import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.rpcv2_cbor.get_agreement_approval
(
output,
http_response,
) = await capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.rpcv2_cbor.get_agreement_approval.async_get_agreement_approval(
req.options, req.input
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_marketplace_agreement.types.get_agreement_approval_output.GetAgreementApprovalOutput",
) -> dict[str, Any]:
import capo_marketplace_agreement.types.get_agreement_approval_output
return capo_marketplace_agreement.types.get_agreement_approval_output.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetAgreementApproval", redact_output=_redact_output),
)
input_: capo_marketplace_agreement.types.get_agreement_approval_input.GetAgreementApprovalInput = {
"agreement_approval_id": agreement_approval_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|