Skip to content

create_firewall_rule_group async

create_firewall_rule_group(
    creator_request_id: CreatorRequestId,
    name: Name,
    *,
    config_overrides: Optional[AsyncRoute53ResolverClientConfig] = None,
    tags: Optional[TagList] = None,
) -> CreateFirewallRuleGroupResponse

Creates an empty DNS Firewall rule group for filtering DNS network traffic in a VPC. You can add rules to the new rule group by calling CreateFirewallRule.

Parameters:

  • creator_request_id (CreatorRequestId) –

    A unique string defined by you to identify the request. This allows you to retry failed requests without the risk of running the operation twice. This can be any unique string, for example, a timestamp.

  • name (Name) –

    A name that lets you identify the rule group, to manage and use it.

  • tags (Optional[TagList], default: None ) –

    A list of the tag keys and values that you want to associate with the rule group.

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.

  • LimitExceededException –

    The request caused one or more limits to be exceeded.

  • 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/async_route53_resolver.py
async def create_firewall_rule_group(
    self,
    creator_request_id: "capo_route53resolver.types.creator_request_id.CreatorRequestId",
    name: "capo_route53resolver.types.name.Name",
    *,
    config_overrides: Optional[AsyncRoute53ResolverClientConfig] = None,
    tags: Optional["capo_route53resolver.types.tag_list.TagList"] = None,
) -> "capo_route53resolver.types.create_firewall_rule_group_response.CreateFirewallRuleGroupResponse":
    """<p>Creates an empty DNS Firewall rule group for filtering DNS network traffic in a VPC. You can add rules to the new rule group by calling <a>CreateFirewallRule</a>. </p>

    Args:
        creator_request_id: <p>A unique string defined by you to identify the request. This allows you to retry failed requests without the risk of running the operation twice. This can be any unique string, for example, a timestamp. </p>
        name: <p>A name that lets you identify the rule group, to manage and use it.</p>
        tags: <p>A list of the tag keys and values that you want to associate with the rule group. </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.limit_exceeded_exception.LimitExceededException: <p>The request caused one or more limits to be exceeded.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route53resolver.types.create_firewall_rule_group_request.CreateFirewallRuleGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_route53resolver.types.create_firewall_rule_group_response.CreateFirewallRuleGroupResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.create_firewall_rule_group

        (
            output,
            http_response,
        ) = await capo_route53resolver._operations.route53_resolver.create_firewall_rule_group.async_create_firewall_rule_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateFirewallRuleGroup")
    )
    input_: capo_route53resolver.types.create_firewall_rule_group_request.CreateFirewallRuleGroupRequest = {
        "creator_request_id": creator_request_id,
        "name": name,
    }
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output