Skip to content

create_proxy_rule_group

create_proxy_rule_group(
    proxy_rule_group_name: ResourceName,
    *,
    config_overrides: Optional[NetworkFirewallClientConfig] = None,
    description: Optional[Description] = None,
    rules: Optional[ProxyRulesByRequestPhase] = None,
    tags: Optional[TagList] = None,
) -> CreateProxyRuleGroupResponse

Creates an Network Firewall ProxyRuleGroup

Collections of related proxy filtering rules. Rule groups help you manage and reuse sets of rules across multiple proxy configurations.

To manage a proxy rule group's tags, use the standard Amazon Web Services resource tagging operations, ListTagsForResource, TagResource, and UntagResource.

To retrieve information about proxy rule groups, use ListProxyRuleGroups and DescribeProxyRuleGroup.

To retrieve information about individual proxy rules, use DescribeProxyRuleGroup and DescribeProxyRule.

Parameters:

  • proxy_rule_group_name (ResourceName) –

    The descriptive name of the proxy rule group. You can't change the name of a proxy rule group after you create it.

  • description (Optional[Description], default: None ) –

    A description of the proxy rule group.

  • rules (Optional[ProxyRulesByRequestPhase], default: None ) –

    Individual rules that define match conditions and actions for application-layer traffic. Rules specify what to inspect (domains, headers, methods) and what action to take (allow, deny, alert).

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

    The key:value pairs to associate with the resource.

Raises:

  • InternalServerError –

    Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request.

  • InvalidRequestException –

    The operation failed because of a problem with your request. Examples include:

    • You specified an unsupported parameter name or value.

    • You tried to update a property with a value that isn't among the available types.

    • Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.

  • LimitExceededException –

    Unable to perform the operation because doing so would violate a limit setting.

  • ThrottlingException –

    Unable to process the request due to throttling limitations.

  • UnknownServiceError –

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

Source code in docs_src/capo_network_firewall/_services/network_firewall.py
def create_proxy_rule_group(
    self,
    proxy_rule_group_name: "capo_network_firewall.types.resource_name.ResourceName",
    *,
    config_overrides: Optional[NetworkFirewallClientConfig] = None,
    description: Optional[
        "capo_network_firewall.types.description.Description"
    ] = None,
    rules: Optional[
        "capo_network_firewall.types.proxy_rules_by_request_phase.ProxyRulesByRequestPhase"
    ] = None,
    tags: Optional["capo_network_firewall.types.tag_list.TagList"] = None,
) -> "capo_network_firewall.types.create_proxy_rule_group_response.CreateProxyRuleGroupResponse":
    """<p>Creates an Network Firewall <a>ProxyRuleGroup</a> </p> <p>Collections of related proxy filtering rules. Rule groups help you manage and reuse sets of rules across multiple proxy configurations. </p> <p>To manage a proxy rule group's tags, use the standard Amazon Web Services resource tagging operations, <a>ListTagsForResource</a>, <a>TagResource</a>, and <a>UntagResource</a>.</p> <p>To retrieve information about proxy rule groups, use <a>ListProxyRuleGroups</a> and <a>DescribeProxyRuleGroup</a>.</p> <p>To retrieve information about individual proxy rules, use <a>DescribeProxyRuleGroup</a> and <a>DescribeProxyRule</a>.</p>

    Args:
        proxy_rule_group_name: <p>The descriptive name of the proxy rule group. You can't change the name of a proxy rule group after you create it.</p>
        description: <p>A description of the proxy rule group. </p>
        rules: <p>Individual rules that define match conditions and actions for application-layer traffic. Rules specify what to inspect (domains, headers, methods) and what action to take (allow, deny, alert). </p>
        tags: <p>The key:value pairs to associate with the resource.</p>

    Raises:
        capo_network_firewall.errors.internal_server_error.InternalServerError: <p>Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request. </p>
        capo_network_firewall.errors.invalid_request_exception.InvalidRequestException: <p>The operation failed because of a problem with your request. Examples include: </p> <ul> <li> <p>You specified an unsupported parameter name or value.</p> </li> <li> <p>You tried to update a property with a value that isn't among the available types.</p> </li> <li> <p>Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.</p> </li> </ul>
        capo_network_firewall.errors.limit_exceeded_exception.LimitExceededException: <p>Unable to perform the operation because doing so would violate a limit setting. </p>
        capo_network_firewall.errors.throttling_exception.ThrottlingException: <p>Unable to process the request due to throttling limitations.</p>
        capo_network_firewall.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_network_firewall.types.create_proxy_rule_group_request.CreateProxyRuleGroupRequest]",
    ) -> OperationResponse[
        "capo_network_firewall.types.create_proxy_rule_group_response.CreateProxyRuleGroupResponse"
    ]:
        import capo_network_firewall._operations.network_firewall_20201112.create_proxy_rule_group

        output, http_response = (
            capo_network_firewall._operations.network_firewall_20201112.create_proxy_rule_group.create_proxy_rule_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProxyRuleGroup")
    )
    input_: capo_network_firewall.types.create_proxy_rule_group_request.CreateProxyRuleGroupRequest = {
        "proxy_rule_group_name": proxy_rule_group_name
    }
    if description is not None:
        input_["description"] = description
    if rules is not None:
        input_["rules"] = rules
    if tags is not None:
        input_["tags"] = tags

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