- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateResolverRuleCommand
Updates settings for a specified Resolver rule. ResolverRuleId
is required, and all other parameters are optional. If you don't specify a parameter, it retains its current value.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Route53ResolverClient, UpdateResolverRuleCommand } from "@aws-sdk/client-route53resolver"; // ES Modules import
// const { Route53ResolverClient, UpdateResolverRuleCommand } = require("@aws-sdk/client-route53resolver"); // CommonJS import
const client = new Route53ResolverClient(config);
const input = { // UpdateResolverRuleRequest
ResolverRuleId: "STRING_VALUE", // required
Config: { // ResolverRuleConfig
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",
},
};
const command = new UpdateResolverRuleCommand(input);
const response = await client.send(command);
// { // UpdateResolverRuleResponse
// 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",
// },
// };
UpdateResolverRuleCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Config Required | ResolverRuleConfig | undefined | The new settings for the Resolver rule. |
ResolverRuleId Required | string | undefined | The ID of the Resolver rule that you want to update. |
UpdateResolverRuleCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ResolverRule | ResolverRule | undefined | The response to an |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | The current account doesn't have the IAM permissions required to perform the specified Resolver operation. This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs. |
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. |
InvalidRequestException | client | The request is invalid. |
LimitExceededException | client | The request caused one or more limits to be exceeded. |
ResourceNotFoundException | client | The specified resource doesn't exist. |
ResourceUnavailableException | client | The specified resource isn't available. |
ThrottlingException | client | The request was throttled. Try again in a few minutes. |
Route53ResolverServiceException | Base exception class for all service exceptions from Route53Resolver service. |