Azure Native

Pulumi Official
Package maintained by Pulumi
v1.64.0 published on Wednesday, May 4, 2022 by Pulumi

getPolicy

Defines web application firewall policy for Azure CDN. API Version: 2020-09-01.

Using getPolicy

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getPolicy(args: GetPolicyArgs, opts?: InvokeOptions): Promise<GetPolicyResult>
function getPolicyOutput(args: GetPolicyOutputArgs, opts?: InvokeOptions): Output<GetPolicyResult>
def get_policy(policy_name: Optional[str] = None,
               resource_group_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetPolicyResult
def get_policy_output(policy_name: Optional[pulumi.Input[str]] = None,
               resource_group_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetPolicyResult]
func LookupPolicy(ctx *Context, args *LookupPolicyArgs, opts ...InvokeOption) (*LookupPolicyResult, error)
func LookupPolicyOutput(ctx *Context, args *LookupPolicyOutputArgs, opts ...InvokeOption) LookupPolicyResultOutput

> Note: This function is named LookupPolicy in the Go SDK.

public static class GetPolicy 
{
    public static Task<GetPolicyResult> InvokeAsync(GetPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetPolicyResult> Invoke(GetPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPolicyResult> getPolicy(GetPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure-native:cdn:getPolicy
  Arguments:
    # Arguments dictionary

The following arguments are supported:

PolicyName string

The name of the CdnWebApplicationFirewallPolicy.

ResourceGroupName string

Name of the Resource group within the Azure subscription.

PolicyName string

The name of the CdnWebApplicationFirewallPolicy.

ResourceGroupName string

Name of the Resource group within the Azure subscription.

policyName String

The name of the CdnWebApplicationFirewallPolicy.

resourceGroupName String

Name of the Resource group within the Azure subscription.

policyName string

The name of the CdnWebApplicationFirewallPolicy.

resourceGroupName string

Name of the Resource group within the Azure subscription.

policy_name str

The name of the CdnWebApplicationFirewallPolicy.

resource_group_name str

Name of the Resource group within the Azure subscription.

policyName String

The name of the CdnWebApplicationFirewallPolicy.

resourceGroupName String

Name of the Resource group within the Azure subscription.

getPolicy Result

The following output properties are available:

EndpointLinks List<Pulumi.AzureNative.Cdn.Outputs.CdnEndpointResponse>

Describes Azure CDN endpoints associated with this Web Application Firewall policy.

Id string

Resource ID.

Location string

Resource location.

Name string

Resource name.

ProvisioningState string

Provisioning state of the WebApplicationFirewallPolicy.

ResourceState string
Sku Pulumi.AzureNative.Cdn.Outputs.SkuResponse

The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.

SystemData Pulumi.AzureNative.Cdn.Outputs.SystemDataResponse

Read only system data

Type string

Resource type.

CustomRules Pulumi.AzureNative.Cdn.Outputs.CustomRuleListResponse

Describes custom rules inside the policy.

Etag string

Gets a unique read-only string that changes whenever the resource is updated.

ManagedRules Pulumi.AzureNative.Cdn.Outputs.ManagedRuleSetListResponse

Describes managed rules inside the policy.

PolicySettings Pulumi.AzureNative.Cdn.Outputs.PolicySettingsResponse

Describes policySettings for policy

RateLimitRules Pulumi.AzureNative.Cdn.Outputs.RateLimitRuleListResponse

Describes rate limit rules inside the policy.

Tags Dictionary<string, string>

Resource tags.

EndpointLinks []CdnEndpointResponse

Describes Azure CDN endpoints associated with this Web Application Firewall policy.

Id string

Resource ID.

Location string

Resource location.

Name string

Resource name.

ProvisioningState string

Provisioning state of the WebApplicationFirewallPolicy.

ResourceState string
Sku SkuResponse

The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.

SystemData SystemDataResponse

Read only system data

Type string

Resource type.

CustomRules CustomRuleListResponse

Describes custom rules inside the policy.

Etag string

Gets a unique read-only string that changes whenever the resource is updated.

ManagedRules ManagedRuleSetListResponse

Describes managed rules inside the policy.

PolicySettings PolicySettingsResponse

Describes policySettings for policy

RateLimitRules RateLimitRuleListResponse

Describes rate limit rules inside the policy.

Tags map[string]string

Resource tags.

endpointLinks ListEndpointResponse>

Describes Azure CDN endpoints associated with this Web Application Firewall policy.

id String

Resource ID.

location String

Resource location.

name String

Resource name.

provisioningState String

Provisioning state of the WebApplicationFirewallPolicy.

resourceState String
sku SkuResponse

The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.

systemData SystemDataResponse

Read only system data

type String

Resource type.

customRules CustomRuleListResponse

Describes custom rules inside the policy.

etag String

Gets a unique read-only string that changes whenever the resource is updated.

managedRules ManagedRuleSetListResponse

Describes managed rules inside the policy.

policySettings PolicySettingsResponse

Describes policySettings for policy

rateLimitRules RateLimitRuleListResponse

Describes rate limit rules inside the policy.

tags Map

Resource tags.

endpointLinks CdnEndpointResponse[]

Describes Azure CDN endpoints associated with this Web Application Firewall policy.

id string

Resource ID.

location string

Resource location.

name string

Resource name.

provisioningState string

Provisioning state of the WebApplicationFirewallPolicy.

resourceState string
sku SkuResponse

The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.

systemData SystemDataResponse

Read only system data

type string

Resource type.

customRules CustomRuleListResponse

Describes custom rules inside the policy.

etag string

Gets a unique read-only string that changes whenever the resource is updated.

managedRules ManagedRuleSetListResponse

Describes managed rules inside the policy.

policySettings PolicySettingsResponse

Describes policySettings for policy

rateLimitRules RateLimitRuleListResponse

Describes rate limit rules inside the policy.

tags {[key: string]: string}

Resource tags.

endpoint_links Sequence[CdnEndpointResponse]

Describes Azure CDN endpoints associated with this Web Application Firewall policy.

id str

Resource ID.

location str

Resource location.

name str

Resource name.

provisioning_state str

Provisioning state of the WebApplicationFirewallPolicy.

resource_state str
sku SkuResponse

The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.

system_data SystemDataResponse

Read only system data

type str

Resource type.

custom_rules CustomRuleListResponse

Describes custom rules inside the policy.

etag str

Gets a unique read-only string that changes whenever the resource is updated.

managed_rules ManagedRuleSetListResponse

Describes managed rules inside the policy.

policy_settings PolicySettingsResponse

Describes policySettings for policy

rate_limit_rules RateLimitRuleListResponse

Describes rate limit rules inside the policy.

tags Mapping[str, str]

Resource tags.

endpointLinks List

Describes Azure CDN endpoints associated with this Web Application Firewall policy.

id String

Resource ID.

location String

Resource location.

name String

Resource name.

provisioningState String

Provisioning state of the WebApplicationFirewallPolicy.

resourceState String
sku Property Map

The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.

systemData Property Map

Read only system data

type String

Resource type.

customRules Property Map

Describes custom rules inside the policy.

etag String

Gets a unique read-only string that changes whenever the resource is updated.

managedRules Property Map

Describes managed rules inside the policy.

policySettings Property Map

Describes policySettings for policy

rateLimitRules Property Map

Describes rate limit rules inside the policy.

tags Map

Resource tags.

Supporting Types

CdnEndpointResponse

Id string

ARM Resource ID string.

Id string

ARM Resource ID string.

id String

ARM Resource ID string.

id string

ARM Resource ID string.

id str

ARM Resource ID string.

id String

ARM Resource ID string.

CustomRuleListResponse

rules List

List of rules

CustomRuleResponse

Action string

Describes what action to be applied when rule matches

MatchConditions List<Pulumi.AzureNative.Cdn.Inputs.MatchConditionResponse>

List of match conditions.

Name string

Defines the name of the custom rule

Priority int

Defines in what order this rule be evaluated in the overall list of custom rules

EnabledState string

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

Action string

Describes what action to be applied when rule matches

MatchConditions []MatchConditionResponse

List of match conditions.

Name string

Defines the name of the custom rule

Priority int

Defines in what order this rule be evaluated in the overall list of custom rules

EnabledState string

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action String

Describes what action to be applied when rule matches

matchConditions ListConditionResponse>

List of match conditions.

name String

Defines the name of the custom rule

priority Integer

Defines in what order this rule be evaluated in the overall list of custom rules

enabledState String

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action string

Describes what action to be applied when rule matches

matchConditions MatchConditionResponse[]

List of match conditions.

name string

Defines the name of the custom rule

priority number

Defines in what order this rule be evaluated in the overall list of custom rules

enabledState string

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action str

Describes what action to be applied when rule matches

match_conditions Sequence[MatchConditionResponse]

List of match conditions.

name str

Defines the name of the custom rule

priority int

Defines in what order this rule be evaluated in the overall list of custom rules

enabled_state str

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action String

Describes what action to be applied when rule matches

matchConditions List

List of match conditions.

name String

Defines the name of the custom rule

priority Number

Defines in what order this rule be evaluated in the overall list of custom rules

enabledState String

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

ManagedRuleGroupOverrideResponse

RuleGroupName string

Describes the managed rule group within the rule set to override

Rules List<Pulumi.AzureNative.Cdn.Inputs.ManagedRuleOverrideResponse>

List of rules that will be disabled. If none specified, all rules in the group will be disabled.

RuleGroupName string

Describes the managed rule group within the rule set to override

Rules []ManagedRuleOverrideResponse

List of rules that will be disabled. If none specified, all rules in the group will be disabled.

ruleGroupName String

Describes the managed rule group within the rule set to override

rules ListRuleOverrideResponse>

List of rules that will be disabled. If none specified, all rules in the group will be disabled.

ruleGroupName string

Describes the managed rule group within the rule set to override

rules ManagedRuleOverrideResponse[]

List of rules that will be disabled. If none specified, all rules in the group will be disabled.

rule_group_name str

Describes the managed rule group within the rule set to override

rules Sequence[ManagedRuleOverrideResponse]

List of rules that will be disabled. If none specified, all rules in the group will be disabled.

ruleGroupName String

Describes the managed rule group within the rule set to override

rules List

List of rules that will be disabled. If none specified, all rules in the group will be disabled.

ManagedRuleOverrideResponse

RuleId string

Identifier for the managed rule.

Action string

Describes the override action to be applied when rule matches.

EnabledState string

Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

RuleId string

Identifier for the managed rule.

Action string

Describes the override action to be applied when rule matches.

EnabledState string

Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

ruleId String

Identifier for the managed rule.

action String

Describes the override action to be applied when rule matches.

enabledState String

Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

ruleId string

Identifier for the managed rule.

action string

Describes the override action to be applied when rule matches.

enabledState string

Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

rule_id str

Identifier for the managed rule.

action str

Describes the override action to be applied when rule matches.

enabled_state str

Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

ruleId String

Identifier for the managed rule.

action String

Describes the override action to be applied when rule matches.

enabledState String

Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

ManagedRuleSetListResponse

managedRuleSets List

List of rule sets.

ManagedRuleSetResponse

RuleSetType string

Defines the rule set type to use.

RuleSetVersion string

Defines the version of the rule set to use.

AnomalyScore int

Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.

RuleGroupOverrides List<Pulumi.AzureNative.Cdn.Inputs.ManagedRuleGroupOverrideResponse>

Defines the rule overrides to apply to the rule set.

RuleSetType string

Defines the rule set type to use.

RuleSetVersion string

Defines the version of the rule set to use.

AnomalyScore int

Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.

RuleGroupOverrides []ManagedRuleGroupOverrideResponse

Defines the rule overrides to apply to the rule set.

ruleSetType String

Defines the rule set type to use.

ruleSetVersion String

Defines the version of the rule set to use.

anomalyScore Integer

Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.

ruleGroupOverrides ListRuleGroupOverrideResponse>

Defines the rule overrides to apply to the rule set.

ruleSetType string

Defines the rule set type to use.

ruleSetVersion string

Defines the version of the rule set to use.

anomalyScore number

Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.

ruleGroupOverrides ManagedRuleGroupOverrideResponse[]

Defines the rule overrides to apply to the rule set.

rule_set_type str

Defines the rule set type to use.

rule_set_version str

Defines the version of the rule set to use.

anomaly_score int

Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.

rule_group_overrides Sequence[ManagedRuleGroupOverrideResponse]

Defines the rule overrides to apply to the rule set.

ruleSetType String

Defines the rule set type to use.

ruleSetVersion String

Defines the version of the rule set to use.

anomalyScore Number

Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.

ruleGroupOverrides List

Defines the rule overrides to apply to the rule set.

MatchConditionResponse

MatchValue List<string>

List of possible match values.

MatchVariable string

Match variable to compare against.

Operator string

Describes operator to be matched

NegateCondition bool

Describes if the result of this condition should be negated.

Selector string

Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.

Transforms List<string>

List of transforms.

MatchValue []string

List of possible match values.

MatchVariable string

Match variable to compare against.

Operator string

Describes operator to be matched

NegateCondition bool

Describes if the result of this condition should be negated.

Selector string

Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.

Transforms []string

List of transforms.

matchValue List

List of possible match values.

matchVariable String

Match variable to compare against.

operator String

Describes operator to be matched

negateCondition Boolean

Describes if the result of this condition should be negated.

selector String

Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.

transforms List

List of transforms.

matchValue string[]

List of possible match values.

matchVariable string

Match variable to compare against.

operator string

Describes operator to be matched

negateCondition boolean

Describes if the result of this condition should be negated.

selector string

Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.

transforms string[]

List of transforms.

match_value Sequence[str]

List of possible match values.

match_variable str

Match variable to compare against.

operator str

Describes operator to be matched

negate_condition bool

Describes if the result of this condition should be negated.

selector str

Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.

transforms Sequence[str]

List of transforms.

matchValue List

List of possible match values.

matchVariable String

Match variable to compare against.

operator String

Describes operator to be matched

negateCondition Boolean

Describes if the result of this condition should be negated.

selector String

Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.

transforms List

List of transforms.

PolicySettingsResponse

DefaultCustomBlockResponseBody string

If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

DefaultCustomBlockResponseStatusCode int

If the action type is block, this field defines the default customer overridable http response status code.

DefaultRedirectUrl string

If action type is redirect, this field represents the default redirect URL for the client.

EnabledState string

describes if the policy is in enabled state or disabled state

Mode string

Describes if it is in detection mode or prevention mode at policy level.

DefaultCustomBlockResponseBody string

If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

DefaultCustomBlockResponseStatusCode int

If the action type is block, this field defines the default customer overridable http response status code.

DefaultRedirectUrl string

If action type is redirect, this field represents the default redirect URL for the client.

EnabledState string

describes if the policy is in enabled state or disabled state

Mode string

Describes if it is in detection mode or prevention mode at policy level.

defaultCustomBlockResponseBody String

If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

defaultCustomBlockResponseStatusCode Integer

If the action type is block, this field defines the default customer overridable http response status code.

defaultRedirectUrl String

If action type is redirect, this field represents the default redirect URL for the client.

enabledState String

describes if the policy is in enabled state or disabled state

mode String

Describes if it is in detection mode or prevention mode at policy level.

defaultCustomBlockResponseBody string

If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

defaultCustomBlockResponseStatusCode number

If the action type is block, this field defines the default customer overridable http response status code.

defaultRedirectUrl string

If action type is redirect, this field represents the default redirect URL for the client.

enabledState string

describes if the policy is in enabled state or disabled state

mode string

Describes if it is in detection mode or prevention mode at policy level.

default_custom_block_response_body str

If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

default_custom_block_response_status_code int

If the action type is block, this field defines the default customer overridable http response status code.

default_redirect_url str

If action type is redirect, this field represents the default redirect URL for the client.

enabled_state str

describes if the policy is in enabled state or disabled state

mode str

Describes if it is in detection mode or prevention mode at policy level.

defaultCustomBlockResponseBody String

If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

defaultCustomBlockResponseStatusCode Number

If the action type is block, this field defines the default customer overridable http response status code.

defaultRedirectUrl String

If action type is redirect, this field represents the default redirect URL for the client.

enabledState String

describes if the policy is in enabled state or disabled state

mode String

Describes if it is in detection mode or prevention mode at policy level.

RateLimitRuleListResponse

rules List

List of rules

RateLimitRuleResponse

Action string

Describes what action to be applied when rule matches

MatchConditions List<Pulumi.AzureNative.Cdn.Inputs.MatchConditionResponse>

List of match conditions.

Name string

Defines the name of the custom rule

Priority int

Defines in what order this rule be evaluated in the overall list of custom rules

RateLimitDurationInMinutes int

Defines rate limit duration. Default is 1 minute.

RateLimitThreshold int

Defines rate limit threshold.

EnabledState string

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

Action string

Describes what action to be applied when rule matches

MatchConditions []MatchConditionResponse

List of match conditions.

Name string

Defines the name of the custom rule

Priority int

Defines in what order this rule be evaluated in the overall list of custom rules

RateLimitDurationInMinutes int

Defines rate limit duration. Default is 1 minute.

RateLimitThreshold int

Defines rate limit threshold.

EnabledState string

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action String

Describes what action to be applied when rule matches

matchConditions ListConditionResponse>

List of match conditions.

name String

Defines the name of the custom rule

priority Integer

Defines in what order this rule be evaluated in the overall list of custom rules

rateLimitDurationInMinutes Integer

Defines rate limit duration. Default is 1 minute.

rateLimitThreshold Integer

Defines rate limit threshold.

enabledState String

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action string

Describes what action to be applied when rule matches

matchConditions MatchConditionResponse[]

List of match conditions.

name string

Defines the name of the custom rule

priority number

Defines in what order this rule be evaluated in the overall list of custom rules

rateLimitDurationInMinutes number

Defines rate limit duration. Default is 1 minute.

rateLimitThreshold number

Defines rate limit threshold.

enabledState string

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action str

Describes what action to be applied when rule matches

match_conditions Sequence[MatchConditionResponse]

List of match conditions.

name str

Defines the name of the custom rule

priority int

Defines in what order this rule be evaluated in the overall list of custom rules

rate_limit_duration_in_minutes int

Defines rate limit duration. Default is 1 minute.

rate_limit_threshold int

Defines rate limit threshold.

enabled_state str

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

action String

Describes what action to be applied when rule matches

matchConditions List

List of match conditions.

name String

Defines the name of the custom rule

priority Number

Defines in what order this rule be evaluated in the overall list of custom rules

rateLimitDurationInMinutes Number

Defines rate limit duration. Default is 1 minute.

rateLimitThreshold Number

Defines rate limit threshold.

enabledState String

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

SkuResponse

Name string

Name of the pricing tier.

Name string

Name of the pricing tier.

name String

Name of the pricing tier.

name string

Name of the pricing tier.

name str

Name of the pricing tier.

name String

Name of the pricing tier.

SystemDataResponse

CreatedAt string

The timestamp of resource creation (UTC)

CreatedBy string

An identifier for the identity that created the resource

CreatedByType string

The type of identity that created the resource

LastModifiedAt string

The timestamp of resource last modification (UTC)

LastModifiedBy string

An identifier for the identity that last modified the resource

LastModifiedByType string

The type of identity that last modified the resource

CreatedAt string

The timestamp of resource creation (UTC)

CreatedBy string

An identifier for the identity that created the resource

CreatedByType string

The type of identity that created the resource

LastModifiedAt string

The timestamp of resource last modification (UTC)

LastModifiedBy string

An identifier for the identity that last modified the resource

LastModifiedByType string

The type of identity that last modified the resource

createdAt String

The timestamp of resource creation (UTC)

createdBy String

An identifier for the identity that created the resource

createdByType String

The type of identity that created the resource

lastModifiedAt String

The timestamp of resource last modification (UTC)

lastModifiedBy String

An identifier for the identity that last modified the resource

lastModifiedByType String

The type of identity that last modified the resource

createdAt string

The timestamp of resource creation (UTC)

createdBy string

An identifier for the identity that created the resource

createdByType string

The type of identity that created the resource

lastModifiedAt string

The timestamp of resource last modification (UTC)

lastModifiedBy string

An identifier for the identity that last modified the resource

lastModifiedByType string

The type of identity that last modified the resource

created_at str

The timestamp of resource creation (UTC)

created_by str

An identifier for the identity that created the resource

created_by_type str

The type of identity that created the resource

last_modified_at str

The timestamp of resource last modification (UTC)

last_modified_by str

An identifier for the identity that last modified the resource

last_modified_by_type str

The type of identity that last modified the resource

createdAt String

The timestamp of resource creation (UTC)

createdBy String

An identifier for the identity that created the resource

createdByType String

The type of identity that created the resource

lastModifiedAt String

The timestamp of resource last modification (UTC)

lastModifiedBy String

An identifier for the identity that last modified the resource

lastModifiedByType String

The type of identity that last modified the resource

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0