webapplicationfirewallpolicies

package
v0.20240124.1094959 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies Documentation

The webapplicationfirewallpolicies SDK allows for interaction with the Azure Resource Manager Service frontdoor (API Version 2020-04-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies"

Client Initialization

client := webapplicationfirewallpolicies.NewWebApplicationFirewallPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: WebApplicationFirewallPoliciesClient.PoliciesCreateOrUpdate

ctx := context.TODO()
id := webapplicationfirewallpolicies.NewFrontDoorWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "frontDoorWebApplicationFirewallPolicyValue")

payload := webapplicationfirewallpolicies.WebApplicationFirewallPolicy{
	// ...
}


if err := client.PoliciesCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: WebApplicationFirewallPoliciesClient.PoliciesDelete

ctx := context.TODO()
id := webapplicationfirewallpolicies.NewFrontDoorWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "frontDoorWebApplicationFirewallPolicyValue")

if err := client.PoliciesDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: WebApplicationFirewallPoliciesClient.PoliciesGet

ctx := context.TODO()
id := webapplicationfirewallpolicies.NewFrontDoorWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "frontDoorWebApplicationFirewallPolicyValue")

read, err := client.PoliciesGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: WebApplicationFirewallPoliciesClient.PoliciesList

ctx := context.TODO()
id := webapplicationfirewallpolicies.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.PoliciesList(ctx, id)` can be used to do batched pagination
items, err := client.PoliciesListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForActionType

func PossibleValuesForActionType() []string

func PossibleValuesForCustomRuleEnabledState

func PossibleValuesForCustomRuleEnabledState() []string

func PossibleValuesForManagedRuleEnabledState

func PossibleValuesForManagedRuleEnabledState() []string

func PossibleValuesForManagedRuleExclusionMatchVariable

func PossibleValuesForManagedRuleExclusionMatchVariable() []string

func PossibleValuesForManagedRuleExclusionSelectorMatchOperator

func PossibleValuesForManagedRuleExclusionSelectorMatchOperator() []string

func PossibleValuesForMatchVariable

func PossibleValuesForMatchVariable() []string

func PossibleValuesForOperator

func PossibleValuesForOperator() []string

func PossibleValuesForPolicyEnabledState

func PossibleValuesForPolicyEnabledState() []string

func PossibleValuesForPolicyMode

func PossibleValuesForPolicyMode() []string

func PossibleValuesForPolicyResourceState

func PossibleValuesForPolicyResourceState() []string

func PossibleValuesForRuleType

func PossibleValuesForRuleType() []string

func PossibleValuesForTransformType

func PossibleValuesForTransformType() []string

func ValidateFrontDoorWebApplicationFirewallPolicyID added in v0.20220907.1111434

func ValidateFrontDoorWebApplicationFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error)

ValidateFrontDoorWebApplicationFirewallPolicyID checks that 'input' can be parsed as a Front Door Web Application Firewall Policy ID

Types

type ActionType

type ActionType string
const (
	ActionTypeAllow    ActionType = "Allow"
	ActionTypeBlock    ActionType = "Block"
	ActionTypeLog      ActionType = "Log"
	ActionTypeRedirect ActionType = "Redirect"
)

type CustomRule

type CustomRule struct {
	Action                     ActionType              `json:"action"`
	EnabledState               *CustomRuleEnabledState `json:"enabledState,omitempty"`
	MatchConditions            []MatchCondition        `json:"matchConditions"`
	Name                       *string                 `json:"name,omitempty"`
	Priority                   int64                   `json:"priority"`
	RateLimitDurationInMinutes *int64                  `json:"rateLimitDurationInMinutes,omitempty"`
	RateLimitThreshold         *int64                  `json:"rateLimitThreshold,omitempty"`
	RuleType                   RuleType                `json:"ruleType"`
}

type CustomRuleEnabledState

type CustomRuleEnabledState string
const (
	CustomRuleEnabledStateDisabled CustomRuleEnabledState = "Disabled"
	CustomRuleEnabledStateEnabled  CustomRuleEnabledState = "Enabled"
)

type CustomRuleList

type CustomRuleList struct {
	Rules *[]CustomRule `json:"rules,omitempty"`
}

type FrontDoorWebApplicationFirewallPolicyId added in v0.20220907.1111434

type FrontDoorWebApplicationFirewallPolicyId struct {
	SubscriptionId                            string
	ResourceGroupName                         string
	FrontDoorWebApplicationFirewallPolicyName string
}

FrontDoorWebApplicationFirewallPolicyId is a struct representing the Resource ID for a Front Door Web Application Firewall Policy

func NewFrontDoorWebApplicationFirewallPolicyID added in v0.20220907.1111434

func NewFrontDoorWebApplicationFirewallPolicyID(subscriptionId string, resourceGroupName string, frontDoorWebApplicationFirewallPolicyName string) FrontDoorWebApplicationFirewallPolicyId

NewFrontDoorWebApplicationFirewallPolicyID returns a new FrontDoorWebApplicationFirewallPolicyId struct

func ParseFrontDoorWebApplicationFirewallPolicyID added in v0.20220907.1111434

func ParseFrontDoorWebApplicationFirewallPolicyID(input string) (*FrontDoorWebApplicationFirewallPolicyId, error)

ParseFrontDoorWebApplicationFirewallPolicyID parses 'input' into a FrontDoorWebApplicationFirewallPolicyId

func ParseFrontDoorWebApplicationFirewallPolicyIDInsensitively added in v0.20220907.1111434

func ParseFrontDoorWebApplicationFirewallPolicyIDInsensitively(input string) (*FrontDoorWebApplicationFirewallPolicyId, error)

ParseFrontDoorWebApplicationFirewallPolicyIDInsensitively parses 'input' case-insensitively into a FrontDoorWebApplicationFirewallPolicyId note: this method should only be used for API response data and not user input

func (*FrontDoorWebApplicationFirewallPolicyId) FromParseResult added in v0.20231127.1171502

func (FrontDoorWebApplicationFirewallPolicyId) ID added in v0.20220907.1111434

ID returns the formatted Front Door Web Application Firewall Policy ID

func (FrontDoorWebApplicationFirewallPolicyId) Segments added in v0.20220907.1111434

Segments returns a slice of Resource ID Segments which comprise this Front Door Web Application Firewall Policy ID

func (FrontDoorWebApplicationFirewallPolicyId) String added in v0.20220907.1111434

String returns a human-readable description of this Front Door Web Application Firewall Policy ID

type FrontendEndpointLink struct {
	Id *string `json:"id,omitempty"`
}

type ManagedRuleEnabledState

type ManagedRuleEnabledState string
const (
	ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled"
	ManagedRuleEnabledStateEnabled  ManagedRuleEnabledState = "Enabled"
)

type ManagedRuleExclusion

type ManagedRuleExclusion struct {
	MatchVariable         ManagedRuleExclusionMatchVariable         `json:"matchVariable"`
	Selector              string                                    `json:"selector"`
	SelectorMatchOperator ManagedRuleExclusionSelectorMatchOperator `json:"selectorMatchOperator"`
}

type ManagedRuleExclusionMatchVariable

type ManagedRuleExclusionMatchVariable string
const (
	ManagedRuleExclusionMatchVariableQueryStringArgNames     ManagedRuleExclusionMatchVariable = "QueryStringArgNames"
	ManagedRuleExclusionMatchVariableRequestBodyPostArgNames ManagedRuleExclusionMatchVariable = "RequestBodyPostArgNames"
	ManagedRuleExclusionMatchVariableRequestCookieNames      ManagedRuleExclusionMatchVariable = "RequestCookieNames"
	ManagedRuleExclusionMatchVariableRequestHeaderNames      ManagedRuleExclusionMatchVariable = "RequestHeaderNames"
)

type ManagedRuleExclusionSelectorMatchOperator

type ManagedRuleExclusionSelectorMatchOperator string
const (
	ManagedRuleExclusionSelectorMatchOperatorContains   ManagedRuleExclusionSelectorMatchOperator = "Contains"
	ManagedRuleExclusionSelectorMatchOperatorEndsWith   ManagedRuleExclusionSelectorMatchOperator = "EndsWith"
	ManagedRuleExclusionSelectorMatchOperatorEquals     ManagedRuleExclusionSelectorMatchOperator = "Equals"
	ManagedRuleExclusionSelectorMatchOperatorEqualsAny  ManagedRuleExclusionSelectorMatchOperator = "EqualsAny"
	ManagedRuleExclusionSelectorMatchOperatorStartsWith ManagedRuleExclusionSelectorMatchOperator = "StartsWith"
)

type ManagedRuleGroupOverride

type ManagedRuleGroupOverride struct {
	Exclusions    *[]ManagedRuleExclusion `json:"exclusions,omitempty"`
	RuleGroupName string                  `json:"ruleGroupName"`
	Rules         *[]ManagedRuleOverride  `json:"rules,omitempty"`
}

type ManagedRuleOverride

type ManagedRuleOverride struct {
	Action       *ActionType              `json:"action,omitempty"`
	EnabledState *ManagedRuleEnabledState `json:"enabledState,omitempty"`
	Exclusions   *[]ManagedRuleExclusion  `json:"exclusions,omitempty"`
	RuleId       string                   `json:"ruleId"`
}

type ManagedRuleSet

type ManagedRuleSet struct {
	Exclusions         *[]ManagedRuleExclusion     `json:"exclusions,omitempty"`
	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
	RuleSetType        string                      `json:"ruleSetType"`
	RuleSetVersion     string                      `json:"ruleSetVersion"`
}

type ManagedRuleSetList

type ManagedRuleSetList struct {
	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
}

type MatchCondition

type MatchCondition struct {
	MatchValue      []string         `json:"matchValue"`
	MatchVariable   MatchVariable    `json:"matchVariable"`
	NegateCondition *bool            `json:"negateCondition,omitempty"`
	Operator        Operator         `json:"operator"`
	Selector        *string          `json:"selector,omitempty"`
	Transforms      *[]TransformType `json:"transforms,omitempty"`
}

type MatchVariable

type MatchVariable string
const (
	MatchVariableCookies       MatchVariable = "Cookies"
	MatchVariablePostArgs      MatchVariable = "PostArgs"
	MatchVariableQueryString   MatchVariable = "QueryString"
	MatchVariableRemoteAddr    MatchVariable = "RemoteAddr"
	MatchVariableRequestBody   MatchVariable = "RequestBody"
	MatchVariableRequestHeader MatchVariable = "RequestHeader"
	MatchVariableRequestMethod MatchVariable = "RequestMethod"
	MatchVariableRequestUri    MatchVariable = "RequestUri"
	MatchVariableSocketAddr    MatchVariable = "SocketAddr"
)

type Operator

type Operator string
const (
	OperatorAny                Operator = "Any"
	OperatorBeginsWith         Operator = "BeginsWith"
	OperatorContains           Operator = "Contains"
	OperatorEndsWith           Operator = "EndsWith"
	OperatorEqual              Operator = "Equal"
	OperatorGeoMatch           Operator = "GeoMatch"
	OperatorGreaterThan        Operator = "GreaterThan"
	OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual"
	OperatorIPMatch            Operator = "IPMatch"
	OperatorLessThan           Operator = "LessThan"
	OperatorLessThanOrEqual    Operator = "LessThanOrEqual"
	OperatorRegEx              Operator = "RegEx"
)

type PoliciesCreateOrUpdateOperationResponse

type PoliciesCreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
	Model        *WebApplicationFirewallPolicy
}

type PoliciesDeleteOperationResponse

type PoliciesDeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type PoliciesGetOperationResponse

type PoliciesGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *WebApplicationFirewallPolicy
}

type PoliciesListCompleteResult

type PoliciesListCompleteResult struct {
	Items []WebApplicationFirewallPolicy
}

type PoliciesListOperationResponse

type PoliciesListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]WebApplicationFirewallPolicy
	// contains filtered or unexported fields
}

func (PoliciesListOperationResponse) HasMore

func (r PoliciesListOperationResponse) HasMore() bool

func (PoliciesListOperationResponse) LoadMore

type PolicyEnabledState

type PolicyEnabledState string
const (
	PolicyEnabledStateDisabled PolicyEnabledState = "Disabled"
	PolicyEnabledStateEnabled  PolicyEnabledState = "Enabled"
)

type PolicyMode

type PolicyMode string
const (
	PolicyModeDetection  PolicyMode = "Detection"
	PolicyModePrevention PolicyMode = "Prevention"
)

type PolicyResourceState

type PolicyResourceState string
const (
	PolicyResourceStateCreating  PolicyResourceState = "Creating"
	PolicyResourceStateDeleting  PolicyResourceState = "Deleting"
	PolicyResourceStateDisabled  PolicyResourceState = "Disabled"
	PolicyResourceStateDisabling PolicyResourceState = "Disabling"
	PolicyResourceStateEnabled   PolicyResourceState = "Enabled"
	PolicyResourceStateEnabling  PolicyResourceState = "Enabling"
)

type PolicySettings

type PolicySettings struct {
	CustomBlockResponseBody       *string             `json:"customBlockResponseBody,omitempty"`
	CustomBlockResponseStatusCode *int64              `json:"customBlockResponseStatusCode,omitempty"`
	EnabledState                  *PolicyEnabledState `json:"enabledState,omitempty"`
	Mode                          *PolicyMode         `json:"mode,omitempty"`
	RedirectUrl                   *string             `json:"redirectUrl,omitempty"`
}
type RoutingRuleLink struct {
	Id *string `json:"id,omitempty"`
}

type RuleType

type RuleType string
const (
	RuleTypeMatchRule     RuleType = "MatchRule"
	RuleTypeRateLimitRule RuleType = "RateLimitRule"
)

type TransformType

type TransformType string
const (
	TransformTypeLowercase   TransformType = "Lowercase"
	TransformTypeRemoveNulls TransformType = "RemoveNulls"
	TransformTypeTrim        TransformType = "Trim"
	TransformTypeUppercase   TransformType = "Uppercase"
	TransformTypeUrlDecode   TransformType = "UrlDecode"
	TransformTypeUrlEncode   TransformType = "UrlEncode"
)

type WebApplicationFirewallPoliciesClient

type WebApplicationFirewallPoliciesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewWebApplicationFirewallPoliciesClientWithBaseURI

func NewWebApplicationFirewallPoliciesClientWithBaseURI(endpoint string) WebApplicationFirewallPoliciesClient

func (WebApplicationFirewallPoliciesClient) PoliciesCreateOrUpdate

PoliciesCreateOrUpdate ...

func (WebApplicationFirewallPoliciesClient) PoliciesCreateOrUpdateThenPoll

PoliciesCreateOrUpdateThenPoll performs PoliciesCreateOrUpdate then polls until it's completed

func (WebApplicationFirewallPoliciesClient) PoliciesDelete

PoliciesDelete ...

func (WebApplicationFirewallPoliciesClient) PoliciesDeleteThenPoll

PoliciesDeleteThenPoll performs PoliciesDelete then polls until it's completed

func (WebApplicationFirewallPoliciesClient) PoliciesGet

PoliciesGet ...

func (WebApplicationFirewallPoliciesClient) PoliciesList

PoliciesList ...

func (WebApplicationFirewallPoliciesClient) PoliciesListComplete

PoliciesListComplete retrieves all of the results into a single object

func (WebApplicationFirewallPoliciesClient) PoliciesListCompleteMatchingPredicate

PoliciesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type WebApplicationFirewallPolicy

type WebApplicationFirewallPolicy struct {
	Etag       *string                                 `json:"etag,omitempty"`
	Id         *string                                 `json:"id,omitempty"`
	Location   *string                                 `json:"location,omitempty"`
	Name       *string                                 `json:"name,omitempty"`
	Properties *WebApplicationFirewallPolicyProperties `json:"properties,omitempty"`
	Tags       *map[string]string                      `json:"tags,omitempty"`
	Type       *string                                 `json:"type,omitempty"`
}

type WebApplicationFirewallPolicyOperationPredicate

type WebApplicationFirewallPolicyOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (WebApplicationFirewallPolicyOperationPredicate) Matches

type WebApplicationFirewallPolicyProperties

type WebApplicationFirewallPolicyProperties struct {
	CustomRules           *CustomRuleList         `json:"customRules,omitempty"`
	FrontendEndpointLinks *[]FrontendEndpointLink `json:"frontendEndpointLinks,omitempty"`
	ManagedRules          *ManagedRuleSetList     `json:"managedRules,omitempty"`
	PolicySettings        *PolicySettings         `json:"policySettings,omitempty"`
	ProvisioningState     *string                 `json:"provisioningState,omitempty"`
	ResourceState         *PolicyResourceState    `json:"resourceState,omitempty"`
	RoutingRuleLinks      *[]RoutingRuleLink      `json:"routingRuleLinks,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL