def __init__(__self__, *, action: Optional[pulumi.Input[str]]=None, description: Optional[pulumi.Input[str]]=None, direction: Optional[pulumi.Input['SecurityPolicyRuleDirection']]=None, enable_logging: Optional[pulumi.Input[bool]]=None, header_action: Optional[pulumi.Input['SecurityPolicyRuleHttpHeaderActionArgs']]=None, match: Optional[pulumi.Input['SecurityPolicyRuleMatcherArgs']]=None, preview: Optional[pulumi.Input[bool]]=None, priority: Optional[pulumi.Input[int]]=None, rate_limit_options: Optional[pulumi.Input['SecurityPolicyRuleRateLimitOptionsArgs']]=None, redirect_options: Optional[pulumi.Input['SecurityPolicyRuleRedirectOptionsArgs']]=None, redirect_target: Optional[pulumi.Input[str]]=None, rule_number: Optional[pulumi.Input[str]]=None, target_resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, target_service_accounts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
    '\n        Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).\n        :param pulumi.Input[str] action: The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. \n        :param pulumi.Input[str] description: An optional description of this resource. Provide this property when you create the resource.\n        :param pulumi.Input[\'SecurityPolicyRuleDirection\'] direction: The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.\n        :param pulumi.Input[bool] enable_logging: Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL.\n        :param pulumi.Input[\'SecurityPolicyRuleHttpHeaderActionArgs\'] header_action: Optional, additional actions that are performed on headers.\n        :param pulumi.Input[\'SecurityPolicyRuleMatcherArgs\'] match: A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding \'action\' is enforced.\n        :param pulumi.Input[bool] preview: If set to true, the specified action is not enforced.\n        :param pulumi.Input[int] priority: An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.\n        :param pulumi.Input[\'SecurityPolicyRuleRateLimitOptionsArgs\'] rate_limit_options: Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions.\n        :param pulumi.Input[\'SecurityPolicyRuleRedirectOptionsArgs\'] redirect_options: Parameters defining the redirect action. Cannot be specified for any other actions.\n        :param pulumi.Input[str] redirect_target: This must be specified for redirect actions. Cannot be specified for any other actions.\n        :param pulumi.Input[str] rule_number: Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.\n        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_resources: A list of network resource URLs to which this rule applies. This field allows you to control which network\'s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.\n        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_service_accounts: A list of service accounts indicating the sets of instances that are applied with this rule.\n        '
    if (action is not None):
        pulumi.set(__self__, 'action', action)
    if (description is not None):
        pulumi.set(__self__, 'description', description)
    if (direction is not None):
        pulumi.set(__self__, 'direction', direction)
    if (enable_logging is not None):
        pulumi.set(__self__, 'enable_logging', enable_logging)
    if (header_action is not None):
        pulumi.set(__self__, 'header_action', header_action)
    if (match is not None):
        pulumi.set(__self__, 'match', match)
    if (preview is not None):
        pulumi.set(__self__, 'preview', preview)
    if (priority is not None):
        pulumi.set(__self__, 'priority', priority)
    if (rate_limit_options is not None):
        pulumi.set(__self__, 'rate_limit_options', rate_limit_options)
    if (redirect_options is not None):
        pulumi.set(__self__, 'redirect_options', redirect_options)
    if (redirect_target is not None):
        pulumi.set(__self__, 'redirect_target', redirect_target)
    if (rule_number is not None):
        pulumi.set(__self__, 'rule_number', rule_number)
    if (target_resources is not None):
        pulumi.set(__self__, 'target_resources', target_resources)
    if (target_service_accounts is not None):
        pulumi.set(__self__, 'target_service_accounts', target_service_accounts)
Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
:param pulumi.Input[str] action: The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. 
:param pulumi.Input[str] description: An optional description of this resource. Provide this property when you create the resource.
:param pulumi.Input['SecurityPolicyRuleDirection'] direction: The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
:param pulumi.Input[bool] enable_logging: Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL.
:param pulumi.Input['SecurityPolicyRuleHttpHeaderActionArgs'] header_action: Optional, additional actions that are performed on headers.
:param pulumi.Input['SecurityPolicyRuleMatcherArgs'] match: A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
:param pulumi.Input[bool] preview: If set to true, the specified action is not enforced.
:param pulumi.Input[int] priority: An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
:param pulumi.Input['SecurityPolicyRuleRateLimitOptionsArgs'] rate_limit_options: Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions.
:param pulumi.Input['SecurityPolicyRuleRedirectOptionsArgs'] redirect_options: Parameters defining the redirect action. Cannot be specified for any other actions.
:param pulumi.Input[str] redirect_target: This must be specified for redirect actions. Cannot be specified for any other actions.
:param pulumi.Input[str] rule_number: Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
:param pulumi.Input[Sequence[pulumi.Input[str]]] target_resources: A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
:param pulumi.Input[Sequence[pulumi.Input[str]]] target_service_accounts: A list of service accounts indicating the sets of instances that are applied with this rule.
def __init__(__self__, *, action: Optional[pulumi.Input[str]]=None, description: Optional[pulumi.Input[str]]=None, direction: Optional[pulumi.Input['SecurityPolicyRuleDirection']]=None, enable_logging: Optional[pulumi.Input[bool]]=None, header_action: Optional[pulumi.Input['SecurityPolicyRuleHttpHeaderActionArgs']]=None, match: Optional[pulumi.Input['SecurityPolicyRuleMatcherArgs']]=None, preview: Optional[pulumi.Input[bool]]=None, priority: Optional[pulumi.Input[int]]=None, rate_limit_options: Optional[pulumi.Input['SecurityPolicyRuleRateLimitOptionsArgs']]=None, redirect_options: Optional[pulumi.Input['SecurityPolicyRuleRedirectOptionsArgs']]=None, redirect_target: Optional[pulumi.Input[str]]=None, rule_number: Optional[pulumi.Input[str]]=None, target_resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, target_service_accounts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
    '\n        Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).\n        :param pulumi.Input[str] action: The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. \n        :param pulumi.Input[str] description: An optional description of this resource. Provide this property when you create the resource.\n        :param pulumi.Input[\'SecurityPolicyRuleDirection\'] direction: The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.\n        :param pulumi.Input[bool] enable_logging: Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL.\n        :param pulumi.Input[\'SecurityPolicyRuleHttpHeaderActionArgs\'] header_action: Optional, additional actions that are performed on headers.\n        :param pulumi.Input[\'SecurityPolicyRuleMatcherArgs\'] match: A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding \'action\' is enforced.\n        :param pulumi.Input[bool] preview: If set to true, the specified action is not enforced.\n        :param pulumi.Input[int] priority: An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.\n        :param pulumi.Input[\'SecurityPolicyRuleRateLimitOptionsArgs\'] rate_limit_options: Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions.\n        :param pulumi.Input[\'SecurityPolicyRuleRedirectOptionsArgs\'] redirect_options: Parameters defining the redirect action. Cannot be specified for any other actions.\n        :param pulumi.Input[str] redirect_target: This must be specified for redirect actions. Cannot be specified for any other actions.\n        :param pulumi.Input[str] rule_number: Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.\n        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_resources: A list of network resource URLs to which this rule applies. This field allows you to control which network\'s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.\n        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_service_accounts: A list of service accounts indicating the sets of instances that are applied with this rule.\n        '
    if (action is not None):
        pulumi.set(__self__, 'action', action)
    if (description is not None):
        pulumi.set(__self__, 'description', description)
    if (direction is not None):
        pulumi.set(__self__, 'direction', direction)
    if (enable_logging is not None):
        pulumi.set(__self__, 'enable_logging', enable_logging)
    if (header_action is not None):
        pulumi.set(__self__, 'header_action', header_action)
    if (match is not None):
        pulumi.set(__self__, 'match', match)
    if (preview is not None):
        pulumi.set(__self__, 'preview', preview)
    if (priority is not None):
        pulumi.set(__self__, 'priority', priority)
    if (rate_limit_options is not None):
        pulumi.set(__self__, 'rate_limit_options', rate_limit_options)
    if (redirect_options is not None):
        pulumi.set(__self__, 'redirect_options', redirect_options)
    if (redirect_target is not None):
        pulumi.set(__self__, 'redirect_target', redirect_target)
    if (rule_number is not None):
        pulumi.set(__self__, 'rule_number', rule_number)
    if (target_resources is not None):
        pulumi.set(__self__, 'target_resources', target_resources)
    if (target_service_accounts is not None):
        pulumi.set(__self__, 'target_service_accounts', target_service_accounts)