Skip to content

update_publisher_association_approval_status

update_publisher_association_approval_status(
    record_arn: RegistryRecordArn,
    approval_status: AssociationApprovalStatus,
    approval_status_reason: StatusReason,
    *,
    config_overrides: Optional[AgentRegistryControlClientConfig] = None,
) -> UpdatePublisherAssociationApprovalStatusResponse

Records a curator's decision, APPROVED or REJECTED, on the publisher association of a registry record. Repeating the decision that the association already has changes nothing. The same approvalStatus with a different approvalStatusReason updates the reason. If you have no access to a publisher association for the registry record, the request fails with AccessDeniedException. The request fails with ConflictException if the association isn't in a status that accepts the decision, such as SUSPENDED, or if it changed while the request was being applied. Get the association again before you decide whether to resubmit.

Parameters:

  • record_arn (RegistryRecordArn) –

    The Amazon Resource Name (ARN) of the registry record whose publisher association you're deciding on.

  • approval_status (AssociationApprovalStatus) –

    The decision on the association: APPROVED or REJECTED.

  • approval_status_reason (StatusReason) –

    The reason for the decision. Can be an empty string, and can be up to 255 characters long.

Raises:

Source code in docs_src/capo_agent_registry_control/_services/agent_registry_control.py
def update_publisher_association_approval_status(
    self,
    record_arn: "capo_agent_registry_control.types.registry_record_arn.RegistryRecordArn",
    approval_status: "capo_agent_registry_control.types.association_approval_status.AssociationApprovalStatus",
    approval_status_reason: "capo_agent_registry_control.types.status_reason.StatusReason",
    *,
    config_overrides: Optional[AgentRegistryControlClientConfig] = None,
) -> "capo_agent_registry_control.types.update_publisher_association_approval_status_response.UpdatePublisherAssociationApprovalStatusResponse":
    """<p>Records a curator's decision, <code>APPROVED</code> or <code>REJECTED</code>, on the publisher association of a registry record. Repeating the decision that the association already has changes nothing. The same <code>approvalStatus</code> with a different <code>approvalStatusReason</code> updates the reason. If you have no access to a publisher association for the registry record, the request fails with <code>AccessDeniedException</code>. The request fails with <code>ConflictException</code> if the association isn't in a status that accepts the decision, such as <code>SUSPENDED</code>, or if it changed while the request was being applied. Get the association again before you decide whether to resubmit.</p>

    Args:
        record_arn: <p>The Amazon Resource Name (ARN) of the registry record whose publisher association you're deciding on.</p>
        approval_status: <p>The decision on the association: <code>APPROVED</code> or <code>REJECTED</code>.</p>
        approval_status_reason: <p>The reason for the decision. Can be an empty string, and can be up to 255 characters long.</p>

    Raises:
        capo_agent_registry_control.errors.access_denied_exception.AccessDeniedException: <p>The caller is not authorized to perform the requested action.</p>
        capo_agent_registry_control.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_agent_registry_control.errors.internal_server_exception.InternalServerException: <p>The request failed due to an unexpected internal error; the caller may retry.</p>
        capo_agent_registry_control.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling; the caller may retry after a delay.</p>
        capo_agent_registry_control.errors.validation_exception.ValidationException: <p>The request failed validation of one or more input fields.</p>
        capo_agent_registry_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_agent_registry_control.types.update_publisher_association_approval_status_request.UpdatePublisherAssociationApprovalStatusRequest]",
    ) -> OperationResponse[
        "capo_agent_registry_control.types.update_publisher_association_approval_status_response.UpdatePublisherAssociationApprovalStatusResponse"
    ]:
        import capo_agent_registry_control._operations.agent_registry_control.update_publisher_association_approval_status

        output, http_response = (
            capo_agent_registry_control._operations.agent_registry_control.update_publisher_association_approval_status.update_publisher_association_approval_status(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_agent_registry_control.types.update_publisher_association_approval_status_request.UpdatePublisherAssociationApprovalStatusRequest",
    ) -> dict[str, Any]:
        import capo_agent_registry_control.types.update_publisher_association_approval_status_request

        return capo_agent_registry_control.types.update_publisher_association_approval_status_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdatePublisherAssociationApprovalStatus", redact_input=_redact_input
        ),
    )
    input_: capo_agent_registry_control.types.update_publisher_association_approval_status_request.UpdatePublisherAssociationApprovalStatusRequest = {
        "record_arn": record_arn,
        "approval_status": approval_status,
        "approval_status_reason": approval_status_reason,
    }

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