Skip to content

list_firewall_rule_group_associations

list_firewall_rule_group_associations(
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    firewall_rule_group_id: Optional[ResourceId] = None,
    vpc_id: Optional[ResourceId] = None,
    priority: Optional[Priority] = None,
    status: Optional[FirewallRuleGroupAssociationStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListFirewallRuleGroupAssociationsResponse

Retrieves the firewall rule group associations that you have defined. Each association enables DNS filtering for a VPC with one rule group.

A single call might return only a partial list of the associations. For information, see MaxResults.

Parameters:

  • firewall_rule_group_id (Optional[ResourceId], default: None ) –

    The unique identifier of the firewall rule group that you want to retrieve the associations for. Leave this blank to retrieve associations for any rule group.

  • vpc_id (Optional[ResourceId], default: None ) –

    The unique identifier of the VPC that you want to retrieve the associations for. Leave this blank to retrieve associations for any VPC.

  • priority (Optional[Priority], default: None ) –

    The setting that determines the processing order of the rule group among the rule groups that are associated with a single VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting.

  • status (Optional[FirewallRuleGroupAssociationStatus], default: None ) –

    The association Status setting that you want DNS Firewall to filter on for the list. If you don't specify this, then DNS Firewall returns all associations, regardless of status.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of objects that you want Resolver to return for this request. If more objects are available, in the response, Resolver provides a NextToken value that you can use in a subsequent call to get the next batch of objects.

    If you don't specify a value for MaxResults, Resolver returns up to 100 objects.

  • next_token (Optional[NextToken], default: None ) –

    For the first call to this list request, omit this value.

    When you request a list of objects, Resolver returns at most the number of objects specified in MaxResults. If more objects are available for retrieval, Resolver returns a NextToken value in the response. To retrieve the next batch of objects, use the token that was returned for the prior request in your next request.

Raises:

  • AccessDeniedException –

    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 –

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

  • ThrottlingException –

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

  • ValidationException –

    You have provided an invalid command. If you ran the UpdateFirewallDomains request. supported values are ADD, REMOVE, or REPLACE a domain.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route53resolver/_services/route53_resolver.py
def list_firewall_rule_group_associations(
    self,
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    firewall_rule_group_id: Optional[
        "capo_route53resolver.types.resource_id.ResourceId"
    ] = None,
    vpc_id: Optional["capo_route53resolver.types.resource_id.ResourceId"] = None,
    priority: Optional["capo_route53resolver.types.priority.Priority"] = None,
    status: Optional[
        "capo_route53resolver.types.firewall_rule_group_association_status.FirewallRuleGroupAssociationStatus"
    ] = None,
    max_results: Optional[
        "capo_route53resolver.types.max_results.MaxResults"
    ] = None,
    next_token: Optional["capo_route53resolver.types.next_token.NextToken"] = None,
) -> "capo_route53resolver.types.list_firewall_rule_group_associations_response.ListFirewallRuleGroupAssociationsResponse":
    """<p>Retrieves the firewall rule group associations that you have defined. Each association enables DNS filtering for a VPC with one rule group. </p> <p>A single call might return only a partial list of the associations. For information, see <code>MaxResults</code>. </p>

    Args:
        firewall_rule_group_id: <p>The unique identifier of the firewall rule group that you want to retrieve the associations for. Leave this blank to retrieve associations for any rule group. </p>
        vpc_id: <p>The unique identifier of the VPC that you want to retrieve the associations for. Leave this blank to retrieve associations for any VPC. </p>
        priority: <p>The setting that determines the processing order of the rule group among the rule groups that are associated with a single VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. </p>
        status: <p>The association <code>Status</code> setting that you want DNS Firewall to filter on for the list. If you don't specify this, then DNS Firewall returns all associations, regardless of status.</p>
        max_results: <p>The maximum number of objects that you want Resolver to return for this request. If more objects are available, in the response, Resolver provides a <code>NextToken</code> value that you can use in a subsequent call to get the next batch of objects.</p> <p>If you don't specify a value for <code>MaxResults</code>, Resolver returns up to 100 objects. </p>
        next_token: <p>For the first call to this list request, omit this value.</p> <p>When you request a list of objects, Resolver returns at most the number of objects specified in <code>MaxResults</code>. If more objects are available for retrieval, Resolver returns a <code>NextToken</code> value in the response. To retrieve the next batch of objects, use the token that was returned for the prior request in your next request.</p>

    Raises:
        capo_route53resolver.errors.access_denied_exception.AccessDeniedException: <p>The current account doesn't have the IAM permissions required to perform the specified Resolver operation.</p> <p>This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.</p>
        capo_route53resolver.errors.internal_service_error_exception.InternalServiceErrorException: <p>We encountered an unknown error. Try again in a few minutes.</p>
        capo_route53resolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Try again in a few minutes.</p>
        capo_route53resolver.errors.validation_exception.ValidationException: <p>You have provided an invalid command. If you ran the <code>UpdateFirewallDomains</code> request. supported values are <code>ADD</code>, <code>REMOVE</code>, or <code>REPLACE</code> a domain.</p>
        capo_route53resolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53resolver.types.list_firewall_rule_group_associations_request.ListFirewallRuleGroupAssociationsRequest]",
    ) -> OperationResponse[
        "capo_route53resolver.types.list_firewall_rule_group_associations_response.ListFirewallRuleGroupAssociationsResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.list_firewall_rule_group_associations

        output, http_response = (
            capo_route53resolver._operations.route53_resolver.list_firewall_rule_group_associations.list_firewall_rule_group_associations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListFirewallRuleGroupAssociations")
    )
    input_: capo_route53resolver.types.list_firewall_rule_group_associations_request.ListFirewallRuleGroupAssociationsRequest = {}
    if firewall_rule_group_id is not None:
        input_["firewall_rule_group_id"] = firewall_rule_group_id
    if vpc_id is not None:
        input_["vpc_id"] = vpc_id
    if priority is not None:
        input_["priority"] = priority
    if status is not None:
        input_["status"] = status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output