DeleteResolverRuleCommand

Deletes a Resolver rule. Before you can delete a Resolver rule, you must disassociate it from all the VPCs that you associated the Resolver rule with. For more information, see DisassociateResolverRule .

Example Syntax

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

import { Route53ResolverClient, DeleteResolverRuleCommand } from "@aws-sdk/client-route53resolver"; // ES Modules import
// const { Route53ResolverClient, DeleteResolverRuleCommand } = require("@aws-sdk/client-route53resolver"); // CommonJS import
const client = new Route53ResolverClient(config);
const input = { // DeleteResolverRuleRequest
  ResolverRuleId: "STRING_VALUE", // required
};
const command = new DeleteResolverRuleCommand(input);
const response = await client.send(command);
// { // DeleteResolverRuleResponse
//   ResolverRule: { // ResolverRule
//     Id: "STRING_VALUE",
//     CreatorRequestId: "STRING_VALUE",
//     Arn: "STRING_VALUE",
//     DomainName: "STRING_VALUE",
//     Status: "COMPLETE" || "DELETING" || "UPDATING" || "FAILED",
//     StatusMessage: "STRING_VALUE",
//     RuleType: "FORWARD" || "SYSTEM" || "RECURSIVE",
//     Name: "STRING_VALUE",
//     TargetIps: [ // TargetList
//       { // TargetAddress
//         Ip: "STRING_VALUE",
//         Port: Number("int"),
//         Ipv6: "STRING_VALUE",
//         Protocol: "DoH" || "Do53" || "DoH-FIPS",
//         ServerNameIndication: "STRING_VALUE",
//       },
//     ],
//     ResolverEndpointId: "STRING_VALUE",
//     OwnerId: "STRING_VALUE",
//     ShareStatus: "NOT_SHARED" || "SHARED_WITH_ME" || "SHARED_BY_ME",
//     CreationTime: "STRING_VALUE",
//     ModificationTime: "STRING_VALUE",
//   },
// };

DeleteResolverRuleCommand Input

See DeleteResolverRuleCommandInput for more details

Parameter
Type
Description
ResolverRuleId
Required
string | undefined

The ID of the Resolver rule that you want to delete.

DeleteResolverRuleCommand Output

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

Information about the DeleteResolverRule request, including the status of the request.

Throws

Name
Fault
Details
InternalServiceErrorException
client

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

InvalidParameterException
client

One or more parameters in this request are not valid.

ResourceInUseException
client

The resource that you tried to update or delete is currently in use.

ResourceNotFoundException
client

The specified resource doesn't exist.

ThrottlingException
client

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

Route53ResolverServiceException
Base exception class for all service exceptions from Route53Resolver service.