armfrontdoor

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 14 Imported by: 6

README

Azure Front Door Module for Go

PkgGoDev

The armfrontdoor module provides operations for working with Azure Front Door.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Front Door module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Front Door. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Front Door module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armfrontdoor.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armfrontdoor.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewEndpointsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Front Door label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType - Defines the action to take on rule match.

const (
	ActionTypeAllow          ActionType = "Allow"
	ActionTypeAnomalyScoring ActionType = "AnomalyScoring"
	ActionTypeBlock          ActionType = "Block"
	ActionTypeJSChallenge    ActionType = "JSChallenge"
	ActionTypeLog            ActionType = "Log"
	ActionTypeRedirect       ActionType = "Redirect"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AggregationInterval

type AggregationInterval string

AggregationInterval - The aggregation interval of the Timeseries

const (
	AggregationIntervalDaily  AggregationInterval = "Daily"
	AggregationIntervalHourly AggregationInterval = "Hourly"
)

func PossibleAggregationIntervalValues

func PossibleAggregationIntervalValues() []AggregationInterval

PossibleAggregationIntervalValues returns the possible values for the AggregationInterval const type.

type Availability

type Availability string

Availability - Indicates whether the name is available.

const (
	AvailabilityAvailable   Availability = "Available"
	AvailabilityUnavailable Availability = "Unavailable"
)

func PossibleAvailabilityValues

func PossibleAvailabilityValues() []Availability

PossibleAvailabilityValues returns the possible values for the Availability const type.

type AzureAsyncOperationResult

type AzureAsyncOperationResult struct {
	Error *Error

	// Status of the Azure async operation.
	Status *NetworkOperationStatus
}

AzureAsyncOperationResult - The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure.

func (AzureAsyncOperationResult) MarshalJSON added in v1.1.0

func (a AzureAsyncOperationResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureAsyncOperationResult.

func (*AzureAsyncOperationResult) UnmarshalJSON added in v1.1.0

func (a *AzureAsyncOperationResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureAsyncOperationResult.

type Backend

type Backend struct {
	// Location of the backend (IP address or FQDN)
	Address *string

	// The value to use as the host header sent to the backend. If blank or unspecified, this defaults to the incoming host.
	BackendHostHeader *string

	// Whether to enable use of this backend. Permitted values are 'Enabled' or 'Disabled'
	EnabledState *BackendEnabledState

	// The HTTP TCP port number. Must be between 1 and 65535.
	HTTPPort *int32

	// The HTTPS TCP port number. Must be between 1 and 65535.
	HTTPSPort *int32

	// Priority to use for load balancing. Higher priorities will not be used for load balancing if any lower priority backend
	// is healthy.
	Priority *int32

	// The Alias of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
	PrivateLinkAlias *string

	// A custom message to be included in the approval request to connect to the Private Link
	PrivateLinkApprovalMessage *string

	// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
	PrivateLinkLocation *string

	// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
	PrivateLinkResourceID *string

	// Weight of this endpoint for load balancing purposes.
	Weight *int32

	// READ-ONLY; The Approval status for the connection to the Private Link
	PrivateEndpointStatus *PrivateEndpointStatus
}

Backend address of a frontDoor load balancer.

func (Backend) MarshalJSON added in v1.1.0

func (b Backend) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Backend.

func (*Backend) UnmarshalJSON added in v1.1.0

func (b *Backend) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Backend.

type BackendEnabledState

type BackendEnabledState string

BackendEnabledState - Whether to enable use of this backend. Permitted values are 'Enabled' or 'Disabled'

const (
	BackendEnabledStateDisabled BackendEnabledState = "Disabled"
	BackendEnabledStateEnabled  BackendEnabledState = "Enabled"
)

func PossibleBackendEnabledStateValues

func PossibleBackendEnabledStateValues() []BackendEnabledState

PossibleBackendEnabledStateValues returns the possible values for the BackendEnabledState const type.

type BackendPool

type BackendPool struct {
	// Resource ID.
	ID *string

	// Resource name.
	Name *string

	// Properties of the Front Door Backend Pool
	Properties *BackendPoolProperties

	// READ-ONLY; Resource type.
	Type *string
}

BackendPool - A backend pool is a collection of backends that can be routed to.

func (BackendPool) MarshalJSON added in v1.1.0

func (b BackendPool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackendPool.

func (*BackendPool) UnmarshalJSON added in v1.1.0

func (b *BackendPool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackendPool.

type BackendPoolListResult

type BackendPoolListResult struct {
	// URL to get the next set of BackendPool objects if there are any.
	NextLink *string

	// READ-ONLY; List of Backend Pools within a Front Door.
	Value []*BackendPool
}

BackendPoolListResult - Result of the request to list Backend Pools. It contains a list of Backend Pools objects and a URL link to get the next set of results.

func (BackendPoolListResult) MarshalJSON

func (b BackendPoolListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackendPoolListResult.

func (*BackendPoolListResult) UnmarshalJSON added in v1.1.0

func (b *BackendPoolListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackendPoolListResult.

type BackendPoolProperties

type BackendPoolProperties struct {
	// The set of backends for this pool
	Backends []*Backend

	// L7 health probe settings for a backend pool
	HealthProbeSettings *SubResource

	// Load balancing settings for a backend pool
	LoadBalancingSettings *SubResource

	// READ-ONLY; Resource status.
	ResourceState *FrontDoorResourceState
}

BackendPoolProperties - The JSON object that contains the properties required to create a Backend Pool.

func (BackendPoolProperties) MarshalJSON

func (b BackendPoolProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackendPoolProperties.

func (*BackendPoolProperties) UnmarshalJSON added in v1.1.0

func (b *BackendPoolProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackendPoolProperties.

type BackendPoolUpdateParameters

type BackendPoolUpdateParameters struct {
	// The set of backends for this pool
	Backends []*Backend

	// L7 health probe settings for a backend pool
	HealthProbeSettings *SubResource

	// Load balancing settings for a backend pool
	LoadBalancingSettings *SubResource
}

BackendPoolUpdateParameters - A collection of backends that can be routed to.

func (BackendPoolUpdateParameters) MarshalJSON

func (b BackendPoolUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackendPoolUpdateParameters.

func (*BackendPoolUpdateParameters) UnmarshalJSON added in v1.1.0

func (b *BackendPoolUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackendPoolUpdateParameters.

type BackendPoolsSettings

type BackendPoolsSettings struct {
	// Whether to enforce certificate name check on HTTPS requests to all backend pools. No effect on non-HTTPS requests.
	EnforceCertificateNameCheck *EnforceCertificateNameCheckEnabledState

	// Send and receive timeout on forwarding request to the backend. When timeout is reached, the request fails and returns.
	SendRecvTimeoutSeconds *int32
}

BackendPoolsSettings - Settings that apply to all backend pools.

func (BackendPoolsSettings) MarshalJSON added in v1.1.0

func (b BackendPoolsSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackendPoolsSettings.

func (*BackendPoolsSettings) UnmarshalJSON added in v1.1.0

func (b *BackendPoolsSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackendPoolsSettings.

type CacheConfiguration

type CacheConfiguration struct {
	// The duration for which the content needs to be cached. Allowed format is in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).
	// HTTP requires the value to be no more than a year
	CacheDuration *string

	// Whether to use dynamic compression for cached content
	DynamicCompression *DynamicCompressionEnabled

	// Treatment of URL query terms when forming the cache key.
	QueryParameterStripDirective *FrontDoorQuery

	// query parameters to include or exclude (comma separated).
	QueryParameters *string
}

CacheConfiguration - Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.

func (CacheConfiguration) MarshalJSON added in v1.1.0

func (c CacheConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheConfiguration.

func (*CacheConfiguration) UnmarshalJSON added in v1.1.0

func (c *CacheConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheConfiguration.

type CertificateSourceParameters added in v0.2.0

type CertificateSourceParameters struct {
	// Defines the type of the certificate used for secure connections to a frontendEndpoint
	CertificateType *FrontDoorCertificateType
}

CertificateSourceParameters - Parameters required for enabling SSL with Front Door-managed certificates

func (CertificateSourceParameters) MarshalJSON added in v1.1.0

func (c CertificateSourceParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CertificateSourceParameters.

func (*CertificateSourceParameters) UnmarshalJSON added in v1.1.0

func (c *CertificateSourceParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateSourceParameters.

type CheckNameAvailabilityInput

type CheckNameAvailabilityInput struct {
	// REQUIRED; The resource name to validate.
	Name *string

	// REQUIRED; The type of the resource whose name is to be validated.
	Type *ResourceType
}

CheckNameAvailabilityInput - Input of CheckNameAvailability API.

func (CheckNameAvailabilityInput) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityInput.

func (*CheckNameAvailabilityInput) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityInput.

type CheckNameAvailabilityOutput

type CheckNameAvailabilityOutput struct {
	// READ-ONLY; The detailed error message describing why the name is not available.
	Message *string

	// READ-ONLY; Indicates whether the name is available.
	NameAvailability *Availability

	// READ-ONLY; The reason why the name is not available.
	Reason *string
}

CheckNameAvailabilityOutput - Output of check name availability API.

func (CheckNameAvailabilityOutput) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityOutput.

func (*CheckNameAvailabilityOutput) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityOutput.

type ClientFactory added in v1.1.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewEndpointsClient added in v1.1.0

func (c *ClientFactory) NewEndpointsClient() *EndpointsClient

NewEndpointsClient creates a new instance of EndpointsClient.

func (*ClientFactory) NewExperimentsClient added in v1.1.0

func (c *ClientFactory) NewExperimentsClient() *ExperimentsClient

NewExperimentsClient creates a new instance of ExperimentsClient.

func (*ClientFactory) NewFrontDoorsClient added in v1.1.0

func (c *ClientFactory) NewFrontDoorsClient() *FrontDoorsClient

NewFrontDoorsClient creates a new instance of FrontDoorsClient.

func (*ClientFactory) NewFrontendEndpointsClient added in v1.1.0

func (c *ClientFactory) NewFrontendEndpointsClient() *FrontendEndpointsClient

NewFrontendEndpointsClient creates a new instance of FrontendEndpointsClient.

func (*ClientFactory) NewManagedRuleSetsClient added in v1.1.0

func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient

NewManagedRuleSetsClient creates a new instance of ManagedRuleSetsClient.

func (*ClientFactory) NewNameAvailabilityClient added in v1.1.0

func (c *ClientFactory) NewNameAvailabilityClient() *NameAvailabilityClient

NewNameAvailabilityClient creates a new instance of NameAvailabilityClient.

func (*ClientFactory) NewNameAvailabilityWithSubscriptionClient added in v1.1.0

func (c *ClientFactory) NewNameAvailabilityWithSubscriptionClient() *NameAvailabilityWithSubscriptionClient

NewNameAvailabilityWithSubscriptionClient creates a new instance of NameAvailabilityWithSubscriptionClient.

func (*ClientFactory) NewNetworkExperimentProfilesClient added in v1.1.0

func (c *ClientFactory) NewNetworkExperimentProfilesClient() *NetworkExperimentProfilesClient

NewNetworkExperimentProfilesClient creates a new instance of NetworkExperimentProfilesClient.

func (*ClientFactory) NewPoliciesClient added in v1.1.0

func (c *ClientFactory) NewPoliciesClient() *PoliciesClient

NewPoliciesClient creates a new instance of PoliciesClient.

func (*ClientFactory) NewPreconfiguredEndpointsClient added in v1.1.0

func (c *ClientFactory) NewPreconfiguredEndpointsClient() *PreconfiguredEndpointsClient

NewPreconfiguredEndpointsClient creates a new instance of PreconfiguredEndpointsClient.

func (*ClientFactory) NewReportsClient added in v1.1.0

func (c *ClientFactory) NewReportsClient() *ReportsClient

NewReportsClient creates a new instance of ReportsClient.

func (*ClientFactory) NewRulesEnginesClient added in v1.1.0

func (c *ClientFactory) NewRulesEnginesClient() *RulesEnginesClient

NewRulesEnginesClient creates a new instance of RulesEnginesClient.

type CustomHTTPSConfiguration

type CustomHTTPSConfiguration struct {
	// REQUIRED; Defines the source of the SSL certificate
	CertificateSource *FrontDoorCertificateSource

	// REQUIRED; The minimum TLS version required from the clients to establish an SSL handshake with Front Door.
	MinimumTLSVersion *MinimumTLSVersion

	// REQUIRED; Defines the TLS extension protocol that is used for secure delivery
	ProtocolType *FrontDoorTLSProtocolType

	// Parameters required for enabling SSL with Front Door-managed certificates (if certificateSource=FrontDoor)
	FrontDoorCertificateSourceParameters *CertificateSourceParameters

	// KeyVault certificate source parameters (if certificateSource=AzureKeyVault)
	KeyVaultCertificateSourceParameters *KeyVaultCertificateSourceParameters
}

CustomHTTPSConfiguration - Https settings for a domain

func (CustomHTTPSConfiguration) MarshalJSON added in v1.1.0

func (c CustomHTTPSConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomHTTPSConfiguration.

func (*CustomHTTPSConfiguration) UnmarshalJSON added in v1.1.0

func (c *CustomHTTPSConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomHTTPSConfiguration.

type CustomHTTPSProvisioningState

type CustomHTTPSProvisioningState string

CustomHTTPSProvisioningState - Provisioning status of Custom Https of the frontendEndpoint.

const (
	CustomHTTPSProvisioningStateDisabled  CustomHTTPSProvisioningState = "Disabled"
	CustomHTTPSProvisioningStateDisabling CustomHTTPSProvisioningState = "Disabling"
	CustomHTTPSProvisioningStateEnabled   CustomHTTPSProvisioningState = "Enabled"
	CustomHTTPSProvisioningStateEnabling  CustomHTTPSProvisioningState = "Enabling"
	CustomHTTPSProvisioningStateFailed    CustomHTTPSProvisioningState = "Failed"
)

func PossibleCustomHTTPSProvisioningStateValues

func PossibleCustomHTTPSProvisioningStateValues() []CustomHTTPSProvisioningState

PossibleCustomHTTPSProvisioningStateValues returns the possible values for the CustomHTTPSProvisioningState const type.

type CustomHTTPSProvisioningSubstate

type CustomHTTPSProvisioningSubstate string

CustomHTTPSProvisioningSubstate - Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step.

const (
	CustomHTTPSProvisioningSubstateCertificateDeleted                            CustomHTTPSProvisioningSubstate = "CertificateDeleted"
	CustomHTTPSProvisioningSubstateCertificateDeployed                           CustomHTTPSProvisioningSubstate = "CertificateDeployed"
	CustomHTTPSProvisioningSubstateDeletingCertificate                           CustomHTTPSProvisioningSubstate = "DeletingCertificate"
	CustomHTTPSProvisioningSubstateDeployingCertificate                          CustomHTTPSProvisioningSubstate = "DeployingCertificate"
	CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved        CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved"
	CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected        CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected"
	CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut        CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut"
	CustomHTTPSProvisioningSubstateIssuingCertificate                            CustomHTTPSProvisioningSubstate = "IssuingCertificate"
	CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval"
	CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest      CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest"
)

func PossibleCustomHTTPSProvisioningSubstateValues

func PossibleCustomHTTPSProvisioningSubstateValues() []CustomHTTPSProvisioningSubstate

PossibleCustomHTTPSProvisioningSubstateValues returns the possible values for the CustomHTTPSProvisioningSubstate const type.

type CustomRule

type CustomRule struct {
	// REQUIRED; Describes what action to be applied when rule matches.
	Action *ActionType

	// REQUIRED; List of match conditions.
	MatchConditions []*MatchCondition

	// REQUIRED; Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
	Priority *int32

	// REQUIRED; Describes type of rule.
	RuleType *RuleType

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

	// Describes the list of variables to group the rate limit requests
	GroupBy []*GroupByVariable

	// Describes the name of the rule.
	Name *string

	// Time window for resetting the rate limit count. Default is 1 minute.
	RateLimitDurationInMinutes *int32

	// Number of allowed requests per client within the time window.
	RateLimitThreshold *int32
}

CustomRule - Defines contents of a web application rule

func (CustomRule) MarshalJSON

func (c CustomRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomRule.

func (*CustomRule) UnmarshalJSON added in v1.1.0

func (c *CustomRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomRule.

type CustomRuleEnabledState

type CustomRuleEnabledState string

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

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

func PossibleCustomRuleEnabledStateValues

func PossibleCustomRuleEnabledStateValues() []CustomRuleEnabledState

PossibleCustomRuleEnabledStateValues returns the possible values for the CustomRuleEnabledState const type.

type CustomRuleList

type CustomRuleList struct {
	// List of rules
	Rules []*CustomRule
}

CustomRuleList - Defines contents of custom rules

func (CustomRuleList) MarshalJSON

func (c CustomRuleList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomRuleList.

func (*CustomRuleList) UnmarshalJSON added in v1.1.0

func (c *CustomRuleList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomRuleList.

type DefaultErrorResponse added in v1.2.0

type DefaultErrorResponse struct {
	// Error model.
	Error *DefaultErrorResponseError
}

DefaultErrorResponse - Error response indicates Front Door service is not able to process the incoming request. The reason is provided in the error message.

func (DefaultErrorResponse) MarshalJSON added in v1.2.0

func (d DefaultErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponse.

func (*DefaultErrorResponse) UnmarshalJSON added in v1.2.0

func (d *DefaultErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse.

type DefaultErrorResponseError added in v1.2.0

type DefaultErrorResponseError struct {
	// READ-ONLY; Error code.
	Code *string

	// READ-ONLY; Error message indicating why the operation failed.
	Message *string
}

DefaultErrorResponseError - Error model.

func (DefaultErrorResponseError) MarshalJSON added in v1.2.0

func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseError.

func (*DefaultErrorResponseError) UnmarshalJSON added in v1.2.0

func (d *DefaultErrorResponseError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseError.

type DynamicCompressionEnabled

type DynamicCompressionEnabled string

DynamicCompressionEnabled - Whether to use dynamic compression for cached content

const (
	DynamicCompressionEnabledDisabled DynamicCompressionEnabled = "Disabled"
	DynamicCompressionEnabledEnabled  DynamicCompressionEnabled = "Enabled"
)

func PossibleDynamicCompressionEnabledValues

func PossibleDynamicCompressionEnabledValues() []DynamicCompressionEnabled

PossibleDynamicCompressionEnabledValues returns the possible values for the DynamicCompressionEnabled const type.

type Endpoint

type Endpoint struct {
	// The endpoint URL
	Endpoint *string

	// The name of the endpoint
	Name *string
}

Endpoint - Defines the endpoint properties

func (Endpoint) MarshalJSON added in v1.1.0

func (e Endpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Endpoint.

func (*Endpoint) UnmarshalJSON added in v1.1.0

func (e *Endpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint.

type EndpointType

type EndpointType string

EndpointType - The type of endpoint

const (
	EndpointTypeAFD         EndpointType = "AFD"
	EndpointTypeATM         EndpointType = "ATM"
	EndpointTypeAzureRegion EndpointType = "AzureRegion"
	EndpointTypeCDN         EndpointType = "CDN"
)

func PossibleEndpointTypeValues

func PossibleEndpointTypeValues() []EndpointType

PossibleEndpointTypeValues returns the possible values for the EndpointType const type.

type EndpointsClient

type EndpointsClient struct {
	// contains filtered or unexported fields
}

EndpointsClient contains the methods for the Endpoints group. Don't use this type directly, use NewEndpointsClient() instead.

func NewEndpointsClient

func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error)

NewEndpointsClient creates a new instance of EndpointsClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*EndpointsClient) BeginPurgeContent

func (client *EndpointsClient) BeginPurgeContent(ctx context.Context, resourceGroupName string, frontDoorName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*runtime.Poller[EndpointsClientPurgeContentResponse], error)

BeginPurgeContent - Removes a content from Front Door. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • contentFilePaths - The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory.
  • options - EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorPurgeContent.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginPurgeContent(ctx, "rg1", "frontDoor1", armfrontdoor.PurgeParameters{
		ContentPaths: []*string{
			to.Ptr("/pictures.aspx"),
			to.Ptr("/pictures/*")},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

type EndpointsClientBeginPurgeContentOptions added in v0.2.0

type EndpointsClientBeginPurgeContentOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent method.

type EndpointsClientPurgeContentResponse added in v0.2.0

type EndpointsClientPurgeContentResponse struct {
}

EndpointsClientPurgeContentResponse contains the response from method EndpointsClient.BeginPurgeContent.

type EnforceCertificateNameCheckEnabledState

type EnforceCertificateNameCheckEnabledState string

EnforceCertificateNameCheckEnabledState - Whether to enforce certificate name check on HTTPS requests to all backend pools. No effect on non-HTTPS requests.

const (
	EnforceCertificateNameCheckEnabledStateDisabled EnforceCertificateNameCheckEnabledState = "Disabled"
	EnforceCertificateNameCheckEnabledStateEnabled  EnforceCertificateNameCheckEnabledState = "Enabled"
)

func PossibleEnforceCertificateNameCheckEnabledStateValues

func PossibleEnforceCertificateNameCheckEnabledStateValues() []EnforceCertificateNameCheckEnabledState

PossibleEnforceCertificateNameCheckEnabledStateValues returns the possible values for the EnforceCertificateNameCheckEnabledState const type.

type Error

type Error struct {
	Code       *string
	Details    []*ErrorDetails
	InnerError *string
	Message    *string
	Target     *string
}

func (Error) MarshalJSON

func (e Error) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Error.

func (*Error) UnmarshalJSON added in v1.1.0

func (e *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Error.

type ErrorDetails

type ErrorDetails struct {
	Code    *string
	Message *string
	Target  *string
}

func (ErrorDetails) MarshalJSON added in v1.1.0

func (e ErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetails.

func (*ErrorDetails) UnmarshalJSON added in v1.1.0

func (e *ErrorDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetails.

type ErrorResponse

type ErrorResponse struct {
	// READ-ONLY; Error code.
	Code *string

	// READ-ONLY; Error message indicating why the operation failed.
	Message *string
}

ErrorResponse - Error response indicates Front Door service is not able to process the incoming request. The reason is provided in the error message.

func (ErrorResponse) MarshalJSON added in v1.1.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type Experiment

type Experiment struct {
	// Resource location.
	Location *string

	// The properties of an Experiment
	Properties *ExperimentProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Experiment - Defines the properties of an Experiment

func (Experiment) MarshalJSON

func (e Experiment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Experiment.

func (*Experiment) UnmarshalJSON added in v1.1.0

func (e *Experiment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Experiment.

type ExperimentList

type ExperimentList struct {
	// URL to get the next set of Experiment objects if there are any.
	NextLink *string

	// READ-ONLY; List of Experiments within a resource group.
	Value []*Experiment
}

ExperimentList - Defines a list of Experiments. It contains a list of Experiment objects and a URL link to get the next set of results.

func (ExperimentList) MarshalJSON

func (e ExperimentList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExperimentList.

func (*ExperimentList) UnmarshalJSON added in v1.1.0

func (e *ExperimentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExperimentList.

type ExperimentProperties

type ExperimentProperties struct {
	// The description of the details or intents of the Experiment
	Description *string

	// The state of the Experiment
	EnabledState *State

	// The endpoint A of an experiment
	EndpointA *Endpoint

	// The endpoint B of an experiment
	EndpointB *Endpoint

	// READ-ONLY; Resource status.
	ResourceState *NetworkExperimentResourceState

	// READ-ONLY; The uri to the Script used in the Experiment
	ScriptFileURI *string

	// READ-ONLY; The description of Experiment status from the server side
	Status *string
}

ExperimentProperties - Defines the properties of an experiment

func (ExperimentProperties) MarshalJSON added in v1.1.0

func (e ExperimentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExperimentProperties.

func (*ExperimentProperties) UnmarshalJSON added in v1.1.0

func (e *ExperimentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExperimentProperties.

type ExperimentUpdateModel

type ExperimentUpdateModel struct {
	// The properties of a Profile
	Properties *ExperimentUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

ExperimentUpdateModel - Defines modifiable attributes of an Experiment

func (ExperimentUpdateModel) MarshalJSON

func (e ExperimentUpdateModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExperimentUpdateModel.

func (*ExperimentUpdateModel) UnmarshalJSON added in v1.1.0

func (e *ExperimentUpdateModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExperimentUpdateModel.

type ExperimentUpdateProperties

type ExperimentUpdateProperties struct {
	// The description of the intent or details of the Experiment
	Description *string

	// The state of the Experiment
	EnabledState *State
}

ExperimentUpdateProperties - Defines the properties of an experiment

func (ExperimentUpdateProperties) MarshalJSON added in v1.1.0

func (e ExperimentUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExperimentUpdateProperties.

func (*ExperimentUpdateProperties) UnmarshalJSON added in v1.1.0

func (e *ExperimentUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExperimentUpdateProperties.

type ExperimentsClient

type ExperimentsClient struct {
	// contains filtered or unexported fields
}

ExperimentsClient contains the methods for the Experiments group. Don't use this type directly, use NewExperimentsClient() instead.

func NewExperimentsClient

func NewExperimentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExperimentsClient, error)

NewExperimentsClient creates a new instance of ExperimentsClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ExperimentsClient) BeginCreateOrUpdate

func (client *ExperimentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters Experiment, options *ExperimentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExperimentsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates an Experiment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • experimentName - The Experiment identifier associated with the Experiment
  • parameters - The Experiment resource
  • options - ExperimentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExperimentsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentCreateExperiment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewExperimentsClient().BeginCreateOrUpdate(ctx, "MyResourceGroup", "MyProfile", "MyExperiment", armfrontdoor.Experiment{
		Properties: &armfrontdoor.ExperimentProperties{
			Description:  to.Ptr("this is my first experiment!"),
			EnabledState: to.Ptr(armfrontdoor.StateEnabled),
			EndpointA: &armfrontdoor.Endpoint{
				Name:     to.Ptr("endpoint A"),
				Endpoint: to.Ptr("endpointA.net"),
			},
			EndpointB: &armfrontdoor.Endpoint{
				Name:     to.Ptr("endpoint B"),
				Endpoint: to.Ptr("endpointB.net"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Experiment = armfrontdoor.Experiment{
	// 	Name: to.Ptr("MyExperiment"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.ExperimentProperties{
	// 		Description: to.Ptr("this is my first experiment!"),
	// 		EnabledState: to.Ptr(armfrontdoor.StateEnabled),
	// 		EndpointA: &armfrontdoor.Endpoint{
	// 			Name: to.Ptr("endpoint A"),
	// 			Endpoint: to.Ptr("endpointA.net"),
	// 		},
	// 		EndpointB: &armfrontdoor.Endpoint{
	// 			Name: to.Ptr("endpoint B"),
	// 			Endpoint: to.Ptr("endpointB.net"),
	// 		},
	// 		ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
	// 		ScriptFileURI: to.Ptr("www.myScript.com"),
	// 		Status: to.Ptr("ongoing"),
	// 	},
	// }
}
Output:

func (*ExperimentsClient) BeginDelete

func (client *ExperimentsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, experimentName string, options *ExperimentsClientBeginDeleteOptions) (*runtime.Poller[ExperimentsClientDeleteResponse], error)

BeginDelete - Deletes an Experiment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • experimentName - The Experiment identifier associated with the Experiment
  • options - ExperimentsClientBeginDeleteOptions contains the optional parameters for the ExperimentsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentDeleteExperiment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewExperimentsClient().BeginDelete(ctx, "MyResourceGroup", "MyProfile", "MyExperiment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ExperimentsClient) BeginUpdate

func (client *ExperimentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters ExperimentUpdateModel, options *ExperimentsClientBeginUpdateOptions) (*runtime.Poller[ExperimentsClientUpdateResponse], error)

BeginUpdate - Updates an Experiment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • experimentName - The Experiment identifier associated with the Experiment
  • parameters - The Experiment Update Model
  • options - ExperimentsClientBeginUpdateOptions contains the optional parameters for the ExperimentsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentUpdateExperiment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewExperimentsClient().BeginUpdate(ctx, "MyResourceGroup", "MyProfile", "MyExperiment", armfrontdoor.ExperimentUpdateModel{
		Properties: &armfrontdoor.ExperimentUpdateProperties{
			Description:  to.Ptr("string"),
			EnabledState: to.Ptr(armfrontdoor.StateEnabled),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Experiment = armfrontdoor.Experiment{
	// 	Name: to.Ptr("MyExperiment"),
	// 	Type: to.Ptr("Microsoft.Network/NetworkExperimentprofiles"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.ExperimentProperties{
	// 		Description: to.Ptr("this is my first experiment!"),
	// 		EnabledState: to.Ptr(armfrontdoor.StateEnabled),
	// 		EndpointA: &armfrontdoor.Endpoint{
	// 			Name: to.Ptr("endpoint A"),
	// 			Endpoint: to.Ptr("endpointA.net"),
	// 		},
	// 		EndpointB: &armfrontdoor.Endpoint{
	// 			Name: to.Ptr("endpoint B"),
	// 			Endpoint: to.Ptr("endpointB.net"),
	// 		},
	// 		ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
	// 		ScriptFileURI: to.Ptr("www.myScript.com"),
	// 		Status: to.Ptr("ongoing"),
	// 	},
	// }
}
Output:

func (*ExperimentsClient) Get

func (client *ExperimentsClient) Get(ctx context.Context, resourceGroupName string, profileName string, experimentName string, options *ExperimentsClientGetOptions) (ExperimentsClientGetResponse, error)

Get - Gets an Experiment by ExperimentName If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • experimentName - The Experiment identifier associated with the Experiment
  • options - ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentGetExperiment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewExperimentsClient().Get(ctx, "MyResourceGroup", "MyProfile", "MyExperiment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Experiment = armfrontdoor.Experiment{
	// 	Name: to.Ptr("MyExperiment"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.ExperimentProperties{
	// 		Description: to.Ptr("this is my first experiment!"),
	// 		EnabledState: to.Ptr(armfrontdoor.StateEnabled),
	// 		EndpointA: &armfrontdoor.Endpoint{
	// 			Name: to.Ptr("endpoint A"),
	// 			Endpoint: to.Ptr("endpointA.net"),
	// 		},
	// 		EndpointB: &armfrontdoor.Endpoint{
	// 			Name: to.Ptr("endpoint B"),
	// 			Endpoint: to.Ptr("endpointB.net"),
	// 		},
	// 		ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
	// 		ScriptFileURI: to.Ptr("www.myScript.com"),
	// 		Status: to.Ptr("ongoing"),
	// 	},
	// }
}
Output:

func (*ExperimentsClient) NewListByProfilePager added in v0.4.0

func (client *ExperimentsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *ExperimentsClientListByProfileOptions) *runtime.Pager[ExperimentsClientListByProfileResponse]

NewListByProfilePager - Gets a list of Experiments

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • options - ExperimentsClientListByProfileOptions contains the optional parameters for the ExperimentsClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentListExperiments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewExperimentsClient().NewListByProfilePager("MyResourceGroup", "MyProfile", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ExperimentList = armfrontdoor.ExperimentList{
		// 	Value: []*armfrontdoor.Experiment{
		// 		{
		// 			Name: to.Ptr("MyExperiment"),
		// 			ID: to.Ptr("/subscriptions/subId/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments"),
		// 			Properties: &armfrontdoor.ExperimentProperties{
		// 				Description: to.Ptr("this is my first experiment!"),
		// 				EnabledState: to.Ptr(armfrontdoor.StateEnabled),
		// 				EndpointA: &armfrontdoor.Endpoint{
		// 					Name: to.Ptr("endpoint A"),
		// 					Endpoint: to.Ptr("endpointA.net"),
		// 				},
		// 				EndpointB: &armfrontdoor.Endpoint{
		// 					Name: to.Ptr("endpoint B"),
		// 					Endpoint: to.Ptr("endpointB.net"),
		// 				},
		// 				ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
		// 				ScriptFileURI: to.Ptr("www.myScript.com"),
		// 				Status: to.Ptr("ongoing"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ExperimentsClientBeginCreateOrUpdateOptions added in v0.2.0

type ExperimentsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ExperimentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExperimentsClient.BeginCreateOrUpdate method.

type ExperimentsClientBeginDeleteOptions added in v0.2.0

type ExperimentsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ExperimentsClientBeginDeleteOptions contains the optional parameters for the ExperimentsClient.BeginDelete method.

type ExperimentsClientBeginUpdateOptions added in v0.2.0

type ExperimentsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ExperimentsClientBeginUpdateOptions contains the optional parameters for the ExperimentsClient.BeginUpdate method.

type ExperimentsClientCreateOrUpdateResponse added in v0.2.0

type ExperimentsClientCreateOrUpdateResponse struct {
	// Defines the properties of an Experiment
	Experiment
}

ExperimentsClientCreateOrUpdateResponse contains the response from method ExperimentsClient.BeginCreateOrUpdate.

type ExperimentsClientDeleteResponse added in v0.2.0

type ExperimentsClientDeleteResponse struct {
}

ExperimentsClientDeleteResponse contains the response from method ExperimentsClient.BeginDelete.

type ExperimentsClientGetOptions added in v0.2.0

type ExperimentsClientGetOptions struct {
}

ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method.

type ExperimentsClientGetResponse added in v0.2.0

type ExperimentsClientGetResponse struct {
	// Defines the properties of an Experiment
	Experiment
}

ExperimentsClientGetResponse contains the response from method ExperimentsClient.Get.

type ExperimentsClientListByProfileOptions added in v0.2.0

type ExperimentsClientListByProfileOptions struct {
}

ExperimentsClientListByProfileOptions contains the optional parameters for the ExperimentsClient.NewListByProfilePager method.

type ExperimentsClientListByProfileResponse added in v0.2.0

type ExperimentsClientListByProfileResponse struct {
	// Defines a list of Experiments. It contains a list of Experiment objects and a URL link to get the next set of results.
	ExperimentList
}

ExperimentsClientListByProfileResponse contains the response from method ExperimentsClient.NewListByProfilePager.

type ExperimentsClientUpdateResponse added in v0.2.0

type ExperimentsClientUpdateResponse struct {
	// Defines the properties of an Experiment
	Experiment
}

ExperimentsClientUpdateResponse contains the response from method ExperimentsClient.BeginUpdate.

type ForwardingConfiguration

type ForwardingConfiguration struct {
	// REQUIRED
	ODataType *string

	// A reference to the BackendPool which this rule routes to.
	BackendPool *SubResource

	// The caching configuration associated with this rule.
	CacheConfiguration *CacheConfiguration

	// A custom path used to rewrite resource paths matched by this rule. Leave empty to use incoming path.
	CustomForwardingPath *string

	// Protocol this rule will use when forwarding traffic to backends.
	ForwardingProtocol *FrontDoorForwardingProtocol
}

ForwardingConfiguration - Describes Forwarding Route.

func (*ForwardingConfiguration) GetRouteConfiguration added in v0.2.0

func (f *ForwardingConfiguration) GetRouteConfiguration() *RouteConfiguration

GetRouteConfiguration implements the RouteConfigurationClassification interface for type ForwardingConfiguration.

func (ForwardingConfiguration) MarshalJSON

func (f ForwardingConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ForwardingConfiguration.

func (*ForwardingConfiguration) UnmarshalJSON

func (f *ForwardingConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ForwardingConfiguration.

type FrontDoor

type FrontDoor struct {
	// Resource location.
	Location *string

	// Properties of the Front Door Load Balancer
	Properties *Properties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

FrontDoor - Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is sent there.

func (FrontDoor) MarshalJSON

func (f FrontDoor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontDoor.

func (*FrontDoor) UnmarshalJSON added in v1.1.0

func (f *FrontDoor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontDoor.

type FrontDoorCertificateSource

type FrontDoorCertificateSource string

FrontDoorCertificateSource - Defines the source of the SSL certificate

const (
	FrontDoorCertificateSourceAzureKeyVault FrontDoorCertificateSource = "AzureKeyVault"
	FrontDoorCertificateSourceFrontDoor     FrontDoorCertificateSource = "FrontDoor"
)

func PossibleFrontDoorCertificateSourceValues

func PossibleFrontDoorCertificateSourceValues() []FrontDoorCertificateSource

PossibleFrontDoorCertificateSourceValues returns the possible values for the FrontDoorCertificateSource const type.

type FrontDoorCertificateType

type FrontDoorCertificateType string

FrontDoorCertificateType - Defines the type of the certificate used for secure connections to a frontendEndpoint

const (
	FrontDoorCertificateTypeDedicated FrontDoorCertificateType = "Dedicated"
)

func PossibleFrontDoorCertificateTypeValues

func PossibleFrontDoorCertificateTypeValues() []FrontDoorCertificateType

PossibleFrontDoorCertificateTypeValues returns the possible values for the FrontDoorCertificateType const type.

type FrontDoorEnabledState

type FrontDoorEnabledState string

FrontDoorEnabledState - Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'

const (
	FrontDoorEnabledStateDisabled FrontDoorEnabledState = "Disabled"
	FrontDoorEnabledStateEnabled  FrontDoorEnabledState = "Enabled"
)

func PossibleFrontDoorEnabledStateValues

func PossibleFrontDoorEnabledStateValues() []FrontDoorEnabledState

PossibleFrontDoorEnabledStateValues returns the possible values for the FrontDoorEnabledState const type.

type FrontDoorForwardingProtocol

type FrontDoorForwardingProtocol string

FrontDoorForwardingProtocol - Protocol this rule will use when forwarding traffic to backends.

const (
	FrontDoorForwardingProtocolHTTPOnly     FrontDoorForwardingProtocol = "HttpOnly"
	FrontDoorForwardingProtocolHTTPSOnly    FrontDoorForwardingProtocol = "HttpsOnly"
	FrontDoorForwardingProtocolMatchRequest FrontDoorForwardingProtocol = "MatchRequest"
)

func PossibleFrontDoorForwardingProtocolValues

func PossibleFrontDoorForwardingProtocolValues() []FrontDoorForwardingProtocol

PossibleFrontDoorForwardingProtocolValues returns the possible values for the FrontDoorForwardingProtocol const type.

type FrontDoorHealthProbeMethod

type FrontDoorHealthProbeMethod string

FrontDoorHealthProbeMethod - Configures which HTTP method to use to probe the backends defined under backendPools.

const (
	FrontDoorHealthProbeMethodGET  FrontDoorHealthProbeMethod = "GET"
	FrontDoorHealthProbeMethodHEAD FrontDoorHealthProbeMethod = "HEAD"
)

func PossibleFrontDoorHealthProbeMethodValues

func PossibleFrontDoorHealthProbeMethodValues() []FrontDoorHealthProbeMethod

PossibleFrontDoorHealthProbeMethodValues returns the possible values for the FrontDoorHealthProbeMethod const type.

type FrontDoorProtocol

type FrontDoorProtocol string

FrontDoorProtocol - Accepted protocol schemes.

const (
	FrontDoorProtocolHTTP  FrontDoorProtocol = "Http"
	FrontDoorProtocolHTTPS FrontDoorProtocol = "Https"
)

func PossibleFrontDoorProtocolValues

func PossibleFrontDoorProtocolValues() []FrontDoorProtocol

PossibleFrontDoorProtocolValues returns the possible values for the FrontDoorProtocol const type.

type FrontDoorQuery

type FrontDoorQuery string

FrontDoorQuery - Treatment of URL query terms when forming the cache key.

const (
	FrontDoorQueryStripAll       FrontDoorQuery = "StripAll"
	FrontDoorQueryStripAllExcept FrontDoorQuery = "StripAllExcept"
	FrontDoorQueryStripNone      FrontDoorQuery = "StripNone"
	FrontDoorQueryStripOnly      FrontDoorQuery = "StripOnly"
)

func PossibleFrontDoorQueryValues

func PossibleFrontDoorQueryValues() []FrontDoorQuery

PossibleFrontDoorQueryValues returns the possible values for the FrontDoorQuery const type.

type FrontDoorRedirectProtocol

type FrontDoorRedirectProtocol string

FrontDoorRedirectProtocol - The protocol of the destination to where the traffic is redirected

const (
	FrontDoorRedirectProtocolHTTPOnly     FrontDoorRedirectProtocol = "HttpOnly"
	FrontDoorRedirectProtocolHTTPSOnly    FrontDoorRedirectProtocol = "HttpsOnly"
	FrontDoorRedirectProtocolMatchRequest FrontDoorRedirectProtocol = "MatchRequest"
)

func PossibleFrontDoorRedirectProtocolValues

func PossibleFrontDoorRedirectProtocolValues() []FrontDoorRedirectProtocol

PossibleFrontDoorRedirectProtocolValues returns the possible values for the FrontDoorRedirectProtocol const type.

type FrontDoorRedirectType

type FrontDoorRedirectType string

FrontDoorRedirectType - The redirect type the rule will use when redirecting traffic.

const (
	FrontDoorRedirectTypeFound             FrontDoorRedirectType = "Found"
	FrontDoorRedirectTypeMoved             FrontDoorRedirectType = "Moved"
	FrontDoorRedirectTypePermanentRedirect FrontDoorRedirectType = "PermanentRedirect"
	FrontDoorRedirectTypeTemporaryRedirect FrontDoorRedirectType = "TemporaryRedirect"
)

func PossibleFrontDoorRedirectTypeValues

func PossibleFrontDoorRedirectTypeValues() []FrontDoorRedirectType

PossibleFrontDoorRedirectTypeValues returns the possible values for the FrontDoorRedirectType const type.

type FrontDoorResourceState

type FrontDoorResourceState string

FrontDoorResourceState - Resource status of the Front Door or Front Door SubResource.

const (
	FrontDoorResourceStateCreating  FrontDoorResourceState = "Creating"
	FrontDoorResourceStateDeleting  FrontDoorResourceState = "Deleting"
	FrontDoorResourceStateDisabled  FrontDoorResourceState = "Disabled"
	FrontDoorResourceStateDisabling FrontDoorResourceState = "Disabling"
	FrontDoorResourceStateEnabled   FrontDoorResourceState = "Enabled"
	FrontDoorResourceStateEnabling  FrontDoorResourceState = "Enabling"
	FrontDoorResourceStateMigrated  FrontDoorResourceState = "Migrated"
	FrontDoorResourceStateMigrating FrontDoorResourceState = "Migrating"
)

func PossibleFrontDoorResourceStateValues

func PossibleFrontDoorResourceStateValues() []FrontDoorResourceState

PossibleFrontDoorResourceStateValues returns the possible values for the FrontDoorResourceState const type.

type FrontDoorTLSProtocolType

type FrontDoorTLSProtocolType string

FrontDoorTLSProtocolType - Defines the TLS extension protocol that is used for secure delivery

const (
	FrontDoorTLSProtocolTypeServerNameIndication FrontDoorTLSProtocolType = "ServerNameIndication"
)

func PossibleFrontDoorTLSProtocolTypeValues

func PossibleFrontDoorTLSProtocolTypeValues() []FrontDoorTLSProtocolType

PossibleFrontDoorTLSProtocolTypeValues returns the possible values for the FrontDoorTLSProtocolType const type.

type FrontDoorsClient

type FrontDoorsClient struct {
	// contains filtered or unexported fields
}

FrontDoorsClient contains the methods for the FrontDoors group. Don't use this type directly, use NewFrontDoorsClient() instead.

func NewFrontDoorsClient

func NewFrontDoorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FrontDoorsClient, error)

NewFrontDoorsClient creates a new instance of FrontDoorsClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FrontDoorsClient) BeginCreateOrUpdate

func (client *FrontDoorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, frontDoorParameters FrontDoor, options *FrontDoorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FrontDoorsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a new Front Door with a Front Door name under the specified subscription and resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • frontDoorParameters - Front Door properties needed to create a new Front Door.
  • options - FrontDoorsClientBeginCreateOrUpdateOptions contains the optional parameters for the FrontDoorsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewFrontDoorsClient().BeginCreateOrUpdate(ctx, "rg1", "frontDoor1", armfrontdoor.FrontDoor{
		Location: to.Ptr("westus"),
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
		Properties: &armfrontdoor.Properties{
			BackendPools: []*armfrontdoor.BackendPool{
				{
					Name: to.Ptr("backendPool1"),
					Properties: &armfrontdoor.BackendPoolProperties{
						Backends: []*armfrontdoor.Backend{
							{
								Address:   to.Ptr("w3.contoso.com"),
								HTTPPort:  to.Ptr[int32](80),
								HTTPSPort: to.Ptr[int32](443),
								Priority:  to.Ptr[int32](2),
								Weight:    to.Ptr[int32](1),
							},
							{
								Address:                    to.Ptr("contoso.com.website-us-west-2.othercloud.net"),
								HTTPPort:                   to.Ptr[int32](80),
								HTTPSPort:                  to.Ptr[int32](443),
								Priority:                   to.Ptr[int32](1),
								PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
								PrivateLinkLocation:        to.Ptr("eastus"),
								PrivateLinkResourceID:      to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1"),
								Weight:                     to.Ptr[int32](2),
							},
							{
								Address:                    to.Ptr("10.0.1.5"),
								HTTPPort:                   to.Ptr[int32](80),
								HTTPSPort:                  to.Ptr[int32](443),
								Priority:                   to.Ptr[int32](1),
								PrivateLinkAlias:           to.Ptr("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"),
								PrivateLinkApprovalMessage: to.Ptr("Please approve this request to connect to the Private Link"),
								Weight:                     to.Ptr[int32](1),
							}},
						HealthProbeSettings: &armfrontdoor.SubResource{
							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1"),
						},
						LoadBalancingSettings: &armfrontdoor.SubResource{
							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1"),
						},
					},
				}},
			BackendPoolsSettings: &armfrontdoor.BackendPoolsSettings{
				EnforceCertificateNameCheck: to.Ptr(armfrontdoor.EnforceCertificateNameCheckEnabledStateEnabled),
				SendRecvTimeoutSeconds:      to.Ptr[int32](60),
			},
			EnabledState: to.Ptr(armfrontdoor.FrontDoorEnabledStateEnabled),
			FrontendEndpoints: []*armfrontdoor.FrontendEndpoint{
				{
					Name: to.Ptr("frontendEndpoint1"),
					Properties: &armfrontdoor.FrontendEndpointProperties{
						HostName:                    to.Ptr("www.contoso.com"),
						SessionAffinityEnabledState: to.Ptr(armfrontdoor.SessionAffinityEnabledStateEnabled),
						SessionAffinityTTLSeconds:   to.Ptr[int32](60),
						WebApplicationFirewallPolicyLink: &armfrontdoor.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink{
							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
						},
					},
				},
				{
					Name: to.Ptr("default"),
					Properties: &armfrontdoor.FrontendEndpointProperties{
						HostName: to.Ptr("frontDoor1.azurefd.net"),
					},
				}},
			HealthProbeSettings: []*armfrontdoor.HealthProbeSettingsModel{
				{
					Name: to.Ptr("healthProbeSettings1"),
					Properties: &armfrontdoor.HealthProbeSettingsProperties{
						Path:              to.Ptr("/"),
						EnabledState:      to.Ptr(armfrontdoor.HealthProbeEnabledEnabled),
						HealthProbeMethod: to.Ptr(armfrontdoor.FrontDoorHealthProbeMethodHEAD),
						IntervalInSeconds: to.Ptr[int32](120),
						Protocol:          to.Ptr(armfrontdoor.FrontDoorProtocolHTTP),
					},
				}},
			LoadBalancingSettings: []*armfrontdoor.LoadBalancingSettingsModel{
				{
					Name: to.Ptr("loadBalancingSettings1"),
					Properties: &armfrontdoor.LoadBalancingSettingsProperties{
						SampleSize:                to.Ptr[int32](4),
						SuccessfulSamplesRequired: to.Ptr[int32](2),
					},
				}},
			RoutingRules: []*armfrontdoor.RoutingRule{
				{
					Name: to.Ptr("routingRule1"),
					Properties: &armfrontdoor.RoutingRuleProperties{
						AcceptedProtocols: []*armfrontdoor.FrontDoorProtocol{
							to.Ptr(armfrontdoor.FrontDoorProtocolHTTP)},
						EnabledState: to.Ptr(armfrontdoor.RoutingRuleEnabledStateEnabled),
						FrontendEndpoints: []*armfrontdoor.SubResource{
							{
								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
							},
							{
								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
							}},
						PatternsToMatch: []*string{
							to.Ptr("/*")},
						RouteConfiguration: &armfrontdoor.ForwardingConfiguration{
							ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
							BackendPool: &armfrontdoor.SubResource{
								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
							},
						},
						RulesEngine: &armfrontdoor.SubResource{
							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
						},
						WebApplicationFirewallPolicyLink: &armfrontdoor.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink{
							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
						},
					},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.FrontDoor = armfrontdoor.FrontDoor{
	// 	Name: to.Ptr("frontDoor1"),
	// 	Type: to.Ptr("Microsoft.Network/frontDoor"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.Properties{
	// 		BackendPools: []*armfrontdoor.BackendPool{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
	// 				Name: to.Ptr("backendPool1"),
	// 				Properties: &armfrontdoor.BackendPoolProperties{
	// 					Backends: []*armfrontdoor.Backend{
	// 						{
	// 							Address: to.Ptr("w3.contoso.com"),
	// 							EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							Priority: to.Ptr[int32](2),
	// 							Weight: to.Ptr[int32](1),
	// 						},
	// 						{
	// 							Address: to.Ptr("contoso.com.website-us-west-2.othercloud.net"),
	// 							EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							Priority: to.Ptr[int32](1),
	// 							PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
	// 							PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
	// 							PrivateLinkLocation: to.Ptr("eastus"),
	// 							PrivateLinkResourceID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1"),
	// 							Weight: to.Ptr[int32](2),
	// 						},
	// 						{
	// 							Address: to.Ptr("10.0.1.5"),
	// 							EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							Priority: to.Ptr[int32](1),
	// 							PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
	// 							PrivateLinkAlias: to.Ptr("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"),
	// 							PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
	// 							Weight: to.Ptr[int32](1),
	// 					}},
	// 					HealthProbeSettings: &armfrontdoor.SubResource{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1"),
	// 					},
	// 					LoadBalancingSettings: &armfrontdoor.SubResource{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1"),
	// 					},
	// 				},
	// 		}},
	// 		BackendPoolsSettings: &armfrontdoor.BackendPoolsSettings{
	// 			EnforceCertificateNameCheck: to.Ptr(armfrontdoor.EnforceCertificateNameCheckEnabledStateEnabled),
	// 			SendRecvTimeoutSeconds: to.Ptr[int32](60),
	// 		},
	// 		EnabledState: to.Ptr(armfrontdoor.FrontDoorEnabledStateEnabled),
	// 		FrontendEndpoints: []*armfrontdoor.FrontendEndpoint{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
	// 				Name: to.Ptr("frontendEndpoint1"),
	// 				Properties: &armfrontdoor.FrontendEndpointProperties{
	// 					HostName: to.Ptr("www.contoso.com"),
	// 					SessionAffinityEnabledState: to.Ptr(armfrontdoor.SessionAffinityEnabledStateEnabled),
	// 					SessionAffinityTTLSeconds: to.Ptr[int32](60),
	// 					WebApplicationFirewallPolicyLink: &armfrontdoor.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
	// 					},
	// 				},
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
	// 				Name: to.Ptr("default"),
	// 				Properties: &armfrontdoor.FrontendEndpointProperties{
	// 					HostName: to.Ptr("frontDoor1.azurefd.net"),
	// 				},
	// 		}},
	// 		HealthProbeSettings: []*armfrontdoor.HealthProbeSettingsModel{
	// 			{
	// 				Name: to.Ptr("healthProbeSettings1"),
	// 				Properties: &armfrontdoor.HealthProbeSettingsProperties{
	// 					Path: to.Ptr("/"),
	// 					EnabledState: to.Ptr(armfrontdoor.HealthProbeEnabledEnabled),
	// 					HealthProbeMethod: to.Ptr(armfrontdoor.FrontDoorHealthProbeMethodHEAD),
	// 					IntervalInSeconds: to.Ptr[int32](120),
	// 					Protocol: to.Ptr(armfrontdoor.FrontDoorProtocolHTTP),
	// 				},
	// 		}},
	// 		LoadBalancingSettings: []*armfrontdoor.LoadBalancingSettingsModel{
	// 			{
	// 				Name: to.Ptr("loadBalancingSettings1"),
	// 				Properties: &armfrontdoor.LoadBalancingSettingsProperties{
	// 					SampleSize: to.Ptr[int32](4),
	// 					SuccessfulSamplesRequired: to.Ptr[int32](2),
	// 				},
	// 		}},
	// 		RoutingRules: []*armfrontdoor.RoutingRule{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/routingRules/routingRule1"),
	// 				Name: to.Ptr("routingRule1"),
	// 				Properties: &armfrontdoor.RoutingRuleProperties{
	// 					AcceptedProtocols: []*armfrontdoor.FrontDoorProtocol{
	// 						to.Ptr(armfrontdoor.FrontDoorProtocolHTTP)},
	// 						EnabledState: to.Ptr(armfrontdoor.RoutingRuleEnabledStateEnabled),
	// 						FrontendEndpoints: []*armfrontdoor.SubResource{
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
	// 							},
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
	// 						}},
	// 						PatternsToMatch: []*string{
	// 							to.Ptr("/*")},
	// 							RouteConfiguration: &armfrontdoor.ForwardingConfiguration{
	// 								ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
	// 								BackendPool: &armfrontdoor.SubResource{
	// 									ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
	// 								},
	// 								CustomForwardingPath: to.Ptr(""),
	// 								ForwardingProtocol: to.Ptr(armfrontdoor.FrontDoorForwardingProtocolMatchRequest),
	// 							},
	// 							RulesEngine: &armfrontdoor.SubResource{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
	// 							},
	// 							WebApplicationFirewallPolicyLink: &armfrontdoor.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
	// 							},
	// 						},
	// 				}},
	// 				Cname: to.Ptr("frontDoor1.azurefd.net"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				ResourceState: to.Ptr(armfrontdoor.FrontDoorResourceStateCreating),
	// 			},
	// 		}
}
Output:

func (*FrontDoorsClient) BeginDelete

func (client *FrontDoorsClient) BeginDelete(ctx context.Context, resourceGroupName string, frontDoorName string, options *FrontDoorsClientBeginDeleteOptions) (*runtime.Poller[FrontDoorsClientDeleteResponse], error)

BeginDelete - Deletes an existing Front Door with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • options - FrontDoorsClientBeginDeleteOptions contains the optional parameters for the FrontDoorsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewFrontDoorsClient().BeginDelete(ctx, "rg1", "frontDoor1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*FrontDoorsClient) Get

func (client *FrontDoorsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, options *FrontDoorsClientGetOptions) (FrontDoorsClientGetResponse, error)

Get - Gets a Front Door with the specified Front Door name under the specified subscription and resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • options - FrontDoorsClientGetOptions contains the optional parameters for the FrontDoorsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFrontDoorsClient().Get(ctx, "rg1", "frontDoor1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.FrontDoor = armfrontdoor.FrontDoor{
	// 	Name: to.Ptr("frontDoor1"),
	// 	Type: to.Ptr("Microsoft.Network/frontDoor"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.Properties{
	// 		BackendPools: []*armfrontdoor.BackendPool{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
	// 				Name: to.Ptr("backendPool1"),
	// 				Properties: &armfrontdoor.BackendPoolProperties{
	// 					Backends: []*armfrontdoor.Backend{
	// 						{
	// 							Address: to.Ptr("w3.contoso.com"),
	// 							EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							Priority: to.Ptr[int32](2),
	// 							Weight: to.Ptr[int32](1),
	// 						},
	// 						{
	// 							Address: to.Ptr("contoso.com.website-us-west-2.othercloud.net"),
	// 							EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							Priority: to.Ptr[int32](1),
	// 							PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
	// 							PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
	// 							PrivateLinkLocation: to.Ptr("eastus"),
	// 							PrivateLinkResourceID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1"),
	// 							Weight: to.Ptr[int32](2),
	// 						},
	// 						{
	// 							Address: to.Ptr("10.0.1.5"),
	// 							EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							Priority: to.Ptr[int32](1),
	// 							PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
	// 							PrivateLinkAlias: to.Ptr("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"),
	// 							PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
	// 							Weight: to.Ptr[int32](1),
	// 					}},
	// 					HealthProbeSettings: &armfrontdoor.SubResource{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1"),
	// 					},
	// 					LoadBalancingSettings: &armfrontdoor.SubResource{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1"),
	// 					},
	// 				},
	// 		}},
	// 		BackendPoolsSettings: &armfrontdoor.BackendPoolsSettings{
	// 			EnforceCertificateNameCheck: to.Ptr(armfrontdoor.EnforceCertificateNameCheckEnabledStateEnabled),
	// 			SendRecvTimeoutSeconds: to.Ptr[int32](60),
	// 		},
	// 		EnabledState: to.Ptr(armfrontdoor.FrontDoorEnabledStateEnabled),
	// 		FrontendEndpoints: []*armfrontdoor.FrontendEndpoint{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
	// 				Name: to.Ptr("frontendEndpoint1"),
	// 				Properties: &armfrontdoor.FrontendEndpointProperties{
	// 					HostName: to.Ptr("www.contoso.com"),
	// 					SessionAffinityEnabledState: to.Ptr(armfrontdoor.SessionAffinityEnabledStateEnabled),
	// 					SessionAffinityTTLSeconds: to.Ptr[int32](60),
	// 					WebApplicationFirewallPolicyLink: &armfrontdoor.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
	// 					},
	// 				},
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
	// 				Name: to.Ptr("default"),
	// 				Properties: &armfrontdoor.FrontendEndpointProperties{
	// 					HostName: to.Ptr("frontDoor1.azurefd.net"),
	// 				},
	// 		}},
	// 		HealthProbeSettings: []*armfrontdoor.HealthProbeSettingsModel{
	// 			{
	// 				Name: to.Ptr("healthProbeSettings1"),
	// 				Properties: &armfrontdoor.HealthProbeSettingsProperties{
	// 					Path: to.Ptr("/"),
	// 					EnabledState: to.Ptr(armfrontdoor.HealthProbeEnabledEnabled),
	// 					HealthProbeMethod: to.Ptr(armfrontdoor.FrontDoorHealthProbeMethodHEAD),
	// 					IntervalInSeconds: to.Ptr[int32](120),
	// 					Protocol: to.Ptr(armfrontdoor.FrontDoorProtocolHTTP),
	// 				},
	// 		}},
	// 		LoadBalancingSettings: []*armfrontdoor.LoadBalancingSettingsModel{
	// 			{
	// 				Name: to.Ptr("loadBalancingSettings1"),
	// 				Properties: &armfrontdoor.LoadBalancingSettingsProperties{
	// 					SampleSize: to.Ptr[int32](4),
	// 					SuccessfulSamplesRequired: to.Ptr[int32](2),
	// 				},
	// 		}},
	// 		RoutingRules: []*armfrontdoor.RoutingRule{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/routingRules/routingRule1"),
	// 				Name: to.Ptr("routingRule1"),
	// 				Properties: &armfrontdoor.RoutingRuleProperties{
	// 					AcceptedProtocols: []*armfrontdoor.FrontDoorProtocol{
	// 						to.Ptr(armfrontdoor.FrontDoorProtocolHTTP)},
	// 						EnabledState: to.Ptr(armfrontdoor.RoutingRuleEnabledStateEnabled),
	// 						FrontendEndpoints: []*armfrontdoor.SubResource{
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
	// 							},
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
	// 						}},
	// 						PatternsToMatch: []*string{
	// 							to.Ptr("/*")},
	// 							RouteConfiguration: &armfrontdoor.ForwardingConfiguration{
	// 								ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
	// 								BackendPool: &armfrontdoor.SubResource{
	// 									ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
	// 								},
	// 								CustomForwardingPath: to.Ptr(""),
	// 								ForwardingProtocol: to.Ptr(armfrontdoor.FrontDoorForwardingProtocolMatchRequest),
	// 							},
	// 							RulesEngine: &armfrontdoor.SubResource{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
	// 							},
	// 							WebApplicationFirewallPolicyLink: &armfrontdoor.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
	// 							},
	// 						},
	// 				}},
	// 				Cname: to.Ptr("frontDoor1.azurefd.net"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				ResourceState: to.Ptr(armfrontdoor.FrontDoorResourceStateEnabled),
	// 				RulesEngines: []*armfrontdoor.RulesEngine{
	// 					{
	// 						Name: to.Ptr("rulesEngine1"),
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
	// 						Properties: &armfrontdoor.RulesEngineProperties{
	// 							Rules: []*armfrontdoor.RulesEngineRule{
	// 								{
	// 									Name: to.Ptr("Rule1"),
	// 									Action: &armfrontdoor.RulesEngineAction{
	// 										RouteConfigurationOverride: &armfrontdoor.RedirectConfiguration{
	// 											ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"),
	// 											CustomFragment: to.Ptr("fragment"),
	// 											CustomHost: to.Ptr("www.bing.com"),
	// 											CustomPath: to.Ptr("/api"),
	// 											CustomQueryString: to.Ptr("a=b"),
	// 											RedirectProtocol: to.Ptr(armfrontdoor.FrontDoorRedirectProtocolHTTPSOnly),
	// 											RedirectType: to.Ptr(armfrontdoor.FrontDoorRedirectTypeMoved),
	// 										},
	// 									},
	// 									MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
	// 										{
	// 											RulesEngineMatchValue: []*string{
	// 												to.Ptr("CH")},
	// 												RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRemoteAddr),
	// 												RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorGeoMatch),
	// 										}},
	// 										MatchProcessingBehavior: to.Ptr(armfrontdoor.MatchProcessingBehaviorStop),
	// 										Priority: to.Ptr[int32](1),
	// 									},
	// 									{
	// 										Name: to.Ptr("Rule2"),
	// 										Action: &armfrontdoor.RulesEngineAction{
	// 											ResponseHeaderActions: []*armfrontdoor.HeaderAction{
	// 												{
	// 													HeaderActionType: to.Ptr(armfrontdoor.HeaderActionTypeOverwrite),
	// 													HeaderName: to.Ptr("Cache-Control"),
	// 													Value: to.Ptr("public, max-age=31536000"),
	// 											}},
	// 										},
	// 										MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
	// 											{
	// 												RulesEngineMatchValue: []*string{
	// 													to.Ptr("jpg")},
	// 													RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariable("FilenameExtension")),
	// 													RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
	// 													Transforms: []*armfrontdoor.Transform{
	// 														to.Ptr(armfrontdoor.TransformLowercase)},
	// 												}},
	// 												Priority: to.Ptr[int32](2),
	// 										}},
	// 									},
	// 							}},
	// 						},
	// 					}
}
Output:

func (*FrontDoorsClient) NewListByResourceGroupPager added in v0.4.0

func (client *FrontDoorsClient) NewListByResourceGroupPager(resourceGroupName string, options *FrontDoorsClientListByResourceGroupOptions) *runtime.Pager[FrontDoorsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all of the Front Doors within a resource group under a subscription.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • options - FrontDoorsClientListByResourceGroupOptions contains the optional parameters for the FrontDoorsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFrontDoorsClient().NewListByResourceGroupPager("rg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ListResult = armfrontdoor.ListResult{
		// 	Value: []*armfrontdoor.FrontDoor{
		// 		{
		// 			Name: to.Ptr("frontDoor1"),
		// 			Type: to.Ptr("Microsoft.Network/frontDoor"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"tag1": to.Ptr("value1"),
		// 				"tag2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armfrontdoor.Properties{
		// 				BackendPools: []*armfrontdoor.BackendPool{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
		// 						Name: to.Ptr("backendPool1"),
		// 						Properties: &armfrontdoor.BackendPoolProperties{
		// 							Backends: []*armfrontdoor.Backend{
		// 								{
		// 									Address: to.Ptr("w3.contoso.com"),
		// 									EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
		// 									HTTPPort: to.Ptr[int32](80),
		// 									HTTPSPort: to.Ptr[int32](443),
		// 									Priority: to.Ptr[int32](2),
		// 									Weight: to.Ptr[int32](1),
		// 								},
		// 								{
		// 									Address: to.Ptr("contoso.com.website-us-west-2.othercloud.net"),
		// 									EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
		// 									HTTPPort: to.Ptr[int32](80),
		// 									HTTPSPort: to.Ptr[int32](443),
		// 									Priority: to.Ptr[int32](1),
		// 									PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
		// 									PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
		// 									PrivateLinkLocation: to.Ptr("eastus"),
		// 									PrivateLinkResourceID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1"),
		// 									Weight: to.Ptr[int32](2),
		// 								},
		// 								{
		// 									Address: to.Ptr("10.0.1.5"),
		// 									EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
		// 									HTTPPort: to.Ptr[int32](80),
		// 									HTTPSPort: to.Ptr[int32](443),
		// 									Priority: to.Ptr[int32](1),
		// 									PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
		// 									PrivateLinkAlias: to.Ptr("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"),
		// 									PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
		// 									Weight: to.Ptr[int32](1),
		// 							}},
		// 							HealthProbeSettings: &armfrontdoor.SubResource{
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1"),
		// 							},
		// 							LoadBalancingSettings: &armfrontdoor.SubResource{
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1"),
		// 							},
		// 						},
		// 				}},
		// 				BackendPoolsSettings: &armfrontdoor.BackendPoolsSettings{
		// 					EnforceCertificateNameCheck: to.Ptr(armfrontdoor.EnforceCertificateNameCheckEnabledStateEnabled),
		// 					SendRecvTimeoutSeconds: to.Ptr[int32](60),
		// 				},
		// 				EnabledState: to.Ptr(armfrontdoor.FrontDoorEnabledStateEnabled),
		// 				FrontendEndpoints: []*armfrontdoor.FrontendEndpoint{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
		// 						Name: to.Ptr("frontendEndpoint1"),
		// 						Properties: &armfrontdoor.FrontendEndpointProperties{
		// 							HostName: to.Ptr("www.contoso.com"),
		// 							SessionAffinityEnabledState: to.Ptr(armfrontdoor.SessionAffinityEnabledStateEnabled),
		// 							SessionAffinityTTLSeconds: to.Ptr[int32](60),
		// 							WebApplicationFirewallPolicyLink: &armfrontdoor.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink{
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
		// 							},
		// 						},
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
		// 						Name: to.Ptr("default"),
		// 						Properties: &armfrontdoor.FrontendEndpointProperties{
		// 							HostName: to.Ptr("frontDoor1.azurefd.net"),
		// 						},
		// 				}},
		// 				HealthProbeSettings: []*armfrontdoor.HealthProbeSettingsModel{
		// 					{
		// 						Name: to.Ptr("healthProbeSettings1"),
		// 						Properties: &armfrontdoor.HealthProbeSettingsProperties{
		// 							Path: to.Ptr("/"),
		// 							EnabledState: to.Ptr(armfrontdoor.HealthProbeEnabledEnabled),
		// 							HealthProbeMethod: to.Ptr(armfrontdoor.FrontDoorHealthProbeMethodHEAD),
		// 							IntervalInSeconds: to.Ptr[int32](120),
		// 							Protocol: to.Ptr(armfrontdoor.FrontDoorProtocolHTTP),
		// 						},
		// 				}},
		// 				LoadBalancingSettings: []*armfrontdoor.LoadBalancingSettingsModel{
		// 					{
		// 						Name: to.Ptr("loadBalancingSettings1"),
		// 						Properties: &armfrontdoor.LoadBalancingSettingsProperties{
		// 							SampleSize: to.Ptr[int32](4),
		// 							SuccessfulSamplesRequired: to.Ptr[int32](2),
		// 						},
		// 				}},
		// 				RoutingRules: []*armfrontdoor.RoutingRule{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/routingRules/routingRule1"),
		// 						Name: to.Ptr("routingRule1"),
		// 						Properties: &armfrontdoor.RoutingRuleProperties{
		// 							AcceptedProtocols: []*armfrontdoor.FrontDoorProtocol{
		// 								to.Ptr(armfrontdoor.FrontDoorProtocolHTTP)},
		// 								EnabledState: to.Ptr(armfrontdoor.RoutingRuleEnabledStateEnabled),
		// 								FrontendEndpoints: []*armfrontdoor.SubResource{
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
		// 									},
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
		// 								}},
		// 								PatternsToMatch: []*string{
		// 									to.Ptr("/*")},
		// 									RouteConfiguration: &armfrontdoor.ForwardingConfiguration{
		// 										ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
		// 										BackendPool: &armfrontdoor.SubResource{
		// 											ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
		// 										},
		// 										CustomForwardingPath: to.Ptr(""),
		// 										ForwardingProtocol: to.Ptr(armfrontdoor.FrontDoorForwardingProtocolMatchRequest),
		// 									},
		// 									RulesEngine: &armfrontdoor.SubResource{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
		// 									},
		// 									WebApplicationFirewallPolicyLink: &armfrontdoor.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
		// 									},
		// 								},
		// 						}},
		// 						Cname: to.Ptr("frontDoor1.azurefd.net"),
		// 						ProvisioningState: to.Ptr("Succeeded"),
		// 						ResourceState: to.Ptr(armfrontdoor.FrontDoorResourceStateEnabled),
		// 						RulesEngines: []*armfrontdoor.RulesEngine{
		// 							{
		// 								Name: to.Ptr("rulesEngine1"),
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/routingRules/rulesEngine1"),
		// 								Properties: &armfrontdoor.RulesEngineProperties{
		// 									Rules: []*armfrontdoor.RulesEngineRule{
		// 										{
		// 											Name: to.Ptr("Rule1"),
		// 											Action: &armfrontdoor.RulesEngineAction{
		// 												RouteConfigurationOverride: &armfrontdoor.RedirectConfiguration{
		// 													ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"),
		// 													CustomFragment: to.Ptr("fragment"),
		// 													CustomHost: to.Ptr("www.bing.com"),
		// 													CustomPath: to.Ptr("/api"),
		// 													CustomQueryString: to.Ptr("a=b"),
		// 													RedirectProtocol: to.Ptr(armfrontdoor.FrontDoorRedirectProtocolHTTPSOnly),
		// 													RedirectType: to.Ptr(armfrontdoor.FrontDoorRedirectTypeMoved),
		// 												},
		// 											},
		// 											MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
		// 												{
		// 													RulesEngineMatchValue: []*string{
		// 														to.Ptr("CH")},
		// 														RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRemoteAddr),
		// 														RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorGeoMatch),
		// 												}},
		// 												MatchProcessingBehavior: to.Ptr(armfrontdoor.MatchProcessingBehaviorStop),
		// 												Priority: to.Ptr[int32](1),
		// 											},
		// 											{
		// 												Name: to.Ptr("Rule2"),
		// 												Action: &armfrontdoor.RulesEngineAction{
		// 													ResponseHeaderActions: []*armfrontdoor.HeaderAction{
		// 														{
		// 															HeaderActionType: to.Ptr(armfrontdoor.HeaderActionTypeOverwrite),
		// 															HeaderName: to.Ptr("Cache-Control"),
		// 															Value: to.Ptr("public, max-age=31536000"),
		// 													}},
		// 												},
		// 												MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
		// 													{
		// 														RulesEngineMatchValue: []*string{
		// 															to.Ptr("jpg")},
		// 															RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariable("FilenameExtension")),
		// 															RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
		// 															Transforms: []*armfrontdoor.Transform{
		// 																to.Ptr(armfrontdoor.TransformLowercase)},
		// 														}},
		// 														Priority: to.Ptr[int32](2),
		// 												}},
		// 											},
		// 									}},
		// 								},
		// 						}},
		// 					}
	}
}
Output:

func (*FrontDoorsClient) NewListPager added in v0.4.0

NewListPager - Lists all of the Front Doors within an Azure subscription.

Generated from API version 2021-06-01

  • options - FrontDoorsClientListOptions contains the optional parameters for the FrontDoorsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFrontDoorsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ListResult = armfrontdoor.ListResult{
		// 	Value: []*armfrontdoor.FrontDoor{
		// 		{
		// 			Name: to.Ptr("frontDoor1"),
		// 			Type: to.Ptr("Microsoft.Network/frontDoor"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"tag1": to.Ptr("value1"),
		// 				"tag2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armfrontdoor.Properties{
		// 				BackendPools: []*armfrontdoor.BackendPool{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
		// 						Name: to.Ptr("backendPool1"),
		// 						Properties: &armfrontdoor.BackendPoolProperties{
		// 							Backends: []*armfrontdoor.Backend{
		// 								{
		// 									Address: to.Ptr("w3.contoso.com"),
		// 									EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
		// 									HTTPPort: to.Ptr[int32](80),
		// 									HTTPSPort: to.Ptr[int32](443),
		// 									Priority: to.Ptr[int32](2),
		// 									Weight: to.Ptr[int32](1),
		// 								},
		// 								{
		// 									Address: to.Ptr("contoso.com.website-us-west-2.othercloud.net"),
		// 									EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
		// 									HTTPPort: to.Ptr[int32](80),
		// 									HTTPSPort: to.Ptr[int32](443),
		// 									Priority: to.Ptr[int32](1),
		// 									PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
		// 									PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
		// 									PrivateLinkLocation: to.Ptr("eastus"),
		// 									PrivateLinkResourceID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1"),
		// 									Weight: to.Ptr[int32](2),
		// 								},
		// 								{
		// 									Address: to.Ptr("10.0.1.5"),
		// 									EnabledState: to.Ptr(armfrontdoor.BackendEnabledStateEnabled),
		// 									HTTPPort: to.Ptr[int32](80),
		// 									HTTPSPort: to.Ptr[int32](443),
		// 									Priority: to.Ptr[int32](1),
		// 									PrivateEndpointStatus: to.Ptr(armfrontdoor.PrivateEndpointStatusApproved),
		// 									PrivateLinkAlias: to.Ptr("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"),
		// 									PrivateLinkApprovalMessage: to.Ptr("Please approve the connection request for this Private Link"),
		// 									Weight: to.Ptr[int32](1),
		// 							}},
		// 							HealthProbeSettings: &armfrontdoor.SubResource{
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1"),
		// 							},
		// 							LoadBalancingSettings: &armfrontdoor.SubResource{
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1"),
		// 							},
		// 						},
		// 				}},
		// 				BackendPoolsSettings: &armfrontdoor.BackendPoolsSettings{
		// 					EnforceCertificateNameCheck: to.Ptr(armfrontdoor.EnforceCertificateNameCheckEnabledStateEnabled),
		// 				},
		// 				EnabledState: to.Ptr(armfrontdoor.FrontDoorEnabledStateEnabled),
		// 				FrontendEndpoints: []*armfrontdoor.FrontendEndpoint{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
		// 						Name: to.Ptr("frontendEndpoint1"),
		// 						Properties: &armfrontdoor.FrontendEndpointProperties{
		// 							HostName: to.Ptr("www.contoso.com"),
		// 							SessionAffinityEnabledState: to.Ptr(armfrontdoor.SessionAffinityEnabledStateEnabled),
		// 							SessionAffinityTTLSeconds: to.Ptr[int32](60),
		// 							WebApplicationFirewallPolicyLink: &armfrontdoor.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink{
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
		// 							},
		// 						},
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
		// 						Name: to.Ptr("default"),
		// 						Properties: &armfrontdoor.FrontendEndpointProperties{
		// 							HostName: to.Ptr("frontDoor1.azurefd.net"),
		// 						},
		// 				}},
		// 				HealthProbeSettings: []*armfrontdoor.HealthProbeSettingsModel{
		// 					{
		// 						Name: to.Ptr("healthProbeSettings1"),
		// 						Properties: &armfrontdoor.HealthProbeSettingsProperties{
		// 							Path: to.Ptr("/"),
		// 							EnabledState: to.Ptr(armfrontdoor.HealthProbeEnabledEnabled),
		// 							HealthProbeMethod: to.Ptr(armfrontdoor.FrontDoorHealthProbeMethodHEAD),
		// 							IntervalInSeconds: to.Ptr[int32](120),
		// 							Protocol: to.Ptr(armfrontdoor.FrontDoorProtocolHTTP),
		// 						},
		// 				}},
		// 				LoadBalancingSettings: []*armfrontdoor.LoadBalancingSettingsModel{
		// 					{
		// 						Name: to.Ptr("loadBalancingSettings1"),
		// 						Properties: &armfrontdoor.LoadBalancingSettingsProperties{
		// 							SampleSize: to.Ptr[int32](4),
		// 							SuccessfulSamplesRequired: to.Ptr[int32](2),
		// 						},
		// 				}},
		// 				RoutingRules: []*armfrontdoor.RoutingRule{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/routingRules/routingRule1"),
		// 						Name: to.Ptr("routingRule1"),
		// 						Properties: &armfrontdoor.RoutingRuleProperties{
		// 							AcceptedProtocols: []*armfrontdoor.FrontDoorProtocol{
		// 								to.Ptr(armfrontdoor.FrontDoorProtocolHTTP)},
		// 								EnabledState: to.Ptr(armfrontdoor.RoutingRuleEnabledStateEnabled),
		// 								FrontendEndpoints: []*armfrontdoor.SubResource{
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
		// 									},
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
		// 								}},
		// 								PatternsToMatch: []*string{
		// 									to.Ptr("/*")},
		// 									RouteConfiguration: &armfrontdoor.ForwardingConfiguration{
		// 										ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
		// 										BackendPool: &armfrontdoor.SubResource{
		// 											ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
		// 										},
		// 										CustomForwardingPath: to.Ptr(""),
		// 										ForwardingProtocol: to.Ptr(armfrontdoor.FrontDoorForwardingProtocolMatchRequest),
		// 									},
		// 									RulesEngine: &armfrontdoor.SubResource{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
		// 									},
		// 									WebApplicationFirewallPolicyLink: &armfrontdoor.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
		// 									},
		// 								},
		// 						}},
		// 						Cname: to.Ptr("frontDoor1.azurefd.net"),
		// 						ProvisioningState: to.Ptr("Succeeded"),
		// 						ResourceState: to.Ptr(armfrontdoor.FrontDoorResourceStateEnabled),
		// 						RulesEngines: []*armfrontdoor.RulesEngine{
		// 							{
		// 								Name: to.Ptr("rulesEngine1"),
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/routingRules/rulesEngine1"),
		// 								Properties: &armfrontdoor.RulesEngineProperties{
		// 									Rules: []*armfrontdoor.RulesEngineRule{
		// 										{
		// 											Name: to.Ptr("Rule1"),
		// 											Action: &armfrontdoor.RulesEngineAction{
		// 												RouteConfigurationOverride: &armfrontdoor.RedirectConfiguration{
		// 													ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"),
		// 													CustomFragment: to.Ptr("fragment"),
		// 													CustomHost: to.Ptr("www.bing.com"),
		// 													CustomPath: to.Ptr("/api"),
		// 													CustomQueryString: to.Ptr("a=b"),
		// 													RedirectProtocol: to.Ptr(armfrontdoor.FrontDoorRedirectProtocolHTTPSOnly),
		// 													RedirectType: to.Ptr(armfrontdoor.FrontDoorRedirectTypeMoved),
		// 												},
		// 											},
		// 											MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
		// 												{
		// 													RulesEngineMatchValue: []*string{
		// 														to.Ptr("CH")},
		// 														RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRemoteAddr),
		// 														RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorGeoMatch),
		// 												}},
		// 												MatchProcessingBehavior: to.Ptr(armfrontdoor.MatchProcessingBehaviorStop),
		// 												Priority: to.Ptr[int32](1),
		// 											},
		// 											{
		// 												Name: to.Ptr("Rule2"),
		// 												Action: &armfrontdoor.RulesEngineAction{
		// 													ResponseHeaderActions: []*armfrontdoor.HeaderAction{
		// 														{
		// 															HeaderActionType: to.Ptr(armfrontdoor.HeaderActionTypeOverwrite),
		// 															HeaderName: to.Ptr("Cache-Control"),
		// 															Value: to.Ptr("public, max-age=31536000"),
		// 													}},
		// 												},
		// 												MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
		// 													{
		// 														RulesEngineMatchValue: []*string{
		// 															to.Ptr("jpg")},
		// 															RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariable("FilenameExtension")),
		// 															RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
		// 															Transforms: []*armfrontdoor.Transform{
		// 																to.Ptr(armfrontdoor.TransformLowercase)},
		// 														}},
		// 														Priority: to.Ptr[int32](2),
		// 												}},
		// 											},
		// 									}},
		// 								},
		// 						}},
		// 					}
	}
}
Output:

func (*FrontDoorsClient) ValidateCustomDomain

func (client *FrontDoorsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, frontDoorName string, customDomainProperties ValidateCustomDomainInput, options *FrontDoorsClientValidateCustomDomainOptions) (FrontDoorsClientValidateCustomDomainResponse, error)

ValidateCustomDomain - Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • customDomainProperties - Custom domain to be validated.
  • options - FrontDoorsClientValidateCustomDomainOptions contains the optional parameters for the FrontDoorsClient.ValidateCustomDomain method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorValidateCustomDomain.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFrontDoorsClient().ValidateCustomDomain(ctx, "rg1", "frontDoor1", armfrontdoor.ValidateCustomDomainInput{
		HostName: to.Ptr("www.someDomain.com"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ValidateCustomDomainOutput = armfrontdoor.ValidateCustomDomainOutput{
	// 	CustomDomainValidated: to.Ptr(true),
	// }
}
Output:

type FrontDoorsClientBeginCreateOrUpdateOptions added in v0.2.0

type FrontDoorsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

FrontDoorsClientBeginCreateOrUpdateOptions contains the optional parameters for the FrontDoorsClient.BeginCreateOrUpdate method.

type FrontDoorsClientBeginDeleteOptions added in v0.2.0

type FrontDoorsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

FrontDoorsClientBeginDeleteOptions contains the optional parameters for the FrontDoorsClient.BeginDelete method.

type FrontDoorsClientCreateOrUpdateResponse added in v0.2.0

type FrontDoorsClientCreateOrUpdateResponse struct {
	// Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is
	// sent there.
	FrontDoor
}

FrontDoorsClientCreateOrUpdateResponse contains the response from method FrontDoorsClient.BeginCreateOrUpdate.

type FrontDoorsClientDeleteResponse added in v0.2.0

type FrontDoorsClientDeleteResponse struct {
}

FrontDoorsClientDeleteResponse contains the response from method FrontDoorsClient.BeginDelete.

type FrontDoorsClientGetOptions added in v0.2.0

type FrontDoorsClientGetOptions struct {
}

FrontDoorsClientGetOptions contains the optional parameters for the FrontDoorsClient.Get method.

type FrontDoorsClientGetResponse added in v0.2.0

type FrontDoorsClientGetResponse struct {
	// Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is
	// sent there.
	FrontDoor
}

FrontDoorsClientGetResponse contains the response from method FrontDoorsClient.Get.

type FrontDoorsClientListByResourceGroupOptions added in v0.2.0

type FrontDoorsClientListByResourceGroupOptions struct {
}

FrontDoorsClientListByResourceGroupOptions contains the optional parameters for the FrontDoorsClient.NewListByResourceGroupPager method.

type FrontDoorsClientListByResourceGroupResponse added in v0.2.0

type FrontDoorsClientListByResourceGroupResponse struct {
	// Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next set
	// of results.
	ListResult
}

FrontDoorsClientListByResourceGroupResponse contains the response from method FrontDoorsClient.NewListByResourceGroupPager.

type FrontDoorsClientListOptions added in v0.2.0

type FrontDoorsClientListOptions struct {
}

FrontDoorsClientListOptions contains the optional parameters for the FrontDoorsClient.NewListPager method.

type FrontDoorsClientListResponse added in v0.2.0

type FrontDoorsClientListResponse struct {
	// Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next set
	// of results.
	ListResult
}

FrontDoorsClientListResponse contains the response from method FrontDoorsClient.NewListPager.

type FrontDoorsClientValidateCustomDomainOptions added in v0.2.0

type FrontDoorsClientValidateCustomDomainOptions struct {
}

FrontDoorsClientValidateCustomDomainOptions contains the optional parameters for the FrontDoorsClient.ValidateCustomDomain method.

type FrontDoorsClientValidateCustomDomainResponse added in v0.2.0

type FrontDoorsClientValidateCustomDomainResponse struct {
	// Output of custom domain validation.
	ValidateCustomDomainOutput
}

FrontDoorsClientValidateCustomDomainResponse contains the response from method FrontDoorsClient.ValidateCustomDomain.

type FrontendEndpoint

type FrontendEndpoint struct {
	// Resource ID.
	ID *string

	// Resource name.
	Name *string

	// Properties of the Frontend endpoint
	Properties *FrontendEndpointProperties

	// READ-ONLY; Resource type.
	Type *string
}

FrontendEndpoint - A frontend endpoint used for routing.

func (FrontendEndpoint) MarshalJSON added in v1.1.0

func (f FrontendEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendEndpoint.

func (*FrontendEndpoint) UnmarshalJSON added in v1.1.0

func (f *FrontendEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpoint.

type FrontendEndpointLink struct {
	// Resource ID.
	ID *string
}

FrontendEndpointLink - Defines the Resource ID for a Frontend Endpoint.

func (FrontendEndpointLink) MarshalJSON added in v1.1.0

func (f FrontendEndpointLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendEndpointLink.

func (*FrontendEndpointLink) UnmarshalJSON added in v1.1.0

func (f *FrontendEndpointLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpointLink.

type FrontendEndpointProperties

type FrontendEndpointProperties struct {
	// The host name of the frontendEndpoint. Must be a domain name.
	HostName *string

	// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
	SessionAffinityEnabledState *SessionAffinityEnabledState

	// UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable.
	SessionAffinityTTLSeconds *int32

	// Defines the Web Application Firewall policy for each host (if applicable)
	WebApplicationFirewallPolicyLink *FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink

	// READ-ONLY; The configuration specifying how to enable HTTPS
	CustomHTTPSConfiguration *CustomHTTPSConfiguration

	// READ-ONLY; Provisioning status of Custom Https of the frontendEndpoint.
	CustomHTTPSProvisioningState *CustomHTTPSProvisioningState

	// READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step.
	CustomHTTPSProvisioningSubstate *CustomHTTPSProvisioningSubstate

	// READ-ONLY; Resource status.
	ResourceState *FrontDoorResourceState
}

FrontendEndpointProperties - The JSON object that contains the properties required to create a frontend endpoint.

func (FrontendEndpointProperties) MarshalJSON added in v1.1.0

func (f FrontendEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendEndpointProperties.

func (*FrontendEndpointProperties) UnmarshalJSON added in v1.1.0

func (f *FrontendEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpointProperties.

type FrontendEndpointUpdateParameters

type FrontendEndpointUpdateParameters struct {
	// The host name of the frontendEndpoint. Must be a domain name.
	HostName *string

	// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
	SessionAffinityEnabledState *SessionAffinityEnabledState

	// UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable.
	SessionAffinityTTLSeconds *int32

	// Defines the Web Application Firewall policy for each host (if applicable)
	WebApplicationFirewallPolicyLink *FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink
}

FrontendEndpointUpdateParameters - Frontend endpoint used in routing rule

func (FrontendEndpointUpdateParameters) MarshalJSON added in v1.1.0

func (f FrontendEndpointUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendEndpointUpdateParameters.

func (*FrontendEndpointUpdateParameters) UnmarshalJSON added in v1.1.0

func (f *FrontendEndpointUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpointUpdateParameters.

type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink struct {
	// Resource ID.
	ID *string
}

FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for each host (if applicable)

func (FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink.

func (*FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink.

type FrontendEndpointsClient

type FrontendEndpointsClient struct {
	// contains filtered or unexported fields
}

FrontendEndpointsClient contains the methods for the FrontendEndpoints group. Don't use this type directly, use NewFrontendEndpointsClient() instead.

func NewFrontendEndpointsClient

func NewFrontendEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FrontendEndpointsClient, error)

NewFrontendEndpointsClient creates a new instance of FrontendEndpointsClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FrontendEndpointsClient) BeginDisableHTTPS

func (client *FrontendEndpointsClient) BeginDisableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, options *FrontendEndpointsClientBeginDisableHTTPSOptions) (*runtime.Poller[FrontendEndpointsClientDisableHTTPSResponse], error)

BeginDisableHTTPS - Disables a frontendEndpoint for HTTPS traffic If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • frontendEndpointName - Name of the Frontend endpoint which is unique within the Front Door.
  • options - FrontendEndpointsClientBeginDisableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginDisableHTTPS method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorDisableHttps.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewFrontendEndpointsClient().BeginDisableHTTPS(ctx, "rg1", "frontDoor1", "frontendEndpoint1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*FrontendEndpointsClient) BeginEnableHTTPS

func (client *FrontendEndpointsClient) BeginEnableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, customHTTPSConfiguration CustomHTTPSConfiguration, options *FrontendEndpointsClientBeginEnableHTTPSOptions) (*runtime.Poller[FrontendEndpointsClientEnableHTTPSResponse], error)

BeginEnableHTTPS - Enables a frontendEndpoint for HTTPS traffic If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • frontendEndpointName - Name of the Frontend endpoint which is unique within the Front Door.
  • customHTTPSConfiguration - The configuration specifying how to enable HTTPS
  • options - FrontendEndpointsClientBeginEnableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginEnableHTTPS method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorEnableHttps.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewFrontendEndpointsClient().BeginEnableHTTPS(ctx, "rg1", "frontDoor1", "frontendEndpoint1", armfrontdoor.CustomHTTPSConfiguration{
		CertificateSource: to.Ptr(armfrontdoor.FrontDoorCertificateSourceAzureKeyVault),
		KeyVaultCertificateSourceParameters: &armfrontdoor.KeyVaultCertificateSourceParameters{
			SecretName:    to.Ptr("secret1"),
			SecretVersion: to.Ptr("00000000-0000-0000-0000-000000000000"),
			Vault: &armfrontdoor.KeyVaultCertificateSourceParametersVault{
				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.KeyVault/vaults/vault1"),
			},
		},
		MinimumTLSVersion: to.Ptr(armfrontdoor.MinimumTLSVersionOne0),
		ProtocolType:      to.Ptr(armfrontdoor.FrontDoorTLSProtocolTypeServerNameIndication),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*FrontendEndpointsClient) Get

func (client *FrontendEndpointsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, options *FrontendEndpointsClientGetOptions) (FrontendEndpointsClientGetResponse, error)

Get - Gets a Frontend endpoint with the specified name within the specified Front Door. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • frontendEndpointName - Name of the Frontend endpoint which is unique within the Front Door.
  • options - FrontendEndpointsClientGetOptions contains the optional parameters for the FrontendEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorFrontendEndpointGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFrontendEndpointsClient().Get(ctx, "rg1", "frontDoor1", "frontendEndpoint1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.FrontendEndpoint = armfrontdoor.FrontendEndpoint{
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
	// 	Name: to.Ptr("frontendEndpoint1"),
	// 	Properties: &armfrontdoor.FrontendEndpointProperties{
	// 		HostName: to.Ptr("www.contoso.com"),
	// 		SessionAffinityEnabledState: to.Ptr(armfrontdoor.SessionAffinityEnabledStateEnabled),
	// 		SessionAffinityTTLSeconds: to.Ptr[int32](60),
	// 		WebApplicationFirewallPolicyLink: &armfrontdoor.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
	// 		},
	// 	},
	// }
}
Output:

func (*FrontendEndpointsClient) NewListByFrontDoorPager added in v0.4.0

func (client *FrontendEndpointsClient) NewListByFrontDoorPager(resourceGroupName string, frontDoorName string, options *FrontendEndpointsClientListByFrontDoorOptions) *runtime.Pager[FrontendEndpointsClientListByFrontDoorResponse]

NewListByFrontDoorPager - Lists all of the frontend endpoints within a Front Door.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • options - FrontendEndpointsClientListByFrontDoorOptions contains the optional parameters for the FrontendEndpointsClient.NewListByFrontDoorPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorFrontendEndpointList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFrontendEndpointsClient().NewListByFrontDoorPager("rg1", "frontDoor1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FrontendEndpointsListResult = armfrontdoor.FrontendEndpointsListResult{
		// 	Value: []*armfrontdoor.FrontendEndpoint{
		// 		{
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
		// 			Name: to.Ptr("frontendEndpoint1"),
		// 			Properties: &armfrontdoor.FrontendEndpointProperties{
		// 				HostName: to.Ptr("www.contoso.com"),
		// 				SessionAffinityEnabledState: to.Ptr(armfrontdoor.SessionAffinityEnabledStateEnabled),
		// 				SessionAffinityTTLSeconds: to.Ptr[int32](60),
		// 				WebApplicationFirewallPolicyLink: &armfrontdoor.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink{
		// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type FrontendEndpointsClientBeginDisableHTTPSOptions added in v0.2.0

type FrontendEndpointsClientBeginDisableHTTPSOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

FrontendEndpointsClientBeginDisableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginDisableHTTPS method.

type FrontendEndpointsClientBeginEnableHTTPSOptions added in v0.2.0

type FrontendEndpointsClientBeginEnableHTTPSOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

FrontendEndpointsClientBeginEnableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginEnableHTTPS method.

type FrontendEndpointsClientDisableHTTPSResponse added in v0.2.0

type FrontendEndpointsClientDisableHTTPSResponse struct {
}

FrontendEndpointsClientDisableHTTPSResponse contains the response from method FrontendEndpointsClient.BeginDisableHTTPS.

type FrontendEndpointsClientEnableHTTPSResponse added in v0.2.0

type FrontendEndpointsClientEnableHTTPSResponse struct {
}

FrontendEndpointsClientEnableHTTPSResponse contains the response from method FrontendEndpointsClient.BeginEnableHTTPS.

type FrontendEndpointsClientGetOptions added in v0.2.0

type FrontendEndpointsClientGetOptions struct {
}

FrontendEndpointsClientGetOptions contains the optional parameters for the FrontendEndpointsClient.Get method.

type FrontendEndpointsClientGetResponse added in v0.2.0

type FrontendEndpointsClientGetResponse struct {
	// A frontend endpoint used for routing.
	FrontendEndpoint
}

FrontendEndpointsClientGetResponse contains the response from method FrontendEndpointsClient.Get.

type FrontendEndpointsClientListByFrontDoorOptions added in v0.2.0

type FrontendEndpointsClientListByFrontDoorOptions struct {
}

FrontendEndpointsClientListByFrontDoorOptions contains the optional parameters for the FrontendEndpointsClient.NewListByFrontDoorPager method.

type FrontendEndpointsClientListByFrontDoorResponse added in v0.2.0

type FrontendEndpointsClientListByFrontDoorResponse struct {
	// Result of the request to list frontend endpoints. It contains a list of Frontend endpoint objects and a URL link to get
	// the next set of results.
	FrontendEndpointsListResult
}

FrontendEndpointsClientListByFrontDoorResponse contains the response from method FrontendEndpointsClient.NewListByFrontDoorPager.

type FrontendEndpointsListResult

type FrontendEndpointsListResult struct {
	// URL to get the next set of frontend endpoints if there are any.
	NextLink *string

	// READ-ONLY; List of Frontend endpoints within a Front Door.
	Value []*FrontendEndpoint
}

FrontendEndpointsListResult - Result of the request to list frontend endpoints. It contains a list of Frontend endpoint objects and a URL link to get the next set of results.

func (FrontendEndpointsListResult) MarshalJSON

func (f FrontendEndpointsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendEndpointsListResult.

func (*FrontendEndpointsListResult) UnmarshalJSON added in v1.1.0

func (f *FrontendEndpointsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpointsListResult.

type GroupByVariable added in v1.4.0

type GroupByVariable struct {
	// REQUIRED; Describes the supported variable for group by
	VariableName *VariableName
}

GroupByVariable - Describes the variables available to group the rate limit requests

func (GroupByVariable) MarshalJSON added in v1.4.0

func (g GroupByVariable) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupByVariable.

func (*GroupByVariable) UnmarshalJSON added in v1.4.0

func (g *GroupByVariable) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupByVariable.

type HeaderAction

type HeaderAction struct {
	// REQUIRED; Which type of manipulation to apply to the header.
	HeaderActionType *HeaderActionType

	// REQUIRED; The name of the header this action will apply to.
	HeaderName *string

	// The value to update the given header name with. This value is not used if the actionType is Delete.
	Value *string
}

HeaderAction - An action that can manipulate an http header.

func (HeaderAction) MarshalJSON added in v1.1.0

func (h HeaderAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HeaderAction.

func (*HeaderAction) UnmarshalJSON added in v1.1.0

func (h *HeaderAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HeaderAction.

type HeaderActionType

type HeaderActionType string

HeaderActionType - Which type of manipulation to apply to the header.

const (
	HeaderActionTypeAppend    HeaderActionType = "Append"
	HeaderActionTypeDelete    HeaderActionType = "Delete"
	HeaderActionTypeOverwrite HeaderActionType = "Overwrite"
)

func PossibleHeaderActionTypeValues

func PossibleHeaderActionTypeValues() []HeaderActionType

PossibleHeaderActionTypeValues returns the possible values for the HeaderActionType const type.

type HealthProbeEnabled

type HealthProbeEnabled string

HealthProbeEnabled - Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.

const (
	HealthProbeEnabledDisabled HealthProbeEnabled = "Disabled"
	HealthProbeEnabledEnabled  HealthProbeEnabled = "Enabled"
)

func PossibleHealthProbeEnabledValues

func PossibleHealthProbeEnabledValues() []HealthProbeEnabled

PossibleHealthProbeEnabledValues returns the possible values for the HealthProbeEnabled const type.

type HealthProbeSettingsListResult

type HealthProbeSettingsListResult struct {
	// URL to get the next set of HealthProbeSettings objects if there are any.
	NextLink *string

	// READ-ONLY; List of HealthProbeSettings within a Front Door.
	Value []*HealthProbeSettingsModel
}

HealthProbeSettingsListResult - Result of the request to list HealthProbeSettings. It contains a list of HealthProbeSettings objects and a URL link to get the next set of results.

func (HealthProbeSettingsListResult) MarshalJSON

func (h HealthProbeSettingsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthProbeSettingsListResult.

func (*HealthProbeSettingsListResult) UnmarshalJSON added in v1.1.0

func (h *HealthProbeSettingsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthProbeSettingsListResult.

type HealthProbeSettingsModel

type HealthProbeSettingsModel struct {
	// Resource ID.
	ID *string

	// Resource name.
	Name *string

	// Properties of the health probe settings
	Properties *HealthProbeSettingsProperties

	// READ-ONLY; Resource type.
	Type *string
}

HealthProbeSettingsModel - Load balancing settings for a backend pool

func (HealthProbeSettingsModel) MarshalJSON added in v1.1.0

func (h HealthProbeSettingsModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthProbeSettingsModel.

func (*HealthProbeSettingsModel) UnmarshalJSON added in v1.1.0

func (h *HealthProbeSettingsModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthProbeSettingsModel.

type HealthProbeSettingsProperties

type HealthProbeSettingsProperties struct {
	// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled
	// if there is a single enabled backend in single enabled backend pool.
	EnabledState *HealthProbeEnabled

	// Configures which HTTP method to use to probe the backends defined under backendPools.
	HealthProbeMethod *FrontDoorHealthProbeMethod

	// The number of seconds between health probes.
	IntervalInSeconds *int32

	// The path to use for the health probe. Default is /
	Path *string

	// Protocol scheme to use for this probe
	Protocol *FrontDoorProtocol

	// READ-ONLY; Resource status.
	ResourceState *FrontDoorResourceState
}

HealthProbeSettingsProperties - The JSON object that contains the properties required to create a health probe settings.

func (HealthProbeSettingsProperties) MarshalJSON added in v1.1.0

func (h HealthProbeSettingsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthProbeSettingsProperties.

func (*HealthProbeSettingsProperties) UnmarshalJSON added in v1.1.0

func (h *HealthProbeSettingsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthProbeSettingsProperties.

type HealthProbeSettingsUpdateParameters

type HealthProbeSettingsUpdateParameters struct {
	// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled
	// if there is a single enabled backend in single enabled backend pool.
	EnabledState *HealthProbeEnabled

	// Configures which HTTP method to use to probe the backends defined under backendPools.
	HealthProbeMethod *FrontDoorHealthProbeMethod

	// The number of seconds between health probes.
	IntervalInSeconds *int32

	// The path to use for the health probe. Default is /
	Path *string

	// Protocol scheme to use for this probe
	Protocol *FrontDoorProtocol
}

HealthProbeSettingsUpdateParameters - L7 health probe settings for a backend pool

func (HealthProbeSettingsUpdateParameters) MarshalJSON added in v1.1.0

func (h HealthProbeSettingsUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthProbeSettingsUpdateParameters.

func (*HealthProbeSettingsUpdateParameters) UnmarshalJSON added in v1.1.0

func (h *HealthProbeSettingsUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthProbeSettingsUpdateParameters.

type KeyVaultCertificateSourceParameters

type KeyVaultCertificateSourceParameters struct {
	// The name of the Key Vault secret representing the full certificate PFX
	SecretName *string

	// The version of the Key Vault secret representing the full certificate PFX
	SecretVersion *string

	// The Key Vault containing the SSL certificate
	Vault *KeyVaultCertificateSourceParametersVault
}

KeyVaultCertificateSourceParameters - Parameters required for bring-your-own-certification via Key Vault

func (KeyVaultCertificateSourceParameters) MarshalJSON added in v1.1.0

func (k KeyVaultCertificateSourceParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateSourceParameters.

func (*KeyVaultCertificateSourceParameters) UnmarshalJSON added in v1.1.0

func (k *KeyVaultCertificateSourceParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateSourceParameters.

type KeyVaultCertificateSourceParametersVault

type KeyVaultCertificateSourceParametersVault struct {
	// Resource ID.
	ID *string
}

KeyVaultCertificateSourceParametersVault - The Key Vault containing the SSL certificate

func (KeyVaultCertificateSourceParametersVault) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateSourceParametersVault.

func (*KeyVaultCertificateSourceParametersVault) UnmarshalJSON added in v1.1.0

func (k *KeyVaultCertificateSourceParametersVault) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateSourceParametersVault.

type LatencyMetric

type LatencyMetric struct {
	// READ-ONLY; The lower end of the 95% confidence interval for endpoint A
	ACLower95CI *float32

	// READ-ONLY; The upper end of the 95% confidence interval for endpoint A
	AHUpper95CI *float32

	// READ-ONLY; The metric value of the A endpoint
	AValue *float32

	// READ-ONLY; The lower end of the 95% confidence interval for endpoint B
	BCLower95CI *float32

	// READ-ONLY; The upper end of the 95% confidence interval for endpoint B
	BUpper95CI *float32

	// READ-ONLY; The metric value of the B endpoint
	BValue *float32

	// READ-ONLY; The difference in value between endpoint A and B
	Delta *float32

	// READ-ONLY; The percent difference between endpoint A and B
	DeltaPercent *float32

	// READ-ONLY; The end time of the Latency Scorecard in UTC
	EndDateTimeUTC *string

	// READ-ONLY; The name of the Latency Metric
	Name *string
}

LatencyMetric - Defines the properties of a latency metric used in the latency scorecard

func (LatencyMetric) MarshalJSON added in v1.1.0

func (l LatencyMetric) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LatencyMetric.

func (*LatencyMetric) UnmarshalJSON added in v1.1.0

func (l *LatencyMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LatencyMetric.

type LatencyScorecard

type LatencyScorecard struct {
	// Resource location.
	Location *string

	// The properties of a latency scorecard
	Properties *LatencyScorecardProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

LatencyScorecard - Defines the LatencyScorecard

func (LatencyScorecard) MarshalJSON

func (l LatencyScorecard) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LatencyScorecard.

func (*LatencyScorecard) UnmarshalJSON added in v1.1.0

func (l *LatencyScorecard) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LatencyScorecard.

type LatencyScorecardAggregationInterval

type LatencyScorecardAggregationInterval string
const (
	LatencyScorecardAggregationIntervalDaily   LatencyScorecardAggregationInterval = "Daily"
	LatencyScorecardAggregationIntervalMonthly LatencyScorecardAggregationInterval = "Monthly"
	LatencyScorecardAggregationIntervalWeekly  LatencyScorecardAggregationInterval = "Weekly"
)

func PossibleLatencyScorecardAggregationIntervalValues

func PossibleLatencyScorecardAggregationIntervalValues() []LatencyScorecardAggregationInterval

PossibleLatencyScorecardAggregationIntervalValues returns the possible values for the LatencyScorecardAggregationInterval const type.

type LatencyScorecardProperties

type LatencyScorecardProperties struct {
	// The latency metrics of the Latency Scorecard
	LatencyMetrics []*LatencyMetric

	// READ-ONLY; The country associated with the Latency Scorecard. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html
	Country *string

	// READ-ONLY; The description of the Latency Scorecard
	Description *string

	// READ-ONLY; The end time of the Latency Scorecard in UTC
	EndDateTimeUTC *time.Time

	// READ-ONLY; The A endpoint in the scorecard
	EndpointA *string

	// READ-ONLY; The B endpoint in the scorecard
	EndpointB *string

	// READ-ONLY; The unique identifier of the Latency Scorecard
	ID *string

	// READ-ONLY; The name of the Latency Scorecard
	Name *string

	// READ-ONLY; The start time of the Latency Scorecard in UTC
	StartDateTimeUTC *time.Time
}

LatencyScorecardProperties - Defines a the properties of a Latency Scorecard

func (LatencyScorecardProperties) MarshalJSON

func (l LatencyScorecardProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LatencyScorecardProperties.

func (*LatencyScorecardProperties) UnmarshalJSON

func (l *LatencyScorecardProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LatencyScorecardProperties.

type ListResult added in v0.2.0

type ListResult struct {
	// URL to get the next set of Front Door objects if there are any.
	NextLink *string

	// READ-ONLY; List of Front Doors within a resource group.
	Value []*FrontDoor
}

ListResult - Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next set of results.

func (ListResult) MarshalJSON added in v0.2.0

func (l ListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListResult.

func (*ListResult) UnmarshalJSON added in v1.1.0

func (l *ListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListResult.

type LoadBalancingSettingsListResult

type LoadBalancingSettingsListResult struct {
	// URL to get the next set of LoadBalancingSettings objects if there are any.
	NextLink *string

	// READ-ONLY; List of Backend Pools within a Front Door.
	Value []*LoadBalancingSettingsModel
}

LoadBalancingSettingsListResult - Result of the request to list load balancing settings. It contains a list of load balancing settings objects and a URL link to get the next set of results.

func (LoadBalancingSettingsListResult) MarshalJSON

func (l LoadBalancingSettingsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsListResult.

func (*LoadBalancingSettingsListResult) UnmarshalJSON added in v1.1.0

func (l *LoadBalancingSettingsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingSettingsListResult.

type LoadBalancingSettingsModel

type LoadBalancingSettingsModel struct {
	// Resource ID.
	ID *string

	// Resource name.
	Name *string

	// Properties of the load balancing settings
	Properties *LoadBalancingSettingsProperties

	// READ-ONLY; Resource type.
	Type *string
}

LoadBalancingSettingsModel - Load balancing settings for a backend pool

func (LoadBalancingSettingsModel) MarshalJSON added in v1.1.0

func (l LoadBalancingSettingsModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsModel.

func (*LoadBalancingSettingsModel) UnmarshalJSON added in v1.1.0

func (l *LoadBalancingSettingsModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingSettingsModel.

type LoadBalancingSettingsProperties

type LoadBalancingSettingsProperties struct {
	// The additional latency in milliseconds for probes to fall into the lowest latency bucket
	AdditionalLatencyMilliseconds *int32

	// The number of samples to consider for load balancing decisions
	SampleSize *int32

	// The number of samples within the sample period that must succeed
	SuccessfulSamplesRequired *int32

	// READ-ONLY; Resource status.
	ResourceState *FrontDoorResourceState
}

LoadBalancingSettingsProperties - The JSON object that contains the properties required to create load balancing settings

func (LoadBalancingSettingsProperties) MarshalJSON added in v1.1.0

func (l LoadBalancingSettingsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsProperties.

func (*LoadBalancingSettingsProperties) UnmarshalJSON added in v1.1.0

func (l *LoadBalancingSettingsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingSettingsProperties.

type LoadBalancingSettingsUpdateParameters

type LoadBalancingSettingsUpdateParameters struct {
	// The additional latency in milliseconds for probes to fall into the lowest latency bucket
	AdditionalLatencyMilliseconds *int32

	// The number of samples to consider for load balancing decisions
	SampleSize *int32

	// The number of samples within the sample period that must succeed
	SuccessfulSamplesRequired *int32
}

LoadBalancingSettingsUpdateParameters - Round-Robin load balancing settings for a backend pool

func (LoadBalancingSettingsUpdateParameters) MarshalJSON added in v1.1.0

func (l LoadBalancingSettingsUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsUpdateParameters.

func (*LoadBalancingSettingsUpdateParameters) UnmarshalJSON added in v1.1.0

func (l *LoadBalancingSettingsUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingSettingsUpdateParameters.

type ManagedRuleDefinition

type ManagedRuleDefinition struct {
	// READ-ONLY; Describes the default action to be applied when the managed rule matches.
	DefaultAction *ActionType

	// READ-ONLY; Describes the default state for the managed rule.
	DefaultState *ManagedRuleEnabledState

	// READ-ONLY; Describes the functionality of the managed rule.
	Description *string

	// READ-ONLY; Identifier for the managed rule.
	RuleID *string
}

ManagedRuleDefinition - Describes a managed rule definition.

func (ManagedRuleDefinition) MarshalJSON added in v1.1.0

func (m ManagedRuleDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleDefinition.

func (*ManagedRuleDefinition) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleDefinition.

type ManagedRuleEnabledState

type ManagedRuleEnabledState string

ManagedRuleEnabledState - Describes if the managed rule is in enabled or disabled state.

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

func PossibleManagedRuleEnabledStateValues

func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState

PossibleManagedRuleEnabledStateValues returns the possible values for the ManagedRuleEnabledState const type.

type ManagedRuleExclusion

type ManagedRuleExclusion struct {
	// REQUIRED; The variable type to be excluded.
	MatchVariable *ManagedRuleExclusionMatchVariable

	// REQUIRED; Selector value for which elements in the collection this exclusion applies to.
	Selector *string

	// REQUIRED; Comparison operator to apply to the selector when specifying which elements in the collection this exclusion
	// applies to.
	SelectorMatchOperator *ManagedRuleExclusionSelectorMatchOperator
}

ManagedRuleExclusion - Exclude variables from managed rule evaluation.

func (ManagedRuleExclusion) MarshalJSON added in v1.1.0

func (m ManagedRuleExclusion) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleExclusion.

func (*ManagedRuleExclusion) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleExclusion) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleExclusion.

type ManagedRuleExclusionMatchVariable

type ManagedRuleExclusionMatchVariable string

ManagedRuleExclusionMatchVariable - The variable type to be excluded.

const (
	ManagedRuleExclusionMatchVariableQueryStringArgNames     ManagedRuleExclusionMatchVariable = "QueryStringArgNames"
	ManagedRuleExclusionMatchVariableRequestBodyJSONArgNames ManagedRuleExclusionMatchVariable = "RequestBodyJsonArgNames"
	ManagedRuleExclusionMatchVariableRequestBodyPostArgNames ManagedRuleExclusionMatchVariable = "RequestBodyPostArgNames"
	ManagedRuleExclusionMatchVariableRequestCookieNames      ManagedRuleExclusionMatchVariable = "RequestCookieNames"
	ManagedRuleExclusionMatchVariableRequestHeaderNames      ManagedRuleExclusionMatchVariable = "RequestHeaderNames"
)

func PossibleManagedRuleExclusionMatchVariableValues

func PossibleManagedRuleExclusionMatchVariableValues() []ManagedRuleExclusionMatchVariable

PossibleManagedRuleExclusionMatchVariableValues returns the possible values for the ManagedRuleExclusionMatchVariable const type.

type ManagedRuleExclusionSelectorMatchOperator

type ManagedRuleExclusionSelectorMatchOperator string

ManagedRuleExclusionSelectorMatchOperator - Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to.

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

func PossibleManagedRuleExclusionSelectorMatchOperatorValues

func PossibleManagedRuleExclusionSelectorMatchOperatorValues() []ManagedRuleExclusionSelectorMatchOperator

PossibleManagedRuleExclusionSelectorMatchOperatorValues returns the possible values for the ManagedRuleExclusionSelectorMatchOperator const type.

type ManagedRuleGroupDefinition

type ManagedRuleGroupDefinition struct {
	// READ-ONLY; Description of the managed rule group.
	Description *string

	// READ-ONLY; Name of the managed rule group.
	RuleGroupName *string

	// READ-ONLY; List of rules within the managed rule group.
	Rules []*ManagedRuleDefinition
}

ManagedRuleGroupDefinition - Describes a managed rule group.

func (ManagedRuleGroupDefinition) MarshalJSON

func (m ManagedRuleGroupDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupDefinition.

func (*ManagedRuleGroupDefinition) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleGroupDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupDefinition.

type ManagedRuleGroupOverride

type ManagedRuleGroupOverride struct {
	// REQUIRED; Describes the managed rule group to override.
	RuleGroupName *string

	// Describes the exclusions that are applied to all rules in the group.
	Exclusions []*ManagedRuleExclusion

	// List of rules that will be disabled. If none specified, all rules in the group will be disabled.
	Rules []*ManagedRuleOverride
}

ManagedRuleGroupOverride - Defines a managed rule group override setting.

func (ManagedRuleGroupOverride) MarshalJSON

func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride.

func (*ManagedRuleGroupOverride) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleGroupOverride) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupOverride.

type ManagedRuleOverride

type ManagedRuleOverride struct {
	// REQUIRED; Identifier for the managed rule.
	RuleID *string

	// Describes the override action to be applied when rule matches.
	Action *ActionType

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

	// Describes the exclusions that are applied to this specific rule.
	Exclusions []*ManagedRuleExclusion
}

ManagedRuleOverride - Defines a managed rule group override setting.

func (ManagedRuleOverride) MarshalJSON

func (m ManagedRuleOverride) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleOverride.

func (*ManagedRuleOverride) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleOverride) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleOverride.

type ManagedRuleSet

type ManagedRuleSet struct {
	// REQUIRED; Defines the rule set type to use.
	RuleSetType *string

	// REQUIRED; Defines the version of the rule set to use.
	RuleSetVersion *string

	// Describes the exclusions that are applied to all rules in the set.
	Exclusions []*ManagedRuleExclusion

	// Defines the rule group overrides to apply to the rule set.
	RuleGroupOverrides []*ManagedRuleGroupOverride

	// Defines the rule set action.
	RuleSetAction *ManagedRuleSetActionType
}

ManagedRuleSet - Defines a managed rule set.

func (ManagedRuleSet) MarshalJSON

func (m ManagedRuleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet.

func (*ManagedRuleSet) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSet.

type ManagedRuleSetActionType

type ManagedRuleSetActionType string

ManagedRuleSetActionType - Defines the action to take when a managed rule set score threshold is met.

const (
	ManagedRuleSetActionTypeBlock    ManagedRuleSetActionType = "Block"
	ManagedRuleSetActionTypeLog      ManagedRuleSetActionType = "Log"
	ManagedRuleSetActionTypeRedirect ManagedRuleSetActionType = "Redirect"
)

func PossibleManagedRuleSetActionTypeValues

func PossibleManagedRuleSetActionTypeValues() []ManagedRuleSetActionType

PossibleManagedRuleSetActionTypeValues returns the possible values for the ManagedRuleSetActionType const type.

type ManagedRuleSetDefinition

type ManagedRuleSetDefinition struct {
	// Resource location.
	Location *string

	// Properties for a managed rule set definition.
	Properties *ManagedRuleSetDefinitionProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

ManagedRuleSetDefinition - Describes the a managed rule set definition.

func (ManagedRuleSetDefinition) MarshalJSON

func (m ManagedRuleSetDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinition.

func (*ManagedRuleSetDefinition) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleSetDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinition.

type ManagedRuleSetDefinitionList

type ManagedRuleSetDefinitionList struct {
	// URL to retrieve next set of managed rule set definitions.
	NextLink *string

	// READ-ONLY; List of managed rule set definitions.
	Value []*ManagedRuleSetDefinition
}

ManagedRuleSetDefinitionList - List of managed rule set definitions available for use in a policy.

func (ManagedRuleSetDefinitionList) MarshalJSON

func (m ManagedRuleSetDefinitionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionList.

func (*ManagedRuleSetDefinitionList) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleSetDefinitionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionList.

type ManagedRuleSetDefinitionProperties

type ManagedRuleSetDefinitionProperties struct {
	// READ-ONLY; Provisioning state of the managed rule set.
	ProvisioningState *string

	// READ-ONLY; Rule groups of the managed rule set.
	RuleGroups []*ManagedRuleGroupDefinition

	// READ-ONLY; Id of the managed rule set.
	RuleSetID *string

	// READ-ONLY; Type of the managed rule set.
	RuleSetType *string

	// READ-ONLY; Version of the managed rule set type.
	RuleSetVersion *string
}

ManagedRuleSetDefinitionProperties - Properties for a managed rule set definition.

func (ManagedRuleSetDefinitionProperties) MarshalJSON

func (m ManagedRuleSetDefinitionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionProperties.

func (*ManagedRuleSetDefinitionProperties) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleSetDefinitionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionProperties.

type ManagedRuleSetList

type ManagedRuleSetList struct {
	// List of rule sets.
	ManagedRuleSets []*ManagedRuleSet
}

ManagedRuleSetList - Defines the list of managed rule sets for the policy.

func (ManagedRuleSetList) MarshalJSON

func (m ManagedRuleSetList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetList.

func (*ManagedRuleSetList) UnmarshalJSON added in v1.1.0

func (m *ManagedRuleSetList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetList.

type ManagedRuleSetsClient

type ManagedRuleSetsClient struct {
	// contains filtered or unexported fields
}

ManagedRuleSetsClient contains the methods for the ManagedRuleSets group. Don't use this type directly, use NewManagedRuleSetsClient() instead.

func NewManagedRuleSetsClient

func NewManagedRuleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedRuleSetsClient, error)

NewManagedRuleSetsClient creates a new instance of ManagedRuleSetsClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ManagedRuleSetsClient) NewListPager added in v0.4.0

NewListPager - Lists all available managed rule sets.

Generated from API version 2024-02-01

  • options - ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListManagedRuleSets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewManagedRuleSetsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ManagedRuleSetDefinitionList = armfrontdoor.ManagedRuleSetDefinitionList{
		// 	Value: []*armfrontdoor.ManagedRuleSetDefinition{
		// 		{
		// 			Name: to.Ptr("DefaultRuleSet_1.0"),
		// 			Type: to.Ptr("Microsoft.Network/frontdoorwebapplicationfirewallmanagedrulesets"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets"),
		// 			Properties: &armfrontdoor.ManagedRuleSetDefinitionProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				RuleGroups: []*armfrontdoor.ManagedRuleGroupDefinition{
		// 					{
		// 						Description: to.Ptr("SQL injection"),
		// 						RuleGroupName: to.Ptr("SQLI"),
		// 						Rules: []*armfrontdoor.ManagedRuleDefinition{
		// 							{
		// 								Description: to.Ptr("SQL Injection Attack Detected via libinjection"),
		// 								DefaultAction: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 								DefaultState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
		// 								RuleID: to.Ptr("942100"),
		// 							},
		// 							{
		// 								Description: to.Ptr("SQL Injection Attack: Common Injection Testing Detected"),
		// 								DefaultAction: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 								DefaultState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
		// 								RuleID: to.Ptr("942110"),
		// 						}},
		// 					},
		// 					{
		// 						Description: to.Ptr("Cross-site scripting"),
		// 						RuleGroupName: to.Ptr("XSS"),
		// 						Rules: []*armfrontdoor.ManagedRuleDefinition{
		// 							{
		// 								Description: to.Ptr("XSS Attack Detected via libinjection"),
		// 								DefaultAction: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 								DefaultState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
		// 								RuleID: to.Ptr("941100"),
		// 							},
		// 							{
		// 								Description: to.Ptr("XSS Attack Detected via libinjection"),
		// 								DefaultAction: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 								DefaultState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
		// 								RuleID: to.Ptr("941101"),
		// 							},
		// 							{
		// 								Description: to.Ptr("XSS Filter - Category 1: Script Tag Vector"),
		// 								DefaultAction: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 								DefaultState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
		// 								RuleID: to.Ptr("941110"),
		// 						}},
		// 				}},
		// 				RuleSetID: to.Ptr("8125d145-ddc5-4d90-9bc3-24c5f2de69a2"),
		// 				RuleSetType: to.Ptr("DefaultRuleSet"),
		// 				RuleSetVersion: to.Ptr("1.0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ManagedRuleSetsClientListOptions added in v0.2.0

type ManagedRuleSetsClientListOptions struct {
}

ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager method.

type ManagedRuleSetsClientListResponse added in v0.2.0

type ManagedRuleSetsClientListResponse struct {
	// List of managed rule set definitions available for use in a policy.
	ManagedRuleSetDefinitionList
}

ManagedRuleSetsClientListResponse contains the response from method ManagedRuleSetsClient.NewListPager.

type MatchCondition

type MatchCondition struct {
	// REQUIRED; List of possible match values.
	MatchValue []*string

	// REQUIRED; Request variable to compare with.
	MatchVariable *MatchVariable

	// REQUIRED; Comparison type to use for matching with the variable value.
	Operator *Operator

	// Describes if the result of this condition should be negated.
	NegateCondition *bool

	// Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null.
	Selector *string

	// List of transforms.
	Transforms []*TransformType
}

MatchCondition - Define a match condition.

func (MatchCondition) MarshalJSON

func (m MatchCondition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MatchCondition.

func (*MatchCondition) UnmarshalJSON added in v1.1.0

func (m *MatchCondition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MatchCondition.

type MatchProcessingBehavior

type MatchProcessingBehavior string

MatchProcessingBehavior - If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.

const (
	MatchProcessingBehaviorContinue MatchProcessingBehavior = "Continue"
	MatchProcessingBehaviorStop     MatchProcessingBehavior = "Stop"
)

func PossibleMatchProcessingBehaviorValues

func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior

PossibleMatchProcessingBehaviorValues returns the possible values for the MatchProcessingBehavior const type.

type MatchVariable

type MatchVariable string

MatchVariable - Request variable to compare with.

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"
)

func PossibleMatchVariableValues

func PossibleMatchVariableValues() []MatchVariable

PossibleMatchVariableValues returns the possible values for the MatchVariable const type.

type MinimumTLSVersion

type MinimumTLSVersion string

MinimumTLSVersion - The minimum TLS version required from the clients to establish an SSL handshake with Front Door.

const (
	MinimumTLSVersionOne0 MinimumTLSVersion = "1.0"
	MinimumTLSVersionOne2 MinimumTLSVersion = "1.2"
)

func PossibleMinimumTLSVersionValues

func PossibleMinimumTLSVersionValues() []MinimumTLSVersion

PossibleMinimumTLSVersionValues returns the possible values for the MinimumTLSVersion const type.

type NameAvailabilityClient added in v0.2.0

type NameAvailabilityClient struct {
	// contains filtered or unexported fields
}

NameAvailabilityClient contains the methods for the FrontDoorNameAvailability group. Don't use this type directly, use NewNameAvailabilityClient() instead.

func NewNameAvailabilityClient added in v0.2.0

func NewNameAvailabilityClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*NameAvailabilityClient, error)

NewNameAvailabilityClient creates a new instance of NameAvailabilityClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NameAvailabilityClient) Check added in v0.2.0

Check - Check the availability of a Front Door resource name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • checkFrontDoorNameAvailabilityInput - Input to check.
  • options - NameAvailabilityClientCheckOptions contains the optional parameters for the NameAvailabilityClient.Check method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/CheckFrontdoorNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNameAvailabilityClient().Check(ctx, armfrontdoor.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armfrontdoor.ResourceTypeMicrosoftNetworkFrontDoors),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameAvailabilityOutput = armfrontdoor.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailability: to.Ptr(armfrontdoor.AvailabilityUnavailable),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

type NameAvailabilityClientCheckOptions added in v0.2.0

type NameAvailabilityClientCheckOptions struct {
}

NameAvailabilityClientCheckOptions contains the optional parameters for the NameAvailabilityClient.Check method.

type NameAvailabilityClientCheckResponse added in v0.2.0

type NameAvailabilityClientCheckResponse struct {
	// Output of check name availability API.
	CheckNameAvailabilityOutput
}

NameAvailabilityClientCheckResponse contains the response from method NameAvailabilityClient.Check.

type NameAvailabilityWithSubscriptionClient added in v0.2.0

type NameAvailabilityWithSubscriptionClient struct {
	// contains filtered or unexported fields
}

NameAvailabilityWithSubscriptionClient contains the methods for the FrontDoorNameAvailabilityWithSubscription group. Don't use this type directly, use NewNameAvailabilityWithSubscriptionClient() instead.

func NewNameAvailabilityWithSubscriptionClient added in v0.2.0

func NewNameAvailabilityWithSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NameAvailabilityWithSubscriptionClient, error)

NewNameAvailabilityWithSubscriptionClient creates a new instance of NameAvailabilityWithSubscriptionClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NameAvailabilityWithSubscriptionClient) Check added in v0.2.0

Check - Check the availability of a Front Door subdomain. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • checkFrontDoorNameAvailabilityInput - Input to check.
  • options - NameAvailabilityWithSubscriptionClientCheckOptions contains the optional parameters for the NameAvailabilityWithSubscriptionClient.Check method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/CheckFrontdoorNameAvailabilityWithSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNameAvailabilityWithSubscriptionClient().Check(ctx, armfrontdoor.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armfrontdoor.ResourceTypeMicrosoftNetworkFrontDoorsFrontendEndpoints),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameAvailabilityOutput = armfrontdoor.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailability: to.Ptr(armfrontdoor.AvailabilityUnavailable),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

type NameAvailabilityWithSubscriptionClientCheckOptions added in v0.2.0

type NameAvailabilityWithSubscriptionClientCheckOptions struct {
}

NameAvailabilityWithSubscriptionClientCheckOptions contains the optional parameters for the NameAvailabilityWithSubscriptionClient.Check method.

type NameAvailabilityWithSubscriptionClientCheckResponse added in v0.2.0

type NameAvailabilityWithSubscriptionClientCheckResponse struct {
	// Output of check name availability API.
	CheckNameAvailabilityOutput
}

NameAvailabilityWithSubscriptionClientCheckResponse contains the response from method NameAvailabilityWithSubscriptionClient.Check.

type NetworkExperimentProfilesClient

type NetworkExperimentProfilesClient struct {
	// contains filtered or unexported fields
}

NetworkExperimentProfilesClient contains the methods for the NetworkExperimentProfiles group. Don't use this type directly, use NewNetworkExperimentProfilesClient() instead.

func NewNetworkExperimentProfilesClient

func NewNetworkExperimentProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkExperimentProfilesClient, error)

NewNetworkExperimentProfilesClient creates a new instance of NetworkExperimentProfilesClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NetworkExperimentProfilesClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates an NetworkExperiment Profile If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • profileName - The Profile identifier associated with the Tenant and Partner
  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • parameters - An Network Experiment Profile
  • options - NetworkExperimentProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentCreateProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNetworkExperimentProfilesClient().BeginCreateOrUpdate(ctx, "MyProfile", "MyResourceGroup", armfrontdoor.Profile{
		Location: to.Ptr("WestUs"),
		Properties: &armfrontdoor.ProfileProperties{
			EnabledState: to.Ptr(armfrontdoor.StateEnabled),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Profile = armfrontdoor.Profile{
	// 	Name: to.Ptr("MyProfile"),
	// 	Type: to.Ptr("Microsoft.Network/NetworkExperimentprofiles"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.ProfileProperties{
	// 		EnabledState: to.Ptr(armfrontdoor.StateEnabled),
	// 		ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
	// 	},
	// }
}
Output:

func (*NetworkExperimentProfilesClient) BeginDelete

BeginDelete - Deletes an NetworkExperiment Profile by ProfileName If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • options - NetworkExperimentProfilesClientBeginDeleteOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentDeleteProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNetworkExperimentProfilesClient().BeginDelete(ctx, "MyResourceGroup", "MyProfile", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*NetworkExperimentProfilesClient) BeginUpdate

BeginUpdate - Updates an NetworkExperimentProfiles If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • parameters - The Profile Update Model
  • options - NetworkExperimentProfilesClientBeginUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentUpdateProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNetworkExperimentProfilesClient().BeginUpdate(ctx, "MyResourceGroup", "MyProfile", armfrontdoor.ProfileUpdateModel{
		Properties: &armfrontdoor.ProfileUpdateProperties{
			EnabledState: to.Ptr(armfrontdoor.StateEnabled),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
			"key2": to.Ptr("value2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Profile = armfrontdoor.Profile{
	// 	Name: to.Ptr("MyProfile"),
	// 	Type: to.Ptr("Microsoft.Network/NetworkExperimentprofiles"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.ProfileProperties{
	// 		EnabledState: to.Ptr(armfrontdoor.StateEnabled),
	// 		ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
	// 	},
	// }
}
Output:

func (*NetworkExperimentProfilesClient) Get

Get - Gets an NetworkExperiment Profile by ProfileName If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • options - NetworkExperimentProfilesClientGetOptions contains the optional parameters for the NetworkExperimentProfilesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentGetProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNetworkExperimentProfilesClient().Get(ctx, "MyResourceGroup", "MyProfile", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Profile = armfrontdoor.Profile{
	// 	Name: to.Ptr("MyProfile"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.ProfileProperties{
	// 		EnabledState: to.Ptr(armfrontdoor.StateEnabled),
	// 		ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
	// 	},
	// }
}
Output:

func (*NetworkExperimentProfilesClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - Gets a list of Network Experiment Profiles within a resource group under a subscription

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • options - NetworkExperimentProfilesClientListByResourceGroupOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListByResourceGroupPager method.

func (*NetworkExperimentProfilesClient) NewListPager added in v0.4.0

NewListPager - Gets a list of Network Experiment Profiles under a subscription

Generated from API version 2019-11-01

  • options - NetworkExperimentProfilesClientListOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentListProfiles.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNetworkExperimentProfilesClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ProfileList = armfrontdoor.ProfileList{
		// 	Value: []*armfrontdoor.Profile{
		// 		{
		// 			Name: to.Ptr("MyProfile"),
		// 			Type: to.Ptr("Microsoft.Network/NetworkExperimentprofiles"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/"),
		// 			Location: to.Ptr("WestUs"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 				"key2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armfrontdoor.ProfileProperties{
		// 				EnabledState: to.Ptr(armfrontdoor.StateEnabled),
		// 				ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
		// 			},
		// 	}},
		// }
	}
}
Output:

type NetworkExperimentProfilesClientBeginCreateOrUpdateOptions added in v0.2.0

type NetworkExperimentProfilesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NetworkExperimentProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginCreateOrUpdate method.

type NetworkExperimentProfilesClientBeginDeleteOptions added in v0.2.0

type NetworkExperimentProfilesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NetworkExperimentProfilesClientBeginDeleteOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginDelete method.

type NetworkExperimentProfilesClientBeginUpdateOptions added in v0.2.0

type NetworkExperimentProfilesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NetworkExperimentProfilesClientBeginUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginUpdate method.

type NetworkExperimentProfilesClientCreateOrUpdateResponse added in v0.2.0

type NetworkExperimentProfilesClientCreateOrUpdateResponse struct {
	// Defines an Network Experiment Profile and lists of Experiments
	Profile
}

NetworkExperimentProfilesClientCreateOrUpdateResponse contains the response from method NetworkExperimentProfilesClient.BeginCreateOrUpdate.

type NetworkExperimentProfilesClientDeleteResponse added in v0.2.0

type NetworkExperimentProfilesClientDeleteResponse struct {
}

NetworkExperimentProfilesClientDeleteResponse contains the response from method NetworkExperimentProfilesClient.BeginDelete.

type NetworkExperimentProfilesClientGetOptions added in v0.2.0

type NetworkExperimentProfilesClientGetOptions struct {
}

NetworkExperimentProfilesClientGetOptions contains the optional parameters for the NetworkExperimentProfilesClient.Get method.

type NetworkExperimentProfilesClientGetResponse added in v0.2.0

type NetworkExperimentProfilesClientGetResponse struct {
	// Defines an Network Experiment Profile and lists of Experiments
	Profile
}

NetworkExperimentProfilesClientGetResponse contains the response from method NetworkExperimentProfilesClient.Get.

type NetworkExperimentProfilesClientListByResourceGroupOptions added in v0.2.0

type NetworkExperimentProfilesClientListByResourceGroupOptions struct {
}

NetworkExperimentProfilesClientListByResourceGroupOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListByResourceGroupPager method.

type NetworkExperimentProfilesClientListByResourceGroupResponse added in v0.2.0

type NetworkExperimentProfilesClientListByResourceGroupResponse struct {
	// Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results.
	ProfileList
}

NetworkExperimentProfilesClientListByResourceGroupResponse contains the response from method NetworkExperimentProfilesClient.NewListByResourceGroupPager.

type NetworkExperimentProfilesClientListOptions added in v0.2.0

type NetworkExperimentProfilesClientListOptions struct {
}

NetworkExperimentProfilesClientListOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListPager method.

type NetworkExperimentProfilesClientListResponse added in v0.2.0

type NetworkExperimentProfilesClientListResponse struct {
	// Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results.
	ProfileList
}

NetworkExperimentProfilesClientListResponse contains the response from method NetworkExperimentProfilesClient.NewListPager.

type NetworkExperimentProfilesClientUpdateResponse added in v0.2.0

type NetworkExperimentProfilesClientUpdateResponse struct {
	// Defines an Network Experiment Profile and lists of Experiments
	Profile
}

NetworkExperimentProfilesClientUpdateResponse contains the response from method NetworkExperimentProfilesClient.BeginUpdate.

type NetworkExperimentResourceState

type NetworkExperimentResourceState string

NetworkExperimentResourceState - Defines the server side resource status

const (
	NetworkExperimentResourceStateCreating  NetworkExperimentResourceState = "Creating"
	NetworkExperimentResourceStateDeleting  NetworkExperimentResourceState = "Deleting"
	NetworkExperimentResourceStateDisabled  NetworkExperimentResourceState = "Disabled"
	NetworkExperimentResourceStateDisabling NetworkExperimentResourceState = "Disabling"
	NetworkExperimentResourceStateEnabled   NetworkExperimentResourceState = "Enabled"
	NetworkExperimentResourceStateEnabling  NetworkExperimentResourceState = "Enabling"
)

func PossibleNetworkExperimentResourceStateValues

func PossibleNetworkExperimentResourceStateValues() []NetworkExperimentResourceState

PossibleNetworkExperimentResourceStateValues returns the possible values for the NetworkExperimentResourceState const type.

type NetworkOperationStatus

type NetworkOperationStatus string

NetworkOperationStatus - Status of the Azure async operation.

const (
	NetworkOperationStatusFailed     NetworkOperationStatus = "Failed"
	NetworkOperationStatusInProgress NetworkOperationStatus = "InProgress"
	NetworkOperationStatusSucceeded  NetworkOperationStatus = "Succeeded"
)

func PossibleNetworkOperationStatusValues

func PossibleNetworkOperationStatusValues() []NetworkOperationStatus

PossibleNetworkOperationStatusValues returns the possible values for the NetworkOperationStatus const type.

type Operator

type Operator string

Operator - Comparison type to use for matching with the variable value.

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"
)

func PossibleOperatorValues

func PossibleOperatorValues() []Operator

PossibleOperatorValues returns the possible values for the Operator const type.

type PoliciesClient

type PoliciesClient struct {
	// contains filtered or unexported fields
}

PoliciesClient contains the methods for the Policies group. Don't use this type directly, use NewPoliciesClient() instead.

func NewPoliciesClient

func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoliciesClient, error)

NewPoliciesClient creates a new instance of PoliciesClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PoliciesClient) BeginCreateOrUpdate

func (client *PoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy, options *PoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PoliciesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update policy with specified rule set name within a resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • policyName - The name of the Web Application Firewall Policy.
  • parameters - Policy to be created.
  • options - PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginCreateOrUpdate(ctx, "rg1", "Policy1", armfrontdoor.WebApplicationFirewallPolicy{
		Location: to.Ptr("WestUs"),
		Properties: &armfrontdoor.WebApplicationFirewallPolicyProperties{
			CustomRules: &armfrontdoor.CustomRuleList{
				Rules: []*armfrontdoor.CustomRule{
					{
						Name:   to.Ptr("Rule1"),
						Action: to.Ptr(armfrontdoor.ActionTypeBlock),
						MatchConditions: []*armfrontdoor.MatchCondition{
							{
								MatchValue: []*string{
									to.Ptr("192.168.1.0/24"),
									to.Ptr("10.0.0.0/24")},
								MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
								Operator:      to.Ptr(armfrontdoor.OperatorIPMatch),
							}},
						Priority:           to.Ptr[int32](1),
						RateLimitThreshold: to.Ptr[int32](1000),
						RuleType:           to.Ptr(armfrontdoor.RuleTypeRateLimitRule),
					},
					{
						Name:   to.Ptr("Rule2"),
						Action: to.Ptr(armfrontdoor.ActionTypeBlock),
						MatchConditions: []*armfrontdoor.MatchCondition{
							{
								MatchValue: []*string{
									to.Ptr("CH")},
								MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
								Operator:      to.Ptr(armfrontdoor.OperatorGeoMatch),
							},
							{
								MatchValue: []*string{
									to.Ptr("windows")},
								MatchVariable: to.Ptr(armfrontdoor.MatchVariableRequestHeader),
								Operator:      to.Ptr(armfrontdoor.OperatorContains),
								Selector:      to.Ptr("UserAgent"),
								Transforms: []*armfrontdoor.TransformType{
									to.Ptr(armfrontdoor.TransformTypeLowercase)},
							}},
						Priority: to.Ptr[int32](2),
						RuleType: to.Ptr(armfrontdoor.RuleTypeMatchRule),
					}},
			},
			ManagedRules: &armfrontdoor.ManagedRuleSetList{
				ManagedRuleSets: []*armfrontdoor.ManagedRuleSet{
					{
						Exclusions: []*armfrontdoor.ManagedRuleExclusion{
							{
								MatchVariable:         to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestHeaderNames),
								Selector:              to.Ptr("User-Agent"),
								SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
							}},
						RuleGroupOverrides: []*armfrontdoor.ManagedRuleGroupOverride{
							{
								Exclusions: []*armfrontdoor.ManagedRuleExclusion{
									{
										MatchVariable:         to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestCookieNames),
										Selector:              to.Ptr("token"),
										SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorStartsWith),
									}},
								RuleGroupName: to.Ptr("SQLI"),
								Rules: []*armfrontdoor.ManagedRuleOverride{
									{
										Action:       to.Ptr(armfrontdoor.ActionTypeRedirect),
										EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
										Exclusions: []*armfrontdoor.ManagedRuleExclusion{
											{
												MatchVariable:         to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableQueryStringArgNames),
												Selector:              to.Ptr("query"),
												SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
											}},
										RuleID: to.Ptr("942100"),
									},
									{
										EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateDisabled),
										RuleID:       to.Ptr("942110"),
									}},
							}},
						RuleSetAction:  to.Ptr(armfrontdoor.ManagedRuleSetActionTypeBlock),
						RuleSetType:    to.Ptr("DefaultRuleSet"),
						RuleSetVersion: to.Ptr("1.0"),
					}},
			},
			PolicySettings: &armfrontdoor.PolicySettings{
				CustomBlockResponseBody:                to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
				CustomBlockResponseStatusCode:          to.Ptr[int32](429),
				EnabledState:                           to.Ptr(armfrontdoor.PolicyEnabledStateEnabled),
				JavascriptChallengeExpirationInMinutes: to.Ptr[int32](30),
				LogScrubbing: &armfrontdoor.PolicySettingsLogScrubbing{
					ScrubbingRules: []*armfrontdoor.WebApplicationFirewallScrubbingRules{
						{
							MatchVariable:         to.Ptr(armfrontdoor.ScrubbingRuleEntryMatchVariableRequestIPAddress),
							SelectorMatchOperator: to.Ptr(armfrontdoor.ScrubbingRuleEntryMatchOperatorEqualsAny),
							State:                 to.Ptr(armfrontdoor.ScrubbingRuleEntryStateEnabled),
						}},
					State: to.Ptr(armfrontdoor.WebApplicationFirewallScrubbingStateEnabled),
				},
				Mode:             to.Ptr(armfrontdoor.PolicyModePrevention),
				RedirectURL:      to.Ptr("http://www.bing.com"),
				RequestBodyCheck: to.Ptr(armfrontdoor.PolicyRequestBodyCheckDisabled),
			},
		},
		SKU: &armfrontdoor.SKU{
			Name: to.Ptr(armfrontdoor.SKUNamePremiumAzureFrontDoor),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WebApplicationFirewallPolicy = armfrontdoor.WebApplicationFirewallPolicy{
	// 	Name: to.Ptr("Policy1"),
	// 	Type: to.Ptr("Microsoft.Network/frontdoorwebapplicationfirewallpolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.WebApplicationFirewallPolicyProperties{
	// 		CustomRules: &armfrontdoor.CustomRuleList{
	// 			Rules: []*armfrontdoor.CustomRule{
	// 				{
	// 					Name: to.Ptr("Rule1"),
	// 					Action: to.Ptr(armfrontdoor.ActionTypeBlock),
	// 					EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
	// 					MatchConditions: []*armfrontdoor.MatchCondition{
	// 						{
	// 							MatchValue: []*string{
	// 								to.Ptr("192.168.1.0/24"),
	// 								to.Ptr("10.0.0.0/24")},
	// 								MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
	// 								NegateCondition: to.Ptr(false),
	// 								Operator: to.Ptr(armfrontdoor.OperatorIPMatch),
	// 								Transforms: []*armfrontdoor.TransformType{
	// 								},
	// 						}},
	// 						Priority: to.Ptr[int32](1),
	// 						RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 						RateLimitThreshold: to.Ptr[int32](1000),
	// 						RuleType: to.Ptr(armfrontdoor.RuleTypeRateLimitRule),
	// 					},
	// 					{
	// 						Name: to.Ptr("Rule2"),
	// 						Action: to.Ptr(armfrontdoor.ActionTypeBlock),
	// 						EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
	// 						MatchConditions: []*armfrontdoor.MatchCondition{
	// 							{
	// 								MatchValue: []*string{
	// 									to.Ptr("CH")},
	// 									MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
	// 									NegateCondition: to.Ptr(false),
	// 									Operator: to.Ptr(armfrontdoor.OperatorGeoMatch),
	// 								},
	// 								{
	// 									MatchValue: []*string{
	// 										to.Ptr("windows")},
	// 										MatchVariable: to.Ptr(armfrontdoor.MatchVariableRequestHeader),
	// 										NegateCondition: to.Ptr(false),
	// 										Operator: to.Ptr(armfrontdoor.OperatorContains),
	// 										Selector: to.Ptr("UserAgent"),
	// 										Transforms: []*armfrontdoor.TransformType{
	// 											to.Ptr(armfrontdoor.TransformTypeLowercase)},
	// 									}},
	// 									Priority: to.Ptr[int32](2),
	// 									RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 									RateLimitThreshold: to.Ptr[int32](0),
	// 									RuleType: to.Ptr(armfrontdoor.RuleTypeMatchRule),
	// 							}},
	// 						},
	// 						FrontendEndpointLinks: []*armfrontdoor.FrontendEndpointLink{
	// 						},
	// 						ManagedRules: &armfrontdoor.ManagedRuleSetList{
	// 							ManagedRuleSets: []*armfrontdoor.ManagedRuleSet{
	// 								{
	// 									Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 										{
	// 											MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestHeaderNames),
	// 											Selector: to.Ptr("User-Agent"),
	// 											SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
	// 									}},
	// 									RuleGroupOverrides: []*armfrontdoor.ManagedRuleGroupOverride{
	// 										{
	// 											Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 												{
	// 													MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestCookieNames),
	// 													Selector: to.Ptr("token"),
	// 													SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorStartsWith),
	// 											}},
	// 											RuleGroupName: to.Ptr("SQLI"),
	// 											Rules: []*armfrontdoor.ManagedRuleOverride{
	// 												{
	// 													Action: to.Ptr(armfrontdoor.ActionTypeRedirect),
	// 													EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
	// 													Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 														{
	// 															MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableQueryStringArgNames),
	// 															Selector: to.Ptr("query"),
	// 															SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
	// 													}},
	// 													RuleID: to.Ptr("942100"),
	// 												},
	// 												{
	// 													EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateDisabled),
	// 													RuleID: to.Ptr("942110"),
	// 											}},
	// 									}},
	// 									RuleSetAction: to.Ptr(armfrontdoor.ManagedRuleSetActionTypeBlock),
	// 									RuleSetType: to.Ptr("DefaultRuleSet"),
	// 									RuleSetVersion: to.Ptr("1.0"),
	// 							}},
	// 						},
	// 						PolicySettings: &armfrontdoor.PolicySettings{
	// 							CustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
	// 							CustomBlockResponseStatusCode: to.Ptr[int32](429),
	// 							EnabledState: to.Ptr(armfrontdoor.PolicyEnabledStateEnabled),
	// 							JavascriptChallengeExpirationInMinutes: to.Ptr[int32](30),
	// 							LogScrubbing: &armfrontdoor.PolicySettingsLogScrubbing{
	// 								ScrubbingRules: []*armfrontdoor.WebApplicationFirewallScrubbingRules{
	// 									{
	// 										MatchVariable: to.Ptr(armfrontdoor.ScrubbingRuleEntryMatchVariableRequestIPAddress),
	// 										SelectorMatchOperator: to.Ptr(armfrontdoor.ScrubbingRuleEntryMatchOperatorEqualsAny),
	// 										State: to.Ptr(armfrontdoor.ScrubbingRuleEntryStateEnabled),
	// 								}},
	// 								State: to.Ptr(armfrontdoor.WebApplicationFirewallScrubbingStateEnabled),
	// 							},
	// 							Mode: to.Ptr(armfrontdoor.PolicyModePrevention),
	// 							RedirectURL: to.Ptr("http://www.bing.com"),
	// 							RequestBodyCheck: to.Ptr(armfrontdoor.PolicyRequestBodyCheckDisabled),
	// 						},
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						ResourceState: to.Ptr(armfrontdoor.PolicyResourceStateEnabled),
	// 						SecurityPolicyLinks: []*armfrontdoor.SecurityPolicyLink{
	// 						},
	// 					},
	// 					SKU: &armfrontdoor.SKU{
	// 						Name: to.Ptr(armfrontdoor.SKUNamePremiumAzureFrontDoor),
	// 					},
	// 				}
}
Output:

func (*PoliciesClient) BeginDelete

func (client *PoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, policyName string, options *PoliciesClientBeginDeleteOptions) (*runtime.Poller[PoliciesClientDeleteResponse], error)

BeginDelete - Deletes Policy If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • policyName - The name of the Web Application Firewall Policy.
  • options - PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginDelete(ctx, "rg1", "Policy1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PoliciesClient) BeginUpdate added in v1.2.0

func (client *PoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters TagsObject, options *PoliciesClientBeginUpdateOptions) (*runtime.Poller[PoliciesClientUpdateResponse], error)

BeginUpdate - Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • policyName - The name of the Web Application Firewall Policy.
  • parameters - FrontdoorWebApplicationFirewallPolicy parameters to be patched.
  • options - PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyPatch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginUpdate(ctx, "rg1", "Policy1", armfrontdoor.TagsObject{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
			"key2": to.Ptr("value2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WebApplicationFirewallPolicy = armfrontdoor.WebApplicationFirewallPolicy{
	// 	Name: to.Ptr("Policy1"),
	// 	Type: to.Ptr("Microsoft.Network/frontdoorwebapplicationfirewallpolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.WebApplicationFirewallPolicyProperties{
	// 		CustomRules: &armfrontdoor.CustomRuleList{
	// 			Rules: []*armfrontdoor.CustomRule{
	// 				{
	// 					Name: to.Ptr("Rule1"),
	// 					Action: to.Ptr(armfrontdoor.ActionTypeBlock),
	// 					EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
	// 					MatchConditions: []*armfrontdoor.MatchCondition{
	// 						{
	// 							MatchValue: []*string{
	// 								to.Ptr("192.168.1.0/24"),
	// 								to.Ptr("10.0.0.0/24")},
	// 								MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
	// 								NegateCondition: to.Ptr(false),
	// 								Operator: to.Ptr(armfrontdoor.OperatorIPMatch),
	// 								Transforms: []*armfrontdoor.TransformType{
	// 								},
	// 						}},
	// 						Priority: to.Ptr[int32](1),
	// 						RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 						RateLimitThreshold: to.Ptr[int32](1000),
	// 						RuleType: to.Ptr(armfrontdoor.RuleTypeRateLimitRule),
	// 					},
	// 					{
	// 						Name: to.Ptr("Rule2"),
	// 						Action: to.Ptr(armfrontdoor.ActionTypeBlock),
	// 						EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
	// 						MatchConditions: []*armfrontdoor.MatchCondition{
	// 							{
	// 								MatchValue: []*string{
	// 									to.Ptr("CH")},
	// 									MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
	// 									NegateCondition: to.Ptr(false),
	// 									Operator: to.Ptr(armfrontdoor.OperatorGeoMatch),
	// 								},
	// 								{
	// 									MatchValue: []*string{
	// 										to.Ptr("windows")},
	// 										MatchVariable: to.Ptr(armfrontdoor.MatchVariableRequestHeader),
	// 										NegateCondition: to.Ptr(false),
	// 										Operator: to.Ptr(armfrontdoor.OperatorContains),
	// 										Selector: to.Ptr("UserAgent"),
	// 										Transforms: []*armfrontdoor.TransformType{
	// 											to.Ptr(armfrontdoor.TransformTypeLowercase)},
	// 									}},
	// 									Priority: to.Ptr[int32](2),
	// 									RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 									RateLimitThreshold: to.Ptr[int32](0),
	// 									RuleType: to.Ptr(armfrontdoor.RuleTypeMatchRule),
	// 							}},
	// 						},
	// 						FrontendEndpointLinks: []*armfrontdoor.FrontendEndpointLink{
	// 						},
	// 						ManagedRules: &armfrontdoor.ManagedRuleSetList{
	// 							ManagedRuleSets: []*armfrontdoor.ManagedRuleSet{
	// 								{
	// 									Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 										{
	// 											MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestHeaderNames),
	// 											Selector: to.Ptr("User-Agent"),
	// 											SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
	// 									}},
	// 									RuleGroupOverrides: []*armfrontdoor.ManagedRuleGroupOverride{
	// 										{
	// 											Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 												{
	// 													MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestCookieNames),
	// 													Selector: to.Ptr("token"),
	// 													SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorStartsWith),
	// 											}},
	// 											RuleGroupName: to.Ptr("SQLI"),
	// 											Rules: []*armfrontdoor.ManagedRuleOverride{
	// 												{
	// 													Action: to.Ptr(armfrontdoor.ActionTypeRedirect),
	// 													EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
	// 													Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 														{
	// 															MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableQueryStringArgNames),
	// 															Selector: to.Ptr("query"),
	// 															SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
	// 													}},
	// 													RuleID: to.Ptr("942100"),
	// 												},
	// 												{
	// 													EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateDisabled),
	// 													RuleID: to.Ptr("942110"),
	// 											}},
	// 									}},
	// 									RuleSetAction: to.Ptr(armfrontdoor.ManagedRuleSetActionTypeBlock),
	// 									RuleSetType: to.Ptr("DefaultRuleSet"),
	// 									RuleSetVersion: to.Ptr("1.0"),
	// 							}},
	// 						},
	// 						PolicySettings: &armfrontdoor.PolicySettings{
	// 							CustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
	// 							CustomBlockResponseStatusCode: to.Ptr[int32](499),
	// 							EnabledState: to.Ptr(armfrontdoor.PolicyEnabledStateEnabled),
	// 							Mode: to.Ptr(armfrontdoor.PolicyModePrevention),
	// 							RedirectURL: to.Ptr("http://www.bing.com"),
	// 							RequestBodyCheck: to.Ptr(armfrontdoor.PolicyRequestBodyCheckDisabled),
	// 						},
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						ResourceState: to.Ptr(armfrontdoor.PolicyResourceStateEnabled),
	// 						SecurityPolicyLinks: []*armfrontdoor.SecurityPolicyLink{
	// 						},
	// 					},
	// 					SKU: &armfrontdoor.SKU{
	// 						Name: to.Ptr(armfrontdoor.SKUNameClassicAzureFrontDoor),
	// 					},
	// 				}
}
Output:

func (*PoliciesClient) Get

func (client *PoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string, options *PoliciesClientGetOptions) (PoliciesClientGetResponse, error)

Get - Retrieve protection policy with specified name within a resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • policyName - The name of the Web Application Firewall Policy.
  • options - PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPoliciesClient().Get(ctx, "rg1", "Policy1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WebApplicationFirewallPolicy = armfrontdoor.WebApplicationFirewallPolicy{
	// 	Name: to.Ptr("Policy1"),
	// 	Type: to.Ptr("Microsoft.Network/frontdoorwebapplicationfirewallpolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armfrontdoor.WebApplicationFirewallPolicyProperties{
	// 		CustomRules: &armfrontdoor.CustomRuleList{
	// 			Rules: []*armfrontdoor.CustomRule{
	// 				{
	// 					Name: to.Ptr("Rule1"),
	// 					Action: to.Ptr(armfrontdoor.ActionTypeBlock),
	// 					EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
	// 					MatchConditions: []*armfrontdoor.MatchCondition{
	// 						{
	// 							MatchValue: []*string{
	// 								to.Ptr("192.168.1.0/24"),
	// 								to.Ptr("10.0.0.0/24")},
	// 								MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
	// 								NegateCondition: to.Ptr(false),
	// 								Operator: to.Ptr(armfrontdoor.OperatorIPMatch),
	// 								Transforms: []*armfrontdoor.TransformType{
	// 								},
	// 						}},
	// 						Priority: to.Ptr[int32](1),
	// 						RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 						RateLimitThreshold: to.Ptr[int32](1000),
	// 						RuleType: to.Ptr(armfrontdoor.RuleTypeRateLimitRule),
	// 					},
	// 					{
	// 						Name: to.Ptr("Rule2"),
	// 						Action: to.Ptr(armfrontdoor.ActionTypeBlock),
	// 						EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
	// 						MatchConditions: []*armfrontdoor.MatchCondition{
	// 							{
	// 								MatchValue: []*string{
	// 									to.Ptr("CH")},
	// 									MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
	// 									NegateCondition: to.Ptr(false),
	// 									Operator: to.Ptr(armfrontdoor.OperatorGeoMatch),
	// 								},
	// 								{
	// 									MatchValue: []*string{
	// 										to.Ptr("windows")},
	// 										MatchVariable: to.Ptr(armfrontdoor.MatchVariableRequestHeader),
	// 										NegateCondition: to.Ptr(false),
	// 										Operator: to.Ptr(armfrontdoor.OperatorContains),
	// 										Selector: to.Ptr("UserAgent"),
	// 										Transforms: []*armfrontdoor.TransformType{
	// 											to.Ptr(armfrontdoor.TransformTypeLowercase)},
	// 									}},
	// 									Priority: to.Ptr[int32](2),
	// 									RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 									RateLimitThreshold: to.Ptr[int32](0),
	// 									RuleType: to.Ptr(armfrontdoor.RuleTypeMatchRule),
	// 							}},
	// 						},
	// 						FrontendEndpointLinks: []*armfrontdoor.FrontendEndpointLink{
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontdoors/fd1/frontendendpoints/fd1-azurefd-net"),
	// 						}},
	// 						ManagedRules: &armfrontdoor.ManagedRuleSetList{
	// 							ManagedRuleSets: []*armfrontdoor.ManagedRuleSet{
	// 								{
	// 									Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 										{
	// 											MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestHeaderNames),
	// 											Selector: to.Ptr("User-Agent"),
	// 											SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
	// 									}},
	// 									RuleGroupOverrides: []*armfrontdoor.ManagedRuleGroupOverride{
	// 										{
	// 											Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 											},
	// 											RuleGroupName: to.Ptr("SQLI"),
	// 											Rules: []*armfrontdoor.ManagedRuleOverride{
	// 												{
	// 													Action: to.Ptr(armfrontdoor.ActionTypeRedirect),
	// 													EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
	// 													Exclusions: []*armfrontdoor.ManagedRuleExclusion{
	// 													},
	// 													RuleID: to.Ptr("942100"),
	// 												},
	// 												{
	// 													EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateDisabled),
	// 													RuleID: to.Ptr("942110"),
	// 											}},
	// 									}},
	// 									RuleSetAction: to.Ptr(armfrontdoor.ManagedRuleSetActionTypeBlock),
	// 									RuleSetType: to.Ptr("DefaultRuleSet"),
	// 									RuleSetVersion: to.Ptr("1.0"),
	// 							}},
	// 						},
	// 						PolicySettings: &armfrontdoor.PolicySettings{
	// 							CustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
	// 							CustomBlockResponseStatusCode: to.Ptr[int32](499),
	// 							EnabledState: to.Ptr(armfrontdoor.PolicyEnabledStateEnabled),
	// 							Mode: to.Ptr(armfrontdoor.PolicyModePrevention),
	// 							RedirectURL: to.Ptr("http://www.bing.com"),
	// 							RequestBodyCheck: to.Ptr(armfrontdoor.PolicyRequestBodyCheckDisabled),
	// 						},
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						ResourceState: to.Ptr(armfrontdoor.PolicyResourceStateEnabled),
	// 						SecurityPolicyLinks: []*armfrontdoor.SecurityPolicyLink{
	// 						},
	// 					},
	// 					SKU: &armfrontdoor.SKU{
	// 						Name: to.Ptr(armfrontdoor.SKUNameClassicAzureFrontDoor),
	// 					},
	// 				}
}
Output:

func (*PoliciesClient) NewListBySubscriptionPager added in v1.2.0

NewListBySubscriptionPager - Lists all of the protection policies within a subscription.

Generated from API version 2024-02-01

  • options - PoliciesClientListBySubscriptionOptions contains the optional parameters for the PoliciesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListPoliciesUnderSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPoliciesClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WebApplicationFirewallPolicyList = armfrontdoor.WebApplicationFirewallPolicyList{
		// 	Value: []*armfrontdoor.WebApplicationFirewallPolicy{
		// 		{
		// 			Name: to.Ptr("Policy1"),
		// 			Type: to.Ptr("Microsoft.Network/frontdoorwebapplicationfirewallpolicies"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1"),
		// 			Location: to.Ptr("WestUs"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 				"key2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armfrontdoor.WebApplicationFirewallPolicyProperties{
		// 				CustomRules: &armfrontdoor.CustomRuleList{
		// 					Rules: []*armfrontdoor.CustomRule{
		// 						{
		// 							Name: to.Ptr("Rule1"),
		// 							Action: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 							EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
		// 							MatchConditions: []*armfrontdoor.MatchCondition{
		// 								{
		// 									MatchValue: []*string{
		// 										to.Ptr("192.168.1.0/24"),
		// 										to.Ptr("10.0.0.0/24")},
		// 										MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
		// 										NegateCondition: to.Ptr(false),
		// 										Operator: to.Ptr(armfrontdoor.OperatorIPMatch),
		// 										Transforms: []*armfrontdoor.TransformType{
		// 										},
		// 								}},
		// 								Priority: to.Ptr[int32](1),
		// 								RateLimitDurationInMinutes: to.Ptr[int32](0),
		// 								RateLimitThreshold: to.Ptr[int32](1000),
		// 								RuleType: to.Ptr(armfrontdoor.RuleTypeRateLimitRule),
		// 							},
		// 							{
		// 								Name: to.Ptr("Rule2"),
		// 								Action: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 								EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
		// 								MatchConditions: []*armfrontdoor.MatchCondition{
		// 									{
		// 										MatchValue: []*string{
		// 											to.Ptr("CH")},
		// 											MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
		// 											NegateCondition: to.Ptr(false),
		// 											Operator: to.Ptr(armfrontdoor.OperatorGeoMatch),
		// 										},
		// 										{
		// 											MatchValue: []*string{
		// 												to.Ptr("windows")},
		// 												MatchVariable: to.Ptr(armfrontdoor.MatchVariableRequestHeader),
		// 												NegateCondition: to.Ptr(false),
		// 												Operator: to.Ptr(armfrontdoor.OperatorContains),
		// 												Selector: to.Ptr("UserAgent"),
		// 												Transforms: []*armfrontdoor.TransformType{
		// 													to.Ptr(armfrontdoor.TransformTypeLowercase)},
		// 											}},
		// 											Priority: to.Ptr[int32](2),
		// 											RateLimitDurationInMinutes: to.Ptr[int32](0),
		// 											RateLimitThreshold: to.Ptr[int32](0),
		// 											RuleType: to.Ptr(armfrontdoor.RuleTypeMatchRule),
		// 									}},
		// 								},
		// 								FrontendEndpointLinks: []*armfrontdoor.FrontendEndpointLink{
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontdoors/fd1/frontendendpoints/fd1-azurefd-net"),
		// 								}},
		// 								ManagedRules: &armfrontdoor.ManagedRuleSetList{
		// 									ManagedRuleSets: []*armfrontdoor.ManagedRuleSet{
		// 										{
		// 											Exclusions: []*armfrontdoor.ManagedRuleExclusion{
		// 												{
		// 													MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestHeaderNames),
		// 													Selector: to.Ptr("User-Agent"),
		// 													SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
		// 											}},
		// 											RuleGroupOverrides: []*armfrontdoor.ManagedRuleGroupOverride{
		// 												{
		// 													RuleGroupName: to.Ptr("SQLI"),
		// 													Rules: []*armfrontdoor.ManagedRuleOverride{
		// 														{
		// 															Action: to.Ptr(armfrontdoor.ActionTypeRedirect),
		// 															EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
		// 															RuleID: to.Ptr("942100"),
		// 														},
		// 														{
		// 															EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateDisabled),
		// 															RuleID: to.Ptr("942110"),
		// 													}},
		// 											}},
		// 											RuleSetType: to.Ptr("DefaultRuleSet"),
		// 											RuleSetVersion: to.Ptr("1.0"),
		// 									}},
		// 								},
		// 								PolicySettings: &armfrontdoor.PolicySettings{
		// 									CustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
		// 									CustomBlockResponseStatusCode: to.Ptr[int32](499),
		// 									EnabledState: to.Ptr(armfrontdoor.PolicyEnabledStateEnabled),
		// 									Mode: to.Ptr(armfrontdoor.PolicyModePrevention),
		// 									RedirectURL: to.Ptr("http://www.bing.com"),
		// 								},
		// 								ProvisioningState: to.Ptr("Succeeded"),
		// 								ResourceState: to.Ptr(armfrontdoor.PolicyResourceStateEnabled),
		// 								SecurityPolicyLinks: []*armfrontdoor.SecurityPolicyLink{
		// 								},
		// 							},
		// 							SKU: &armfrontdoor.SKU{
		// 								Name: to.Ptr(armfrontdoor.SKUNameClassicAzureFrontDoor),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*PoliciesClient) NewListPager added in v0.4.0

func (client *PoliciesClient) NewListPager(resourceGroupName string, options *PoliciesClientListOptions) *runtime.Pager[PoliciesClientListResponse]

NewListPager - Lists all of the protection policies within a resource group.

Generated from API version 2024-02-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • options - PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListPolicies.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPoliciesClient().NewListPager("rg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WebApplicationFirewallPolicyList = armfrontdoor.WebApplicationFirewallPolicyList{
		// 	Value: []*armfrontdoor.WebApplicationFirewallPolicy{
		// 		{
		// 			Name: to.Ptr("Policy1"),
		// 			Type: to.Ptr("Microsoft.Network/frontdoorwebapplicationfirewallpolicies"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1"),
		// 			Location: to.Ptr("WestUs"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 				"key2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armfrontdoor.WebApplicationFirewallPolicyProperties{
		// 				CustomRules: &armfrontdoor.CustomRuleList{
		// 					Rules: []*armfrontdoor.CustomRule{
		// 						{
		// 							Name: to.Ptr("Rule1"),
		// 							Action: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 							EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
		// 							MatchConditions: []*armfrontdoor.MatchCondition{
		// 								{
		// 									MatchValue: []*string{
		// 										to.Ptr("192.168.1.0/24"),
		// 										to.Ptr("10.0.0.0/24")},
		// 										MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
		// 										NegateCondition: to.Ptr(false),
		// 										Operator: to.Ptr(armfrontdoor.OperatorIPMatch),
		// 										Transforms: []*armfrontdoor.TransformType{
		// 										},
		// 								}},
		// 								Priority: to.Ptr[int32](1),
		// 								RateLimitDurationInMinutes: to.Ptr[int32](0),
		// 								RateLimitThreshold: to.Ptr[int32](1000),
		// 								RuleType: to.Ptr(armfrontdoor.RuleTypeRateLimitRule),
		// 							},
		// 							{
		// 								Name: to.Ptr("Rule2"),
		// 								Action: to.Ptr(armfrontdoor.ActionTypeBlock),
		// 								EnabledState: to.Ptr(armfrontdoor.CustomRuleEnabledStateEnabled),
		// 								MatchConditions: []*armfrontdoor.MatchCondition{
		// 									{
		// 										MatchValue: []*string{
		// 											to.Ptr("CH")},
		// 											MatchVariable: to.Ptr(armfrontdoor.MatchVariableRemoteAddr),
		// 											NegateCondition: to.Ptr(false),
		// 											Operator: to.Ptr(armfrontdoor.OperatorGeoMatch),
		// 										},
		// 										{
		// 											MatchValue: []*string{
		// 												to.Ptr("windows")},
		// 												MatchVariable: to.Ptr(armfrontdoor.MatchVariableRequestHeader),
		// 												NegateCondition: to.Ptr(false),
		// 												Operator: to.Ptr(armfrontdoor.OperatorContains),
		// 												Selector: to.Ptr("UserAgent"),
		// 												Transforms: []*armfrontdoor.TransformType{
		// 													to.Ptr(armfrontdoor.TransformTypeLowercase)},
		// 											}},
		// 											Priority: to.Ptr[int32](2),
		// 											RateLimitDurationInMinutes: to.Ptr[int32](0),
		// 											RateLimitThreshold: to.Ptr[int32](0),
		// 											RuleType: to.Ptr(armfrontdoor.RuleTypeMatchRule),
		// 									}},
		// 								},
		// 								FrontendEndpointLinks: []*armfrontdoor.FrontendEndpointLink{
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontdoors/fd1/frontendendpoints/fd1-azurefd-net"),
		// 								}},
		// 								ManagedRules: &armfrontdoor.ManagedRuleSetList{
		// 									ManagedRuleSets: []*armfrontdoor.ManagedRuleSet{
		// 										{
		// 											Exclusions: []*armfrontdoor.ManagedRuleExclusion{
		// 												{
		// 													MatchVariable: to.Ptr(armfrontdoor.ManagedRuleExclusionMatchVariableRequestHeaderNames),
		// 													Selector: to.Ptr("User-Agent"),
		// 													SelectorMatchOperator: to.Ptr(armfrontdoor.ManagedRuleExclusionSelectorMatchOperatorEquals),
		// 											}},
		// 											RuleGroupOverrides: []*armfrontdoor.ManagedRuleGroupOverride{
		// 												{
		// 													RuleGroupName: to.Ptr("SQLI"),
		// 													Rules: []*armfrontdoor.ManagedRuleOverride{
		// 														{
		// 															Action: to.Ptr(armfrontdoor.ActionTypeRedirect),
		// 															EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateEnabled),
		// 															RuleID: to.Ptr("942100"),
		// 														},
		// 														{
		// 															EnabledState: to.Ptr(armfrontdoor.ManagedRuleEnabledStateDisabled),
		// 															RuleID: to.Ptr("942110"),
		// 													}},
		// 											}},
		// 											RuleSetType: to.Ptr("DefaultRuleSet"),
		// 											RuleSetVersion: to.Ptr("1.0"),
		// 									}},
		// 								},
		// 								PolicySettings: &armfrontdoor.PolicySettings{
		// 									CustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
		// 									CustomBlockResponseStatusCode: to.Ptr[int32](499),
		// 									EnabledState: to.Ptr(armfrontdoor.PolicyEnabledStateEnabled),
		// 									Mode: to.Ptr(armfrontdoor.PolicyModePrevention),
		// 									RedirectURL: to.Ptr("http://www.bing.com"),
		// 								},
		// 								ProvisioningState: to.Ptr("Succeeded"),
		// 								ResourceState: to.Ptr(armfrontdoor.PolicyResourceStateEnabled),
		// 								SecurityPolicyLinks: []*armfrontdoor.SecurityPolicyLink{
		// 								},
		// 							},
		// 							SKU: &armfrontdoor.SKU{
		// 								Name: to.Ptr(armfrontdoor.SKUNameClassicAzureFrontDoor),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

type PoliciesClientBeginCreateOrUpdateOptions added in v0.2.0

type PoliciesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method.

type PoliciesClientBeginDeleteOptions added in v0.2.0

type PoliciesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method.

type PoliciesClientBeginUpdateOptions added in v1.2.0

type PoliciesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method.

type PoliciesClientCreateOrUpdateResponse added in v0.2.0

type PoliciesClientCreateOrUpdateResponse struct {
	// Defines web application firewall policy.
	WebApplicationFirewallPolicy
}

PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.BeginCreateOrUpdate.

type PoliciesClientDeleteResponse added in v0.2.0

type PoliciesClientDeleteResponse struct {
}

PoliciesClientDeleteResponse contains the response from method PoliciesClient.BeginDelete.

type PoliciesClientGetOptions added in v0.2.0

type PoliciesClientGetOptions struct {
}

PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method.

type PoliciesClientGetResponse added in v0.2.0

type PoliciesClientGetResponse struct {
	// Defines web application firewall policy.
	WebApplicationFirewallPolicy
}

PoliciesClientGetResponse contains the response from method PoliciesClient.Get.

type PoliciesClientListBySubscriptionOptions added in v1.2.0

type PoliciesClientListBySubscriptionOptions struct {
}

PoliciesClientListBySubscriptionOptions contains the optional parameters for the PoliciesClient.NewListBySubscriptionPager method.

type PoliciesClientListBySubscriptionResponse added in v1.2.0

type PoliciesClientListBySubscriptionResponse struct {
	// Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL
	// link to get the next set of results.
	WebApplicationFirewallPolicyList
}

PoliciesClientListBySubscriptionResponse contains the response from method PoliciesClient.NewListBySubscriptionPager.

type PoliciesClientListOptions added in v0.2.0

type PoliciesClientListOptions struct {
}

PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method.

type PoliciesClientListResponse added in v0.2.0

type PoliciesClientListResponse struct {
	// Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL
	// link to get the next set of results.
	WebApplicationFirewallPolicyList
}

PoliciesClientListResponse contains the response from method PoliciesClient.NewListPager.

type PoliciesClientUpdateResponse added in v1.2.0

type PoliciesClientUpdateResponse struct {
	// Defines web application firewall policy.
	WebApplicationFirewallPolicy
}

PoliciesClientUpdateResponse contains the response from method PoliciesClient.BeginUpdate.

type PolicyEnabledState

type PolicyEnabledState string

PolicyEnabledState - Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified.

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

func PossiblePolicyEnabledStateValues

func PossiblePolicyEnabledStateValues() []PolicyEnabledState

PossiblePolicyEnabledStateValues returns the possible values for the PolicyEnabledState const type.

type PolicyMode

type PolicyMode string

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

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

func PossiblePolicyModeValues

func PossiblePolicyModeValues() []PolicyMode

PossiblePolicyModeValues returns the possible values for the PolicyMode const type.

type PolicyRequestBodyCheck

type PolicyRequestBodyCheck string

PolicyRequestBodyCheck - Describes if policy managed rules will inspect the request body content.

const (
	PolicyRequestBodyCheckDisabled PolicyRequestBodyCheck = "Disabled"
	PolicyRequestBodyCheckEnabled  PolicyRequestBodyCheck = "Enabled"
)

func PossiblePolicyRequestBodyCheckValues

func PossiblePolicyRequestBodyCheckValues() []PolicyRequestBodyCheck

PossiblePolicyRequestBodyCheckValues returns the possible values for the PolicyRequestBodyCheck const type.

type PolicyResourceState

type PolicyResourceState string

PolicyResourceState - Resource status of the policy.

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

func PossiblePolicyResourceStateValues

func PossiblePolicyResourceStateValues() []PolicyResourceState

PossiblePolicyResourceStateValues returns the possible values for the PolicyResourceState const type.

type PolicySettings

type PolicySettings struct {
	// If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
	CustomBlockResponseBody *string

	// If the action type is block, customer can override the response status code.
	CustomBlockResponseStatusCode *int32

	// Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified.
	EnabledState *PolicyEnabledState

	// Defines the JavaScript challenge cookie validity lifetime in minutes. This setting is only applicable to Premium_AzureFrontDoor.
	// Value must be an integer between 5 and 1440 with the default value
	// being 30.
	JavascriptChallengeExpirationInMinutes *int32

	// Defines rules that scrub sensitive fields in the Web Application Firewall logs.
	LogScrubbing *PolicySettingsLogScrubbing

	// Describes if it is in detection mode or prevention mode at policy level.
	Mode *PolicyMode

	// If action type is redirect, this field represents redirect URL for the client.
	RedirectURL *string

	// Describes if policy managed rules will inspect the request body content.
	RequestBodyCheck *PolicyRequestBodyCheck
}

PolicySettings - Defines top-level WebApplicationFirewallPolicy configuration settings.

func (PolicySettings) MarshalJSON added in v1.1.0

func (p PolicySettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicySettings.

func (*PolicySettings) UnmarshalJSON added in v1.1.0

func (p *PolicySettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettings.

type PolicySettingsLogScrubbing added in v1.4.0

type PolicySettingsLogScrubbing struct {
	// List of log scrubbing rules applied to the Web Application Firewall logs.
	ScrubbingRules []*WebApplicationFirewallScrubbingRules

	// State of the log scrubbing config. Default value is Enabled.
	State *WebApplicationFirewallScrubbingState
}

PolicySettingsLogScrubbing - Defines rules that scrub sensitive fields in the Web Application Firewall logs.

func (PolicySettingsLogScrubbing) MarshalJSON added in v1.4.0

func (p PolicySettingsLogScrubbing) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicySettingsLogScrubbing.

func (*PolicySettingsLogScrubbing) UnmarshalJSON added in v1.4.0

func (p *PolicySettingsLogScrubbing) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettingsLogScrubbing.

type PreconfiguredEndpoint

type PreconfiguredEndpoint struct {
	// Resource location.
	Location *string

	// The properties of a preconfiguredEndpoint
	Properties *PreconfiguredEndpointProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

PreconfiguredEndpoint - Defines the properties of a preconfigured endpoint

func (PreconfiguredEndpoint) MarshalJSON

func (p PreconfiguredEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PreconfiguredEndpoint.

func (*PreconfiguredEndpoint) UnmarshalJSON added in v1.1.0

func (p *PreconfiguredEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PreconfiguredEndpoint.

type PreconfiguredEndpointList

type PreconfiguredEndpointList struct {
	// URL to get the next set of PreconfiguredEndpoints if there are any.
	NextLink *string

	// READ-ONLY; List of PreconfiguredEndpoints supported by NetworkExperiment.
	Value []*PreconfiguredEndpoint
}

PreconfiguredEndpointList - Defines a list of preconfigured endpoints.

func (PreconfiguredEndpointList) MarshalJSON

func (p PreconfiguredEndpointList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PreconfiguredEndpointList.

func (*PreconfiguredEndpointList) UnmarshalJSON added in v1.1.0

func (p *PreconfiguredEndpointList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PreconfiguredEndpointList.

type PreconfiguredEndpointProperties

type PreconfiguredEndpointProperties struct {
	// The preconfigured endpoint backend
	Backend *string

	// The description of the endpoint
	Description *string

	// The endpoint that is preconfigured
	Endpoint *string

	// The type of endpoint
	EndpointType *EndpointType
}

PreconfiguredEndpointProperties - Defines the properties of a preconfigured endpoint

func (PreconfiguredEndpointProperties) MarshalJSON added in v1.1.0

func (p PreconfiguredEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PreconfiguredEndpointProperties.

func (*PreconfiguredEndpointProperties) UnmarshalJSON added in v1.1.0

func (p *PreconfiguredEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PreconfiguredEndpointProperties.

type PreconfiguredEndpointsClient

type PreconfiguredEndpointsClient struct {
	// contains filtered or unexported fields
}

PreconfiguredEndpointsClient contains the methods for the PreconfiguredEndpoints group. Don't use this type directly, use NewPreconfiguredEndpointsClient() instead.

func NewPreconfiguredEndpointsClient

func NewPreconfiguredEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PreconfiguredEndpointsClient, error)

NewPreconfiguredEndpointsClient creates a new instance of PreconfiguredEndpointsClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PreconfiguredEndpointsClient) NewListPager added in v0.4.0

NewListPager - Gets a list of Preconfigured Endpoints

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • options - PreconfiguredEndpointsClientListOptions contains the optional parameters for the PreconfiguredEndpointsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentGetPreconfiguredEndpoints.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPreconfiguredEndpointsClient().NewListPager("MyResourceGroup", "MyProfile", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PreconfiguredEndpointList = armfrontdoor.PreconfiguredEndpointList{
		// 	Value: []*armfrontdoor.PreconfiguredEndpoint{
		// 		{
		// 			Name: to.Ptr("Endpoint 1"),
		// 			Properties: &armfrontdoor.PreconfiguredEndpointProperties{
		// 				Description: to.Ptr("this is the endpoint 1 preconfigured endpoint."),
		// 				Backend: to.Ptr("WESTUS"),
		// 				Endpoint: to.Ptr("endpoint1.net"),
		// 				EndpointType: to.Ptr(armfrontdoor.EndpointTypeAFD),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PreconfiguredEndpointsClientListOptions added in v0.2.0

type PreconfiguredEndpointsClientListOptions struct {
}

PreconfiguredEndpointsClientListOptions contains the optional parameters for the PreconfiguredEndpointsClient.NewListPager method.

type PreconfiguredEndpointsClientListResponse added in v0.2.0

type PreconfiguredEndpointsClientListResponse struct {
	// Defines a list of preconfigured endpoints.
	PreconfiguredEndpointList
}

PreconfiguredEndpointsClientListResponse contains the response from method PreconfiguredEndpointsClient.NewListPager.

type PrivateEndpointStatus

type PrivateEndpointStatus string

PrivateEndpointStatus - The Approval status for the connection to the Private Link

const (
	PrivateEndpointStatusApproved     PrivateEndpointStatus = "Approved"
	PrivateEndpointStatusDisconnected PrivateEndpointStatus = "Disconnected"
	PrivateEndpointStatusPending      PrivateEndpointStatus = "Pending"
	PrivateEndpointStatusRejected     PrivateEndpointStatus = "Rejected"
	PrivateEndpointStatusTimeout      PrivateEndpointStatus = "Timeout"
)

func PossiblePrivateEndpointStatusValues

func PossiblePrivateEndpointStatusValues() []PrivateEndpointStatus

PossiblePrivateEndpointStatusValues returns the possible values for the PrivateEndpointStatus const type.

type Profile

type Profile struct {
	// Gets a unique read-only string that changes whenever the resource is updated.
	Etag *string

	// Resource location.
	Location *string

	// The properties of a Profile
	Properties *ProfileProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Profile - Defines an Network Experiment Profile and lists of Experiments

func (Profile) MarshalJSON

func (p Profile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Profile.

func (*Profile) UnmarshalJSON added in v1.1.0

func (p *Profile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Profile.

type ProfileList

type ProfileList struct {
	// URL to get the next set of Profile objects if there are any.
	NextLink *string

	// READ-ONLY; List of Profiles within a resource group.
	Value []*Profile
}

ProfileList - Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results.

func (ProfileList) MarshalJSON

func (p ProfileList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProfileList.

func (*ProfileList) UnmarshalJSON added in v1.1.0

func (p *ProfileList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProfileList.

type ProfileProperties

type ProfileProperties struct {
	// The state of the Experiment
	EnabledState *State

	// READ-ONLY; Resource status.
	ResourceState *NetworkExperimentResourceState
}

ProfileProperties - Defines the properties of an experiment

func (ProfileProperties) MarshalJSON added in v1.1.0

func (p ProfileProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProfileProperties.

func (*ProfileProperties) UnmarshalJSON added in v1.1.0

func (p *ProfileProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProfileProperties.

type ProfileUpdateModel

type ProfileUpdateModel struct {
	// The properties of a Profile
	Properties *ProfileUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

ProfileUpdateModel - Defines modifiable attributes of a Profile

func (ProfileUpdateModel) MarshalJSON

func (p ProfileUpdateModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProfileUpdateModel.

func (*ProfileUpdateModel) UnmarshalJSON added in v1.1.0

func (p *ProfileUpdateModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProfileUpdateModel.

type ProfileUpdateProperties

type ProfileUpdateProperties struct {
	// The enabled state of the Profile
	EnabledState *State
}

ProfileUpdateProperties - Defines the properties of an experiment

func (ProfileUpdateProperties) MarshalJSON added in v1.1.0

func (p ProfileUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProfileUpdateProperties.

func (*ProfileUpdateProperties) UnmarshalJSON added in v1.1.0

func (p *ProfileUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProfileUpdateProperties.

type Properties added in v0.2.0

type Properties struct {
	// Backend pools available to routing rules.
	BackendPools []*BackendPool

	// Settings for all backendPools
	BackendPoolsSettings *BackendPoolsSettings

	// Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'
	EnabledState *FrontDoorEnabledState

	// A friendly name for the frontDoor
	FriendlyName *string

	// Frontend endpoints available to routing rules.
	FrontendEndpoints []*FrontendEndpoint

	// Health probe settings associated with this Front Door instance.
	HealthProbeSettings []*HealthProbeSettingsModel

	// Load balancing settings associated with this Front Door instance.
	LoadBalancingSettings []*LoadBalancingSettingsModel

	// Routing rules associated with this Front Door.
	RoutingRules []*RoutingRule

	// READ-ONLY; The host that each frontendEndpoint must CNAME to.
	Cname *string

	// READ-ONLY; Key-Value pair representing additional properties for frontdoor.
	ExtendedProperties map[string]*string

	// READ-ONLY; The Id of the frontdoor.
	FrontdoorID *string

	// READ-ONLY; Provisioning state of the Front Door.
	ProvisioningState *string

	// READ-ONLY; Resource status of the Front Door.
	ResourceState *FrontDoorResourceState

	// READ-ONLY; Rules Engine Configurations available to routing rules.
	RulesEngines []*RulesEngine
}

Properties - The JSON object that contains the properties required to create an endpoint.

func (Properties) MarshalJSON added in v0.2.0

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON added in v1.1.0

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type PurgeParameters

type PurgeParameters struct {
	// REQUIRED; The path to the content to be purged. Can describe a file path or a wild card directory.
	ContentPaths []*string
}

PurgeParameters - Parameters required for content purge.

func (PurgeParameters) MarshalJSON

func (p PurgeParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PurgeParameters.

func (*PurgeParameters) UnmarshalJSON added in v1.1.0

func (p *PurgeParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PurgeParameters.

type RedirectConfiguration

type RedirectConfiguration struct {
	// REQUIRED
	ODataType *string

	// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.
	CustomFragment *string

	// Host to redirect. Leave empty to use the incoming host as the destination host.
	CustomHost *string

	// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination
	// path.
	CustomPath *string

	// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string;
	// leave empty to preserve the incoming query string. Query string must be in =
	// format. The first ? and & will be added automatically so do not include them in the front, but do separate multiple query
	// strings with &.
	CustomQueryString *string

	// The protocol of the destination to where the traffic is redirected
	RedirectProtocol *FrontDoorRedirectProtocol

	// The redirect type the rule will use when redirecting traffic.
	RedirectType *FrontDoorRedirectType
}

RedirectConfiguration - Describes Redirect Route.

func (*RedirectConfiguration) GetRouteConfiguration added in v0.2.0

func (r *RedirectConfiguration) GetRouteConfiguration() *RouteConfiguration

GetRouteConfiguration implements the RouteConfigurationClassification interface for type RedirectConfiguration.

func (RedirectConfiguration) MarshalJSON

func (r RedirectConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RedirectConfiguration.

func (*RedirectConfiguration) UnmarshalJSON

func (r *RedirectConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RedirectConfiguration.

type ReportsClient

type ReportsClient struct {
	// contains filtered or unexported fields
}

ReportsClient contains the methods for the Reports group. Don't use this type directly, use NewReportsClient() instead.

func NewReportsClient

func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportsClient, error)

NewReportsClient creates a new instance of ReportsClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ReportsClient) GetLatencyScorecards

func (client *ReportsClient) GetLatencyScorecards(ctx context.Context, resourceGroupName string, profileName string, experimentName string, aggregationInterval LatencyScorecardAggregationInterval, options *ReportsClientGetLatencyScorecardsOptions) (ReportsClientGetLatencyScorecardsResponse, error)

GetLatencyScorecards - Gets a Latency Scorecard for a given Experiment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • experimentName - The Experiment identifier associated with the Experiment
  • aggregationInterval - The aggregation interval of the Latency Scorecard
  • options - ReportsClientGetLatencyScorecardsOptions contains the optional parameters for the ReportsClient.GetLatencyScorecards method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentGetLatencyScorecard.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReportsClient().GetLatencyScorecards(ctx, "MyResourceGroup", "MyProfile", "MyExperiment", armfrontdoor.LatencyScorecardAggregationIntervalDaily, &armfrontdoor.ReportsClientGetLatencyScorecardsOptions{EndDateTimeUTC: nil,
		Country: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.LatencyScorecard = armfrontdoor.LatencyScorecard{
	// 	Name: to.Ptr("DailyLatencyScorecard"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment/LatencyScorecard"),
	// 	Properties: &armfrontdoor.LatencyScorecardProperties{
	// 		Description: to.Ptr("This scorecard is the latency scorecard, aggregated over a day"),
	// 		Country: to.Ptr("USA"),
	// 		EndDateTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T17:32:28.000Z"); return t}()),
	// 		EndpointA: to.Ptr("https://endpointA.com"),
	// 		EndpointB: to.Ptr("https://endpoingB.com"),
	// 		StartDateTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-21T17:32:28.000Z"); return t}()),
	// 	},
	// }
}
Output:

func (*ReportsClient) GetTimeseries

func (client *ReportsClient) GetTimeseries(ctx context.Context, resourceGroupName string, profileName string, experimentName string, startDateTimeUTC time.Time, endDateTimeUTC time.Time, aggregationInterval TimeseriesAggregationInterval, timeseriesType TimeseriesType, options *ReportsClientGetTimeseriesOptions) (ReportsClientGetTimeseriesResponse, error)

GetTimeseries - Gets a Timeseries for a given Experiment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2019-11-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - The Profile identifier associated with the Tenant and Partner
  • experimentName - The Experiment identifier associated with the Experiment
  • startDateTimeUTC - The start DateTime of the Timeseries in UTC
  • endDateTimeUTC - The end DateTime of the Timeseries in UTC
  • aggregationInterval - The aggregation interval of the Timeseries
  • timeseriesType - The type of Timeseries
  • options - ReportsClientGetTimeseriesOptions contains the optional parameters for the ReportsClient.GetTimeseries method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentGetTimeseries.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewReportsClient().GetTimeseries(ctx, "MyResourceGroup", "MyProfile", "MyExperiment", func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-21T17:32:28.000Z"); return t }(), func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-09-21T17:32:28.000Z"); return t }(), armfrontdoor.TimeseriesAggregationIntervalHourly, armfrontdoor.TimeseriesTypeMeasurementCounts, &armfrontdoor.ReportsClientGetTimeseriesOptions{Endpoint: nil,
		Country: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Timeseries = armfrontdoor.Timeseries{
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment/Timeseries"),
	// 	Properties: &armfrontdoor.TimeseriesProperties{
	// 		AggregationInterval: to.Ptr(armfrontdoor.AggregationIntervalHourly),
	// 		Country: to.Ptr("United States"),
	// 		EndDateTimeUTC: to.Ptr("2019-08-02"),
	// 		Endpoint: to.Ptr("https://endpointA.com"),
	// 		StartDateTimeUTC: to.Ptr("2019-07-29"),
	// 		TimeseriesData: []*armfrontdoor.TimeseriesDataPoint{
	// 			{
	// 				DateTimeUTC: to.Ptr("2019-07-22T17:32:28Z"),
	// 				Value: to.Ptr[float32](79),
	// 		}},
	// 		TimeseriesType: to.Ptr(armfrontdoor.TimeseriesTypeMeasurementCounts),
	// 	},
	// }
}
Output:

type ReportsClientGetLatencyScorecardsOptions added in v0.2.0

type ReportsClientGetLatencyScorecardsOptions struct {
	// The country associated with the Latency Scorecard. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html
	Country *string

	// The end DateTime of the Latency Scorecard in UTC
	EndDateTimeUTC *string
}

ReportsClientGetLatencyScorecardsOptions contains the optional parameters for the ReportsClient.GetLatencyScorecards method.

type ReportsClientGetLatencyScorecardsResponse added in v0.2.0

type ReportsClientGetLatencyScorecardsResponse struct {
	// Defines the LatencyScorecard
	LatencyScorecard
}

ReportsClientGetLatencyScorecardsResponse contains the response from method ReportsClient.GetLatencyScorecards.

type ReportsClientGetTimeseriesOptions added in v0.2.0

type ReportsClientGetTimeseriesOptions struct {
	// The country associated with the Timeseries. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html
	Country *string

	// The specific endpoint
	Endpoint *string
}

ReportsClientGetTimeseriesOptions contains the optional parameters for the ReportsClient.GetTimeseries method.

type ReportsClientGetTimeseriesResponse added in v0.2.0

type ReportsClientGetTimeseriesResponse struct {
	// Defines the Timeseries
	Timeseries
}

ReportsClientGetTimeseriesResponse contains the response from method ReportsClient.GetTimeseries.

type Resource

type Resource struct {
	// Resource location.
	Location *string

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Resource - Common resource representation.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceType

type ResourceType string

ResourceType - Type of Front Door resource used in CheckNameAvailability.

const (
	ResourceTypeMicrosoftNetworkFrontDoors                  ResourceType = "Microsoft.Network/frontDoors"
	ResourceTypeMicrosoftNetworkFrontDoorsFrontendEndpoints ResourceType = "Microsoft.Network/frontDoors/frontendEndpoints"
)

func PossibleResourceTypeValues

func PossibleResourceTypeValues() []ResourceType

PossibleResourceTypeValues returns the possible values for the ResourceType const type.

type RouteConfiguration

type RouteConfiguration struct {
	// REQUIRED
	ODataType *string
}

RouteConfiguration - Base class for all types of Route.

func (*RouteConfiguration) GetRouteConfiguration

func (r *RouteConfiguration) GetRouteConfiguration() *RouteConfiguration

GetRouteConfiguration implements the RouteConfigurationClassification interface for type RouteConfiguration.

func (RouteConfiguration) MarshalJSON added in v1.1.0

func (r RouteConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RouteConfiguration.

func (*RouteConfiguration) UnmarshalJSON

func (r *RouteConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RouteConfiguration.

type RouteConfigurationClassification

type RouteConfigurationClassification interface {
	// GetRouteConfiguration returns the RouteConfiguration content of the underlying type.
	GetRouteConfiguration() *RouteConfiguration
}

RouteConfigurationClassification provides polymorphic access to related types. Call the interface's GetRouteConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ForwardingConfiguration, *RedirectConfiguration, *RouteConfiguration

type RoutingRule

type RoutingRule struct {
	// Resource ID.
	ID *string

	// Resource name.
	Name *string

	// Properties of the Front Door Routing Rule
	Properties *RoutingRuleProperties

	// READ-ONLY; Resource type.
	Type *string
}

RoutingRule - A routing rule represents a specification for traffic to treat and where to send it, along with health probe information.

func (RoutingRule) MarshalJSON added in v1.1.0

func (r RoutingRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoutingRule.

func (*RoutingRule) UnmarshalJSON added in v1.1.0

func (r *RoutingRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRule.

type RoutingRuleEnabledState

type RoutingRuleEnabledState string

RoutingRuleEnabledState - Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'

const (
	RoutingRuleEnabledStateDisabled RoutingRuleEnabledState = "Disabled"
	RoutingRuleEnabledStateEnabled  RoutingRuleEnabledState = "Enabled"
)

func PossibleRoutingRuleEnabledStateValues

func PossibleRoutingRuleEnabledStateValues() []RoutingRuleEnabledState

PossibleRoutingRuleEnabledStateValues returns the possible values for the RoutingRuleEnabledState const type.

type RoutingRuleLink struct {
	// Resource ID.
	ID *string
}

RoutingRuleLink - Defines the Resource ID for a Routing Rule.

func (RoutingRuleLink) MarshalJSON added in v1.1.0

func (r RoutingRuleLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoutingRuleLink.

func (*RoutingRuleLink) UnmarshalJSON added in v1.1.0

func (r *RoutingRuleLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleLink.

type RoutingRuleListResult

type RoutingRuleListResult struct {
	// URL to get the next set of RoutingRule objects if there are any.
	NextLink *string

	// READ-ONLY; List of Routing Rules within a Front Door.
	Value []*RoutingRule
}

RoutingRuleListResult - Result of the request to list Routing Rules. It contains a list of Routing Rule objects and a URL link to get the next set of results.

func (RoutingRuleListResult) MarshalJSON

func (r RoutingRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoutingRuleListResult.

func (*RoutingRuleListResult) UnmarshalJSON added in v1.1.0

func (r *RoutingRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleListResult.

type RoutingRuleProperties

type RoutingRuleProperties struct {
	// Protocol schemes to match for this rule
	AcceptedProtocols []*FrontDoorProtocol

	// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
	EnabledState *RoutingRuleEnabledState

	// Frontend endpoints associated with this rule
	FrontendEndpoints []*SubResource

	// The route patterns of the rule.
	PatternsToMatch []*string

	// A reference to the routing configuration.
	RouteConfiguration RouteConfigurationClassification

	// A reference to a specific Rules Engine Configuration to apply to this route.
	RulesEngine *SubResource

	// Defines the Web Application Firewall policy for each routing rule (if applicable)
	WebApplicationFirewallPolicyLink *RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink

	// READ-ONLY; Resource status.
	ResourceState *FrontDoorResourceState
}

RoutingRuleProperties - The JSON object that contains the properties required to create a routing rule.

func (RoutingRuleProperties) MarshalJSON

func (r RoutingRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoutingRuleProperties.

func (*RoutingRuleProperties) UnmarshalJSON

func (r *RoutingRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleProperties.

type RoutingRuleUpdateParameters

type RoutingRuleUpdateParameters struct {
	// Protocol schemes to match for this rule
	AcceptedProtocols []*FrontDoorProtocol

	// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
	EnabledState *RoutingRuleEnabledState

	// Frontend endpoints associated with this rule
	FrontendEndpoints []*SubResource

	// The route patterns of the rule.
	PatternsToMatch []*string

	// A reference to the routing configuration.
	RouteConfiguration RouteConfigurationClassification

	// A reference to a specific Rules Engine Configuration to apply to this route.
	RulesEngine *SubResource

	// Defines the Web Application Firewall policy for each routing rule (if applicable)
	WebApplicationFirewallPolicyLink *RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink
}

RoutingRuleUpdateParameters - Routing rules to apply to an endpoint

func (RoutingRuleUpdateParameters) MarshalJSON

func (r RoutingRuleUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoutingRuleUpdateParameters.

func (*RoutingRuleUpdateParameters) UnmarshalJSON

func (r *RoutingRuleUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleUpdateParameters.

type RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink struct {
	// Resource ID.
	ID *string
}

RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for each routing rule (if applicable)

func (RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.

func (*RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.

type RuleType

type RuleType string

RuleType - Describes type of rule.

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

func PossibleRuleTypeValues

func PossibleRuleTypeValues() []RuleType

PossibleRuleTypeValues returns the possible values for the RuleType const type.

type RulesEngine

type RulesEngine struct {
	// Properties of the Rules Engine Configuration.
	Properties *RulesEngineProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

RulesEngine - A rules engine configuration containing a list of rules that will run to modify the runtime behavior of the request and response.

func (RulesEngine) MarshalJSON added in v1.1.0

func (r RulesEngine) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesEngine.

func (*RulesEngine) UnmarshalJSON added in v1.1.0

func (r *RulesEngine) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesEngine.

type RulesEngineAction

type RulesEngineAction struct {
	// A list of header actions to apply from the request from AFD to the origin.
	RequestHeaderActions []*HeaderAction

	// A list of header actions to apply from the response from AFD to the client.
	ResponseHeaderActions []*HeaderAction

	// Override the route configuration.
	RouteConfigurationOverride RouteConfigurationClassification
}

RulesEngineAction - One or more actions that will execute, modifying the request and/or response.

func (RulesEngineAction) MarshalJSON

func (r RulesEngineAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesEngineAction.

func (*RulesEngineAction) UnmarshalJSON

func (r *RulesEngineAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesEngineAction.

type RulesEngineListResult

type RulesEngineListResult struct {
	// URL to get the next set of RulesEngine objects if there are any.
	NextLink *string

	// READ-ONLY; List of rulesEngines within a Front Door.
	Value []*RulesEngine
}

RulesEngineListResult - Result of the request to list Rules Engine Configurations. It contains a list of RulesEngine objects and a URL link to get the next set of results.

func (RulesEngineListResult) MarshalJSON

func (r RulesEngineListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesEngineListResult.

func (*RulesEngineListResult) UnmarshalJSON added in v1.1.0

func (r *RulesEngineListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesEngineListResult.

type RulesEngineMatchCondition

type RulesEngineMatchCondition struct {
	// REQUIRED; Match values to match against. The operator will apply to each value in here with OR semantics. If any of them
	// match the variable with the given operator this match condition is considered a match.
	RulesEngineMatchValue []*string

	// REQUIRED; Match Variable
	RulesEngineMatchVariable *RulesEngineMatchVariable

	// REQUIRED; Describes operator to apply to the match condition.
	RulesEngineOperator *RulesEngineOperator

	// Describes if this is negate condition or not
	NegateCondition *bool

	// Name of selector in RequestHeader or RequestBody to be matched
	Selector *string

	// List of transforms
	Transforms []*Transform
}

RulesEngineMatchCondition - Define a match condition

func (RulesEngineMatchCondition) MarshalJSON

func (r RulesEngineMatchCondition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesEngineMatchCondition.

func (*RulesEngineMatchCondition) UnmarshalJSON added in v1.1.0

func (r *RulesEngineMatchCondition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesEngineMatchCondition.

type RulesEngineMatchVariable

type RulesEngineMatchVariable string

RulesEngineMatchVariable - Match Variable

const (
	RulesEngineMatchVariableIsMobile                 RulesEngineMatchVariable = "IsMobile"
	RulesEngineMatchVariablePostArgs                 RulesEngineMatchVariable = "PostArgs"
	RulesEngineMatchVariableQueryString              RulesEngineMatchVariable = "QueryString"
	RulesEngineMatchVariableRemoteAddr               RulesEngineMatchVariable = "RemoteAddr"
	RulesEngineMatchVariableRequestBody              RulesEngineMatchVariable = "RequestBody"
	RulesEngineMatchVariableRequestFilename          RulesEngineMatchVariable = "RequestFilename"
	RulesEngineMatchVariableRequestFilenameExtension RulesEngineMatchVariable = "RequestFilenameExtension"
	RulesEngineMatchVariableRequestHeader            RulesEngineMatchVariable = "RequestHeader"
	RulesEngineMatchVariableRequestMethod            RulesEngineMatchVariable = "RequestMethod"
	RulesEngineMatchVariableRequestPath              RulesEngineMatchVariable = "RequestPath"
	RulesEngineMatchVariableRequestScheme            RulesEngineMatchVariable = "RequestScheme"
	RulesEngineMatchVariableRequestURI               RulesEngineMatchVariable = "RequestUri"
)

func PossibleRulesEngineMatchVariableValues

func PossibleRulesEngineMatchVariableValues() []RulesEngineMatchVariable

PossibleRulesEngineMatchVariableValues returns the possible values for the RulesEngineMatchVariable const type.

type RulesEngineOperator

type RulesEngineOperator string

RulesEngineOperator - Describes operator to apply to the match condition.

const (
	RulesEngineOperatorAny                RulesEngineOperator = "Any"
	RulesEngineOperatorBeginsWith         RulesEngineOperator = "BeginsWith"
	RulesEngineOperatorContains           RulesEngineOperator = "Contains"
	RulesEngineOperatorEndsWith           RulesEngineOperator = "EndsWith"
	RulesEngineOperatorEqual              RulesEngineOperator = "Equal"
	RulesEngineOperatorGeoMatch           RulesEngineOperator = "GeoMatch"
	RulesEngineOperatorGreaterThan        RulesEngineOperator = "GreaterThan"
	RulesEngineOperatorGreaterThanOrEqual RulesEngineOperator = "GreaterThanOrEqual"
	RulesEngineOperatorIPMatch            RulesEngineOperator = "IPMatch"
	RulesEngineOperatorLessThan           RulesEngineOperator = "LessThan"
	RulesEngineOperatorLessThanOrEqual    RulesEngineOperator = "LessThanOrEqual"
)

func PossibleRulesEngineOperatorValues

func PossibleRulesEngineOperatorValues() []RulesEngineOperator

PossibleRulesEngineOperatorValues returns the possible values for the RulesEngineOperator const type.

type RulesEngineProperties

type RulesEngineProperties struct {
	// A list of rules that define a particular Rules Engine Configuration.
	Rules []*RulesEngineRule

	// READ-ONLY; Resource status.
	ResourceState *FrontDoorResourceState
}

RulesEngineProperties - The JSON object that contains the properties required to create a Rules Engine Configuration.

func (RulesEngineProperties) MarshalJSON

func (r RulesEngineProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesEngineProperties.

func (*RulesEngineProperties) UnmarshalJSON added in v1.1.0

func (r *RulesEngineProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesEngineProperties.

type RulesEngineRule

type RulesEngineRule struct {
	// REQUIRED; Actions to perform on the request and response if all of the match conditions are met.
	Action *RulesEngineAction

	// REQUIRED; A name to refer to this specific rule.
	Name *string

	// REQUIRED; A priority assigned to this rule.
	Priority *int32

	// A list of match conditions that must meet in order for the actions of this rule to run. Having no match conditions means
	// the actions will always run.
	MatchConditions []*RulesEngineMatchCondition

	// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults
	// to Continue.
	MatchProcessingBehavior *MatchProcessingBehavior
}

RulesEngineRule - Contains a list of match conditions, and an action on how to modify the request/response. If multiple rules match, the actions from one rule that conflict with a previous rule overwrite for a singular action, or append in the case of headers manipulation.

func (RulesEngineRule) MarshalJSON

func (r RulesEngineRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesEngineRule.

func (*RulesEngineRule) UnmarshalJSON added in v1.1.0

func (r *RulesEngineRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesEngineRule.

type RulesEngineUpdateParameters

type RulesEngineUpdateParameters struct {
	// A list of rules that define a particular Rules Engine Configuration.
	Rules []*RulesEngineRule
}

RulesEngineUpdateParameters - Rules Engine Configuration to apply to a Routing Rule.

func (RulesEngineUpdateParameters) MarshalJSON

func (r RulesEngineUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RulesEngineUpdateParameters.

func (*RulesEngineUpdateParameters) UnmarshalJSON added in v1.1.0

func (r *RulesEngineUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RulesEngineUpdateParameters.

type RulesEnginesClient

type RulesEnginesClient struct {
	// contains filtered or unexported fields
}

RulesEnginesClient contains the methods for the RulesEngines group. Don't use this type directly, use NewRulesEnginesClient() instead.

func NewRulesEnginesClient

func NewRulesEnginesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RulesEnginesClient, error)

NewRulesEnginesClient creates a new instance of RulesEnginesClient with the specified values.

  • subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RulesEnginesClient) BeginCreateOrUpdate

func (client *RulesEnginesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, rulesEngineParameters RulesEngine, options *RulesEnginesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RulesEnginesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a new Rules Engine Configuration with the specified name within the specified Front Door. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • rulesEngineName - Name of the Rules Engine which is unique within the Front Door.
  • rulesEngineParameters - Rules Engine Configuration properties needed to create a new Rules Engine Configuration.
  • options - RulesEnginesClientBeginCreateOrUpdateOptions contains the optional parameters for the RulesEnginesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRulesEnginesClient().BeginCreateOrUpdate(ctx, "rg1", "frontDoor1", "rulesEngine1", armfrontdoor.RulesEngine{
		Properties: &armfrontdoor.RulesEngineProperties{
			Rules: []*armfrontdoor.RulesEngineRule{
				{
					Name: to.Ptr("Rule1"),
					Action: &armfrontdoor.RulesEngineAction{
						RouteConfigurationOverride: &armfrontdoor.RedirectConfiguration{
							ODataType:         to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"),
							CustomFragment:    to.Ptr("fragment"),
							CustomHost:        to.Ptr("www.bing.com"),
							CustomPath:        to.Ptr("/api"),
							CustomQueryString: to.Ptr("a=b"),
							RedirectProtocol:  to.Ptr(armfrontdoor.FrontDoorRedirectProtocolHTTPSOnly),
							RedirectType:      to.Ptr(armfrontdoor.FrontDoorRedirectTypeMoved),
						},
					},
					MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
						{
							RulesEngineMatchValue: []*string{
								to.Ptr("CH")},
							RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRemoteAddr),
							RulesEngineOperator:      to.Ptr(armfrontdoor.RulesEngineOperatorGeoMatch),
						}},
					MatchProcessingBehavior: to.Ptr(armfrontdoor.MatchProcessingBehaviorStop),
					Priority:                to.Ptr[int32](1),
				},
				{
					Name: to.Ptr("Rule2"),
					Action: &armfrontdoor.RulesEngineAction{
						ResponseHeaderActions: []*armfrontdoor.HeaderAction{
							{
								HeaderActionType: to.Ptr(armfrontdoor.HeaderActionTypeOverwrite),
								HeaderName:       to.Ptr("Cache-Control"),
								Value:            to.Ptr("public, max-age=31536000"),
							}},
					},
					MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
						{
							RulesEngineMatchValue: []*string{
								to.Ptr("jpg")},
							RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRequestFilenameExtension),
							RulesEngineOperator:      to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
							Transforms: []*armfrontdoor.Transform{
								to.Ptr(armfrontdoor.TransformLowercase)},
						}},
					Priority: to.Ptr[int32](2),
				},
				{
					Name: to.Ptr("Rule3"),
					Action: &armfrontdoor.RulesEngineAction{
						RouteConfigurationOverride: &armfrontdoor.ForwardingConfiguration{
							ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
							BackendPool: &armfrontdoor.SubResource{
								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
							},
							CacheConfiguration: &armfrontdoor.CacheConfiguration{
								CacheDuration:                to.Ptr("P1DT12H20M30S"),
								DynamicCompression:           to.Ptr(armfrontdoor.DynamicCompressionEnabledDisabled),
								QueryParameterStripDirective: to.Ptr(armfrontdoor.FrontDoorQueryStripOnly),
								QueryParameters:              to.Ptr("a=b,p=q"),
							},
							ForwardingProtocol: to.Ptr(armfrontdoor.FrontDoorForwardingProtocolHTTPSOnly),
						},
					},
					MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
						{
							NegateCondition: to.Ptr(false),
							RulesEngineMatchValue: []*string{
								to.Ptr("allowoverride")},
							RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRequestHeader),
							RulesEngineOperator:      to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
							Selector:                 to.Ptr("Rules-Engine-Route-Forward"),
							Transforms: []*armfrontdoor.Transform{
								to.Ptr(armfrontdoor.TransformLowercase)},
						}},
					Priority: to.Ptr[int32](3),
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RulesEngine = armfrontdoor.RulesEngine{
	// 	Name: to.Ptr("rulesEngine1"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
	// 	Properties: &armfrontdoor.RulesEngineProperties{
	// 		Rules: []*armfrontdoor.RulesEngineRule{
	// 			{
	// 				Name: to.Ptr("Rule1"),
	// 				Action: &armfrontdoor.RulesEngineAction{
	// 					RouteConfigurationOverride: &armfrontdoor.RedirectConfiguration{
	// 						ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"),
	// 						CustomFragment: to.Ptr("fragment"),
	// 						CustomHost: to.Ptr("www.bing.com"),
	// 						CustomPath: to.Ptr("/api"),
	// 						CustomQueryString: to.Ptr("a=b"),
	// 						RedirectProtocol: to.Ptr(armfrontdoor.FrontDoorRedirectProtocolHTTPSOnly),
	// 						RedirectType: to.Ptr(armfrontdoor.FrontDoorRedirectTypeMoved),
	// 					},
	// 				},
	// 				MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
	// 					{
	// 						RulesEngineMatchValue: []*string{
	// 							to.Ptr("CH")},
	// 							RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRemoteAddr),
	// 							RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorGeoMatch),
	// 					}},
	// 					MatchProcessingBehavior: to.Ptr(armfrontdoor.MatchProcessingBehaviorStop),
	// 					Priority: to.Ptr[int32](1),
	// 				},
	// 				{
	// 					Name: to.Ptr("Rule2"),
	// 					Action: &armfrontdoor.RulesEngineAction{
	// 						ResponseHeaderActions: []*armfrontdoor.HeaderAction{
	// 							{
	// 								HeaderActionType: to.Ptr(armfrontdoor.HeaderActionTypeOverwrite),
	// 								HeaderName: to.Ptr("Cache-Control"),
	// 								Value: to.Ptr("public, max-age=31536000"),
	// 						}},
	// 					},
	// 					MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
	// 						{
	// 							RulesEngineMatchValue: []*string{
	// 								to.Ptr("jpg")},
	// 								RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRequestFilenameExtension),
	// 								RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
	// 								Transforms: []*armfrontdoor.Transform{
	// 									to.Ptr(armfrontdoor.TransformLowercase)},
	// 							}},
	// 							Priority: to.Ptr[int32](2),
	// 					}},
	// 				},
	// 			}
}
Output:

func (*RulesEnginesClient) BeginDelete

func (client *RulesEnginesClient) BeginDelete(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, options *RulesEnginesClientBeginDeleteOptions) (*runtime.Poller[RulesEnginesClientDeleteResponse], error)

BeginDelete - Deletes an existing Rules Engine Configuration with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • rulesEngineName - Name of the Rules Engine which is unique within the Front Door.
  • options - RulesEnginesClientBeginDeleteOptions contains the optional parameters for the RulesEnginesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRulesEnginesClient().BeginDelete(ctx, "rg1", "frontDoor1", "rulesEngine1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*RulesEnginesClient) Get

func (client *RulesEnginesClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, options *RulesEnginesClientGetOptions) (RulesEnginesClientGetResponse, error)

Get - Gets a Rules Engine Configuration with the specified name within the specified Front Door. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • rulesEngineName - Name of the Rules Engine which is unique within the Front Door.
  • options - RulesEnginesClientGetOptions contains the optional parameters for the RulesEnginesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRulesEnginesClient().Get(ctx, "rg1", "frontDoor1", "rulesEngine1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RulesEngine = armfrontdoor.RulesEngine{
	// 	Name: to.Ptr("rulesEngine1"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
	// 	Properties: &armfrontdoor.RulesEngineProperties{
	// 		Rules: []*armfrontdoor.RulesEngineRule{
	// 			{
	// 				Name: to.Ptr("Rule1"),
	// 				Action: &armfrontdoor.RulesEngineAction{
	// 					RouteConfigurationOverride: &armfrontdoor.RedirectConfiguration{
	// 						ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"),
	// 						CustomFragment: to.Ptr("fragment"),
	// 						CustomHost: to.Ptr("www.bing.com"),
	// 						CustomPath: to.Ptr("/api"),
	// 						CustomQueryString: to.Ptr("a=b"),
	// 						RedirectProtocol: to.Ptr(armfrontdoor.FrontDoorRedirectProtocolHTTPSOnly),
	// 						RedirectType: to.Ptr(armfrontdoor.FrontDoorRedirectTypeMoved),
	// 					},
	// 				},
	// 				MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
	// 					{
	// 						RulesEngineMatchValue: []*string{
	// 							to.Ptr("CH")},
	// 							RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRemoteAddr),
	// 							RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorGeoMatch),
	// 					}},
	// 					MatchProcessingBehavior: to.Ptr(armfrontdoor.MatchProcessingBehaviorStop),
	// 					Priority: to.Ptr[int32](1),
	// 				},
	// 				{
	// 					Name: to.Ptr("Rule2"),
	// 					Action: &armfrontdoor.RulesEngineAction{
	// 						ResponseHeaderActions: []*armfrontdoor.HeaderAction{
	// 							{
	// 								HeaderActionType: to.Ptr(armfrontdoor.HeaderActionTypeOverwrite),
	// 								HeaderName: to.Ptr("Cache-Control"),
	// 								Value: to.Ptr("public, max-age=31536000"),
	// 						}},
	// 					},
	// 					MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
	// 						{
	// 							RulesEngineMatchValue: []*string{
	// 								to.Ptr("jpg")},
	// 								RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRequestFilenameExtension),
	// 								RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
	// 								Transforms: []*armfrontdoor.Transform{
	// 									to.Ptr(armfrontdoor.TransformLowercase)},
	// 							}},
	// 							Priority: to.Ptr[int32](2),
	// 						},
	// 						{
	// 							Name: to.Ptr("Rule3"),
	// 							Action: &armfrontdoor.RulesEngineAction{
	// 								RouteConfigurationOverride: &armfrontdoor.ForwardingConfiguration{
	// 									ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
	// 									BackendPool: &armfrontdoor.SubResource{
	// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
	// 									},
	// 									CacheConfiguration: &armfrontdoor.CacheConfiguration{
	// 										CacheDuration: to.Ptr("P1DT12H20M30S"),
	// 										DynamicCompression: to.Ptr(armfrontdoor.DynamicCompressionEnabledDisabled),
	// 										QueryParameterStripDirective: to.Ptr(armfrontdoor.FrontDoorQueryStripOnly),
	// 										QueryParameters: to.Ptr("a=b,p=q"),
	// 									},
	// 									ForwardingProtocol: to.Ptr(armfrontdoor.FrontDoorForwardingProtocolHTTPSOnly),
	// 								},
	// 							},
	// 							MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
	// 								{
	// 									NegateCondition: to.Ptr(false),
	// 									RulesEngineMatchValue: []*string{
	// 										to.Ptr("allowoverride")},
	// 										RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRequestHeader),
	// 										RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
	// 										Selector: to.Ptr("Rules-Engine-Route-Forward"),
	// 										Transforms: []*armfrontdoor.Transform{
	// 											to.Ptr(armfrontdoor.TransformLowercase)},
	// 									}},
	// 									Priority: to.Ptr[int32](3),
	// 							}},
	// 						},
	// 					}
}
Output:

func (*RulesEnginesClient) NewListByFrontDoorPager added in v0.4.0

func (client *RulesEnginesClient) NewListByFrontDoorPager(resourceGroupName string, frontDoorName string, options *RulesEnginesClientListByFrontDoorOptions) *runtime.Pager[RulesEnginesClientListByFrontDoorResponse]

NewListByFrontDoorPager - Lists all of the Rules Engine Configurations within a Front Door.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • frontDoorName - Name of the Front Door which is globally unique.
  • options - RulesEnginesClientListByFrontDoorOptions contains the optional parameters for the RulesEnginesClient.NewListByFrontDoorPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRulesEnginesClient().NewListByFrontDoorPager("rg1", "frontDoor1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RulesEngineListResult = armfrontdoor.RulesEngineListResult{
		// 	Value: []*armfrontdoor.RulesEngine{
		// 		{
		// 			Name: to.Ptr("rulesEngine1"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
		// 			Properties: &armfrontdoor.RulesEngineProperties{
		// 				Rules: []*armfrontdoor.RulesEngineRule{
		// 					{
		// 						Name: to.Ptr("Rule1"),
		// 						Action: &armfrontdoor.RulesEngineAction{
		// 							RouteConfigurationOverride: &armfrontdoor.RedirectConfiguration{
		// 								ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"),
		// 								CustomFragment: to.Ptr("fragment"),
		// 								CustomHost: to.Ptr("www.bing.com"),
		// 								CustomPath: to.Ptr("/api"),
		// 								CustomQueryString: to.Ptr("a=b"),
		// 								RedirectProtocol: to.Ptr(armfrontdoor.FrontDoorRedirectProtocolHTTPSOnly),
		// 								RedirectType: to.Ptr(armfrontdoor.FrontDoorRedirectTypeMoved),
		// 							},
		// 						},
		// 						MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
		// 							{
		// 								RulesEngineMatchValue: []*string{
		// 									to.Ptr("CH")},
		// 									RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRemoteAddr),
		// 									RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorGeoMatch),
		// 							}},
		// 							MatchProcessingBehavior: to.Ptr(armfrontdoor.MatchProcessingBehaviorStop),
		// 							Priority: to.Ptr[int32](1),
		// 						},
		// 						{
		// 							Name: to.Ptr("Rule2"),
		// 							Action: &armfrontdoor.RulesEngineAction{
		// 								ResponseHeaderActions: []*armfrontdoor.HeaderAction{
		// 									{
		// 										HeaderActionType: to.Ptr(armfrontdoor.HeaderActionTypeOverwrite),
		// 										HeaderName: to.Ptr("Cache-Control"),
		// 										Value: to.Ptr("public, max-age=31536000"),
		// 								}},
		// 							},
		// 							MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
		// 								{
		// 									RulesEngineMatchValue: []*string{
		// 										to.Ptr("jpg")},
		// 										RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRequestFilenameExtension),
		// 										RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
		// 										Transforms: []*armfrontdoor.Transform{
		// 											to.Ptr(armfrontdoor.TransformLowercase)},
		// 									}},
		// 									Priority: to.Ptr[int32](2),
		// 								},
		// 								{
		// 									Name: to.Ptr("Rule3"),
		// 									Action: &armfrontdoor.RulesEngineAction{
		// 										RouteConfigurationOverride: &armfrontdoor.ForwardingConfiguration{
		// 											ODataType: to.Ptr("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"),
		// 											BackendPool: &armfrontdoor.SubResource{
		// 												ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1"),
		// 											},
		// 											CacheConfiguration: &armfrontdoor.CacheConfiguration{
		// 												CacheDuration: to.Ptr("P1DT12H20M30S"),
		// 												DynamicCompression: to.Ptr(armfrontdoor.DynamicCompressionEnabledDisabled),
		// 												QueryParameterStripDirective: to.Ptr(armfrontdoor.FrontDoorQueryStripOnly),
		// 												QueryParameters: to.Ptr("a=b,p=q"),
		// 											},
		// 											ForwardingProtocol: to.Ptr(armfrontdoor.FrontDoorForwardingProtocolHTTPSOnly),
		// 										},
		// 									},
		// 									MatchConditions: []*armfrontdoor.RulesEngineMatchCondition{
		// 										{
		// 											NegateCondition: to.Ptr(false),
		// 											RulesEngineMatchValue: []*string{
		// 												to.Ptr("allowoverride")},
		// 												RulesEngineMatchVariable: to.Ptr(armfrontdoor.RulesEngineMatchVariableRequestHeader),
		// 												RulesEngineOperator: to.Ptr(armfrontdoor.RulesEngineOperatorEqual),
		// 												Selector: to.Ptr("Rules-Engine-Route-Forward"),
		// 												Transforms: []*armfrontdoor.Transform{
		// 													to.Ptr(armfrontdoor.TransformLowercase)},
		// 											}},
		// 											Priority: to.Ptr[int32](3),
		// 									}},
		// 								},
		// 						}},
		// 					}
	}
}
Output:

type RulesEnginesClientBeginCreateOrUpdateOptions added in v0.2.0

type RulesEnginesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RulesEnginesClientBeginCreateOrUpdateOptions contains the optional parameters for the RulesEnginesClient.BeginCreateOrUpdate method.

type RulesEnginesClientBeginDeleteOptions added in v0.2.0

type RulesEnginesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RulesEnginesClientBeginDeleteOptions contains the optional parameters for the RulesEnginesClient.BeginDelete method.

type RulesEnginesClientCreateOrUpdateResponse added in v0.2.0

type RulesEnginesClientCreateOrUpdateResponse struct {
	// A rules engine configuration containing a list of rules that will run to modify the runtime behavior of the request and
	// response.
	RulesEngine
}

RulesEnginesClientCreateOrUpdateResponse contains the response from method RulesEnginesClient.BeginCreateOrUpdate.

type RulesEnginesClientDeleteResponse added in v0.2.0

type RulesEnginesClientDeleteResponse struct {
}

RulesEnginesClientDeleteResponse contains the response from method RulesEnginesClient.BeginDelete.

type RulesEnginesClientGetOptions added in v0.2.0

type RulesEnginesClientGetOptions struct {
}

RulesEnginesClientGetOptions contains the optional parameters for the RulesEnginesClient.Get method.

type RulesEnginesClientGetResponse added in v0.2.0

type RulesEnginesClientGetResponse struct {
	// A rules engine configuration containing a list of rules that will run to modify the runtime behavior of the request and
	// response.
	RulesEngine
}

RulesEnginesClientGetResponse contains the response from method RulesEnginesClient.Get.

type RulesEnginesClientListByFrontDoorOptions added in v0.2.0

type RulesEnginesClientListByFrontDoorOptions struct {
}

RulesEnginesClientListByFrontDoorOptions contains the optional parameters for the RulesEnginesClient.NewListByFrontDoorPager method.

type RulesEnginesClientListByFrontDoorResponse added in v0.2.0

type RulesEnginesClientListByFrontDoorResponse struct {
	// Result of the request to list Rules Engine Configurations. It contains a list of RulesEngine objects and a URL link to
	// get the next set of results.
	RulesEngineListResult
}

RulesEnginesClientListByFrontDoorResponse contains the response from method RulesEnginesClient.NewListByFrontDoorPager.

type SKU

type SKU struct {
	// Name of the pricing tier.
	Name *SKUName
}

SKU - The pricing tier of the web application firewall policy.

func (SKU) MarshalJSON added in v1.1.0

func (s SKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.1.0

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUName

type SKUName string

SKUName - Name of the pricing tier.

const (
	SKUNameClassicAzureFrontDoor  SKUName = "Classic_AzureFrontDoor"
	SKUNamePremiumAzureFrontDoor  SKUName = "Premium_AzureFrontDoor"
	SKUNameStandardAzureFrontDoor SKUName = "Standard_AzureFrontDoor"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type ScrubbingRuleEntryMatchOperator added in v1.4.0

type ScrubbingRuleEntryMatchOperator string

ScrubbingRuleEntryMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to.

const (
	ScrubbingRuleEntryMatchOperatorEquals    ScrubbingRuleEntryMatchOperator = "Equals"
	ScrubbingRuleEntryMatchOperatorEqualsAny ScrubbingRuleEntryMatchOperator = "EqualsAny"
)

func PossibleScrubbingRuleEntryMatchOperatorValues added in v1.4.0

func PossibleScrubbingRuleEntryMatchOperatorValues() []ScrubbingRuleEntryMatchOperator

PossibleScrubbingRuleEntryMatchOperatorValues returns the possible values for the ScrubbingRuleEntryMatchOperator const type.

type ScrubbingRuleEntryMatchVariable added in v1.4.0

type ScrubbingRuleEntryMatchVariable string

ScrubbingRuleEntryMatchVariable - The variable to be scrubbed from the logs.

const (
	ScrubbingRuleEntryMatchVariableQueryStringArgNames     ScrubbingRuleEntryMatchVariable = "QueryStringArgNames"
	ScrubbingRuleEntryMatchVariableRequestBodyJSONArgNames ScrubbingRuleEntryMatchVariable = "RequestBodyJsonArgNames"
	ScrubbingRuleEntryMatchVariableRequestBodyPostArgNames ScrubbingRuleEntryMatchVariable = "RequestBodyPostArgNames"
	ScrubbingRuleEntryMatchVariableRequestCookieNames      ScrubbingRuleEntryMatchVariable = "RequestCookieNames"
	ScrubbingRuleEntryMatchVariableRequestHeaderNames      ScrubbingRuleEntryMatchVariable = "RequestHeaderNames"
	ScrubbingRuleEntryMatchVariableRequestIPAddress        ScrubbingRuleEntryMatchVariable = "RequestIPAddress"
	ScrubbingRuleEntryMatchVariableRequestURI              ScrubbingRuleEntryMatchVariable = "RequestUri"
)

func PossibleScrubbingRuleEntryMatchVariableValues added in v1.4.0

func PossibleScrubbingRuleEntryMatchVariableValues() []ScrubbingRuleEntryMatchVariable

PossibleScrubbingRuleEntryMatchVariableValues returns the possible values for the ScrubbingRuleEntryMatchVariable const type.

type ScrubbingRuleEntryState added in v1.4.0

type ScrubbingRuleEntryState string

ScrubbingRuleEntryState - Defines the state of a log scrubbing rule. Default value is enabled.

const (
	ScrubbingRuleEntryStateDisabled ScrubbingRuleEntryState = "Disabled"
	ScrubbingRuleEntryStateEnabled  ScrubbingRuleEntryState = "Enabled"
)

func PossibleScrubbingRuleEntryStateValues added in v1.4.0

func PossibleScrubbingRuleEntryStateValues() []ScrubbingRuleEntryState

PossibleScrubbingRuleEntryStateValues returns the possible values for the ScrubbingRuleEntryState const type.

type SecurityPolicyLink struct {
	// Resource ID.
	ID *string
}

SecurityPolicyLink - Defines the Resource ID for a Security Policy.

func (SecurityPolicyLink) MarshalJSON added in v1.1.0

func (s SecurityPolicyLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyLink.

func (*SecurityPolicyLink) UnmarshalJSON added in v1.1.0

func (s *SecurityPolicyLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyLink.

type SessionAffinityEnabledState

type SessionAffinityEnabledState string

SessionAffinityEnabledState - Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'

const (
	SessionAffinityEnabledStateDisabled SessionAffinityEnabledState = "Disabled"
	SessionAffinityEnabledStateEnabled  SessionAffinityEnabledState = "Enabled"
)

func PossibleSessionAffinityEnabledStateValues

func PossibleSessionAffinityEnabledStateValues() []SessionAffinityEnabledState

PossibleSessionAffinityEnabledStateValues returns the possible values for the SessionAffinityEnabledState const type.

type State

type State string

State - The state of the Experiment

const (
	StateDisabled State = "Disabled"
	StateEnabled  State = "Enabled"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns the possible values for the State const type.

type SubResource

type SubResource struct {
	// Resource ID.
	ID *string
}

SubResource - Reference to another subresource.

func (SubResource) MarshalJSON added in v1.1.0

func (s SubResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubResource.

func (*SubResource) UnmarshalJSON added in v1.1.0

func (s *SubResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubResource.

type TagsObject

type TagsObject struct {
	// Resource tags.
	Tags map[string]*string
}

TagsObject - Tags object for patch operations.

func (TagsObject) MarshalJSON

func (t TagsObject) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagsObject.

func (*TagsObject) UnmarshalJSON added in v1.1.0

func (t *TagsObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagsObject.

type Timeseries

type Timeseries struct {
	// Resource location.
	Location *string

	// The properties of a Timeseries
	Properties *TimeseriesProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Timeseries - Defines the Timeseries

func (Timeseries) MarshalJSON

func (t Timeseries) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Timeseries.

func (*Timeseries) UnmarshalJSON added in v1.1.0

func (t *Timeseries) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Timeseries.

type TimeseriesAggregationInterval

type TimeseriesAggregationInterval string
const (
	TimeseriesAggregationIntervalDaily  TimeseriesAggregationInterval = "Daily"
	TimeseriesAggregationIntervalHourly TimeseriesAggregationInterval = "Hourly"
)

func PossibleTimeseriesAggregationIntervalValues

func PossibleTimeseriesAggregationIntervalValues() []TimeseriesAggregationInterval

PossibleTimeseriesAggregationIntervalValues returns the possible values for the TimeseriesAggregationInterval const type.

type TimeseriesDataPoint

type TimeseriesDataPoint struct {
	// The DateTime of the Timeseries data point in UTC
	DateTimeUTC *string

	// The Value of the Timeseries data point
	Value *float32
}

TimeseriesDataPoint - Defines a timeseries datapoint used in a timeseries

func (TimeseriesDataPoint) MarshalJSON added in v1.1.0

func (t TimeseriesDataPoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TimeseriesDataPoint.

func (*TimeseriesDataPoint) UnmarshalJSON added in v1.1.0

func (t *TimeseriesDataPoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TimeseriesDataPoint.

type TimeseriesProperties

type TimeseriesProperties struct {
	// The aggregation interval of the Timeseries
	AggregationInterval *AggregationInterval

	// The country associated with the Timeseries. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html
	Country *string

	// The end DateTime of the Timeseries in UTC
	EndDateTimeUTC *string

	// The endpoint associated with the Timeseries data point
	Endpoint *string

	// The start DateTime of the Timeseries in UTC
	StartDateTimeUTC *string

	// The set of data points for the timeseries
	TimeseriesData []*TimeseriesDataPoint

	// The type of Timeseries
	TimeseriesType *TimeseriesType
}

TimeseriesProperties - Defines the properties of a timeseries

func (TimeseriesProperties) MarshalJSON

func (t TimeseriesProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TimeseriesProperties.

func (*TimeseriesProperties) UnmarshalJSON added in v1.1.0

func (t *TimeseriesProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TimeseriesProperties.

type TimeseriesType

type TimeseriesType string

TimeseriesType - The type of Timeseries

const (
	TimeseriesTypeLatencyP50        TimeseriesType = "LatencyP50"
	TimeseriesTypeLatencyP75        TimeseriesType = "LatencyP75"
	TimeseriesTypeLatencyP95        TimeseriesType = "LatencyP95"
	TimeseriesTypeMeasurementCounts TimeseriesType = "MeasurementCounts"
)

func PossibleTimeseriesTypeValues

func PossibleTimeseriesTypeValues() []TimeseriesType

PossibleTimeseriesTypeValues returns the possible values for the TimeseriesType const type.

type Transform

type Transform string

Transform - Describes what transforms are applied before matching

const (
	TransformLowercase   Transform = "Lowercase"
	TransformRemoveNulls Transform = "RemoveNulls"
	TransformTrim        Transform = "Trim"
	TransformURLDecode   Transform = "UrlDecode"
	TransformURLEncode   Transform = "UrlEncode"
	TransformUppercase   Transform = "Uppercase"
)

func PossibleTransformValues

func PossibleTransformValues() []Transform

PossibleTransformValues returns the possible values for the Transform const type.

type TransformType

type TransformType string

TransformType - Describes what transforms applied before matching.

const (
	TransformTypeLowercase   TransformType = "Lowercase"
	TransformTypeRemoveNulls TransformType = "RemoveNulls"
	TransformTypeTrim        TransformType = "Trim"
	TransformTypeURLDecode   TransformType = "UrlDecode"
	TransformTypeURLEncode   TransformType = "UrlEncode"
	TransformTypeUppercase   TransformType = "Uppercase"
)

func PossibleTransformTypeValues

func PossibleTransformTypeValues() []TransformType

PossibleTransformTypeValues returns the possible values for the TransformType const type.

type UpdateParameters added in v0.2.0

type UpdateParameters struct {
	// Backend pools available to routing rules.
	BackendPools []*BackendPool

	// Settings for all backendPools
	BackendPoolsSettings *BackendPoolsSettings

	// Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'
	EnabledState *FrontDoorEnabledState

	// A friendly name for the frontDoor
	FriendlyName *string

	// Frontend endpoints available to routing rules.
	FrontendEndpoints []*FrontendEndpoint

	// Health probe settings associated with this Front Door instance.
	HealthProbeSettings []*HealthProbeSettingsModel

	// Load balancing settings associated with this Front Door instance.
	LoadBalancingSettings []*LoadBalancingSettingsModel

	// Routing rules associated with this Front Door.
	RoutingRules []*RoutingRule
}

UpdateParameters - The properties needed to update a Front Door

func (UpdateParameters) MarshalJSON added in v0.2.0

func (u UpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateParameters.

func (*UpdateParameters) UnmarshalJSON added in v1.1.0

func (u *UpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateParameters.

type ValidateCustomDomainInput

type ValidateCustomDomainInput struct {
	// REQUIRED; The host name of the custom domain. Must be a domain name.
	HostName *string
}

ValidateCustomDomainInput - Input of the custom domain to be validated for DNS mapping.

func (ValidateCustomDomainInput) MarshalJSON added in v1.1.0

func (v ValidateCustomDomainInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainInput.

func (*ValidateCustomDomainInput) UnmarshalJSON added in v1.1.0

func (v *ValidateCustomDomainInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainInput.

type ValidateCustomDomainOutput

type ValidateCustomDomainOutput struct {
	// READ-ONLY; Indicates whether the custom domain is valid or not.
	CustomDomainValidated *bool

	// READ-ONLY; Error message describing why the custom domain is not valid.
	Message *string

	// READ-ONLY; The reason why the custom domain is not valid.
	Reason *string
}

ValidateCustomDomainOutput - Output of custom domain validation.

func (ValidateCustomDomainOutput) MarshalJSON added in v1.1.0

func (v ValidateCustomDomainOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainOutput.

func (*ValidateCustomDomainOutput) UnmarshalJSON added in v1.1.0

func (v *ValidateCustomDomainOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainOutput.

type VariableName added in v1.4.0

type VariableName string

VariableName - Describes the supported variable for group by

const (
	VariableNameGeoLocation VariableName = "GeoLocation"
	VariableNameNone        VariableName = "None"
	VariableNameSocketAddr  VariableName = "SocketAddr"
)

func PossibleVariableNameValues added in v1.4.0

func PossibleVariableNameValues() []VariableName

PossibleVariableNameValues returns the possible values for the VariableName const type.

type WebApplicationFirewallPolicy

type WebApplicationFirewallPolicy struct {
	// Gets a unique read-only string that changes whenever the resource is updated.
	Etag *string

	// Resource location.
	Location *string

	// Properties of the web application firewall policy.
	Properties *WebApplicationFirewallPolicyProperties

	// The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified.
	SKU *SKU

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WebApplicationFirewallPolicy - Defines web application firewall policy.

func (WebApplicationFirewallPolicy) MarshalJSON

func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy.

func (*WebApplicationFirewallPolicy) UnmarshalJSON added in v1.1.0

func (w *WebApplicationFirewallPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicy.

type WebApplicationFirewallPolicyList

type WebApplicationFirewallPolicyList struct {
	// URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
	NextLink *string

	// READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
	Value []*WebApplicationFirewallPolicy
}

WebApplicationFirewallPolicyList - Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.

func (WebApplicationFirewallPolicyList) MarshalJSON

func (w WebApplicationFirewallPolicyList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyList.

func (*WebApplicationFirewallPolicyList) UnmarshalJSON added in v1.1.0

func (w *WebApplicationFirewallPolicyList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyList.

type WebApplicationFirewallPolicyProperties

type WebApplicationFirewallPolicyProperties struct {
	// Describes custom rules inside the policy.
	CustomRules *CustomRuleList

	// Describes managed rules inside the policy.
	ManagedRules *ManagedRuleSetList

	// Describes settings for the policy.
	PolicySettings *PolicySettings

	// READ-ONLY; Describes Frontend Endpoints associated with this Web Application Firewall policy.
	FrontendEndpointLinks []*FrontendEndpointLink

	// READ-ONLY; Provisioning state of the policy.
	ProvisioningState *string

	// READ-ONLY; Resource status of the policy.
	ResourceState *PolicyResourceState

	// READ-ONLY; Describes Routing Rules associated with this Web Application Firewall policy.
	RoutingRuleLinks []*RoutingRuleLink

	// READ-ONLY; Describes Security Policy associated with this Web Application Firewall policy.
	SecurityPolicyLinks []*SecurityPolicyLink
}

WebApplicationFirewallPolicyProperties - Defines web application firewall policy properties.

func (WebApplicationFirewallPolicyProperties) MarshalJSON

func (w WebApplicationFirewallPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyProperties.

func (*WebApplicationFirewallPolicyProperties) UnmarshalJSON added in v1.1.0

func (w *WebApplicationFirewallPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyProperties.

type WebApplicationFirewallScrubbingRules added in v1.4.0

type WebApplicationFirewallScrubbingRules struct {
	// REQUIRED; The variable to be scrubbed from the logs.
	MatchVariable *ScrubbingRuleEntryMatchVariable

	// REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this
	// rule applies to.
	SelectorMatchOperator *ScrubbingRuleEntryMatchOperator

	// When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to.
	Selector *string

	// Defines the state of a log scrubbing rule. Default value is enabled.
	State *ScrubbingRuleEntryState
}

WebApplicationFirewallScrubbingRules - Defines the contents of the log scrubbing rules.

func (WebApplicationFirewallScrubbingRules) MarshalJSON added in v1.4.0

func (w WebApplicationFirewallScrubbingRules) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallScrubbingRules.

func (*WebApplicationFirewallScrubbingRules) UnmarshalJSON added in v1.4.0

func (w *WebApplicationFirewallScrubbingRules) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallScrubbingRules.

type WebApplicationFirewallScrubbingState added in v1.4.0

type WebApplicationFirewallScrubbingState string

WebApplicationFirewallScrubbingState - State of the log scrubbing config. Default value is Enabled.

const (
	WebApplicationFirewallScrubbingStateDisabled WebApplicationFirewallScrubbingState = "Disabled"
	WebApplicationFirewallScrubbingStateEnabled  WebApplicationFirewallScrubbingState = "Enabled"
)

func PossibleWebApplicationFirewallScrubbingStateValues added in v1.4.0

func PossibleWebApplicationFirewallScrubbingStateValues() []WebApplicationFirewallScrubbingState

PossibleWebApplicationFirewallScrubbingStateValues returns the possible values for the WebApplicationFirewallScrubbingState const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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