Skip to content

update_firewall_rule_group_association

update_firewall_rule_group_association(
    firewall_rule_group_association_id: ResourceId,
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    priority: Optional[Priority] = None,
    mutation_protection: Optional[MutationProtectionStatus] = None,
    name: Optional[Name] = None,
) -> UpdateFirewallRuleGroupAssociationResponse

Changes the association of a FirewallRuleGroup with a VPC. The association enables DNS filtering for the VPC.

Parameters:

  • firewall_rule_group_association_id (ResourceId) –

    The identifier of the FirewallRuleGroupAssociation.

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

    The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting.

    You must specify a unique priority for each rule group that you associate with a single VPC. To make it easier to insert rule groups later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for a rule group association after you create it.

  • mutation_protection (Optional[MutationProtectionStatus], default: None ) –

    If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections.

  • name (Optional[Name], default: None ) –

    The name of the rule group association.

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.

  • ConflictException –

    The requested state transition isn't valid. For example, you can't delete a firewall domain list if it is in the process of being deleted, or you can't import domains into a domain list that is in the process of being deleted.

  • InternalServiceErrorException –

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

  • ResourceNotFoundException –

    The specified resource doesn't exist.

  • 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 update_firewall_rule_group_association(
    self,
    firewall_rule_group_association_id: "capo_route53resolver.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    priority: Optional["capo_route53resolver.types.priority.Priority"] = None,
    mutation_protection: Optional[
        "capo_route53resolver.types.mutation_protection_status.MutationProtectionStatus"
    ] = None,
    name: Optional["capo_route53resolver.types.name.Name"] = None,
) -> "capo_route53resolver.types.update_firewall_rule_group_association_response.UpdateFirewallRuleGroupAssociationResponse":
    """<p>Changes the association of a <a>FirewallRuleGroup</a> with a VPC. The association enables DNS filtering for the VPC. </p>

    Args:
        firewall_rule_group_association_id: <p>The identifier of the <a>FirewallRuleGroupAssociation</a>. </p>
        priority: <p>The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. </p> <p>You must specify a unique priority for each rule group that you associate with a single VPC. To make it easier to insert rule groups later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for a rule group association after you create it.</p>
        mutation_protection: <p>If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. </p>
        name: <p>The name of the rule group association.</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.conflict_exception.ConflictException: <p>The requested state transition isn't valid. For example, you can't delete a firewall domain list if it is in the process of being deleted, or you can't import domains into a domain list that is in the process of being deleted.</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.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</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.update_firewall_rule_group_association_request.UpdateFirewallRuleGroupAssociationRequest]",
    ) -> OperationResponse[
        "capo_route53resolver.types.update_firewall_rule_group_association_response.UpdateFirewallRuleGroupAssociationResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.update_firewall_rule_group_association

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFirewallRuleGroupAssociation")
    )
    input_: capo_route53resolver.types.update_firewall_rule_group_association_request.UpdateFirewallRuleGroupAssociationRequest = {
        "firewall_rule_group_association_id": firewall_rule_group_association_id
    }
    if priority is not None:
        input_["priority"] = priority
    if mutation_protection is not None:
        input_["mutation_protection"] = mutation_protection
    if name is not None:
        input_["name"] = name

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