import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { UpdateTrafficPolicyInstanceRequest, UpdateTrafficPolicyInstanceResponse } from "../models/models_0"; import type { Route53ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Route53Client"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link UpdateTrafficPolicyInstanceCommand}. */ export interface UpdateTrafficPolicyInstanceCommandInput extends UpdateTrafficPolicyInstanceRequest { } /** * @public * * The output of {@link UpdateTrafficPolicyInstanceCommand}. */ export interface UpdateTrafficPolicyInstanceCommandOutput extends UpdateTrafficPolicyInstanceResponse, __MetadataBearer { } declare const UpdateTrafficPolicyInstanceCommand_base: { new (input: UpdateTrafficPolicyInstanceCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: UpdateTrafficPolicyInstanceCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** * *

After you submit a UpdateTrafficPolicyInstance request, there's a brief delay while RouteĀ 53 creates the resource record sets * that are specified in the traffic policy definition. Use GetTrafficPolicyInstance with the id of updated traffic policy instance confirm * that the * UpdateTrafficPolicyInstance request completed successfully. For more information, see the State response element.

*
*

Updates the resource record sets in a specified hosted zone that were created based on * the settings in a specified traffic policy version.

*

When you update a traffic policy instance, Amazon Route 53 continues to respond to DNS * queries for the root resource record set name (such as example.com) while it replaces * one group of resource record sets with another. Route 53 performs the following * operations:

*
    *
  1. *

    Route 53 creates a new group of resource record sets based on the specified * traffic policy. This is true regardless of how significant the differences are * between the existing resource record sets and the new resource record sets. *

    *
  2. *
  3. *

    When all of the new resource record sets have been created, Route 53 starts to * respond to DNS queries for the root resource record set name (such as * example.com) by using the new resource record sets.

    *
  4. *
  5. *

    Route 53 deletes the old group of resource record sets that are associated * with the root resource record set name.

    *
  6. *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { Route53Client, UpdateTrafficPolicyInstanceCommand } from "@aws-sdk/client-route-53"; // ES Modules import * // const { Route53Client, UpdateTrafficPolicyInstanceCommand } = require("@aws-sdk/client-route-53"); // CommonJS import * // import type { Route53ClientConfig } from "@aws-sdk/client-route-53"; * const config = {}; // type is Route53ClientConfig * const client = new Route53Client(config); * const input = { // UpdateTrafficPolicyInstanceRequest * Id: "STRING_VALUE", // required * TTL: Number("long"), // required * TrafficPolicyId: "STRING_VALUE", // required * TrafficPolicyVersion: Number("int"), // required * }; * const command = new UpdateTrafficPolicyInstanceCommand(input); * const response = await client.send(command); * // { // UpdateTrafficPolicyInstanceResponse * // TrafficPolicyInstance: { // TrafficPolicyInstance * // Id: "STRING_VALUE", // required * // HostedZoneId: "STRING_VALUE", // required * // Name: "STRING_VALUE", // required * // TTL: Number("long"), // required * // State: "STRING_VALUE", // required * // Message: "STRING_VALUE", // required * // TrafficPolicyId: "STRING_VALUE", // required * // TrafficPolicyVersion: Number("int"), // required * // TrafficPolicyType: "SOA" || "A" || "TXT" || "NS" || "CNAME" || "MX" || "NAPTR" || "PTR" || "SRV" || "SPF" || "AAAA" || "CAA" || "DS" || "TLSA" || "SSHFP" || "SVCB" || "HTTPS", // required * // }, * // }; * * ``` * * @param UpdateTrafficPolicyInstanceCommandInput - {@link UpdateTrafficPolicyInstanceCommandInput} * @returns {@link UpdateTrafficPolicyInstanceCommandOutput} * @see {@link UpdateTrafficPolicyInstanceCommandInput} for command's `input` shape. * @see {@link UpdateTrafficPolicyInstanceCommandOutput} for command's `response` shape. * @see {@link Route53ClientResolvedConfig | config} for Route53Client's `config` shape. * * @throws {@link ConflictingTypes} (client fault) *

You tried to update a traffic policy instance by using a traffic policy version that * has a different DNS type than the current type for the instance. You specified the type * in the JSON document in the CreateTrafficPolicy or * CreateTrafficPolicyVersionrequest.

* * @throws {@link InvalidInput} (client fault) *

The input is not valid.

* * @throws {@link NoSuchTrafficPolicy} (client fault) *

No traffic policy exists with the specified ID.

* * @throws {@link NoSuchTrafficPolicyInstance} (client fault) *

No traffic policy instance exists with the specified ID.

* * @throws {@link PriorRequestNotComplete} (client fault) *

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.

* * @throws {@link Route53ServiceException} *

Base exception class for all service exceptions from Route53 service.

* * * @public */ export declare class UpdateTrafficPolicyInstanceCommand extends UpdateTrafficPolicyInstanceCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: UpdateTrafficPolicyInstanceRequest; output: UpdateTrafficPolicyInstanceResponse; }; sdk: { input: UpdateTrafficPolicyInstanceCommandInput; output: UpdateTrafficPolicyInstanceCommandOutput; }; }; }