CmdID

CmdID / aws / aws route53resolver

aws route53resolver associate-resolver-rule

Associates a Resolver rule with a VPC. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To associate a Resolver rule with a VPC

The following associate-resolver-rule example associates a Resolver rule with an Amazon VPC. After you run the command, Resolver starts to forward DNS queries to your network based on the settings in the rule, such as the domain name of the queries that are forwarded.

aws route53resolver associate-resolver-rule --name my-resolver-rule-association --resolver-rule-id rslvr-rr-42b60677c0example --vpc-id vpc-304bexamIdentify
--nameA name for the association that you're creating between a Resolver rule and a VPC.
--resolver-rule-idThe ID of the Resolver rule that you want to associate with the VPC.
--vpc-idThe ID of the VPC that you want to associate the Resolver rule with.
Its output
{
    "ResolverRuleAssociation": {
        "Id": "rslvr-rrassoc-d61cbb2c8bexample",
        "ResolverRuleId": "rslvr-rr-42b60677c0example",
        "Name": "my-resolver-rule-association",
        "VPCId": "vpc-304bexam",
        "Status": "CREATING",
        "StatusMessage": "[Trace id: 1-5dc5a8fa-ec2cc480d2ef07617example] Creating the association."
    }
}

For more information, see Forwarding Outbound DNS Queries to Your Network in the Amazon Route 53 Developer Guide.

Options

3 in the AWS CLI reference
--nameA name for the association that you're creating between a Resolver rule and a VPC.
--resolver-rule-idThe ID of the Resolver rule that you want to associate with the VPC.
--vpc-idThe ID of the VPC that you want to associate the Resolver rule with.