Policy
Manages a Azure Web Application Firewall Policy instance.
Create a Policy Resource
new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);def Policy(resource_name, opts=None, custom_rules=None, location=None, managed_rules=None, name=None, policy_settings=None, resource_group_name=None, tags=None, __props__=None);func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Policy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Policy resource accepts the following input properties:
- Managed
Rules PolicyManaged Rules Args A
managed_rulesblocks as defined below.- Resource
Group stringName The name of the resource group. Changing this forces a new resource to be created.
- Custom
Rules List<PolicyCustom Rule Args> One or more
custom_rulesblocks as defined below.- Location string
Resource location. Changing this forces a new resource to be created.
- Name string
The name of the policy. Changing this forces a new resource to be created.
- Policy
Settings PolicyPolicy Settings Args A
policy_settingsblock as defined below.- Dictionary<string, string>
A mapping of tags to assign to the Web Application Firewall Policy.
- Managed
Rules PolicyManaged Rules A
managed_rulesblocks as defined below.- Resource
Group stringName The name of the resource group. Changing this forces a new resource to be created.
- Custom
Rules []PolicyCustom Rule One or more
custom_rulesblocks as defined below.- Location string
Resource location. Changing this forces a new resource to be created.
- Name string
The name of the policy. Changing this forces a new resource to be created.
- Policy
Settings PolicyPolicy Settings A
policy_settingsblock as defined below.- map[string]string
A mapping of tags to assign to the Web Application Firewall Policy.
- managed
Rules PolicyManaged Rules A
managed_rulesblocks as defined below.- resource
Group stringName The name of the resource group. Changing this forces a new resource to be created.
- custom
Rules PolicyCustom Rule[] One or more
custom_rulesblocks as defined below.- location string
Resource location. Changing this forces a new resource to be created.
- name string
The name of the policy. Changing this forces a new resource to be created.
- policy
Settings PolicyPolicy Settings A
policy_settingsblock as defined below.- {[key: string]: string}
A mapping of tags to assign to the Web Application Firewall Policy.
- managed_
rules Dict[PolicyManaged Rules] A
managed_rulesblocks as defined below.- resource_
group_ strname The name of the resource group. Changing this forces a new resource to be created.
- custom_
rules List[PolicyCustom Rule] One or more
custom_rulesblocks as defined below.- location str
Resource location. Changing this forces a new resource to be created.
- name str
The name of the policy. Changing this forces a new resource to be created.
- policy_
settings Dict[PolicyPolicy Settings] A
policy_settingsblock as defined below.- Dict[str, str]
A mapping of tags to assign to the Web Application Firewall Policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
Look up an Existing Policy Resource
Get an existing Policy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PolicyState, opts?: CustomResourceOptions): Policystatic get(resource_name, id, opts=None, custom_rules=None, location=None, managed_rules=None, name=None, policy_settings=None, resource_group_name=None, tags=None, __props__=None);func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Custom
Rules List<PolicyCustom Rule Args> One or more
custom_rulesblocks as defined below.- Location string
Resource location. Changing this forces a new resource to be created.
- Managed
Rules PolicyManaged Rules Args A
managed_rulesblocks as defined below.- Name string
The name of the policy. Changing this forces a new resource to be created.
- Policy
Settings PolicyPolicy Settings Args A
policy_settingsblock as defined below.- Resource
Group stringName The name of the resource group. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the Web Application Firewall Policy.
- Custom
Rules []PolicyCustom Rule One or more
custom_rulesblocks as defined below.- Location string
Resource location. Changing this forces a new resource to be created.
- Managed
Rules PolicyManaged Rules A
managed_rulesblocks as defined below.- Name string
The name of the policy. Changing this forces a new resource to be created.
- Policy
Settings PolicyPolicy Settings A
policy_settingsblock as defined below.- Resource
Group stringName The name of the resource group. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the Web Application Firewall Policy.
- custom
Rules PolicyCustom Rule[] One or more
custom_rulesblocks as defined below.- location string
Resource location. Changing this forces a new resource to be created.
- managed
Rules PolicyManaged Rules A
managed_rulesblocks as defined below.- name string
The name of the policy. Changing this forces a new resource to be created.
- policy
Settings PolicyPolicy Settings A
policy_settingsblock as defined below.- resource
Group stringName The name of the resource group. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the Web Application Firewall Policy.
- custom_
rules List[PolicyCustom Rule] One or more
custom_rulesblocks as defined below.- location str
Resource location. Changing this forces a new resource to be created.
- managed_
rules Dict[PolicyManaged Rules] A
managed_rulesblocks as defined below.- name str
The name of the policy. Changing this forces a new resource to be created.
- policy_
settings Dict[PolicyPolicy Settings] A
policy_settingsblock as defined below.- resource_
group_ strname The name of the resource group. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the Web Application Firewall Policy.
Supporting Types
PolicyCustomRule
- Action string
Type of action.
- Match
Conditions List<PolicyCustom Rule Match Condition Args> One or more
match_conditionsblocks as defined below.- Priority int
Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
- Rule
Type string Describes the type of rule.
- Name string
Gets name of the resource that is unique within a policy. This name can be used to access the resource.
- Action string
Type of action.
- Match
Conditions []PolicyCustom Rule Match Condition One or more
match_conditionsblocks as defined below.- Priority int
Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
- Rule
Type string Describes the type of rule.
- Name string
Gets name of the resource that is unique within a policy. This name can be used to access the resource.
- action string
Type of action.
- match
Conditions PolicyCustom Rule Match Condition[] One or more
match_conditionsblocks as defined below.- priority number
Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
- rule
Type string Describes the type of rule.
- name string
Gets name of the resource that is unique within a policy. This name can be used to access the resource.
- action str
Type of action.
- match
Conditions List[PolicyCustom Rule Match Condition] One or more
match_conditionsblocks as defined below.- priority float
Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
- rule
Type str Describes the type of rule.
- name str
Gets name of the resource that is unique within a policy. This name can be used to access the resource.
PolicyCustomRuleMatchCondition
- Match
Values List<string> A list of match values.
- Match
Variables List<PolicyCustom Rule Match Condition Match Variable Args> One or more
match_variablesblocks as defined below.- Operator string
Describes operator to be matched.
- Negation
Condition bool Describes if this is negate condition or not
- Match
Values []string A list of match values.
- Match
Variables []PolicyCustom Rule Match Condition Match Variable One or more
match_variablesblocks as defined below.- Operator string
Describes operator to be matched.
- Negation
Condition bool Describes if this is negate condition or not
- match
Values string[] A list of match values.
- match
Variables PolicyCustom Rule Match Condition Match Variable[] One or more
match_variablesblocks as defined below.- operator string
Describes operator to be matched.
- negation
Condition boolean Describes if this is negate condition or not
- match
Values List[str] A list of match values.
- match
Variables List[PolicyCustom Rule Match Condition Match Variable] One or more
match_variablesblocks as defined below.- operator str
Describes operator to be matched.
- negation
Condition bool Describes if this is negate condition or not
PolicyCustomRuleMatchConditionMatchVariable
- Variable
Name string The name of the Match Variable
- Selector string
Describes field of the matchVariable collection
- Variable
Name string The name of the Match Variable
- Selector string
Describes field of the matchVariable collection
- variable
Name string The name of the Match Variable
- selector string
Describes field of the matchVariable collection
- variable
Name str The name of the Match Variable
- selector str
Describes field of the matchVariable collection
PolicyManagedRules
- Managed
Rule List<PolicySets Managed Rules Managed Rule Set Args> One or more
managed_rule_setblock defined below.- Exclusions
List<Policy
Managed Rules Exclusion Args> One or more
exclusionblock defined below.
- Managed
Rule []PolicySets Managed Rules Managed Rule Set One or more
managed_rule_setblock defined below.- Exclusions
[]Policy
Managed Rules Exclusion One or more
exclusionblock defined below.
- managed
Rule PolicySets Managed Rules Managed Rule Set[] One or more
managed_rule_setblock defined below.- exclusions
Policy
Managed Rules Exclusion[] One or more
exclusionblock defined below.
- managed
Rule List[PolicySets Managed Rules Managed Rule Set] One or more
managed_rule_setblock defined below.- exclusions
List[Policy
Managed Rules Exclusion] One or more
exclusionblock defined below.
PolicyManagedRulesExclusion
- Match
Variable string - Selector string
Describes field of the matchVariable collection.
- Selector
Match stringOperator Describes operator to be matched. Possible values:
Contains,EndsWith,Equals,EqualsAny,StartsWith.
- Match
Variable string - Selector string
Describes field of the matchVariable collection.
- Selector
Match stringOperator Describes operator to be matched. Possible values:
Contains,EndsWith,Equals,EqualsAny,StartsWith.
- match
Variable string - selector string
Describes field of the matchVariable collection.
- selector
Match stringOperator Describes operator to be matched. Possible values:
Contains,EndsWith,Equals,EqualsAny,StartsWith.
- match
Variable str - selector str
Describes field of the matchVariable collection.
- selector
Match strOperator Describes operator to be matched. Possible values:
Contains,EndsWith,Equals,EqualsAny,StartsWith.
PolicyManagedRulesManagedRuleSet
- Version string
The rule set version.
- Rule
Group List<PolicyOverrides Managed Rules Managed Rule Set Rule Group Override Args> One or more
rule_group_overrideblock defined below.- Type string
The rule set type.
- Version string
The rule set version.
- Rule
Group []PolicyOverrides Managed Rules Managed Rule Set Rule Group Override One or more
rule_group_overrideblock defined below.- Type string
The rule set type.
- version string
The rule set version.
- rule
Group PolicyOverrides Managed Rules Managed Rule Set Rule Group Override[] One or more
rule_group_overrideblock defined below.- type string
The rule set type.
- version str
The rule set version.
- rule
Group List[PolicyOverrides Managed Rules Managed Rule Set Rule Group Override] One or more
rule_group_overrideblock defined below.- type str
The rule set type.
PolicyManagedRulesManagedRuleSetRuleGroupOverride
- Disabled
Rules List<string> One or more Rule ID’s
- Rule
Group stringName The name of the Rule Group
- Disabled
Rules []string One or more Rule ID’s
- Rule
Group stringName The name of the Rule Group
- disabled
Rules string[] One or more Rule ID’s
- rule
Group stringName The name of the Rule Group
- disabled
Rules List[str] One or more Rule ID’s
- rule
Group strName The name of the Rule Group
PolicyPolicySettings
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.