Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class AssociateResolverQueryLogConfigCommandProtected

Associates an Amazon VPC with a specified query logging configuration. Route 53 Resolver logs DNS queries that originate in all of the Amazon VPCs that are associated with a specified query logging configuration. To associate more than one VPC with a configuration, submit one AssociateResolverQueryLogConfig request for each VPC.

The VPCs that you associate with a query logging configuration must be in the same Region as the configuration.

To remove a VPC from a query logging configuration, see DisassociateResolverQueryLogConfig.

Example

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

import { Route53ResolverClient, AssociateResolverQueryLogConfigCommand } from "@aws-sdk/client-route53resolver"; // ES Modules import
// const { Route53ResolverClient, AssociateResolverQueryLogConfigCommand } = require("@aws-sdk/client-route53resolver"); // CommonJS import
const client = new Route53ResolverClient(config);
const input = { // AssociateResolverQueryLogConfigRequest
ResolverQueryLogConfigId: "STRING_VALUE", // required
ResourceId: "STRING_VALUE", // required
};
const command = new AssociateResolverQueryLogConfigCommand(input);
const response = await client.send(command);
// { // AssociateResolverQueryLogConfigResponse
// ResolverQueryLogConfigAssociation: { // ResolverQueryLogConfigAssociation
// Id: "STRING_VALUE",
// ResolverQueryLogConfigId: "STRING_VALUE",
// ResourceId: "STRING_VALUE",
// Status: "CREATING" || "ACTIVE" || "ACTION_NEEDED" || "DELETING" || "FAILED",
// Error: "NONE" || "DESTINATION_NOT_FOUND" || "ACCESS_DENIED" || "INTERNAL_SERVICE_ERROR",
// ErrorMessage: "STRING_VALUE",
// CreationTime: "STRING_VALUE",
// },
// };

Param

AssociateResolverQueryLogConfigCommandInput

Returns

AssociateResolverQueryLogConfigCommandOutput

See

Throws

AccessDeniedException (client fault)

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

Throws

InternalServiceErrorException (client fault)

We encountered an unknown error. Try again in a few minutes.

Throws

InvalidParameterException (client fault)

One or more parameters in this request are not valid.

Throws

InvalidRequestException (client fault)

The request is invalid.

Throws

LimitExceededException (client fault)

The request caused one or more limits to be exceeded.

Throws

ResourceExistsException (client fault)

The resource that you tried to create already exists.

Throws

ResourceNotFoundException (client fault)

The specified resource doesn't exist.

Throws

ThrottlingException (client fault)

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

Throws

Route53ResolverServiceException

Base exception class for all service exceptions from Route53Resolver service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods