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

Associates an Amazon VPC with a private hosted zone.

* *

To perform the association, the VPC and the private hosted zone must already * exist. You can't convert a public hosted zone into a private hosted zone.

*
* *

If you want to associate a VPC that was created by using one Amazon Web Services account with a private hosted zone that was created by using a * different account, the Amazon Web Services account that created the private hosted * zone must first submit a CreateVPCAssociationAuthorization request. * Then the account that created the VPC must submit an * AssociateVPCWithHostedZone request.

*
* *

When granting access, the hosted zone and the Amazon VPC must belong to * the same partition. A partition is a group of Amazon Web Services Regions. Each * Amazon Web Services account is scoped to one partition.

*

The following are the supported partitions:

*
    *
  • *

    * aws - Amazon Web Services Regions

    *
  • *
  • *

    * aws-cn - China Regions

    *
  • *
  • *

    * aws-us-gov - Amazon Web Services GovCloud (US) Region

    *
  • *
*

For more information, see Access Management * in the Amazon Web Services General Reference.

*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { Route53Client, AssociateVPCWithHostedZoneCommand } from "@aws-sdk/client-route-53"; // ES Modules import * // const { Route53Client, AssociateVPCWithHostedZoneCommand } = 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 = { // AssociateVPCWithHostedZoneRequest * HostedZoneId: "STRING_VALUE", // required * VPC: { // VPC * VPCRegion: "us-east-1" || "us-east-2" || "us-west-1" || "us-west-2" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "eu-central-1" || "eu-central-2" || "ap-east-1" || "me-south-1" || "us-gov-west-1" || "us-gov-east-1" || "us-iso-east-1" || "us-iso-west-1" || "us-isob-east-1" || "me-central-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ap-south-1" || "ap-south-2" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "eu-north-1" || "sa-east-1" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "af-south-1" || "eu-south-1" || "eu-south-2" || "ap-southeast-4" || "il-central-1" || "ca-west-1" || "ap-southeast-5" || "mx-central-1" || "us-isof-south-1" || "us-isof-east-1" || "ap-southeast-7" || "ap-east-2" || "eu-isoe-west-1" || "ap-southeast-6" || "us-isob-west-1" || "eusc-de-east-1", * VPCId: "STRING_VALUE", * }, * Comment: "STRING_VALUE", * }; * const command = new AssociateVPCWithHostedZoneCommand(input); * const response = await client.send(command); * // { // AssociateVPCWithHostedZoneResponse * // ChangeInfo: { // ChangeInfo * // Id: "STRING_VALUE", // required * // Status: "PENDING" || "INSYNC", // required * // SubmittedAt: new Date("TIMESTAMP"), // required * // Comment: "STRING_VALUE", * // }, * // }; * * ``` * * @param AssociateVPCWithHostedZoneCommandInput - {@link AssociateVPCWithHostedZoneCommandInput} * @returns {@link AssociateVPCWithHostedZoneCommandOutput} * @see {@link AssociateVPCWithHostedZoneCommandInput} for command's `input` shape. * @see {@link AssociateVPCWithHostedZoneCommandOutput} for command's `response` shape. * @see {@link Route53ClientResolvedConfig | config} for Route53Client's `config` shape. * * @throws {@link ConflictingDomainExists} (client fault) *

The cause of this error depends on the operation that you're performing:

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

The input is not valid.

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

The VPC ID that you specified either isn't a valid ID or the current account is not * authorized to access this VPC.

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

This operation can't be completed because the current account has reached the * limit on the resource you are trying to create. To request a higher limit, create a case with the Amazon Web Services Support * Center.

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

No hosted zone exists with the ID that you specified.

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

Associating the specified VPC with the specified hosted zone has not been * authorized.

* * @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 PublicZoneVPCAssociation} (client fault) *

You're trying to associate a VPC with a public hosted zone. Amazon Route 53 doesn't * support associating a VPC with a public hosted zone.

* * @throws {@link Route53ServiceException} *

Base exception class for all service exceptions from Route53 service.

* * * @example To associate a VPC with a hosted zone * ```javascript * // The following example associates the VPC with ID vpc-1a2b3c4d with the hosted zone with ID Z3M3LMPEXAMPLE. * const input = { * Comment: "", * HostedZoneId: "Z3M3LMPEXAMPLE", * VPC: { * VPCId: "vpc-1a2b3c4d", * VPCRegion: "us-east-2" * } * }; * const command = new AssociateVPCWithHostedZoneCommand(input); * const response = await client.send(command); * /* response is * { * ChangeInfo: { * Comment: "", * Id: "/change/C3HC6WDB2UANE2", * Status: "INSYNC", * SubmittedAt: "2017-01-31T01:36:41.958Z" * } * } * *\/ * ``` * * @public */ export declare class AssociateVPCWithHostedZoneCommand extends AssociateVPCWithHostedZoneCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: AssociateVPCWithHostedZoneRequest; output: AssociateVPCWithHostedZoneResponse; }; sdk: { input: AssociateVPCWithHostedZoneCommandInput; output: AssociateVPCWithHostedZoneCommandOutput; }; }; }