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

Creates a new version of an existing traffic policy. When you create a new version of * a traffic policy, you specify the ID of the traffic policy that you want to update and a * JSON-formatted document that describes the new version. You use traffic policies to * create multiple DNS resource record sets for one domain name (such as example.com) or * one subdomain name (such as www.example.com). You can create a maximum of 1000 versions * of a traffic policy. If you reach the limit and need to create another version, you'll * need to start a new traffic policy.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { Route53Client, CreateTrafficPolicyVersionCommand } from "@aws-sdk/client-route-53"; // ES Modules import * // const { Route53Client, CreateTrafficPolicyVersionCommand } = 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 = { // CreateTrafficPolicyVersionRequest * Id: "STRING_VALUE", // required * Document: "STRING_VALUE", // required * Comment: "STRING_VALUE", * }; * const command = new CreateTrafficPolicyVersionCommand(input); * const response = await client.send(command); * // { // CreateTrafficPolicyVersionResponse * // TrafficPolicy: { // TrafficPolicy * // Id: "STRING_VALUE", // required * // Version: Number("int"), // required * // Name: "STRING_VALUE", // required * // Type: "SOA" || "A" || "TXT" || "NS" || "CNAME" || "MX" || "NAPTR" || "PTR" || "SRV" || "SPF" || "AAAA" || "CAA" || "DS" || "TLSA" || "SSHFP" || "SVCB" || "HTTPS", // required * // Document: "STRING_VALUE", // required * // Comment: "STRING_VALUE", * // }, * // Location: "STRING_VALUE", // required * // }; * * ``` * * @param CreateTrafficPolicyVersionCommandInput - {@link CreateTrafficPolicyVersionCommandInput} * @returns {@link CreateTrafficPolicyVersionCommandOutput} * @see {@link CreateTrafficPolicyVersionCommandInput} for command's `input` shape. * @see {@link CreateTrafficPolicyVersionCommandOutput} for command's `response` shape. * @see {@link Route53ClientResolvedConfig | config} for Route53Client's `config` shape. * * @throws {@link ConcurrentModification} (client fault) *

Another user submitted a request to create, update, or delete the object at the same * time that you did. Retry the request.

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

The input is not valid.

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

The format of the traffic policy document that you specified in the * Document element is not valid.

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

No traffic policy exists with the specified ID.

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

This traffic policy version can't be created because you've reached the limit of 1000 * on the number of versions that you can create for the current traffic policy.

*

To create more traffic policy versions, you can use GetTrafficPolicy * to get the traffic policy document for a specified traffic policy version, and then use * CreateTrafficPolicy to create a new traffic policy using the traffic policy * document.

* * @throws {@link Route53ServiceException} *

Base exception class for all service exceptions from Route53 service.

* * * @public */ export declare class CreateTrafficPolicyVersionCommand extends CreateTrafficPolicyVersionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateTrafficPolicyVersionRequest; output: CreateTrafficPolicyVersionResponse; }; sdk: { input: CreateTrafficPolicyVersionCommandInput; output: CreateTrafficPolicyVersionCommandOutput; }; }; }