Skip to content

update_hosted_zone_comment async

update_hosted_zone_comment(
    id: ResourceId,
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    comment: Optional[ResourceDescription] = None,
) -> UpdateHostedZoneCommentResponse

Updates the comment for a specified hosted zone.

Parameters:

  • id (ResourceId) –

    The ID for the hosted zone that you want to update the comment for.

  • comment (Optional[ResourceDescription], default: None ) –

    The new comment for the hosted zone. If you don't specify a value for Comment, Amazon Route 53 deletes the existing value of the Comment element, if any.

Raises:

  • InvalidInput –

    The input is not valid.

  • NoSuchHostedZone –

    No hosted zone exists with the ID that you specified.

  • PriorRequestNotComplete –

    If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again.

  • UnknownServiceError –

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

Source code in docs_src/capo_route_53/_services/async_route53.py
async def update_hosted_zone_comment(
    self,
    id: "capo_route_53.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    comment: Optional[
        "capo_route_53.types.resource_description.ResourceDescription"
    ] = None,
) -> "capo_route_53.types.update_hosted_zone_comment_response.UpdateHostedZoneCommentResponse":
    """<p>Updates the comment for a specified hosted zone.</p>

    Args:
        id: <p>The ID for the hosted zone that you want to update the comment for.</p>
        comment: <p>The new comment for the hosted zone. If you don't specify a value for <code>Comment</code>, Amazon Route 53 deletes the existing value of the <code>Comment</code> element, if any.</p>

    Raises:
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.no_such_hosted_zone.NoSuchHostedZone: <p>No hosted zone exists with the ID that you specified.</p>
        capo_route_53.errors.prior_request_not_complete.PriorRequestNotComplete: <p>If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an <code>HTTP 400 error</code> (<code>Bad request</code>). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53.types.update_hosted_zone_comment_request.UpdateHostedZoneCommentRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53.types.update_hosted_zone_comment_response.UpdateHostedZoneCommentResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.update_hosted_zone_comment

        (
            output,
            http_response,
        ) = await capo_route_53._operations.aws_dns_v20130401.update_hosted_zone_comment.async_update_hosted_zone_comment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateHostedZoneComment")
    )
    input_: capo_route_53.types.update_hosted_zone_comment_request.UpdateHostedZoneCommentRequest = {
        "id": id
    }
    if comment is not None:
        input_["comment"] = comment

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