Skip to content

validate_publisher async

validate_publisher(
    publisher_arn: PublisherIdentifierArn,
    *,
    config_overrides: Optional[AsyncAgentRegistryControlClientConfig] = None,
) -> ValidatePublisherResponse

Restarts domain verification for a publisher that is FAILED or SUSPENDED. The publisher returns to ACTION_REQUIRED with a new domainChallenge, which the response includes. Update the Domain Name System (DNS) TXT record with the new recordValue. The previous value no longer verifies the domain. The request fails with ConflictException if the publisher is ACTIVE, verification is already in progress (ACTION_REQUIRED), or the publisher is being deleted.

Parameters:

Raises:

Source code in docs_src/capo_agent_registry_control/_services/async_agent_registry_control.py
async def validate_publisher(
    self,
    publisher_arn: "capo_agent_registry_control.types.publisher_identifier_arn.PublisherIdentifierArn",
    *,
    config_overrides: Optional[AsyncAgentRegistryControlClientConfig] = None,
) -> "capo_agent_registry_control.types.validate_publisher_response.ValidatePublisherResponse":
    """<p>Restarts domain verification for a publisher that is <code>FAILED</code> or <code>SUSPENDED</code>. The publisher returns to <code>ACTION_REQUIRED</code> with a new <code>domainChallenge</code>, which the response includes. Update the Domain Name System (DNS) TXT record with the new <code>recordValue</code>. The previous value no longer verifies the domain. The request fails with <code>ConflictException</code> if the publisher is <code>ACTIVE</code>, verification is already in progress (<code>ACTION_REQUIRED</code>), or the publisher is being deleted.</p>

    Args:
        publisher_arn: <p>The Amazon Resource Name (ARN) of the publisher to verify again.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_agent_registry_control.types.validate_publisher_request.ValidatePublisherRequest]",
    ) -> AsyncOperationResponse[
        "capo_agent_registry_control.types.validate_publisher_response.ValidatePublisherResponse"
    ]:
        import capo_agent_registry_control._operations.agent_registry_control.validate_publisher

        (
            output,
            http_response,
        ) = await capo_agent_registry_control._operations.agent_registry_control.validate_publisher.async_validate_publisher(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_agent_registry_control.types.validate_publisher_response.ValidatePublisherResponse",
    ) -> dict[str, Any]:
        import capo_agent_registry_control.types.validate_publisher_response

        return capo_agent_registry_control.types.validate_publisher_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ValidatePublisher", redact_output=_redact_output),
    )
    input_: capo_agent_registry_control.types.validate_publisher_request.ValidatePublisherRequest = {
        "publisher_arn": publisher_arn
    }

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