Allows the management account or a delegated administrator of the buyer's AWS organization to approve an agreement approval that is in PENDING_APPROVAL status, as the organization administrator approver or on behalf of another approver. Once every level is approved, the agreement approval transitions to APPROVED status. You can optionally provide purchase order references and a note.
Parameters:
Raises:
Examples:
Approve an agreement approval
>>> client.accept_agreement_approval(buyer_agreement_approval_approver_input={'agreementApprovalId': 'apr-EXAMPLE9s0t1u2v3w4x', 'purchaseOrders': [{'chargeId': 'ch-EXAMPLE4b4296145c3EXAMPLE56', 'purchaseOrderReference': 'PO-123'}], 'note': 'Approved. Budget confirmed for this fiscal year.'})
Source code in docs_src/capo_marketplace_agreement/_services/marketplace_agreement.py
| def accept_agreement_approval(
self,
*,
config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
buyer_agreement_approval_approver_input: Optional[
"capo_marketplace_agreement.types.buyer_agreement_approval_approver_input.BuyerAgreementApprovalApproverInput"
] = None,
) -> "capo_marketplace_agreement.types.accept_agreement_approval_output.AcceptAgreementApprovalOutput":
"""<p>Allows the management account or a delegated administrator of the buyer's AWS organization to approve an agreement approval that is in <code>PENDING_APPROVAL</code> status, as the organization administrator approver or on behalf of another approver. Once every level is approved, the agreement approval transitions to <code>APPROVED</code> status. You can optionally provide purchase order references and a note.</p>
Args:
buyer_agreement_approval_approver_input: <p>The approval decision for an agreement approval that the buyer's organization requires.</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.conflict_exception.ConflictException: <p>Request was denied due to a resource conflict.</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:
Approve an agreement approval
>>> client.accept_agreement_approval(buyer_agreement_approval_approver_input={'agreementApprovalId': 'apr-EXAMPLE9s0t1u2v3w4x', 'purchaseOrders': [{'chargeId': 'ch-EXAMPLE4b4296145c3EXAMPLE56', 'purchaseOrderReference': 'PO-123'}], 'note': 'Approved. Budget confirmed for this fiscal year.'})
"""
def _handler(
req: "OperationRequest[capo_marketplace_agreement.types.accept_agreement_approval_input.AcceptAgreementApprovalInput]",
) -> OperationResponse[
"capo_marketplace_agreement.types.accept_agreement_approval_output.AcceptAgreementApprovalOutput"
]:
if req.options.protocol == "awsJson1_0":
import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.aws_json1_0.accept_agreement_approval
output, http_response = (
capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.aws_json1_0.accept_agreement_approval.accept_agreement_approval(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.rpcv2_cbor.accept_agreement_approval
output, http_response = (
capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.rpcv2_cbor.accept_agreement_approval.accept_agreement_approval(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return OperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_marketplace_agreement.types.accept_agreement_approval_input.AcceptAgreementApprovalInput",
) -> dict[str, Any]:
import capo_marketplace_agreement.types.accept_agreement_approval_input
return capo_marketplace_agreement.types.accept_agreement_approval_input.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("AcceptAgreementApproval", redact_input=_redact_input),
)
input_: capo_marketplace_agreement.types.accept_agreement_approval_input.AcceptAgreementApprovalInput = {}
if buyer_agreement_approval_approver_input is not None:
input_["buyer_agreement_approval_approver_input"] = (
buyer_agreement_approval_approver_input
)
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|