Skip to content

update_traffic_policy_comment

update_traffic_policy_comment(
    id: TrafficPolicyId,
    version: TrafficPolicyVersion,
    comment: TrafficPolicyComment,
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
) -> UpdateTrafficPolicyCommentResponse

Updates the comment for a specified traffic policy version.

Parameters:

  • id (TrafficPolicyId) –

    The value of Id for the traffic policy that you want to update the comment for.

  • version (TrafficPolicyVersion) –

    The value of Version for the traffic policy that you want to update the comment for.

  • comment (TrafficPolicyComment) –

    The new comment for the specified traffic policy and version.

Raises:

Source code in docs_src/capo_route_53/_services/route53.py
def update_traffic_policy_comment(
    self,
    id: "capo_route_53.types.traffic_policy_id.TrafficPolicyId",
    version: "capo_route_53.types.traffic_policy_version.TrafficPolicyVersion",
    comment: "capo_route_53.types.traffic_policy_comment.TrafficPolicyComment",
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
) -> "capo_route_53.types.update_traffic_policy_comment_response.UpdateTrafficPolicyCommentResponse":
    """<p>Updates the comment for a specified traffic policy version.</p>

    Args:
        id: <p>The value of <code>Id</code> for the traffic policy that you want to update the comment for.</p>
        version: <p>The value of <code>Version</code> for the traffic policy that you want to update the comment for.</p>
        comment: <p>The new comment for the specified traffic policy and version.</p>

    Raises:
        capo_route_53.errors.concurrent_modification.ConcurrentModification: <p>Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request. </p>
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.no_such_traffic_policy.NoSuchTrafficPolicy: <p>No traffic policy exists with the specified ID.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route_53.types.update_traffic_policy_comment_request.UpdateTrafficPolicyCommentRequest]",
    ) -> OperationResponse[
        "capo_route_53.types.update_traffic_policy_comment_response.UpdateTrafficPolicyCommentResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.update_traffic_policy_comment

        output, http_response = (
            capo_route_53._operations.aws_dns_v20130401.update_traffic_policy_comment.update_traffic_policy_comment(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTrafficPolicyComment")
    )
    input_: capo_route_53.types.update_traffic_policy_comment_request.UpdateTrafficPolicyCommentRequest = {
        "id": id,
        "version": version,
        "comment": comment,
    }

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