Documentation ¶
Index ¶
- type ActionType
- type AggregationInterval
- type Availability
- type AzureAsyncOperationResult
- type Backend
- type BackendEnabledState
- type BackendPool
- type BackendPoolListResult
- type BackendPoolProperties
- type BackendPoolUpdateParameters
- type BackendPoolsSettings
- type CacheConfiguration
- type CertificateSourceParameters
- type CheckNameAvailabilityInput
- type CheckNameAvailabilityOutput
- type ClientFactory
- func (c *ClientFactory) NewEndpointsClient() *EndpointsClient
- func (c *ClientFactory) NewExperimentsClient() *ExperimentsClient
- func (c *ClientFactory) NewFrontDoorsClient() *FrontDoorsClient
- func (c *ClientFactory) NewFrontendEndpointsClient() *FrontendEndpointsClient
- func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient
- func (c *ClientFactory) NewNameAvailabilityClient() *NameAvailabilityClient
- func (c *ClientFactory) NewNameAvailabilityWithSubscriptionClient() *NameAvailabilityWithSubscriptionClient
- func (c *ClientFactory) NewNetworkExperimentProfilesClient() *NetworkExperimentProfilesClient
- func (c *ClientFactory) NewPoliciesClient() *PoliciesClient
- func (c *ClientFactory) NewPreconfiguredEndpointsClient() *PreconfiguredEndpointsClient
- func (c *ClientFactory) NewReportsClient() *ReportsClient
- func (c *ClientFactory) NewRulesEnginesClient() *RulesEnginesClient
- type CustomHTTPSConfiguration
- type CustomHTTPSProvisioningState
- type CustomHTTPSProvisioningSubstate
- type CustomRule
- type CustomRuleEnabledState
- type CustomRuleList
- type DefaultErrorResponse
- type DefaultErrorResponseError
- type DynamicCompressionEnabled
- type Endpoint
- type EndpointType
- type EndpointsClient
- type EndpointsClientBeginPurgeContentOptions
- type EndpointsClientPurgeContentResponse
- type EnforceCertificateNameCheckEnabledState
- type Error
- type ErrorDetails
- type ErrorResponse
- type Experiment
- type ExperimentList
- type ExperimentProperties
- type ExperimentUpdateModel
- type ExperimentUpdateProperties
- type ExperimentsClient
- func (client *ExperimentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, profileName string, ...) (*runtime.Poller[ExperimentsClientCreateOrUpdateResponse], error)
- func (client *ExperimentsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, ...) (*runtime.Poller[ExperimentsClientDeleteResponse], error)
- func (client *ExperimentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, ...) (*runtime.Poller[ExperimentsClientUpdateResponse], error)
- func (client *ExperimentsClient) Get(ctx context.Context, resourceGroupName string, profileName string, ...) (ExperimentsClientGetResponse, error)
- func (client *ExperimentsClient) NewListByProfilePager(resourceGroupName string, profileName string, ...) *runtime.Pager[ExperimentsClientListByProfileResponse]
- type ExperimentsClientBeginCreateOrUpdateOptions
- type ExperimentsClientBeginDeleteOptions
- type ExperimentsClientBeginUpdateOptions
- type ExperimentsClientCreateOrUpdateResponse
- type ExperimentsClientDeleteResponse
- type ExperimentsClientGetOptions
- type ExperimentsClientGetResponse
- type ExperimentsClientListByProfileOptions
- type ExperimentsClientListByProfileResponse
- type ExperimentsClientUpdateResponse
- type ForwardingConfiguration
- type FrontDoor
- type FrontDoorCertificateSource
- type FrontDoorCertificateType
- type FrontDoorEnabledState
- type FrontDoorForwardingProtocol
- type FrontDoorHealthProbeMethod
- type FrontDoorProtocol
- type FrontDoorQuery
- type FrontDoorRedirectProtocol
- type FrontDoorRedirectType
- type FrontDoorResourceState
- type FrontDoorTLSProtocolType
- type FrontDoorsClient
- func (client *FrontDoorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (*runtime.Poller[FrontDoorsClientCreateOrUpdateResponse], error)
- func (client *FrontDoorsClient) BeginDelete(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (*runtime.Poller[FrontDoorsClientDeleteResponse], error)
- func (client *FrontDoorsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (FrontDoorsClientGetResponse, error)
- func (client *FrontDoorsClient) NewListByResourceGroupPager(resourceGroupName string, options *FrontDoorsClientListByResourceGroupOptions) *runtime.Pager[FrontDoorsClientListByResourceGroupResponse]
- func (client *FrontDoorsClient) NewListPager(options *FrontDoorsClientListOptions) *runtime.Pager[FrontDoorsClientListResponse]
- func (client *FrontDoorsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (FrontDoorsClientValidateCustomDomainResponse, error)
- type FrontDoorsClientBeginCreateOrUpdateOptions
- type FrontDoorsClientBeginDeleteOptions
- type FrontDoorsClientCreateOrUpdateResponse
- type FrontDoorsClientDeleteResponse
- type FrontDoorsClientGetOptions
- type FrontDoorsClientGetResponse
- type FrontDoorsClientListByResourceGroupOptions
- type FrontDoorsClientListByResourceGroupResponse
- type FrontDoorsClientListOptions
- type FrontDoorsClientListResponse
- type FrontDoorsClientValidateCustomDomainOptions
- type FrontDoorsClientValidateCustomDomainResponse
- type FrontendEndpoint
- type FrontendEndpointLink
- type FrontendEndpointProperties
- type FrontendEndpointUpdateParameters
- type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink
- type FrontendEndpointsClient
- func (client *FrontendEndpointsClient) BeginDisableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (*runtime.Poller[FrontendEndpointsClientDisableHTTPSResponse], error)
- func (client *FrontendEndpointsClient) BeginEnableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (*runtime.Poller[FrontendEndpointsClientEnableHTTPSResponse], error)
- func (client *FrontendEndpointsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (FrontendEndpointsClientGetResponse, error)
- func (client *FrontendEndpointsClient) NewListByFrontDoorPager(resourceGroupName string, frontDoorName string, ...) *runtime.Pager[FrontendEndpointsClientListByFrontDoorResponse]
- type FrontendEndpointsClientBeginDisableHTTPSOptions
- type FrontendEndpointsClientBeginEnableHTTPSOptions
- type FrontendEndpointsClientDisableHTTPSResponse
- type FrontendEndpointsClientEnableHTTPSResponse
- type FrontendEndpointsClientGetOptions
- type FrontendEndpointsClientGetResponse
- type FrontendEndpointsClientListByFrontDoorOptions
- type FrontendEndpointsClientListByFrontDoorResponse
- type FrontendEndpointsListResult
- type GroupByVariable
- type HeaderAction
- type HeaderActionType
- type HealthProbeEnabled
- type HealthProbeSettingsListResult
- type HealthProbeSettingsModel
- type HealthProbeSettingsProperties
- type HealthProbeSettingsUpdateParameters
- type KeyVaultCertificateSourceParameters
- type KeyVaultCertificateSourceParametersVault
- type LatencyMetric
- type LatencyScorecard
- type LatencyScorecardAggregationInterval
- type LatencyScorecardProperties
- type ListResult
- type LoadBalancingSettingsListResult
- type LoadBalancingSettingsModel
- type LoadBalancingSettingsProperties
- type LoadBalancingSettingsUpdateParameters
- type ManagedRuleDefinition
- type ManagedRuleEnabledState
- type ManagedRuleExclusion
- type ManagedRuleExclusionMatchVariable
- type ManagedRuleExclusionSelectorMatchOperator
- type ManagedRuleGroupDefinition
- type ManagedRuleGroupOverride
- type ManagedRuleOverride
- type ManagedRuleSet
- type ManagedRuleSetActionType
- type ManagedRuleSetDefinition
- type ManagedRuleSetDefinitionList
- type ManagedRuleSetDefinitionProperties
- type ManagedRuleSetList
- type ManagedRuleSetsClient
- type ManagedRuleSetsClientListOptions
- type ManagedRuleSetsClientListResponse
- type MatchCondition
- type MatchProcessingBehavior
- type MatchVariable
- type MinimumTLSVersion
- type NameAvailabilityClient
- type NameAvailabilityClientCheckOptions
- type NameAvailabilityClientCheckResponse
- type NameAvailabilityWithSubscriptionClient
- type NameAvailabilityWithSubscriptionClientCheckOptions
- type NameAvailabilityWithSubscriptionClientCheckResponse
- type NetworkExperimentProfilesClient
- func (client *NetworkExperimentProfilesClient) BeginCreateOrUpdate(ctx context.Context, profileName string, resourceGroupName string, ...) (*runtime.Poller[NetworkExperimentProfilesClientCreateOrUpdateResponse], error)
- func (client *NetworkExperimentProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, ...) (*runtime.Poller[NetworkExperimentProfilesClientDeleteResponse], error)
- func (client *NetworkExperimentProfilesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, ...) (*runtime.Poller[NetworkExperimentProfilesClientUpdateResponse], error)
- func (client *NetworkExperimentProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string, ...) (NetworkExperimentProfilesClientGetResponse, error)
- func (client *NetworkExperimentProfilesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[NetworkExperimentProfilesClientListByResourceGroupResponse]
- func (client *NetworkExperimentProfilesClient) NewListPager(options *NetworkExperimentProfilesClientListOptions) *runtime.Pager[NetworkExperimentProfilesClientListResponse]
- type NetworkExperimentProfilesClientBeginCreateOrUpdateOptions
- type NetworkExperimentProfilesClientBeginDeleteOptions
- type NetworkExperimentProfilesClientBeginUpdateOptions
- type NetworkExperimentProfilesClientCreateOrUpdateResponse
- type NetworkExperimentProfilesClientDeleteResponse
- type NetworkExperimentProfilesClientGetOptions
- type NetworkExperimentProfilesClientGetResponse
- type NetworkExperimentProfilesClientListByResourceGroupOptions
- type NetworkExperimentProfilesClientListByResourceGroupResponse
- type NetworkExperimentProfilesClientListOptions
- type NetworkExperimentProfilesClientListResponse
- type NetworkExperimentProfilesClientUpdateResponse
- type NetworkExperimentResourceState
- type NetworkOperationStatus
- type Operator
- type PoliciesClient
- func (client *PoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, ...) (*runtime.Poller[PoliciesClientCreateOrUpdateResponse], error)
- func (client *PoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, policyName string, ...) (*runtime.Poller[PoliciesClientDeleteResponse], error)
- func (client *PoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, policyName string, ...) (*runtime.Poller[PoliciesClientUpdateResponse], error)
- func (client *PoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string, ...) (PoliciesClientGetResponse, error)
- func (client *PoliciesClient) NewListBySubscriptionPager(options *PoliciesClientListBySubscriptionOptions) *runtime.Pager[PoliciesClientListBySubscriptionResponse]
- func (client *PoliciesClient) NewListPager(resourceGroupName string, options *PoliciesClientListOptions) *runtime.Pager[PoliciesClientListResponse]
- type PoliciesClientBeginCreateOrUpdateOptions
- type PoliciesClientBeginDeleteOptions
- type PoliciesClientBeginUpdateOptions
- type PoliciesClientCreateOrUpdateResponse
- type PoliciesClientDeleteResponse
- type PoliciesClientGetOptions
- type PoliciesClientGetResponse
- type PoliciesClientListBySubscriptionOptions
- type PoliciesClientListBySubscriptionResponse
- type PoliciesClientListOptions
- type PoliciesClientListResponse
- type PoliciesClientUpdateResponse
- type PolicyEnabledState
- type PolicyMode
- type PolicyRequestBodyCheck
- type PolicyResourceState
- type PolicySettings
- type PolicySettingsLogScrubbing
- type PreconfiguredEndpoint
- type PreconfiguredEndpointList
- type PreconfiguredEndpointProperties
- type PreconfiguredEndpointsClient
- type PreconfiguredEndpointsClientListOptions
- type PreconfiguredEndpointsClientListResponse
- type PrivateEndpointStatus
- type Profile
- type ProfileList
- type ProfileProperties
- type ProfileUpdateModel
- type ProfileUpdateProperties
- type Properties
- type PurgeParameters
- type RedirectConfiguration
- type ReportsClient
- func (client *ReportsClient) GetLatencyScorecards(ctx context.Context, resourceGroupName string, profileName string, ...) (ReportsClientGetLatencyScorecardsResponse, error)
- func (client *ReportsClient) GetTimeseries(ctx context.Context, resourceGroupName string, profileName string, ...) (ReportsClientGetTimeseriesResponse, error)
- type ReportsClientGetLatencyScorecardsOptions
- type ReportsClientGetLatencyScorecardsResponse
- type ReportsClientGetTimeseriesOptions
- type ReportsClientGetTimeseriesResponse
- type Resource
- type ResourceType
- type RouteConfiguration
- type RouteConfigurationClassification
- type RoutingRule
- type RoutingRuleEnabledState
- type RoutingRuleLink
- type RoutingRuleListResult
- type RoutingRuleProperties
- type RoutingRuleUpdateParameters
- type RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink
- type RuleType
- type RulesEngine
- type RulesEngineAction
- type RulesEngineListResult
- type RulesEngineMatchCondition
- type RulesEngineMatchVariable
- type RulesEngineOperator
- type RulesEngineProperties
- type RulesEngineRule
- type RulesEngineUpdateParameters
- type RulesEnginesClient
- func (client *RulesEnginesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (*runtime.Poller[RulesEnginesClientCreateOrUpdateResponse], error)
- func (client *RulesEnginesClient) BeginDelete(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (*runtime.Poller[RulesEnginesClientDeleteResponse], error)
- func (client *RulesEnginesClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, ...) (RulesEnginesClientGetResponse, error)
- func (client *RulesEnginesClient) NewListByFrontDoorPager(resourceGroupName string, frontDoorName string, ...) *runtime.Pager[RulesEnginesClientListByFrontDoorResponse]
- type RulesEnginesClientBeginCreateOrUpdateOptions
- type RulesEnginesClientBeginDeleteOptions
- type RulesEnginesClientCreateOrUpdateResponse
- type RulesEnginesClientDeleteResponse
- type RulesEnginesClientGetOptions
- type RulesEnginesClientGetResponse
- type RulesEnginesClientListByFrontDoorOptions
- type RulesEnginesClientListByFrontDoorResponse
- type SKU
- type SKUName
- type ScrubbingRuleEntryMatchOperator
- type ScrubbingRuleEntryMatchVariable
- type ScrubbingRuleEntryState
- type SecurityPolicyLink
- type SessionAffinityEnabledState
- type State
- type SubResource
- type TagsObject
- type Timeseries
- type TimeseriesAggregationInterval
- type TimeseriesDataPoint
- type TimeseriesProperties
- type TimeseriesType
- type Transform
- type TransformType
- type UpdateParameters
- type ValidateCustomDomainInput
- type ValidateCustomDomainOutput
- type VariableName
- type WebApplicationFirewallPolicy
- type WebApplicationFirewallPolicyList
- type WebApplicationFirewallPolicyProperties
- type WebApplicationFirewallScrubbingRules
- type WebApplicationFirewallScrubbingState
Examples ¶
- EndpointsClient.BeginPurgeContent
- ExperimentsClient.BeginCreateOrUpdate
- ExperimentsClient.BeginDelete
- ExperimentsClient.BeginUpdate
- ExperimentsClient.Get
- ExperimentsClient.NewListByProfilePager
- FrontDoorsClient.BeginCreateOrUpdate
- FrontDoorsClient.BeginDelete
- FrontDoorsClient.Get
- FrontDoorsClient.NewListByResourceGroupPager
- FrontDoorsClient.NewListPager
- FrontDoorsClient.ValidateCustomDomain
- FrontendEndpointsClient.BeginDisableHTTPS
- FrontendEndpointsClient.BeginEnableHTTPS
- FrontendEndpointsClient.Get
- FrontendEndpointsClient.NewListByFrontDoorPager
- ManagedRuleSetsClient.NewListPager
- NameAvailabilityClient.Check
- NameAvailabilityWithSubscriptionClient.Check
- NetworkExperimentProfilesClient.BeginCreateOrUpdate
- NetworkExperimentProfilesClient.BeginDelete
- NetworkExperimentProfilesClient.BeginUpdate
- NetworkExperimentProfilesClient.Get
- NetworkExperimentProfilesClient.NewListPager
- PoliciesClient.BeginCreateOrUpdate
- PoliciesClient.BeginDelete
- PoliciesClient.BeginUpdate
- PoliciesClient.Get
- PoliciesClient.NewListBySubscriptionPager
- PoliciesClient.NewListPager
- PreconfiguredEndpointsClient.NewListPager
- ReportsClient.GetLatencyScorecards
- ReportsClient.GetTimeseries
- RulesEnginesClient.BeginCreateOrUpdate
- RulesEnginesClient.BeginDelete
- RulesEnginesClient.Get
- RulesEnginesClient.NewListByFrontDoorPager
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" )
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 ¶
func (a AzureAsyncOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureAsyncOperationResult.
func (*AzureAsyncOperationResult) UnmarshalJSON ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type Backend.
func (*Backend) UnmarshalJSON ¶
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 ¶
func (b BackendPool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackendPool.
func (*BackendPool) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (b BackendPoolsSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackendPoolsSettings.
func (*BackendPoolsSettings) UnmarshalJSON ¶
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 ¶
func (c CacheConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheConfiguration.
func (*CacheConfiguration) UnmarshalJSON ¶
func (c *CacheConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheConfiguration.
type CertificateSourceParameters ¶
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 ¶
func (c CertificateSourceParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateSourceParameters.
func (*CertificateSourceParameters) UnmarshalJSON ¶
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 ¶
func (c CheckNameAvailabilityInput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityInput.
func (*CheckNameAvailabilityInput) UnmarshalJSON ¶
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 ¶
func (c CheckNameAvailabilityOutput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityOutput.
func (*CheckNameAvailabilityOutput) UnmarshalJSON ¶
func (c *CheckNameAvailabilityOutput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityOutput.
type ClientFactory ¶
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 ¶
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 ¶
func (c *ClientFactory) NewEndpointsClient() *EndpointsClient
NewEndpointsClient creates a new instance of EndpointsClient.
func (*ClientFactory) NewExperimentsClient ¶
func (c *ClientFactory) NewExperimentsClient() *ExperimentsClient
NewExperimentsClient creates a new instance of ExperimentsClient.
func (*ClientFactory) NewFrontDoorsClient ¶
func (c *ClientFactory) NewFrontDoorsClient() *FrontDoorsClient
NewFrontDoorsClient creates a new instance of FrontDoorsClient.
func (*ClientFactory) NewFrontendEndpointsClient ¶
func (c *ClientFactory) NewFrontendEndpointsClient() *FrontendEndpointsClient
NewFrontendEndpointsClient creates a new instance of FrontendEndpointsClient.
func (*ClientFactory) NewManagedRuleSetsClient ¶
func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient
NewManagedRuleSetsClient creates a new instance of ManagedRuleSetsClient.
func (*ClientFactory) NewNameAvailabilityClient ¶
func (c *ClientFactory) NewNameAvailabilityClient() *NameAvailabilityClient
NewNameAvailabilityClient creates a new instance of NameAvailabilityClient.
func (*ClientFactory) NewNameAvailabilityWithSubscriptionClient ¶
func (c *ClientFactory) NewNameAvailabilityWithSubscriptionClient() *NameAvailabilityWithSubscriptionClient
NewNameAvailabilityWithSubscriptionClient creates a new instance of NameAvailabilityWithSubscriptionClient.
func (*ClientFactory) NewNetworkExperimentProfilesClient ¶
func (c *ClientFactory) NewNetworkExperimentProfilesClient() *NetworkExperimentProfilesClient
NewNetworkExperimentProfilesClient creates a new instance of NetworkExperimentProfilesClient.
func (*ClientFactory) NewPoliciesClient ¶
func (c *ClientFactory) NewPoliciesClient() *PoliciesClient
NewPoliciesClient creates a new instance of PoliciesClient.
func (*ClientFactory) NewPreconfiguredEndpointsClient ¶
func (c *ClientFactory) NewPreconfiguredEndpointsClient() *PreconfiguredEndpointsClient
NewPreconfiguredEndpointsClient creates a new instance of PreconfiguredEndpointsClient.
func (*ClientFactory) NewReportsClient ¶
func (c *ClientFactory) NewReportsClient() *ReportsClient
NewReportsClient creates a new instance of ReportsClient.
func (*ClientFactory) NewRulesEnginesClient ¶
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 ¶
func (c CustomHTTPSConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomHTTPSConfiguration.
func (*CustomHTTPSConfiguration) UnmarshalJSON ¶
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 ¶
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 ¶
func (c *CustomRuleList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomRuleList.
type DefaultErrorResponse ¶
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 ¶
func (d DefaultErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponse.
func (*DefaultErrorResponse) UnmarshalJSON ¶
func (d *DefaultErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse.
type DefaultErrorResponseError ¶
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 ¶
func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseError.
func (*DefaultErrorResponseError) UnmarshalJSON ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type Endpoint.
func (*Endpoint) UnmarshalJSON ¶
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 ¶
type EndpointsClientBeginPurgeContentOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent method.
type EndpointsClientPurgeContentResponse ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type Error.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Error.
type ErrorDetails ¶
func (ErrorDetails) MarshalJSON ¶
func (e ErrorDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetails.
func (*ErrorDetails) UnmarshalJSON ¶
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 ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (e ExperimentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentProperties.
func (*ExperimentProperties) UnmarshalJSON ¶
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 ¶
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 ¶
func (e ExperimentUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExperimentUpdateProperties.
func (*ExperimentUpdateProperties) UnmarshalJSON ¶
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 ¶
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 ¶
type ExperimentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExperimentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExperimentsClient.BeginCreateOrUpdate method.
type ExperimentsClientBeginDeleteOptions ¶
type ExperimentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExperimentsClientBeginDeleteOptions contains the optional parameters for the ExperimentsClient.BeginDelete method.
type ExperimentsClientBeginUpdateOptions ¶
type ExperimentsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExperimentsClientBeginUpdateOptions contains the optional parameters for the ExperimentsClient.BeginUpdate method.
type ExperimentsClientCreateOrUpdateResponse ¶
type ExperimentsClientCreateOrUpdateResponse struct { // Defines the properties of an Experiment Experiment }
ExperimentsClientCreateOrUpdateResponse contains the response from method ExperimentsClient.BeginCreateOrUpdate.
type ExperimentsClientDeleteResponse ¶
type ExperimentsClientDeleteResponse struct { }
ExperimentsClientDeleteResponse contains the response from method ExperimentsClient.BeginDelete.
type ExperimentsClientGetOptions ¶
type ExperimentsClientGetOptions struct { }
ExperimentsClientGetOptions contains the optional parameters for the ExperimentsClient.Get method.
type ExperimentsClientGetResponse ¶
type ExperimentsClientGetResponse struct { // Defines the properties of an Experiment Experiment }
ExperimentsClientGetResponse contains the response from method ExperimentsClient.Get.
type ExperimentsClientListByProfileOptions ¶
type ExperimentsClientListByProfileOptions struct { }
ExperimentsClientListByProfileOptions contains the optional parameters for the ExperimentsClient.NewListByProfilePager method.
type ExperimentsClientListByProfileResponse ¶
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 ¶
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 ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type FrontDoor.
func (*FrontDoor) UnmarshalJSON ¶
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 ¶
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 ¶
func (client *FrontDoorsClient) NewListPager(options *FrontDoorsClientListOptions) *runtime.Pager[FrontDoorsClientListResponse]
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 ¶
type FrontDoorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FrontDoorsClientBeginCreateOrUpdateOptions contains the optional parameters for the FrontDoorsClient.BeginCreateOrUpdate method.
type FrontDoorsClientBeginDeleteOptions ¶
type FrontDoorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FrontDoorsClientBeginDeleteOptions contains the optional parameters for the FrontDoorsClient.BeginDelete method.
type FrontDoorsClientCreateOrUpdateResponse ¶
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 ¶
type FrontDoorsClientDeleteResponse struct { }
FrontDoorsClientDeleteResponse contains the response from method FrontDoorsClient.BeginDelete.
type FrontDoorsClientGetOptions ¶
type FrontDoorsClientGetOptions struct { }
FrontDoorsClientGetOptions contains the optional parameters for the FrontDoorsClient.Get method.
type FrontDoorsClientGetResponse ¶
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 ¶
type FrontDoorsClientListByResourceGroupOptions struct { }
FrontDoorsClientListByResourceGroupOptions contains the optional parameters for the FrontDoorsClient.NewListByResourceGroupPager method.
type FrontDoorsClientListByResourceGroupResponse ¶
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 ¶
type FrontDoorsClientListOptions struct { }
FrontDoorsClientListOptions contains the optional parameters for the FrontDoorsClient.NewListPager method.
type FrontDoorsClientListResponse ¶
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 ¶
type FrontDoorsClientValidateCustomDomainOptions struct { }
FrontDoorsClientValidateCustomDomainOptions contains the optional parameters for the FrontDoorsClient.ValidateCustomDomain method.
type FrontDoorsClientValidateCustomDomainResponse ¶
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 ¶
func (f FrontendEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FrontendEndpoint.
func (*FrontendEndpoint) UnmarshalJSON ¶
func (f *FrontendEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpoint.
type FrontendEndpointLink ¶
type FrontendEndpointLink struct { // Resource ID. ID *string }
FrontendEndpointLink - Defines the Resource ID for a Frontend Endpoint.
func (FrontendEndpointLink) MarshalJSON ¶
func (f FrontendEndpointLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FrontendEndpointLink.
func (*FrontendEndpointLink) UnmarshalJSON ¶
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 ¶
func (f FrontendEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FrontendEndpointProperties.
func (*FrontendEndpointProperties) UnmarshalJSON ¶
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 ¶
func (f FrontendEndpointUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FrontendEndpointUpdateParameters.
func (*FrontendEndpointUpdateParameters) UnmarshalJSON ¶
func (f *FrontendEndpointUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpointUpdateParameters.
type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink ¶
type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink struct { // Resource ID. ID *string }
FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for each host (if applicable)
func (FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON ¶
func (f FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink.
func (*FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON ¶
func (f *FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON(data []byte) error
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 ¶
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 ¶
type FrontendEndpointsClientBeginDisableHTTPSOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FrontendEndpointsClientBeginDisableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginDisableHTTPS method.
type FrontendEndpointsClientBeginEnableHTTPSOptions ¶
type FrontendEndpointsClientBeginEnableHTTPSOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FrontendEndpointsClientBeginEnableHTTPSOptions contains the optional parameters for the FrontendEndpointsClient.BeginEnableHTTPS method.
type FrontendEndpointsClientDisableHTTPSResponse ¶
type FrontendEndpointsClientDisableHTTPSResponse struct { }
FrontendEndpointsClientDisableHTTPSResponse contains the response from method FrontendEndpointsClient.BeginDisableHTTPS.
type FrontendEndpointsClientEnableHTTPSResponse ¶
type FrontendEndpointsClientEnableHTTPSResponse struct { }
FrontendEndpointsClientEnableHTTPSResponse contains the response from method FrontendEndpointsClient.BeginEnableHTTPS.
type FrontendEndpointsClientGetOptions ¶
type FrontendEndpointsClientGetOptions struct { }
FrontendEndpointsClientGetOptions contains the optional parameters for the FrontendEndpointsClient.Get method.
type FrontendEndpointsClientGetResponse ¶
type FrontendEndpointsClientGetResponse struct { // A frontend endpoint used for routing. FrontendEndpoint }
FrontendEndpointsClientGetResponse contains the response from method FrontendEndpointsClient.Get.
type FrontendEndpointsClientListByFrontDoorOptions ¶
type FrontendEndpointsClientListByFrontDoorOptions struct { }
FrontendEndpointsClientListByFrontDoorOptions contains the optional parameters for the FrontendEndpointsClient.NewListByFrontDoorPager method.
type FrontendEndpointsClientListByFrontDoorResponse ¶
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 ¶
func (f *FrontendEndpointsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FrontendEndpointsListResult.
type GroupByVariable ¶
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 ¶
func (g GroupByVariable) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GroupByVariable.
func (*GroupByVariable) UnmarshalJSON ¶
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 ¶
func (h HeaderAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HeaderAction.
func (*HeaderAction) UnmarshalJSON ¶
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 ¶
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 ¶
func (h HealthProbeSettingsModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HealthProbeSettingsModel.
func (*HealthProbeSettingsModel) UnmarshalJSON ¶
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 ¶
func (h HealthProbeSettingsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HealthProbeSettingsProperties.
func (*HealthProbeSettingsProperties) UnmarshalJSON ¶
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 ¶
func (h HealthProbeSettingsUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HealthProbeSettingsUpdateParameters.
func (*HealthProbeSettingsUpdateParameters) UnmarshalJSON ¶
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 ¶
func (k KeyVaultCertificateSourceParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateSourceParameters.
func (*KeyVaultCertificateSourceParameters) UnmarshalJSON ¶
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 ¶
func (k KeyVaultCertificateSourceParametersVault) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateSourceParametersVault.
func (*KeyVaultCertificateSourceParametersVault) UnmarshalJSON ¶
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 ¶
func (l LatencyMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LatencyMetric.
func (*LatencyMetric) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (l ListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListResult.
func (*ListResult) UnmarshalJSON ¶
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 ¶
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 ¶
func (l LoadBalancingSettingsModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsModel.
func (*LoadBalancingSettingsModel) UnmarshalJSON ¶
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 ¶
func (l LoadBalancingSettingsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsProperties.
func (*LoadBalancingSettingsProperties) UnmarshalJSON ¶
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 ¶
func (l LoadBalancingSettingsUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsUpdateParameters.
func (*LoadBalancingSettingsUpdateParameters) UnmarshalJSON ¶
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 ¶
func (m ManagedRuleDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedRuleDefinition.
func (*ManagedRuleDefinition) UnmarshalJSON ¶
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 ¶
func (m ManagedRuleExclusion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedRuleExclusion.
func (*ManagedRuleExclusion) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (client *ManagedRuleSetsClient) NewListPager(options *ManagedRuleSetsClientListOptions) *runtime.Pager[ManagedRuleSetsClientListResponse]
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 ¶
type ManagedRuleSetsClientListOptions struct { }
ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager method.
type ManagedRuleSetsClientListResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (client *NameAvailabilityClient) Check(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput, options *NameAvailabilityClientCheckOptions) (NameAvailabilityClientCheckResponse, error)
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 ¶
type NameAvailabilityClientCheckOptions struct { }
NameAvailabilityClientCheckOptions contains the optional parameters for the NameAvailabilityClient.Check method.
type NameAvailabilityClientCheckResponse ¶
type NameAvailabilityClientCheckResponse struct { // Output of check name availability API. CheckNameAvailabilityOutput }
NameAvailabilityClientCheckResponse contains the response from method NameAvailabilityClient.Check.
type NameAvailabilityWithSubscriptionClient ¶
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 ¶
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 ¶
func (client *NameAvailabilityWithSubscriptionClient) Check(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput, options *NameAvailabilityWithSubscriptionClientCheckOptions) (NameAvailabilityWithSubscriptionClientCheckResponse, error)
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 ¶
type NameAvailabilityWithSubscriptionClientCheckOptions struct { }
NameAvailabilityWithSubscriptionClientCheckOptions contains the optional parameters for the NameAvailabilityWithSubscriptionClient.Check method.
type NameAvailabilityWithSubscriptionClientCheckResponse ¶
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 ¶
func (client *NetworkExperimentProfilesClient) BeginCreateOrUpdate(ctx context.Context, profileName string, resourceGroupName string, parameters Profile, options *NetworkExperimentProfilesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NetworkExperimentProfilesClientCreateOrUpdateResponse], error)
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 ¶
func (client *NetworkExperimentProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, options *NetworkExperimentProfilesClientBeginDeleteOptions) (*runtime.Poller[NetworkExperimentProfilesClientDeleteResponse], error)
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 ¶
func (client *NetworkExperimentProfilesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, parameters ProfileUpdateModel, options *NetworkExperimentProfilesClientBeginUpdateOptions) (*runtime.Poller[NetworkExperimentProfilesClientUpdateResponse], error)
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 ¶
func (client *NetworkExperimentProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *NetworkExperimentProfilesClientGetOptions) (NetworkExperimentProfilesClientGetResponse, error)
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 ¶
func (client *NetworkExperimentProfilesClient) NewListByResourceGroupPager(resourceGroupName string, options *NetworkExperimentProfilesClientListByResourceGroupOptions) *runtime.Pager[NetworkExperimentProfilesClientListByResourceGroupResponse]
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 ¶
func (client *NetworkExperimentProfilesClient) NewListPager(options *NetworkExperimentProfilesClientListOptions) *runtime.Pager[NetworkExperimentProfilesClientListResponse]
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 ¶
type NetworkExperimentProfilesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NetworkExperimentProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginCreateOrUpdate method.
type NetworkExperimentProfilesClientBeginDeleteOptions ¶
type NetworkExperimentProfilesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NetworkExperimentProfilesClientBeginDeleteOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginDelete method.
type NetworkExperimentProfilesClientBeginUpdateOptions ¶
type NetworkExperimentProfilesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NetworkExperimentProfilesClientBeginUpdateOptions contains the optional parameters for the NetworkExperimentProfilesClient.BeginUpdate method.
type NetworkExperimentProfilesClientCreateOrUpdateResponse ¶
type NetworkExperimentProfilesClientCreateOrUpdateResponse struct { // Defines an Network Experiment Profile and lists of Experiments Profile }
NetworkExperimentProfilesClientCreateOrUpdateResponse contains the response from method NetworkExperimentProfilesClient.BeginCreateOrUpdate.
type NetworkExperimentProfilesClientDeleteResponse ¶
type NetworkExperimentProfilesClientDeleteResponse struct { }
NetworkExperimentProfilesClientDeleteResponse contains the response from method NetworkExperimentProfilesClient.BeginDelete.
type NetworkExperimentProfilesClientGetOptions ¶
type NetworkExperimentProfilesClientGetOptions struct { }
NetworkExperimentProfilesClientGetOptions contains the optional parameters for the NetworkExperimentProfilesClient.Get method.
type NetworkExperimentProfilesClientGetResponse ¶
type NetworkExperimentProfilesClientGetResponse struct { // Defines an Network Experiment Profile and lists of Experiments Profile }
NetworkExperimentProfilesClientGetResponse contains the response from method NetworkExperimentProfilesClient.Get.
type NetworkExperimentProfilesClientListByResourceGroupOptions ¶
type NetworkExperimentProfilesClientListByResourceGroupOptions struct { }
NetworkExperimentProfilesClientListByResourceGroupOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListByResourceGroupPager method.
type NetworkExperimentProfilesClientListByResourceGroupResponse ¶
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 ¶
type NetworkExperimentProfilesClientListOptions struct { }
NetworkExperimentProfilesClientListOptions contains the optional parameters for the NetworkExperimentProfilesClient.NewListPager method.
type NetworkExperimentProfilesClientListResponse ¶
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 ¶
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 ¶
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 ¶
func (client *PoliciesClient) NewListBySubscriptionPager(options *PoliciesClientListBySubscriptionOptions) *runtime.Pager[PoliciesClientListBySubscriptionResponse]
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 ¶
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 ¶
type PoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method.
type PoliciesClientBeginDeleteOptions ¶
type PoliciesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method.
type PoliciesClientBeginUpdateOptions ¶
type PoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method.
type PoliciesClientCreateOrUpdateResponse ¶
type PoliciesClientCreateOrUpdateResponse struct { // Defines web application firewall policy. WebApplicationFirewallPolicy }
PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.BeginCreateOrUpdate.
type PoliciesClientDeleteResponse ¶
type PoliciesClientDeleteResponse struct { }
PoliciesClientDeleteResponse contains the response from method PoliciesClient.BeginDelete.
type PoliciesClientGetOptions ¶
type PoliciesClientGetOptions struct { }
PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method.
type PoliciesClientGetResponse ¶
type PoliciesClientGetResponse struct { // Defines web application firewall policy. WebApplicationFirewallPolicy }
PoliciesClientGetResponse contains the response from method PoliciesClient.Get.
type PoliciesClientListBySubscriptionOptions ¶
type PoliciesClientListBySubscriptionOptions struct { }
PoliciesClientListBySubscriptionOptions contains the optional parameters for the PoliciesClient.NewListBySubscriptionPager method.
type PoliciesClientListBySubscriptionResponse ¶
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 ¶
type PoliciesClientListOptions struct { }
PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method.
type PoliciesClientListResponse ¶
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 ¶
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 ¶
func (p PolicySettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicySettings.
func (*PolicySettings) UnmarshalJSON ¶
func (p *PolicySettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettings.
type PolicySettingsLogScrubbing ¶
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 ¶
func (p PolicySettingsLogScrubbing) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicySettingsLogScrubbing.
func (*PolicySettingsLogScrubbing) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (p PreconfiguredEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreconfiguredEndpointProperties.
func (*PreconfiguredEndpointProperties) UnmarshalJSON ¶
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 ¶
func (client *PreconfiguredEndpointsClient) NewListPager(resourceGroupName string, profileName string, options *PreconfiguredEndpointsClientListOptions) *runtime.Pager[PreconfiguredEndpointsClientListResponse]
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 ¶
type PreconfiguredEndpointsClientListOptions struct { }
PreconfiguredEndpointsClientListOptions contains the optional parameters for the PreconfiguredEndpointsClient.NewListPager method.
type PreconfiguredEndpointsClientListResponse ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type Profile.
func (*Profile) UnmarshalJSON ¶
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 ¶
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 ¶
func (p ProfileProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProfileProperties.
func (*ProfileProperties) UnmarshalJSON ¶
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 ¶
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 ¶
func (p ProfileUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProfileUpdateProperties.
func (*ProfileUpdateProperties) UnmarshalJSON ¶
func (p *ProfileUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProfileUpdateProperties.
type Properties ¶
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 ¶
func (p Properties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Properties.
func (*Properties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
type ReportsClientGetLatencyScorecardsResponse struct { // Defines the LatencyScorecard LatencyScorecard }
ReportsClientGetLatencyScorecardsResponse contains the response from method ReportsClient.GetLatencyScorecards.
type ReportsClientGetTimeseriesOptions ¶
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 ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
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 ¶
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 ¶
func (r RoutingRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingRule.
func (*RoutingRule) UnmarshalJSON ¶
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 ¶
type RoutingRuleLink struct { // Resource ID. ID *string }
RoutingRuleLink - Defines the Resource ID for a Routing Rule.
func (RoutingRuleLink) MarshalJSON ¶
func (r RoutingRuleLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingRuleLink.
func (*RoutingRuleLink) UnmarshalJSON ¶
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 ¶
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 ¶
type RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink struct { // Resource ID. ID *string }
RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for each routing rule (if applicable)
func (RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON ¶
func (r RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.
func (*RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON ¶
func (r *RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.
type RuleType ¶
type RuleType string
RuleType - Describes type of rule.
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 ¶
func (r RulesEngine) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RulesEngine.
func (*RulesEngine) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
type RulesEnginesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RulesEnginesClientBeginCreateOrUpdateOptions contains the optional parameters for the RulesEnginesClient.BeginCreateOrUpdate method.
type RulesEnginesClientBeginDeleteOptions ¶
type RulesEnginesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RulesEnginesClientBeginDeleteOptions contains the optional parameters for the RulesEnginesClient.BeginDelete method.
type RulesEnginesClientCreateOrUpdateResponse ¶
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 ¶
type RulesEnginesClientDeleteResponse struct { }
RulesEnginesClientDeleteResponse contains the response from method RulesEnginesClient.BeginDelete.
type RulesEnginesClientGetOptions ¶
type RulesEnginesClientGetOptions struct { }
RulesEnginesClientGetOptions contains the optional parameters for the RulesEnginesClient.Get method.
type RulesEnginesClientGetResponse ¶
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 ¶
type RulesEnginesClientListByFrontDoorOptions struct { }
RulesEnginesClientListByFrontDoorOptions contains the optional parameters for the RulesEnginesClient.NewListByFrontDoorPager method.
type RulesEnginesClientListByFrontDoorResponse ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUName ¶
type SKUName string
SKUName - Name of the pricing tier.
func PossibleSKUNameValues ¶
func PossibleSKUNameValues() []SKUName
PossibleSKUNameValues returns the possible values for the SKUName const type.
type ScrubbingRuleEntryMatchOperator ¶
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 ¶
func PossibleScrubbingRuleEntryMatchOperatorValues() []ScrubbingRuleEntryMatchOperator
PossibleScrubbingRuleEntryMatchOperatorValues returns the possible values for the ScrubbingRuleEntryMatchOperator const type.
type ScrubbingRuleEntryMatchVariable ¶
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 ¶
func PossibleScrubbingRuleEntryMatchVariableValues() []ScrubbingRuleEntryMatchVariable
PossibleScrubbingRuleEntryMatchVariableValues returns the possible values for the ScrubbingRuleEntryMatchVariable const type.
type ScrubbingRuleEntryState ¶
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 ¶
func PossibleScrubbingRuleEntryStateValues() []ScrubbingRuleEntryState
PossibleScrubbingRuleEntryStateValues returns the possible values for the ScrubbingRuleEntryState const type.
type SecurityPolicyLink ¶
type SecurityPolicyLink struct { // Resource ID. ID *string }
SecurityPolicyLink - Defines the Resource ID for a Security Policy.
func (SecurityPolicyLink) MarshalJSON ¶
func (s SecurityPolicyLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityPolicyLink.
func (*SecurityPolicyLink) UnmarshalJSON ¶
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
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 ¶
func (s SubResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubResource.
func (*SubResource) UnmarshalJSON ¶
func (s *SubResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubResource.
type TagsObject ¶
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 ¶
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 ¶
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 ¶
func (t TimeseriesDataPoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TimeseriesDataPoint.
func (*TimeseriesDataPoint) UnmarshalJSON ¶
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 ¶
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
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 ¶
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 ¶
func (u UpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateParameters.
func (*UpdateParameters) UnmarshalJSON ¶
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 ¶
func (v ValidateCustomDomainInput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainInput.
func (*ValidateCustomDomainInput) UnmarshalJSON ¶
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 ¶
func (v ValidateCustomDomainOutput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainOutput.
func (*ValidateCustomDomainOutput) UnmarshalJSON ¶
func (v *ValidateCustomDomainOutput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainOutput.
type VariableName ¶
type VariableName string
VariableName - Describes the supported variable for group by
const ( VariableNameGeoLocation VariableName = "GeoLocation" VariableNameNone VariableName = "None" VariableNameSocketAddr VariableName = "SocketAddr" )
func PossibleVariableNameValues ¶
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 ¶
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 ¶
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 ¶
func (w *WebApplicationFirewallPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyProperties.
type WebApplicationFirewallScrubbingRules ¶
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 ¶
func (w WebApplicationFirewallScrubbingRules) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallScrubbingRules.
func (*WebApplicationFirewallScrubbingRules) UnmarshalJSON ¶
func (w *WebApplicationFirewallScrubbingRules) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallScrubbingRules.
type WebApplicationFirewallScrubbingState ¶
type WebApplicationFirewallScrubbingState string
WebApplicationFirewallScrubbingState - State of the log scrubbing config. Default value is Enabled.
const ( WebApplicationFirewallScrubbingStateDisabled WebApplicationFirewallScrubbingState = "Disabled" WebApplicationFirewallScrubbingStateEnabled WebApplicationFirewallScrubbingState = "Enabled" )
func PossibleWebApplicationFirewallScrubbingStateValues ¶
func PossibleWebApplicationFirewallScrubbingStateValues() []WebApplicationFirewallScrubbingState
PossibleWebApplicationFirewallScrubbingStateValues returns the possible values for the WebApplicationFirewallScrubbingState const type.
Source Files ¶
- build.go
- client_factory.go
- constants.go
- endpoints_client.go
- experiments_client.go
- frontdoors_client.go
- frontendendpoints_client.go
- interfaces.go
- managedrulesets_client.go
- models.go
- models_serde.go
- nameavailability_client.go
- nameavailabilitywithsubscription_client.go
- networkexperimentprofiles_client.go
- options.go
- policies_client.go
- polymorphic_helpers.go
- preconfiguredendpoints_client.go
- reports_client.go
- responses.go
- rulesengines_client.go
- time_rfc3339.go