AssociateProfileCommand

Associates a Route 53 Profiles profile with a VPC. A VPC can have only one Profile associated with it, but a Profile can be associated with 1000 of VPCs (and you can request a higher quota). For more information, see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { Route53ProfilesClient, AssociateProfileCommand } from "@aws-sdk/client-route53profiles"; // ES Modules import
// const { Route53ProfilesClient, AssociateProfileCommand } = require("@aws-sdk/client-route53profiles"); // CommonJS import
const client = new Route53ProfilesClient(config);
const input = { // AssociateProfileRequest
  ProfileId: "STRING_VALUE", // required
  ResourceId: "STRING_VALUE", // required
  Name: "STRING_VALUE", // required
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
};
const command = new AssociateProfileCommand(input);
const response = await client.send(command);
// { // AssociateProfileResponse
//   ProfileAssociation: { // ProfileAssociation
//     Id: "STRING_VALUE",
//     Name: "STRING_VALUE",
//     OwnerId: "STRING_VALUE",
//     ProfileId: "STRING_VALUE",
//     ResourceId: "STRING_VALUE",
//     Status: "COMPLETE" || "DELETING" || "UPDATING" || "CREATING" || "DELETED" || "FAILED",
//     StatusMessage: "STRING_VALUE",
//     CreationTime: new Date("TIMESTAMP"),
//     ModificationTime: new Date("TIMESTAMP"),
//   },
// };

AssociateProfileCommand Input

See AssociateProfileCommandInput for more details

Parameter
Type
Description
Name
Required
string | undefined

A name for the association.

ProfileId
Required
string | undefined

ID of the Profile.

ResourceId
Required
string | undefined

The ID of the VPC.

Tags
Tag[] | undefined

A list of the tag keys and values that you want to identify the Profile association.

AssociateProfileCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ProfileAssociation
ProfileAssociation | undefined

The association that you just created. The association has an ID that you can use to identify it in other requests, like update and delete.

Throws

Name
Fault
Details
AccessDeniedException
client

The current account doesn't have the IAM permissions required to perform the specified operation.

ConflictException
client

The request you submitted conflicts with an existing request.

InvalidParameterException
client

One or more parameters in this request are not valid.

LimitExceededException
client

The request caused one or more limits to be exceeded.

ResourceExistsException
client

The resource you are trying to associate, has already been associated.

ResourceNotFoundException
client

The resource you are associating is not found.

ThrottlingException
client

The request was throttled. Try again in a few minutes.

ValidationException
client

You have provided an invalid command.

Route53ProfilesServiceException
Base exception class for all service exceptions from Route53Profiles service.