armcdn

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 15 Imported by: 2

README

Azure Content Delivery Network Module for Go

PkgGoDev

The armcdn module provides operations for working with Azure Content Delivery Network.

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Content Delivery Network module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewManagementClient()

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Content Delivery Network label.

Contributing

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

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

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

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AFDCustomDomainsClient

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

AFDCustomDomainsClient contains the methods for the AFDCustomDomains group. Don't use this type directly, use NewAFDCustomDomainsClient() instead.

func NewAFDCustomDomainsClient

func NewAFDCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDCustomDomainsClient, error)

NewAFDCustomDomainsClient creates a new instance of AFDCustomDomainsClient with the specified values.

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

func (*AFDCustomDomainsClient) BeginCreate

func (client *AFDCustomDomainsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, customDomain AFDDomain, options *AFDCustomDomainsClientBeginCreateOptions) (*runtime.Poller[AFDCustomDomainsClientCreateResponse], error)

BeginCreate - Creates a new domain within the specified profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • customDomainName - Name of the domain under the profile which is unique globally
  • customDomain - Domain properties
  • options - AFDCustomDomainsClientBeginCreateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDCustomDomainsClient().BeginCreate(ctx, "RG", "profile1", "domain1", armcdn.AFDDomain{
		Properties: &armcdn.AFDDomainProperties{
			AzureDNSZone: &armcdn.ResourceReference{
				ID: to.Ptr(""),
			},
			TLSSettings: &armcdn.AFDDomainHTTPSParameters{
				CertificateType:   to.Ptr(armcdn.AfdCertificateTypeManagedCertificate),
				MinimumTLSVersion: to.Ptr(armcdn.AfdMinimumTLSVersionTLS12),
			},
			HostName: to.Ptr("www.someDomain.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.AFDDomain = armcdn.AFDDomain{
	// 	Name: to.Ptr("domain1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/customdomains"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/domain1"),
	// 	Properties: &armcdn.AFDDomainProperties{
	// 		AzureDNSZone: &armcdn.ResourceReference{
	// 			ID: to.Ptr(""),
	// 		},
	// 		PreValidatedCustomDomainResourceID: &armcdn.ResourceReference{
	// 			ID: to.Ptr(""),
	// 		},
	// 		ProfileName: to.Ptr("profile1"),
	// 		TLSSettings: &armcdn.AFDDomainHTTPSParameters{
	// 			CertificateType: to.Ptr(armcdn.AfdCertificateTypeManagedCertificate),
	// 			MinimumTLSVersion: to.Ptr(armcdn.AfdMinimumTLSVersionTLS12),
	// 			Secret: &armcdn.ResourceReference{
	// 				ID: to.Ptr(""),
	// 			},
	// 		},
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		DomainValidationState: to.Ptr(armcdn.DomainValidationStateSubmitting),
	// 		HostName: to.Ptr("www.contoso.com"),
	// 		ValidationProperties: &armcdn.DomainValidationProperties{
	// 			ExpirationDate: to.Ptr(""),
	// 			ValidationToken: to.Ptr(""),
	// 		},
	// 	},
	// }
}
Output:

func (*AFDCustomDomainsClient) BeginDelete

func (client *AFDCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, options *AFDCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[AFDCustomDomainsClientDeleteResponse], error)

BeginDelete - Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • customDomainName - Name of the domain under the profile which is unique globally.
  • options - AFDCustomDomainsClientBeginDeleteOptions contains the optional parameters for the AFDCustomDomainsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDCustomDomainsClient().BeginDelete(ctx, "RG", "profile1", "domain1", 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 (*AFDCustomDomainsClient) BeginRefreshValidationToken

func (client *AFDCustomDomainsClient) BeginRefreshValidationToken(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, options *AFDCustomDomainsClientBeginRefreshValidationTokenOptions) (*runtime.Poller[AFDCustomDomainsClientRefreshValidationTokenResponse], error)

BeginRefreshValidationToken - Updates the domain validation token. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • customDomainName - Name of the domain under the profile which is unique globally.
  • options - AFDCustomDomainsClientBeginRefreshValidationTokenOptions contains the optional parameters for the AFDCustomDomainsClient.BeginRefreshValidationToken method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_RefreshValidationToken.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDCustomDomainsClient().BeginRefreshValidationToken(ctx, "RG", "profile1", "domain1", 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 (*AFDCustomDomainsClient) BeginUpdate

func (client *AFDCustomDomainsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, customDomainUpdateProperties AFDDomainUpdateParameters, options *AFDCustomDomainsClientBeginUpdateOptions) (*runtime.Poller[AFDCustomDomainsClientUpdateResponse], error)

BeginUpdate - Updates an existing domain within a profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • customDomainName - Name of the domain under the profile which is unique globally
  • customDomainUpdateProperties - Domain properties
  • options - AFDCustomDomainsClientBeginUpdateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDCustomDomainsClient().BeginUpdate(ctx, "RG", "profile1", "domain1", armcdn.AFDDomainUpdateParameters{
		Properties: &armcdn.AFDDomainUpdatePropertiesParameters{
			AzureDNSZone: &armcdn.ResourceReference{
				ID: to.Ptr(""),
			},
			TLSSettings: &armcdn.AFDDomainHTTPSParameters{
				CertificateType:   to.Ptr(armcdn.AfdCertificateTypeCustomerCertificate),
				MinimumTLSVersion: to.Ptr(armcdn.AfdMinimumTLSVersionTLS12),
			},
		},
	}, 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.AFDDomain = armcdn.AFDDomain{
	// 	Name: to.Ptr("domain1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/customdomains"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/domain1"),
	// 	Properties: &armcdn.AFDDomainProperties{
	// 		AzureDNSZone: &armcdn.ResourceReference{
	// 			ID: to.Ptr(""),
	// 		},
	// 		PreValidatedCustomDomainResourceID: &armcdn.ResourceReference{
	// 			ID: to.Ptr(""),
	// 		},
	// 		ProfileName: to.Ptr("profile1"),
	// 		TLSSettings: &armcdn.AFDDomainHTTPSParameters{
	// 			CertificateType: to.Ptr(armcdn.AfdCertificateTypeManagedCertificate),
	// 			MinimumTLSVersion: to.Ptr(armcdn.AfdMinimumTLSVersionTLS12),
	// 			Secret: &armcdn.ResourceReference{
	// 				ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/secrets/mysecert"),
	// 			},
	// 		},
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		DomainValidationState: to.Ptr(armcdn.DomainValidationStateApproved),
	// 		HostName: to.Ptr("www.contoso.com"),
	// 		ValidationProperties: &armcdn.DomainValidationProperties{
	// 			ExpirationDate: to.Ptr("2009-06-15T13:45:43.0000000Z"),
	// 			ValidationToken: to.Ptr("8c9912db-c615-4eeb-8465"),
	// 		},
	// 	},
	// }
}
Output:

func (*AFDCustomDomainsClient) Get

func (client *AFDCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, options *AFDCustomDomainsClientGetOptions) (AFDCustomDomainsClientGetResponse, error)

Get - Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • customDomainName - Name of the domain under the profile which is unique globally.
  • options - AFDCustomDomainsClientGetOptions contains the optional parameters for the AFDCustomDomainsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAFDCustomDomainsClient().Get(ctx, "RG", "profile1", "domain1", 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.AFDDomain = armcdn.AFDDomain{
	// 	Name: to.Ptr("domain1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/customdomains"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/domain1"),
	// 	Properties: &armcdn.AFDDomainProperties{
	// 		AzureDNSZone: &armcdn.ResourceReference{
	// 			ID: to.Ptr(""),
	// 		},
	// 		PreValidatedCustomDomainResourceID: &armcdn.ResourceReference{
	// 			ID: to.Ptr(""),
	// 		},
	// 		ProfileName: to.Ptr("profile1"),
	// 		TLSSettings: &armcdn.AFDDomainHTTPSParameters{
	// 			CertificateType: to.Ptr(armcdn.AfdCertificateTypeManagedCertificate),
	// 			MinimumTLSVersion: to.Ptr(armcdn.AfdMinimumTLSVersionTLS12),
	// 			Secret: &armcdn.ResourceReference{
	// 				ID: to.Ptr(""),
	// 			},
	// 		},
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		DomainValidationState: to.Ptr(armcdn.DomainValidationStatePending),
	// 		HostName: to.Ptr("www.contoso.com"),
	// 		ValidationProperties: &armcdn.DomainValidationProperties{
	// 			ExpirationDate: to.Ptr("2009-06-15T13:45:43.0000000Z"),
	// 			ValidationToken: to.Ptr("8c9912db-c615-4eeb-8465"),
	// 		},
	// 	},
	// }
}
Output:

func (*AFDCustomDomainsClient) NewListByProfilePager added in v0.5.0

func (client *AFDCustomDomainsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *AFDCustomDomainsClientListByProfileOptions) *runtime.Pager[AFDCustomDomainsClientListByProfileResponse]

NewListByProfilePager - Lists existing AzureFrontDoor domains.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN profile which is unique within the resource group.
  • options - AFDCustomDomainsClientListByProfileOptions contains the optional parameters for the AFDCustomDomainsClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_ListByProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAFDCustomDomainsClient().NewListByProfilePager("RG", "profile1", 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.AFDDomainListResult = armcdn.AFDDomainListResult{
		// 	Value: []*armcdn.AFDDomain{
		// 		{
		// 			Name: to.Ptr("domain1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/customdomains"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/domain1"),
		// 			Properties: &armcdn.AFDDomainProperties{
		// 				AzureDNSZone: &armcdn.ResourceReference{
		// 					ID: to.Ptr(""),
		// 				},
		// 				PreValidatedCustomDomainResourceID: &armcdn.ResourceReference{
		// 					ID: to.Ptr(""),
		// 				},
		// 				ProfileName: to.Ptr("profile1"),
		// 				TLSSettings: &armcdn.AFDDomainHTTPSParameters{
		// 					CertificateType: to.Ptr(armcdn.AfdCertificateTypeManagedCertificate),
		// 					MinimumTLSVersion: to.Ptr(armcdn.AfdMinimumTLSVersionTLS12),
		// 					Secret: &armcdn.ResourceReference{
		// 						ID: to.Ptr(""),
		// 					},
		// 				},
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 				DomainValidationState: to.Ptr(armcdn.DomainValidationStatePending),
		// 				HostName: to.Ptr("www.contoso.com"),
		// 				ValidationProperties: &armcdn.DomainValidationProperties{
		// 					ExpirationDate: to.Ptr("2009-06-15T13:45:43.0000000Z"),
		// 					ValidationToken: to.Ptr("8c9912db-c615-4eeb-8465"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type AFDCustomDomainsClientBeginCreateOptions added in v0.3.0

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

AFDCustomDomainsClientBeginCreateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginCreate method.

type AFDCustomDomainsClientBeginDeleteOptions added in v0.3.0

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

AFDCustomDomainsClientBeginDeleteOptions contains the optional parameters for the AFDCustomDomainsClient.BeginDelete method.

type AFDCustomDomainsClientBeginRefreshValidationTokenOptions added in v0.3.0

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

AFDCustomDomainsClientBeginRefreshValidationTokenOptions contains the optional parameters for the AFDCustomDomainsClient.BeginRefreshValidationToken method.

type AFDCustomDomainsClientBeginUpdateOptions added in v0.3.0

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

AFDCustomDomainsClientBeginUpdateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginUpdate method.

type AFDCustomDomainsClientCreateResponse added in v0.3.0

type AFDCustomDomainsClientCreateResponse struct {
	AFDDomain
}

AFDCustomDomainsClientCreateResponse contains the response from method AFDCustomDomainsClient.BeginCreate.

type AFDCustomDomainsClientDeleteResponse added in v0.3.0

type AFDCustomDomainsClientDeleteResponse struct {
}

AFDCustomDomainsClientDeleteResponse contains the response from method AFDCustomDomainsClient.BeginDelete.

type AFDCustomDomainsClientGetOptions added in v0.3.0

type AFDCustomDomainsClientGetOptions struct {
}

AFDCustomDomainsClientGetOptions contains the optional parameters for the AFDCustomDomainsClient.Get method.

type AFDCustomDomainsClientGetResponse added in v0.3.0

type AFDCustomDomainsClientGetResponse struct {
	AFDDomain
}

AFDCustomDomainsClientGetResponse contains the response from method AFDCustomDomainsClient.Get.

type AFDCustomDomainsClientListByProfileOptions added in v0.3.0

type AFDCustomDomainsClientListByProfileOptions struct {
}

AFDCustomDomainsClientListByProfileOptions contains the optional parameters for the AFDCustomDomainsClient.NewListByProfilePager method.

type AFDCustomDomainsClientListByProfileResponse added in v0.3.0

type AFDCustomDomainsClientListByProfileResponse struct {
	AFDDomainListResult
}

AFDCustomDomainsClientListByProfileResponse contains the response from method AFDCustomDomainsClient.NewListByProfilePager.

type AFDCustomDomainsClientRefreshValidationTokenResponse added in v0.3.0

type AFDCustomDomainsClientRefreshValidationTokenResponse struct {
}

AFDCustomDomainsClientRefreshValidationTokenResponse contains the response from method AFDCustomDomainsClient.BeginRefreshValidationToken.

type AFDCustomDomainsClientUpdateResponse added in v0.3.0

type AFDCustomDomainsClientUpdateResponse struct {
	AFDDomain
}

AFDCustomDomainsClientUpdateResponse contains the response from method AFDCustomDomainsClient.BeginUpdate.

type AFDDomain

type AFDDomain struct {
	// The JSON object that contains the properties of the domain to create.
	Properties *AFDDomainProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

AFDDomain - Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com.

func (AFDDomain) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDDomain.

func (*AFDDomain) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomain.

type AFDDomainHTTPSParameters

type AFDDomainHTTPSParameters struct {
	// REQUIRED; Defines the source of the SSL certificate.
	CertificateType *AfdCertificateType

	// TLS protocol version that will be used for Https
	MinimumTLSVersion *AfdMinimumTLSVersion

	// Resource reference to the secret. ie. subs/rg/profile/secret
	Secret *ResourceReference
}

AFDDomainHTTPSParameters - The JSON object that contains the properties to secure a domain.

func (AFDDomainHTTPSParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AFDDomainHTTPSParameters.

func (*AFDDomainHTTPSParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainHTTPSParameters.

type AFDDomainListResult

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

	// READ-ONLY; List of AzureFrontDoor domains within a profile.
	Value []*AFDDomain
}

AFDDomainListResult - Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results.

func (AFDDomainListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDDomainListResult.

func (*AFDDomainListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainListResult.

type AFDDomainProperties

type AFDDomainProperties struct {
	// REQUIRED; The host name of the domain. Must be a domain name.
	HostName *string

	// Resource reference to the Azure DNS zone
	AzureDNSZone *ResourceReference

	// Resource reference to the Azure resource where custom domain ownership was prevalidated
	PreValidatedCustomDomainResourceID *ResourceReference

	// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own
	// certificate. If not specified, enabling ssl uses AzureFrontDoor managed
	// certificate by default.
	TLSSettings *AFDDomainHTTPSParameters

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands
	// for DomainControlValidation.
	DomainValidationState *DomainValidationState

	// READ-ONLY; The name of the profile which holds the domain.
	ProfileName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState

	// READ-ONLY; Values the customer needs to validate domain ownership
	ValidationProperties *DomainValidationProperties
}

AFDDomainProperties - The JSON object that contains the properties of the domain to create.

func (AFDDomainProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDDomainProperties.

func (*AFDDomainProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainProperties.

type AFDDomainUpdateParameters

type AFDDomainUpdateParameters struct {
	// The JSON object that contains the properties of the domain to create.
	Properties *AFDDomainUpdatePropertiesParameters
}

AFDDomainUpdateParameters - The domain JSON object required for domain creation or update.

func (AFDDomainUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDDomainUpdateParameters.

func (*AFDDomainUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainUpdateParameters.

type AFDDomainUpdatePropertiesParameters

type AFDDomainUpdatePropertiesParameters struct {
	// Resource reference to the Azure DNS zone
	AzureDNSZone *ResourceReference

	// Resource reference to the Azure resource where custom domain ownership was prevalidated
	PreValidatedCustomDomainResourceID *ResourceReference

	// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own
	// certificate. If not specified, enabling ssl uses AzureFrontDoor managed
	// certificate by default.
	TLSSettings *AFDDomainHTTPSParameters

	// READ-ONLY; The name of the profile which holds the domain.
	ProfileName *string
}

AFDDomainUpdatePropertiesParameters - The JSON object that contains the properties of the domain to create.

func (AFDDomainUpdatePropertiesParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDDomainUpdatePropertiesParameters.

func (*AFDDomainUpdatePropertiesParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainUpdatePropertiesParameters.

type AFDEndpoint

type AFDEndpoint struct {
	// REQUIRED; Resource location.
	Location *string

	// The JSON object that contains the properties required to create an endpoint.
	Properties *AFDEndpointProperties

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

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

AFDEndpoint - CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net.

func (AFDEndpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDEndpoint.

func (*AFDEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpoint.

type AFDEndpointListResult

type AFDEndpointListResult struct {
	// URL to get the next set of endpoint objects if there is any.
	NextLink *string

	// READ-ONLY; List of AzureFrontDoor endpoints within a profile
	Value []*AFDEndpoint
}

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

func (AFDEndpointListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDEndpointListResult.

func (*AFDEndpointListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointListResult.

type AFDEndpointProperties

type AFDEndpointProperties struct {
	// Indicates the endpoint name reuse scope. The default value is TenantReuse.
	AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope

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

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net
	HostName *string

	// READ-ONLY; The name of the profile which holds the endpoint.
	ProfileName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

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

func (AFDEndpointProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDEndpointProperties.

func (*AFDEndpointProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointProperties.

type AFDEndpointPropertiesUpdateParameters

type AFDEndpointPropertiesUpdateParameters struct {
	// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
	EnabledState *EnabledState

	// READ-ONLY; The name of the profile which holds the endpoint.
	ProfileName *string
}

AFDEndpointPropertiesUpdateParameters - The JSON object containing endpoint update parameters.

func (AFDEndpointPropertiesUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDEndpointPropertiesUpdateParameters.

func (*AFDEndpointPropertiesUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointPropertiesUpdateParameters.

type AFDEndpointProtocols

type AFDEndpointProtocols string

AFDEndpointProtocols - Supported protocols for the customer's endpoint.

const (
	AFDEndpointProtocolsHTTP  AFDEndpointProtocols = "Http"
	AFDEndpointProtocolsHTTPS AFDEndpointProtocols = "Https"
)

func PossibleAFDEndpointProtocolsValues

func PossibleAFDEndpointProtocolsValues() []AFDEndpointProtocols

PossibleAFDEndpointProtocolsValues returns the possible values for the AFDEndpointProtocols const type.

type AFDEndpointUpdateParameters

type AFDEndpointUpdateParameters struct {
	// The JSON object containing endpoint update parameters.
	Properties *AFDEndpointPropertiesUpdateParameters

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

AFDEndpointUpdateParameters - Properties required to create or update an endpoint.

func (AFDEndpointUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDEndpointUpdateParameters.

func (*AFDEndpointUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointUpdateParameters.

type AFDEndpointsClient

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

AFDEndpointsClient contains the methods for the AFDEndpoints group. Don't use this type directly, use NewAFDEndpointsClient() instead.

func NewAFDEndpointsClient

func NewAFDEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDEndpointsClient, error)

NewAFDEndpointsClient creates a new instance of AFDEndpointsClient with the specified values.

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

func (*AFDEndpointsClient) BeginCreate

func (client *AFDEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint AFDEndpoint, options *AFDEndpointsClientBeginCreateOptions) (*runtime.Poller[AFDEndpointsClientCreateResponse], error)

BeginCreate - Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • endpoint - Endpoint properties
  • options - AFDEndpointsClientBeginCreateOptions contains the optional parameters for the AFDEndpointsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDEndpointsClient().BeginCreate(ctx, "RG", "profile1", "endpoint1", armcdn.AFDEndpoint{
		Location: to.Ptr("global"),
		Tags:     map[string]*string{},
		Properties: &armcdn.AFDEndpointProperties{
			EnabledState:                      to.Ptr(armcdn.EnabledStateEnabled),
			AutoGeneratedDomainNameLabelScope: to.Ptr(armcdn.AutoGeneratedDomainNameLabelScopeTenantReuse),
		},
	}, 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.AFDEndpoint = armcdn.AFDEndpoint{
	// 	Name: to.Ptr("endpoint1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1"),
	// 	Location: to.Ptr("global"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armcdn.AFDEndpointProperties{
	// 		EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armcdn.AutoGeneratedDomainNameLabelScopeTenantReuse),
	// 		HostName: to.Ptr("endpoint1-abcdefghijklmnop.z01.azurefd.net"),
	// 	},
	// }
}
Output:

func (*AFDEndpointsClient) BeginDelete

func (client *AFDEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *AFDEndpointsClientBeginDeleteOptions) (*runtime.Poller[AFDEndpointsClientDeleteResponse], error)

BeginDelete - Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - AFDEndpointsClientBeginDeleteOptions contains the optional parameters for the AFDEndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDEndpointsClient().BeginDelete(ctx, "RG", "profile1", "endpoint1", 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 (*AFDEndpointsClient) BeginPurgeContent

func (client *AFDEndpointsClient) BeginPurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contents AfdPurgeParameters, options *AFDEndpointsClientBeginPurgeContentOptions) (*runtime.Poller[AFDEndpointsClientPurgeContentResponse], error)

BeginPurgeContent - Removes a content from AzureFrontDoor. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • contents - The list of paths to the content and the list of linked domains 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 - AFDEndpointsClientBeginPurgeContentOptions contains the optional parameters for the AFDEndpointsClient.BeginPurgeContent method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_PurgeContent.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDEndpointsClient().BeginPurgeContent(ctx, "RG", "profile1", "endpoint1", armcdn.AfdPurgeParameters{
		ContentPaths: []*string{
			to.Ptr("/folder1")},
		Domains: []*string{
			to.Ptr("endpoint1-abcdefghijklmnop.z01.azurefd.net")},
	}, 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 (*AFDEndpointsClient) BeginUpdate

func (client *AFDEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties AFDEndpointUpdateParameters, options *AFDEndpointsClientBeginUpdateOptions) (*runtime.Poller[AFDEndpointsClientUpdateResponse], error)

BeginUpdate - Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • endpointUpdateProperties - Endpoint update properties
  • options - AFDEndpointsClientBeginUpdateOptions contains the optional parameters for the AFDEndpointsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDEndpointsClient().BeginUpdate(ctx, "RG", "profile1", "endpoint1", armcdn.AFDEndpointUpdateParameters{
		Properties: &armcdn.AFDEndpointPropertiesUpdateParameters{
			EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
		},
		Tags: map[string]*string{},
	}, 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.AFDEndpoint = armcdn.AFDEndpoint{
	// 	Name: to.Ptr("endpoint1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1"),
	// 	Location: to.Ptr("global"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armcdn.AFDEndpointProperties{
	// 		EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armcdn.AutoGeneratedDomainNameLabelScopeTenantReuse),
	// 		HostName: to.Ptr("endpoint1-ezh7ddcmguaeajfu.z01.azureedge.net"),
	// 	},
	// }
}
Output:

func (*AFDEndpointsClient) Get

func (client *AFDEndpointsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *AFDEndpointsClientGetOptions) (AFDEndpointsClientGetResponse, error)

Get - Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - AFDEndpointsClientGetOptions contains the optional parameters for the AFDEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAFDEndpointsClient().Get(ctx, "RG", "profile1", "endpoint1", 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.AFDEndpoint = armcdn.AFDEndpoint{
	// 	Name: to.Ptr("endpoint1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1"),
	// 	Location: to.Ptr("global"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armcdn.AFDEndpointProperties{
	// 		EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armcdn.AutoGeneratedDomainNameLabelScopeTenantReuse),
	// 		HostName: to.Ptr("endpoint1-abcdefghijklmnop.z01.azurefd.net"),
	// 	},
	// }
}
Output:

func (*AFDEndpointsClient) NewListByProfilePager added in v0.5.0

func (client *AFDEndpointsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *AFDEndpointsClientListByProfileOptions) *runtime.Pager[AFDEndpointsClientListByProfileResponse]

NewListByProfilePager - Lists existing AzureFrontDoor endpoints.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • options - AFDEndpointsClientListByProfileOptions contains the optional parameters for the AFDEndpointsClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_ListByProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAFDEndpointsClient().NewListByProfilePager("RG", "profile1", 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.AFDEndpointListResult = armcdn.AFDEndpointListResult{
		// 	Value: []*armcdn.AFDEndpoint{
		// 		{
		// 			Name: to.Ptr("endpoint1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1"),
		// 			Location: to.Ptr("global"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armcdn.AFDEndpointProperties{
		// 				EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 				AutoGeneratedDomainNameLabelScope: to.Ptr(armcdn.AutoGeneratedDomainNameLabelScopeTenantReuse),
		// 				HostName: to.Ptr("endpoint1-abcdefghijklmnop.z01.azurefd.net"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AFDEndpointsClient) NewListResourceUsagePager added in v0.5.0

func (client *AFDEndpointsClient) NewListResourceUsagePager(resourceGroupName string, profileName string, endpointName string, options *AFDEndpointsClientListResourceUsageOptions) *runtime.Pager[AFDEndpointsClientListResourceUsageResponse]

NewListResourceUsagePager - Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - AFDEndpointsClientListResourceUsageOptions contains the optional parameters for the AFDEndpointsClient.NewListResourceUsagePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_ListResourceUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAFDEndpointsClient().NewListResourceUsagePager("RG", "profile1", "endpoint1", 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.UsagesListResult = armcdn.UsagesListResult{
		// 	Value: []*armcdn.Usage{
		// 		{
		// 			Name: &armcdn.UsageName{
		// 				LocalizedValue: to.Ptr("route"),
		// 				Value: to.Ptr("route"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1"),
		// 			Limit: to.Ptr[int64](25),
		// 			Unit: to.Ptr(armcdn.UsageUnitCount),
		// 	}},
		// }
	}
}
Output:

func (*AFDEndpointsClient) ValidateCustomDomain

func (client *AFDEndpointsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput, options *AFDEndpointsClientValidateCustomDomainOptions) (AFDEndpointsClientValidateCustomDomainResponse, error)

ValidateCustomDomain - Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • customDomainProperties - Custom domain to be validated.
  • options - AFDEndpointsClientValidateCustomDomainOptions contains the optional parameters for the AFDEndpointsClient.ValidateCustomDomain method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_ValidateCustomDomain.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAFDEndpointsClient().ValidateCustomDomain(ctx, "RG", "profile1", "endpoint1", armcdn.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 = armcdn.ValidateCustomDomainOutput{
	// 	CustomDomainValidated: to.Ptr(true),
	// }
}
Output:

type AFDEndpointsClientBeginCreateOptions added in v0.3.0

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

AFDEndpointsClientBeginCreateOptions contains the optional parameters for the AFDEndpointsClient.BeginCreate method.

type AFDEndpointsClientBeginDeleteOptions added in v0.3.0

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

AFDEndpointsClientBeginDeleteOptions contains the optional parameters for the AFDEndpointsClient.BeginDelete method.

type AFDEndpointsClientBeginPurgeContentOptions added in v0.3.0

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

AFDEndpointsClientBeginPurgeContentOptions contains the optional parameters for the AFDEndpointsClient.BeginPurgeContent method.

type AFDEndpointsClientBeginUpdateOptions added in v0.3.0

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

AFDEndpointsClientBeginUpdateOptions contains the optional parameters for the AFDEndpointsClient.BeginUpdate method.

type AFDEndpointsClientCreateResponse added in v0.3.0

type AFDEndpointsClientCreateResponse struct {
	AFDEndpoint
}

AFDEndpointsClientCreateResponse contains the response from method AFDEndpointsClient.BeginCreate.

type AFDEndpointsClientDeleteResponse added in v0.3.0

type AFDEndpointsClientDeleteResponse struct {
}

AFDEndpointsClientDeleteResponse contains the response from method AFDEndpointsClient.BeginDelete.

type AFDEndpointsClientGetOptions added in v0.3.0

type AFDEndpointsClientGetOptions struct {
}

AFDEndpointsClientGetOptions contains the optional parameters for the AFDEndpointsClient.Get method.

type AFDEndpointsClientGetResponse added in v0.3.0

type AFDEndpointsClientGetResponse struct {
	AFDEndpoint
}

AFDEndpointsClientGetResponse contains the response from method AFDEndpointsClient.Get.

type AFDEndpointsClientListByProfileOptions added in v0.3.0

type AFDEndpointsClientListByProfileOptions struct {
}

AFDEndpointsClientListByProfileOptions contains the optional parameters for the AFDEndpointsClient.NewListByProfilePager method.

type AFDEndpointsClientListByProfileResponse added in v0.3.0

type AFDEndpointsClientListByProfileResponse struct {
	AFDEndpointListResult
}

AFDEndpointsClientListByProfileResponse contains the response from method AFDEndpointsClient.NewListByProfilePager.

type AFDEndpointsClientListResourceUsageOptions added in v0.3.0

type AFDEndpointsClientListResourceUsageOptions struct {
}

AFDEndpointsClientListResourceUsageOptions contains the optional parameters for the AFDEndpointsClient.NewListResourceUsagePager method.

type AFDEndpointsClientListResourceUsageResponse added in v0.3.0

type AFDEndpointsClientListResourceUsageResponse struct {
	UsagesListResult
}

AFDEndpointsClientListResourceUsageResponse contains the response from method AFDEndpointsClient.NewListResourceUsagePager.

type AFDEndpointsClientPurgeContentResponse added in v0.3.0

type AFDEndpointsClientPurgeContentResponse struct {
}

AFDEndpointsClientPurgeContentResponse contains the response from method AFDEndpointsClient.BeginPurgeContent.

type AFDEndpointsClientUpdateResponse added in v0.3.0

type AFDEndpointsClientUpdateResponse struct {
	AFDEndpoint
}

AFDEndpointsClientUpdateResponse contains the response from method AFDEndpointsClient.BeginUpdate.

type AFDEndpointsClientValidateCustomDomainOptions added in v0.3.0

type AFDEndpointsClientValidateCustomDomainOptions struct {
}

AFDEndpointsClientValidateCustomDomainOptions contains the optional parameters for the AFDEndpointsClient.ValidateCustomDomain method.

type AFDEndpointsClientValidateCustomDomainResponse added in v0.3.0

type AFDEndpointsClientValidateCustomDomainResponse struct {
	ValidateCustomDomainOutput
}

AFDEndpointsClientValidateCustomDomainResponse contains the response from method AFDEndpointsClient.ValidateCustomDomain.

type AFDOrigin

type AFDOrigin struct {
	// The JSON object that contains the properties of the origin.
	Properties *AFDOriginProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

AFDOrigin - CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins.

func (AFDOrigin) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOrigin.

func (*AFDOrigin) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOrigin.

type AFDOriginGroup

type AFDOriginGroup struct {
	// The JSON object that contains the properties of the origin group.
	Properties *AFDOriginGroupProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

AFDOriginGroup - AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN.

func (AFDOriginGroup) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginGroup.

func (*AFDOriginGroup) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroup.

type AFDOriginGroupListResult

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

	// READ-ONLY; List of CDN origin groups within an endpoint
	Value []*AFDOriginGroup
}

AFDOriginGroupListResult - Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next set of results.

func (AFDOriginGroupListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupListResult.

func (*AFDOriginGroupListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupListResult.

type AFDOriginGroupProperties

type AFDOriginGroupProperties struct {
	// Health probe settings to the origin that is used to determine the health of the origin.
	HealthProbeSettings *HealthProbeParameters

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

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

	// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint
	// is added. Default is 10 mins. This property is currently not supported.
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; The name of the profile which holds the origin group.
	ProfileName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

AFDOriginGroupProperties - The JSON object that contains the properties of the origin group.

func (AFDOriginGroupProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupProperties.

func (*AFDOriginGroupProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupProperties.

type AFDOriginGroupUpdateParameters

type AFDOriginGroupUpdateParameters struct {
	// The JSON object that contains the properties of the origin group.
	Properties *AFDOriginGroupUpdatePropertiesParameters
}

AFDOriginGroupUpdateParameters - AFDOrigin group properties needed for origin group creation or update.

func (AFDOriginGroupUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupUpdateParameters.

func (*AFDOriginGroupUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupUpdateParameters.

type AFDOriginGroupUpdatePropertiesParameters

type AFDOriginGroupUpdatePropertiesParameters struct {
	// Health probe settings to the origin that is used to determine the health of the origin.
	HealthProbeSettings *HealthProbeParameters

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

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

	// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint
	// is added. Default is 10 mins. This property is currently not supported.
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32

	// READ-ONLY; The name of the profile which holds the origin group.
	ProfileName *string
}

AFDOriginGroupUpdatePropertiesParameters - The JSON object that contains the properties of the origin group.

func (AFDOriginGroupUpdatePropertiesParameters) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupUpdatePropertiesParameters.

func (*AFDOriginGroupUpdatePropertiesParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupUpdatePropertiesParameters.

type AFDOriginGroupsClient

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

AFDOriginGroupsClient contains the methods for the AFDOriginGroups group. Don't use this type directly, use NewAFDOriginGroupsClient() instead.

func NewAFDOriginGroupsClient

func NewAFDOriginGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDOriginGroupsClient, error)

NewAFDOriginGroupsClient creates a new instance of AFDOriginGroupsClient with the specified values.

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

func (*AFDOriginGroupsClient) BeginCreate

func (client *AFDOriginGroupsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originGroup AFDOriginGroup, options *AFDOriginGroupsClientBeginCreateOptions) (*runtime.Poller[AFDOriginGroupsClientCreateResponse], error)

BeginCreate - Creates a new origin group within the specified profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the endpoint.
  • originGroup - Origin group properties
  • options - AFDOriginGroupsClientBeginCreateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDOriginGroupsClient().BeginCreate(ctx, "RG", "profile1", "origingroup1", armcdn.AFDOriginGroup{
		Properties: &armcdn.AFDOriginGroupProperties{
			HealthProbeSettings: &armcdn.HealthProbeParameters{
				ProbeIntervalInSeconds: to.Ptr[int32](10),
				ProbePath:              to.Ptr("/path2"),
				ProbeProtocol:          to.Ptr(armcdn.ProbeProtocolNotSet),
				ProbeRequestType:       to.Ptr(armcdn.HealthProbeRequestTypeNotSet),
			},
			LoadBalancingSettings: &armcdn.LoadBalancingSettingsParameters{
				AdditionalLatencyInMilliseconds: to.Ptr[int32](1000),
				SampleSize:                      to.Ptr[int32](3),
				SuccessfulSamplesRequired:       to.Ptr[int32](3),
			},
			TrafficRestorationTimeToHealedOrNewEndpointsInMinutes: to.Ptr[int32](5),
		},
	}, 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.AFDOriginGroup = armcdn.AFDOriginGroup{
	// 	Name: to.Ptr("origingroup1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/origingroups"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1"),
	// 	Properties: &armcdn.AFDOriginGroupProperties{
	// 		HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 			ProbeIntervalInSeconds: to.Ptr[int32](10),
	// 			ProbePath: to.Ptr("/path1"),
	// 			ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 			ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeHEAD),
	// 		},
	// 		LoadBalancingSettings: &armcdn.LoadBalancingSettingsParameters{
	// 			AdditionalLatencyInMilliseconds: to.Ptr[int32](1000),
	// 			SampleSize: to.Ptr[int32](3),
	// 			SuccessfulSamplesRequired: to.Ptr[int32](3),
	// 		},
	// 		TrafficRestorationTimeToHealedOrNewEndpointsInMinutes: to.Ptr[int32](5),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AFDOriginGroupsClient) BeginDelete

func (client *AFDOriginGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, options *AFDOriginGroupsClientBeginDeleteOptions) (*runtime.Poller[AFDOriginGroupsClientDeleteResponse], error)

BeginDelete - Deletes an existing origin group within a profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the profile.
  • options - AFDOriginGroupsClientBeginDeleteOptions contains the optional parameters for the AFDOriginGroupsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDOriginGroupsClient().BeginDelete(ctx, "RG", "profile1", "origingroup1", 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 (*AFDOriginGroupsClient) BeginUpdate

func (client *AFDOriginGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originGroupUpdateProperties AFDOriginGroupUpdateParameters, options *AFDOriginGroupsClientBeginUpdateOptions) (*runtime.Poller[AFDOriginGroupsClientUpdateResponse], error)

BeginUpdate - Updates an existing origin group within a profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the profile.
  • originGroupUpdateProperties - Origin group properties
  • options - AFDOriginGroupsClientBeginUpdateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDOriginGroupsClient().BeginUpdate(ctx, "RG", "profile1", "origingroup1", armcdn.AFDOriginGroupUpdateParameters{
		Properties: &armcdn.AFDOriginGroupUpdatePropertiesParameters{
			HealthProbeSettings: &armcdn.HealthProbeParameters{
				ProbeIntervalInSeconds: to.Ptr[int32](10),
				ProbePath:              to.Ptr("/path2"),
				ProbeProtocol:          to.Ptr(armcdn.ProbeProtocolNotSet),
				ProbeRequestType:       to.Ptr(armcdn.HealthProbeRequestTypeNotSet),
			},
			LoadBalancingSettings: &armcdn.LoadBalancingSettingsParameters{
				AdditionalLatencyInMilliseconds: to.Ptr[int32](1000),
				SampleSize:                      to.Ptr[int32](3),
				SuccessfulSamplesRequired:       to.Ptr[int32](3),
			},
			TrafficRestorationTimeToHealedOrNewEndpointsInMinutes: to.Ptr[int32](5),
		},
	}, 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.AFDOriginGroup = armcdn.AFDOriginGroup{
	// 	Name: to.Ptr("origingroup1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/origingroups"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1"),
	// 	Properties: &armcdn.AFDOriginGroupProperties{
	// 		HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 			ProbeIntervalInSeconds: to.Ptr[int32](10),
	// 			ProbePath: to.Ptr("/path1"),
	// 			ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 			ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeHEAD),
	// 		},
	// 		LoadBalancingSettings: &armcdn.LoadBalancingSettingsParameters{
	// 			AdditionalLatencyInMilliseconds: to.Ptr[int32](1000),
	// 			SampleSize: to.Ptr[int32](3),
	// 			SuccessfulSamplesRequired: to.Ptr[int32](3),
	// 		},
	// 		TrafficRestorationTimeToHealedOrNewEndpointsInMinutes: to.Ptr[int32](5),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AFDOriginGroupsClient) Get

func (client *AFDOriginGroupsClient) Get(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, options *AFDOriginGroupsClientGetOptions) (AFDOriginGroupsClientGetResponse, error)

Get - Gets an existing origin group within a profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the endpoint.
  • options - AFDOriginGroupsClientGetOptions contains the optional parameters for the AFDOriginGroupsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAFDOriginGroupsClient().Get(ctx, "RG", "profile1", "origingroup1", 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.AFDOriginGroup = armcdn.AFDOriginGroup{
	// 	Name: to.Ptr("origingroup1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/origingroups"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1"),
	// 	Properties: &armcdn.AFDOriginGroupProperties{
	// 		HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 			ProbeIntervalInSeconds: to.Ptr[int32](10),
	// 			ProbePath: to.Ptr("/path1"),
	// 			ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 			ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeHEAD),
	// 		},
	// 		LoadBalancingSettings: &armcdn.LoadBalancingSettingsParameters{
	// 			AdditionalLatencyInMilliseconds: to.Ptr[int32](1000),
	// 			SampleSize: to.Ptr[int32](3),
	// 			SuccessfulSamplesRequired: to.Ptr[int32](3),
	// 		},
	// 		TrafficRestorationTimeToHealedOrNewEndpointsInMinutes: to.Ptr[int32](5),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AFDOriginGroupsClient) NewListByProfilePager added in v0.5.0

func (client *AFDOriginGroupsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *AFDOriginGroupsClientListByProfileOptions) *runtime.Pager[AFDOriginGroupsClientListByProfileResponse]

NewListByProfilePager - Lists all of the existing origin groups within a profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • options - AFDOriginGroupsClientListByProfileOptions contains the optional parameters for the AFDOriginGroupsClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_ListByProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAFDOriginGroupsClient().NewListByProfilePager("RG", "profile1", 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.AFDOriginGroupListResult = armcdn.AFDOriginGroupListResult{
		// 	Value: []*armcdn.AFDOriginGroup{
		// 		{
		// 			Name: to.Ptr("origingroup1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/origingroups"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1"),
		// 			Properties: &armcdn.AFDOriginGroupProperties{
		// 				HealthProbeSettings: &armcdn.HealthProbeParameters{
		// 					ProbeIntervalInSeconds: to.Ptr[int32](10),
		// 					ProbePath: to.Ptr("/path1"),
		// 					ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
		// 					ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeHEAD),
		// 				},
		// 				LoadBalancingSettings: &armcdn.LoadBalancingSettingsParameters{
		// 					AdditionalLatencyInMilliseconds: to.Ptr[int32](1000),
		// 					SampleSize: to.Ptr[int32](3),
		// 					SuccessfulSamplesRequired: to.Ptr[int32](3),
		// 				},
		// 				TrafficRestorationTimeToHealedOrNewEndpointsInMinutes: to.Ptr[int32](5),
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AFDOriginGroupsClient) NewListResourceUsagePager added in v0.5.0

func (client *AFDOriginGroupsClient) NewListResourceUsagePager(resourceGroupName string, profileName string, originGroupName string, options *AFDOriginGroupsClientListResourceUsageOptions) *runtime.Pager[AFDOriginGroupsClientListResourceUsageResponse]

NewListResourceUsagePager - Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the endpoint.
  • options - AFDOriginGroupsClientListResourceUsageOptions contains the optional parameters for the AFDOriginGroupsClient.NewListResourceUsagePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_ListResourceUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAFDOriginGroupsClient().NewListResourceUsagePager("RG", "profile1", "origingroup1", 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.UsagesListResult = armcdn.UsagesListResult{
		// 	Value: []*armcdn.Usage{
		// 		{
		// 			Name: &armcdn.UsageName{
		// 				LocalizedValue: to.Ptr("origin"),
		// 				Value: to.Ptr("origin"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1/origins/origin1"),
		// 			Limit: to.Ptr[int64](25),
		// 			Unit: to.Ptr(armcdn.UsageUnitCount),
		// 	}},
		// }
	}
}
Output:

type AFDOriginGroupsClientBeginCreateOptions added in v0.3.0

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

AFDOriginGroupsClientBeginCreateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginCreate method.

type AFDOriginGroupsClientBeginDeleteOptions added in v0.3.0

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

AFDOriginGroupsClientBeginDeleteOptions contains the optional parameters for the AFDOriginGroupsClient.BeginDelete method.

type AFDOriginGroupsClientBeginUpdateOptions added in v0.3.0

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

AFDOriginGroupsClientBeginUpdateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginUpdate method.

type AFDOriginGroupsClientCreateResponse added in v0.3.0

type AFDOriginGroupsClientCreateResponse struct {
	AFDOriginGroup
}

AFDOriginGroupsClientCreateResponse contains the response from method AFDOriginGroupsClient.BeginCreate.

type AFDOriginGroupsClientDeleteResponse added in v0.3.0

type AFDOriginGroupsClientDeleteResponse struct {
}

AFDOriginGroupsClientDeleteResponse contains the response from method AFDOriginGroupsClient.BeginDelete.

type AFDOriginGroupsClientGetOptions added in v0.3.0

type AFDOriginGroupsClientGetOptions struct {
}

AFDOriginGroupsClientGetOptions contains the optional parameters for the AFDOriginGroupsClient.Get method.

type AFDOriginGroupsClientGetResponse added in v0.3.0

type AFDOriginGroupsClientGetResponse struct {
	AFDOriginGroup
}

AFDOriginGroupsClientGetResponse contains the response from method AFDOriginGroupsClient.Get.

type AFDOriginGroupsClientListByProfileOptions added in v0.3.0

type AFDOriginGroupsClientListByProfileOptions struct {
}

AFDOriginGroupsClientListByProfileOptions contains the optional parameters for the AFDOriginGroupsClient.NewListByProfilePager method.

type AFDOriginGroupsClientListByProfileResponse added in v0.3.0

type AFDOriginGroupsClientListByProfileResponse struct {
	AFDOriginGroupListResult
}

AFDOriginGroupsClientListByProfileResponse contains the response from method AFDOriginGroupsClient.NewListByProfilePager.

type AFDOriginGroupsClientListResourceUsageOptions added in v0.3.0

type AFDOriginGroupsClientListResourceUsageOptions struct {
}

AFDOriginGroupsClientListResourceUsageOptions contains the optional parameters for the AFDOriginGroupsClient.NewListResourceUsagePager method.

type AFDOriginGroupsClientListResourceUsageResponse added in v0.3.0

type AFDOriginGroupsClientListResourceUsageResponse struct {
	UsagesListResult
}

AFDOriginGroupsClientListResourceUsageResponse contains the response from method AFDOriginGroupsClient.NewListResourceUsagePager.

type AFDOriginGroupsClientUpdateResponse added in v0.3.0

type AFDOriginGroupsClientUpdateResponse struct {
	AFDOriginGroup
}

AFDOriginGroupsClientUpdateResponse contains the response from method AFDOriginGroupsClient.BeginUpdate.

type AFDOriginListResult

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

	// READ-ONLY; List of CDN origins within an endpoint
	Value []*AFDOrigin
}

AFDOriginListResult - Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results.

func (AFDOriginListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginListResult.

func (*AFDOriginListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginListResult.

type AFDOriginProperties

type AFDOriginProperties struct {
	// Resource reference to the Azure origin resource.
	AzureOrigin *ResourceReference

	// 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 *EnabledState

	// Whether to enable certificate name check at origin level
	EnforceCertificateNameCheck *bool

	// The value of the HTTP port. Must be between 1 and 65535.
	HTTPPort *int32

	// The value of the HTTPS port. Must be between 1 and 65535.
	HTTPSPort *int32

	// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across
	// all origins in an endpoint.
	HostName *string

	// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this
	// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services
	// require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint
	OriginHostHeader *string

	// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any
	// lower priority origin is healthy.Must be between 1 and 5
	Priority *int32

	// The properties of the private link resource for private origin.
	SharedPrivateLinkResource *SharedPrivateLinkResourceProperties

	// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
	Weight *int32

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; The name of the origin group which contains this origin.
	OriginGroupName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

AFDOriginProperties - The JSON object that contains the properties of the origin.

func (AFDOriginProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginProperties.

func (*AFDOriginProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginProperties.

type AFDOriginUpdateParameters

type AFDOriginUpdateParameters struct {
	// The JSON object that contains the properties of the origin.
	Properties *AFDOriginUpdatePropertiesParameters
}

AFDOriginUpdateParameters - AFDOrigin properties needed for origin update.

func (AFDOriginUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginUpdateParameters.

func (*AFDOriginUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginUpdateParameters.

type AFDOriginUpdatePropertiesParameters

type AFDOriginUpdatePropertiesParameters struct {
	// Resource reference to the Azure origin resource.
	AzureOrigin *ResourceReference

	// 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 *EnabledState

	// Whether to enable certificate name check at origin level
	EnforceCertificateNameCheck *bool

	// The value of the HTTP port. Must be between 1 and 65535.
	HTTPPort *int32

	// The value of the HTTPS port. Must be between 1 and 65535.
	HTTPSPort *int32

	// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across
	// all origins in an endpoint.
	HostName *string

	// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this
	// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services
	// require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint
	OriginHostHeader *string

	// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any
	// lower priority origin is healthy.Must be between 1 and 5
	Priority *int32

	// The properties of the private link resource for private origin.
	SharedPrivateLinkResource *SharedPrivateLinkResourceProperties

	// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
	Weight *int32

	// READ-ONLY; The name of the origin group which contains this origin.
	OriginGroupName *string
}

AFDOriginUpdatePropertiesParameters - The JSON object that contains the properties of the origin.

func (AFDOriginUpdatePropertiesParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginUpdatePropertiesParameters.

func (*AFDOriginUpdatePropertiesParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginUpdatePropertiesParameters.

type AFDOriginsClient

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

AFDOriginsClient contains the methods for the AFDOrigins group. Don't use this type directly, use NewAFDOriginsClient() instead.

func NewAFDOriginsClient

func NewAFDOriginsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDOriginsClient, error)

NewAFDOriginsClient creates a new instance of AFDOriginsClient with the specified values.

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

func (*AFDOriginsClient) BeginCreate

func (client *AFDOriginsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, origin AFDOrigin, options *AFDOriginsClientBeginCreateOptions) (*runtime.Poller[AFDOriginsClientCreateResponse], error)

BeginCreate - Creates a new origin within the specified origin 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the profile.
  • originName - Name of the origin that is unique within the profile.
  • origin - Origin properties
  • options - AFDOriginsClientBeginCreateOptions contains the optional parameters for the AFDOriginsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDOriginsClient().BeginCreate(ctx, "RG", "profile1", "origingroup1", "origin1", armcdn.AFDOrigin{
		Properties: &armcdn.AFDOriginProperties{
			EnabledState:     to.Ptr(armcdn.EnabledStateEnabled),
			HostName:         to.Ptr("host1.blob.core.windows.net"),
			HTTPPort:         to.Ptr[int32](80),
			HTTPSPort:        to.Ptr[int32](443),
			OriginHostHeader: to.Ptr("host1.foo.com"),
		},
	}, 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.AFDOrigin = armcdn.AFDOrigin{
	// 	Name: to.Ptr("origin1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/origingroups/origins"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1/origins/origin1"),
	// 	Properties: &armcdn.AFDOriginProperties{
	// 		EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 		EnforceCertificateNameCheck: to.Ptr(true),
	// 		HostName: to.Ptr("host1.blob.core.windows.net"),
	// 		HTTPPort: to.Ptr[int32](80),
	// 		HTTPSPort: to.Ptr[int32](443),
	// 		OriginGroupName: to.Ptr("origingroup1"),
	// 		OriginHostHeader: to.Ptr("host1.foo.com"),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AFDOriginsClient) BeginDelete

func (client *AFDOriginsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, options *AFDOriginsClientBeginDeleteOptions) (*runtime.Poller[AFDOriginsClientDeleteResponse], error)

BeginDelete - Deletes an existing origin within an origin 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the profile.
  • originName - Name of the origin which is unique within the profile.
  • options - AFDOriginsClientBeginDeleteOptions contains the optional parameters for the AFDOriginsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDOriginsClient().BeginDelete(ctx, "RG", "profile1", "origingroup1", "origin1", 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 (*AFDOriginsClient) BeginUpdate

func (client *AFDOriginsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, originUpdateProperties AFDOriginUpdateParameters, options *AFDOriginsClientBeginUpdateOptions) (*runtime.Poller[AFDOriginsClientUpdateResponse], error)

BeginUpdate - Updates an existing origin within an origin 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the profile.
  • originName - Name of the origin which is unique within the profile.
  • originUpdateProperties - Origin properties
  • options - AFDOriginsClientBeginUpdateOptions contains the optional parameters for the AFDOriginsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAFDOriginsClient().BeginUpdate(ctx, "RG", "profile1", "origingroup1", "origin1", armcdn.AFDOriginUpdateParameters{
		Properties: &armcdn.AFDOriginUpdatePropertiesParameters{
			EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
			HostName:     to.Ptr("host1.blob.core.windows.net"),
			HTTPPort:     to.Ptr[int32](80),
			HTTPSPort:    to.Ptr[int32](443),
		},
	}, 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.AFDOrigin = armcdn.AFDOrigin{
	// 	Name: to.Ptr("origin1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/origingroups/origins"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1/origins/origin1"),
	// 	Properties: &armcdn.AFDOriginProperties{
	// 		EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 		EnforceCertificateNameCheck: to.Ptr(true),
	// 		HostName: to.Ptr("host1.blob.core.windows.net"),
	// 		HTTPPort: to.Ptr[int32](80),
	// 		HTTPSPort: to.Ptr[int32](443),
	// 		OriginGroupName: to.Ptr("origingroup1"),
	// 		OriginHostHeader: to.Ptr("host1.foo.com"),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AFDOriginsClient) Get

func (client *AFDOriginsClient) Get(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, options *AFDOriginsClientGetOptions) (AFDOriginsClientGetResponse, error)

Get - Gets an existing origin within an origin 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the profile.
  • originName - Name of the origin which is unique within the profile.
  • options - AFDOriginsClientGetOptions contains the optional parameters for the AFDOriginsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAFDOriginsClient().Get(ctx, "RG", "profile1", "origingroup1", "origin1", 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.AFDOrigin = armcdn.AFDOrigin{
	// 	Name: to.Ptr("origin1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/origingroups/origins"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1/origins/origin1"),
	// 	Properties: &armcdn.AFDOriginProperties{
	// 		EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 		EnforceCertificateNameCheck: to.Ptr(true),
	// 		HostName: to.Ptr("host1.blob.core.windows.net"),
	// 		HTTPPort: to.Ptr[int32](80),
	// 		HTTPSPort: to.Ptr[int32](443),
	// 		OriginGroupName: to.Ptr("origingroup1"),
	// 		OriginHostHeader: to.Ptr("host1.foo.com"),
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AFDOriginsClient) NewListByOriginGroupPager added in v0.5.0

func (client *AFDOriginsClient) NewListByOriginGroupPager(resourceGroupName string, profileName string, originGroupName string, options *AFDOriginsClientListByOriginGroupOptions) *runtime.Pager[AFDOriginsClientListByOriginGroupResponse]

NewListByOriginGroupPager - Lists all of the existing origins within an origin group.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • originGroupName - Name of the origin group which is unique within the profile.
  • options - AFDOriginsClientListByOriginGroupOptions contains the optional parameters for the AFDOriginsClient.NewListByOriginGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_ListByOriginGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAFDOriginsClient().NewListByOriginGroupPager("RG", "profile1", "origingroup1", 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.AFDOriginListResult = armcdn.AFDOriginListResult{
		// 	Value: []*armcdn.AFDOrigin{
		// 		{
		// 			Name: to.Ptr("origin1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/origingroups/origins"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/origingroups/origingroup1/origins/origin1"),
		// 			Properties: &armcdn.AFDOriginProperties{
		// 				EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
		// 				EnforceCertificateNameCheck: to.Ptr(true),
		// 				HostName: to.Ptr("host1.blob.core.windows.net"),
		// 				HTTPPort: to.Ptr[int32](80),
		// 				HTTPSPort: to.Ptr[int32](443),
		// 				OriginGroupName: to.Ptr("origingroup1"),
		// 				OriginHostHeader: to.Ptr("host1.foo.com"),
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AFDOriginsClientBeginCreateOptions added in v0.3.0

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

AFDOriginsClientBeginCreateOptions contains the optional parameters for the AFDOriginsClient.BeginCreate method.

type AFDOriginsClientBeginDeleteOptions added in v0.3.0

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

AFDOriginsClientBeginDeleteOptions contains the optional parameters for the AFDOriginsClient.BeginDelete method.

type AFDOriginsClientBeginUpdateOptions added in v0.3.0

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

AFDOriginsClientBeginUpdateOptions contains the optional parameters for the AFDOriginsClient.BeginUpdate method.

type AFDOriginsClientCreateResponse added in v0.3.0

type AFDOriginsClientCreateResponse struct {
	AFDOrigin
}

AFDOriginsClientCreateResponse contains the response from method AFDOriginsClient.BeginCreate.

type AFDOriginsClientDeleteResponse added in v0.3.0

type AFDOriginsClientDeleteResponse struct {
}

AFDOriginsClientDeleteResponse contains the response from method AFDOriginsClient.BeginDelete.

type AFDOriginsClientGetOptions added in v0.3.0

type AFDOriginsClientGetOptions struct {
}

AFDOriginsClientGetOptions contains the optional parameters for the AFDOriginsClient.Get method.

type AFDOriginsClientGetResponse added in v0.3.0

type AFDOriginsClientGetResponse struct {
	AFDOrigin
}

AFDOriginsClientGetResponse contains the response from method AFDOriginsClient.Get.

type AFDOriginsClientListByOriginGroupOptions added in v0.3.0

type AFDOriginsClientListByOriginGroupOptions struct {
}

AFDOriginsClientListByOriginGroupOptions contains the optional parameters for the AFDOriginsClient.NewListByOriginGroupPager method.

type AFDOriginsClientListByOriginGroupResponse added in v0.3.0

type AFDOriginsClientListByOriginGroupResponse struct {
	AFDOriginListResult
}

AFDOriginsClientListByOriginGroupResponse contains the response from method AFDOriginsClient.NewListByOriginGroupPager.

type AFDOriginsClientUpdateResponse added in v0.3.0

type AFDOriginsClientUpdateResponse struct {
	AFDOrigin
}

AFDOriginsClientUpdateResponse contains the response from method AFDOriginsClient.BeginUpdate.

type AFDProfilesClient

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

AFDProfilesClient contains the methods for the AFDProfiles group. Don't use this type directly, use NewAFDProfilesClient() instead.

func NewAFDProfilesClient

func NewAFDProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDProfilesClient, error)

NewAFDProfilesClient creates a new instance of AFDProfilesClient with the specified values.

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

func (*AFDProfilesClient) CheckHostNameAvailability

func (client *AFDProfilesClient) CheckHostNameAvailability(ctx context.Context, resourceGroupName string, profileName string, checkHostNameAvailabilityInput CheckHostNameAvailabilityInput, options *AFDProfilesClientCheckHostNameAvailabilityOptions) (AFDProfilesClientCheckHostNameAvailabilityResponse, error)

CheckHostNameAvailability - Check the name availability of a host name. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • checkHostNameAvailabilityInput - Custom domain to be validated.
  • options - AFDProfilesClientCheckHostNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckHostNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDProfiles_CheckHostNameAvailability.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAFDProfilesClient().CheckHostNameAvailability(ctx, "RG", "profile1", armcdn.CheckHostNameAvailabilityInput{
		HostName: to.Ptr("www.someDomain.net"),
	}, 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 = armcdn.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("The hostname 'www.someDomain.net' is already owned by another profile."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Conflict"),
	// }
}
Output:

func (*AFDProfilesClient) NewListResourceUsagePager added in v0.5.0

func (client *AFDProfilesClient) NewListResourceUsagePager(resourceGroupName string, profileName string, options *AFDProfilesClientListResourceUsageOptions) *runtime.Pager[AFDProfilesClientListResourceUsageResponse]

NewListResourceUsagePager - Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • options - AFDProfilesClientListResourceUsageOptions contains the optional parameters for the AFDProfilesClient.NewListResourceUsagePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDProfiles_ListResourceUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAFDProfilesClient().NewListResourceUsagePager("RG", "profile1", 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.UsagesListResult = armcdn.UsagesListResult{
		// 	Value: []*armcdn.Usage{
		// 		{
		// 			Name: &armcdn.UsageName{
		// 				LocalizedValue: to.Ptr("afdendpoint"),
		// 				Value: to.Ptr("afdendpoint"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1"),
		// 			Limit: to.Ptr[int64](25),
		// 			Unit: to.Ptr(armcdn.UsageUnitCount),
		// 	}},
		// }
	}
}
Output:

type AFDProfilesClientCheckHostNameAvailabilityOptions added in v0.3.0

type AFDProfilesClientCheckHostNameAvailabilityOptions struct {
}

AFDProfilesClientCheckHostNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckHostNameAvailability method.

type AFDProfilesClientCheckHostNameAvailabilityResponse added in v0.3.0

type AFDProfilesClientCheckHostNameAvailabilityResponse struct {
	CheckNameAvailabilityOutput
}

AFDProfilesClientCheckHostNameAvailabilityResponse contains the response from method AFDProfilesClient.CheckHostNameAvailability.

type AFDProfilesClientListResourceUsageOptions added in v0.3.0

type AFDProfilesClientListResourceUsageOptions struct {
}

AFDProfilesClientListResourceUsageOptions contains the optional parameters for the AFDProfilesClient.NewListResourceUsagePager method.

type AFDProfilesClientListResourceUsageResponse added in v0.3.0

type AFDProfilesClientListResourceUsageResponse struct {
	UsagesListResult
}

AFDProfilesClientListResourceUsageResponse contains the response from method AFDProfilesClient.NewListResourceUsagePager.

type AFDStateProperties

type AFDStateProperties struct {
	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

AFDStateProperties - The tracking states for afd resources.

func (AFDStateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDStateProperties.

func (*AFDStateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AFDStateProperties.

type ActionType

type ActionType string

ActionType - Defines the action to take on rule match.

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

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type ActivatedResourceReference added in v0.3.0

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

	// READ-ONLY; Whether the resource is active or inactive
	IsActive *bool
}

ActivatedResourceReference - Reference to another resource along with its state.

func (ActivatedResourceReference) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ActivatedResourceReference.

func (*ActivatedResourceReference) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ActivatedResourceReference.

type AfdCertificateType

type AfdCertificateType string

AfdCertificateType - Defines the source of the SSL certificate.

const (
	AfdCertificateTypeAzureFirstPartyManagedCertificate AfdCertificateType = "AzureFirstPartyManagedCertificate"
	AfdCertificateTypeCustomerCertificate               AfdCertificateType = "CustomerCertificate"
	AfdCertificateTypeManagedCertificate                AfdCertificateType = "ManagedCertificate"
)

func PossibleAfdCertificateTypeValues

func PossibleAfdCertificateTypeValues() []AfdCertificateType

PossibleAfdCertificateTypeValues returns the possible values for the AfdCertificateType const type.

type AfdErrorResponse

type AfdErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

AfdErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (AfdErrorResponse) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AfdErrorResponse.

func (*AfdErrorResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AfdErrorResponse.

type AfdMinimumTLSVersion

type AfdMinimumTLSVersion string

AfdMinimumTLSVersion - TLS protocol version that will be used for Https

const (
	AfdMinimumTLSVersionTLS10 AfdMinimumTLSVersion = "TLS10"
	AfdMinimumTLSVersionTLS12 AfdMinimumTLSVersion = "TLS12"
)

func PossibleAfdMinimumTLSVersionValues

func PossibleAfdMinimumTLSVersionValues() []AfdMinimumTLSVersion

PossibleAfdMinimumTLSVersionValues returns the possible values for the AfdMinimumTLSVersion const type.

type AfdProvisioningState

type AfdProvisioningState string

AfdProvisioningState - Provisioning status

const (
	AfdProvisioningStateCreating  AfdProvisioningState = "Creating"
	AfdProvisioningStateDeleting  AfdProvisioningState = "Deleting"
	AfdProvisioningStateFailed    AfdProvisioningState = "Failed"
	AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded"
	AfdProvisioningStateUpdating  AfdProvisioningState = "Updating"
)

func PossibleAfdProvisioningStateValues

func PossibleAfdProvisioningStateValues() []AfdProvisioningState

PossibleAfdProvisioningStateValues returns the possible values for the AfdProvisioningState const type.

type AfdPurgeParameters

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

	// List of domains.
	Domains []*string
}

AfdPurgeParameters - Parameters required for content purge.

func (AfdPurgeParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AfdPurgeParameters.

func (*AfdPurgeParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AfdPurgeParameters.

type AfdQueryStringCachingBehavior

type AfdQueryStringCachingBehavior string

AfdQueryStringCachingBehavior - Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.

const (
	AfdQueryStringCachingBehaviorIgnoreQueryString            AfdQueryStringCachingBehavior = "IgnoreQueryString"
	AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings  AfdQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings"
	AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings"
	AfdQueryStringCachingBehaviorUseQueryString               AfdQueryStringCachingBehavior = "UseQueryString"
)

func PossibleAfdQueryStringCachingBehaviorValues

func PossibleAfdQueryStringCachingBehaviorValues() []AfdQueryStringCachingBehavior

PossibleAfdQueryStringCachingBehaviorValues returns the possible values for the AfdQueryStringCachingBehavior const type.

type AfdRouteCacheConfiguration added in v0.3.0

type AfdRouteCacheConfiguration struct {
	// compression settings.
	CompressionSettings *CompressionSettings

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

	// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore
	// specific query strings, cache every request with a unique URL, or cache specific
	// query strings.
	QueryStringCachingBehavior *AfdQueryStringCachingBehavior
}

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

func (AfdRouteCacheConfiguration) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AfdRouteCacheConfiguration.

func (*AfdRouteCacheConfiguration) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AfdRouteCacheConfiguration.

type Algorithm

type Algorithm string

Algorithm - Algorithm to use for URL signing

const (
	AlgorithmSHA256 Algorithm = "SHA256"
)

func PossibleAlgorithmValues

func PossibleAlgorithmValues() []Algorithm

PossibleAlgorithmValues returns the possible values for the Algorithm const type.

type AutoGeneratedDomainNameLabelScope added in v0.4.0

type AutoGeneratedDomainNameLabelScope string

AutoGeneratedDomainNameLabelScope - Indicates the endpoint name reuse scope. The default value is TenantReuse.

const (
	AutoGeneratedDomainNameLabelScopeNoReuse            AutoGeneratedDomainNameLabelScope = "NoReuse"
	AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse"
	AutoGeneratedDomainNameLabelScopeSubscriptionReuse  AutoGeneratedDomainNameLabelScope = "SubscriptionReuse"
	AutoGeneratedDomainNameLabelScopeTenantReuse        AutoGeneratedDomainNameLabelScope = "TenantReuse"
)

func PossibleAutoGeneratedDomainNameLabelScopeValues added in v0.4.0

func PossibleAutoGeneratedDomainNameLabelScopeValues() []AutoGeneratedDomainNameLabelScope

PossibleAutoGeneratedDomainNameLabelScopeValues returns the possible values for the AutoGeneratedDomainNameLabelScope const type.

type AzureFirstPartyManagedCertificate added in v0.4.0

type AzureFirstPartyManagedCertificate struct {
	// The type of the secret resource.
	Type *SecretType

	// READ-ONLY; Certificate expiration date.
	ExpirationDate *string

	// READ-ONLY; Subject name in the certificate.
	Subject *string
}

AzureFirstPartyManagedCertificate - Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS.

func (AzureFirstPartyManagedCertificate) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AzureFirstPartyManagedCertificate.

func (*AzureFirstPartyManagedCertificate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirstPartyManagedCertificate.

type AzureFirstPartyManagedCertificateParameters added in v0.3.0

type AzureFirstPartyManagedCertificateParameters struct {
	// REQUIRED; The type of the secret resource.
	Type *SecretType
}

AzureFirstPartyManagedCertificateParameters - Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS.

func (*AzureFirstPartyManagedCertificateParameters) GetSecretParameters added in v0.3.0

GetSecretParameters implements the SecretParametersClassification interface for type AzureFirstPartyManagedCertificateParameters.

func (AzureFirstPartyManagedCertificateParameters) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type AzureFirstPartyManagedCertificateParameters.

func (*AzureFirstPartyManagedCertificateParameters) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirstPartyManagedCertificateParameters.

type CacheBehavior

type CacheBehavior string

CacheBehavior - Caching behavior for the requests

const (
	CacheBehaviorBypassCache  CacheBehavior = "BypassCache"
	CacheBehaviorOverride     CacheBehavior = "Override"
	CacheBehaviorSetIfMissing CacheBehavior = "SetIfMissing"
)

func PossibleCacheBehaviorValues

func PossibleCacheBehaviorValues() []CacheBehavior

PossibleCacheBehaviorValues returns the possible values for the CacheBehavior const type.

type CacheConfiguration added in v0.3.0

type CacheConfiguration struct {
	// Caching behavior for the requests
	CacheBehavior *RuleCacheBehavior

	// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
	CacheDuration *string

	// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user
	// requests for a compressed version. Content won't be compressed on
	// AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
	IsCompressionEnabled *RuleIsCompressionEnabled

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

	// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore
	// specific query strings, cache every request with a unique URL, or cache specific
	// query strings.
	QueryStringCachingBehavior *RuleQueryStringCachingBehavior
}

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

func (CacheConfiguration) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CacheConfiguration.

func (*CacheConfiguration) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheConfiguration.

type CacheExpirationActionParameters

type CacheExpirationActionParameters struct {
	// REQUIRED; Caching behavior for the requests
	CacheBehavior *CacheBehavior

	// REQUIRED; The level at which the content needs to be cached.
	CacheType *CacheType

	// REQUIRED
	TypeName *CacheExpirationActionParametersTypeName

	// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
	CacheDuration *string
}

CacheExpirationActionParameters - Defines the parameters for the cache expiration action.

func (CacheExpirationActionParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CacheExpirationActionParameters.

func (*CacheExpirationActionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheExpirationActionParameters.

type CacheExpirationActionParametersTypeName added in v0.3.0

type CacheExpirationActionParametersTypeName string
const (
	CacheExpirationActionParametersTypeNameDeliveryRuleCacheExpirationActionParameters CacheExpirationActionParametersTypeName = "DeliveryRuleCacheExpirationActionParameters"
)

func PossibleCacheExpirationActionParametersTypeNameValues added in v0.3.0

func PossibleCacheExpirationActionParametersTypeNameValues() []CacheExpirationActionParametersTypeName

PossibleCacheExpirationActionParametersTypeNameValues returns the possible values for the CacheExpirationActionParametersTypeName const type.

type CacheKeyQueryStringActionParameters

type CacheKeyQueryStringActionParameters struct {
	// REQUIRED; Caching behavior for the requests
	QueryStringBehavior *QueryStringBehavior

	// REQUIRED
	TypeName *CacheKeyQueryStringActionParametersTypeName

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

CacheKeyQueryStringActionParameters - Defines the parameters for the cache-key query string action.

func (CacheKeyQueryStringActionParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CacheKeyQueryStringActionParameters.

func (*CacheKeyQueryStringActionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheKeyQueryStringActionParameters.

type CacheKeyQueryStringActionParametersTypeName added in v0.3.0

type CacheKeyQueryStringActionParametersTypeName string
const (
	CacheKeyQueryStringActionParametersTypeNameDeliveryRuleCacheKeyQueryStringBehaviorActionParameters CacheKeyQueryStringActionParametersTypeName = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"
)

func PossibleCacheKeyQueryStringActionParametersTypeNameValues added in v0.3.0

func PossibleCacheKeyQueryStringActionParametersTypeNameValues() []CacheKeyQueryStringActionParametersTypeName

PossibleCacheKeyQueryStringActionParametersTypeNameValues returns the possible values for the CacheKeyQueryStringActionParametersTypeName const type.

type CacheType

type CacheType string

CacheType - The level at which the content needs to be cached.

const (
	CacheTypeAll CacheType = "All"
)

func PossibleCacheTypeValues

func PossibleCacheTypeValues() []CacheType

PossibleCacheTypeValues returns the possible values for the CacheType const type.

type CdnCertificateSourceParametersTypeName added in v0.3.0

type CdnCertificateSourceParametersTypeName string
const (
	CdnCertificateSourceParametersTypeNameCdnCertificateSourceParameters CdnCertificateSourceParametersTypeName = "CdnCertificateSourceParameters"
)

func PossibleCdnCertificateSourceParametersTypeNameValues added in v0.3.0

func PossibleCdnCertificateSourceParametersTypeNameValues() []CdnCertificateSourceParametersTypeName

PossibleCdnCertificateSourceParametersTypeNameValues returns the possible values for the CdnCertificateSourceParametersTypeName const type.

type Certificate

type Certificate struct {
	// The type of the secret resource.
	Type *SecretType

	// READ-ONLY; Certificate expiration date.
	ExpirationDate *string

	// READ-ONLY; Subject name in the certificate.
	Subject *string
}

Certificate used for https

func (Certificate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Certificate.

func (*Certificate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Certificate.

type CertificateSource

type CertificateSource string

CertificateSource - Defines the source of the SSL certificate.

const (
	CertificateSourceAzureKeyVault CertificateSource = "AzureKeyVault"
	CertificateSourceCdn           CertificateSource = "Cdn"
)

func PossibleCertificateSourceValues

func PossibleCertificateSourceValues() []CertificateSource

PossibleCertificateSourceValues returns the possible values for the CertificateSource const type.

type CertificateSourceParameters added in v0.3.0

type CertificateSourceParameters struct {
	// REQUIRED; Type of certificate used
	CertificateType *CertificateType

	// REQUIRED
	TypeName *CdnCertificateSourceParametersTypeName
}

CertificateSourceParameters - Defines the parameters for using CDN managed certificate for securing custom domain.

func (CertificateSourceParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CertificateSourceParameters.

func (*CertificateSourceParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateSourceParameters.

type CertificateType

type CertificateType string

CertificateType - Type of certificate used

const (
	CertificateTypeDedicated CertificateType = "Dedicated"
	CertificateTypeShared    CertificateType = "Shared"
)

func PossibleCertificateTypeValues

func PossibleCertificateTypeValues() []CertificateType

PossibleCertificateTypeValues returns the possible values for the CertificateType const type.

type CheckEndpointNameAvailabilityInput added in v0.4.0

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

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

	// Indicates the endpoint name reuse scope. The default value is TenantReuse.
	AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope
}

CheckEndpointNameAvailabilityInput - Input of CheckNameAvailability API.

func (CheckEndpointNameAvailabilityInput) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckEndpointNameAvailabilityInput.

func (*CheckEndpointNameAvailabilityInput) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckEndpointNameAvailabilityInput.

type CheckEndpointNameAvailabilityOutput added in v0.4.0

type CheckEndpointNameAvailabilityOutput struct {
	// READ-ONLY; Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available,
	// otherwise it returns empty string
	AvailableHostname *string

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

	// READ-ONLY; Indicates whether the name is available.
	NameAvailable *bool

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

CheckEndpointNameAvailabilityOutput - Output of check name availability API.

func (CheckEndpointNameAvailabilityOutput) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckEndpointNameAvailabilityOutput.

func (*CheckEndpointNameAvailabilityOutput) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckEndpointNameAvailabilityOutput.

type CheckHostNameAvailabilityInput added in v0.3.0

type CheckHostNameAvailabilityInput struct {
	// REQUIRED; The host name to validate.
	HostName *string
}

CheckHostNameAvailabilityInput - Input of CheckHostNameAvailability API.

func (CheckHostNameAvailabilityInput) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckHostNameAvailabilityInput.

func (*CheckHostNameAvailabilityInput) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckHostNameAvailabilityInput.

type CheckNameAvailabilityInput

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

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

CheckNameAvailabilityInput - Input of CheckNameAvailability API.

func (CheckNameAvailabilityInput) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityInput.

func (*CheckNameAvailabilityInput) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityInput.

type CheckNameAvailabilityOutput

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

	// READ-ONLY; Indicates whether the name is available.
	NameAvailable *bool

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

CheckNameAvailabilityOutput - Output of check name availability API.

func (CheckNameAvailabilityOutput) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityOutput.

func (*CheckNameAvailabilityOutput) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityOutput.

type CidrIPAddress

type CidrIPAddress struct {
	// Ip address itself.
	BaseIPAddress *string

	// The length of the prefix of the ip address.
	PrefixLength *int32
}

CidrIPAddress - CIDR Ip address

func (CidrIPAddress) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CidrIPAddress.

func (*CidrIPAddress) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CidrIPAddress.

type ClientFactory added in v1.1.0

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

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

func NewClientFactory added in v1.1.0

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

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

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

func (*ClientFactory) NewAFDCustomDomainsClient added in v1.1.0

func (c *ClientFactory) NewAFDCustomDomainsClient() *AFDCustomDomainsClient

func (*ClientFactory) NewAFDEndpointsClient added in v1.1.0

func (c *ClientFactory) NewAFDEndpointsClient() *AFDEndpointsClient

func (*ClientFactory) NewAFDOriginGroupsClient added in v1.1.0

func (c *ClientFactory) NewAFDOriginGroupsClient() *AFDOriginGroupsClient

func (*ClientFactory) NewAFDOriginsClient added in v1.1.0

func (c *ClientFactory) NewAFDOriginsClient() *AFDOriginsClient

func (*ClientFactory) NewAFDProfilesClient added in v1.1.0

func (c *ClientFactory) NewAFDProfilesClient() *AFDProfilesClient

func (*ClientFactory) NewCustomDomainsClient added in v1.1.0

func (c *ClientFactory) NewCustomDomainsClient() *CustomDomainsClient

func (*ClientFactory) NewEdgeNodesClient added in v1.1.0

func (c *ClientFactory) NewEdgeNodesClient() *EdgeNodesClient

func (*ClientFactory) NewEndpointsClient added in v1.1.0

func (c *ClientFactory) NewEndpointsClient() *EndpointsClient

func (*ClientFactory) NewLogAnalyticsClient added in v1.1.0

func (c *ClientFactory) NewLogAnalyticsClient() *LogAnalyticsClient

func (*ClientFactory) NewManagedRuleSetsClient added in v1.1.0

func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient

func (*ClientFactory) NewManagementClient added in v1.1.0

func (c *ClientFactory) NewManagementClient() *ManagementClient

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

func (*ClientFactory) NewOriginGroupsClient added in v1.1.0

func (c *ClientFactory) NewOriginGroupsClient() *OriginGroupsClient

func (*ClientFactory) NewOriginsClient added in v1.1.0

func (c *ClientFactory) NewOriginsClient() *OriginsClient

func (*ClientFactory) NewPoliciesClient added in v1.1.0

func (c *ClientFactory) NewPoliciesClient() *PoliciesClient

func (*ClientFactory) NewProfilesClient added in v1.1.0

func (c *ClientFactory) NewProfilesClient() *ProfilesClient

func (*ClientFactory) NewResourceUsageClient added in v1.1.0

func (c *ClientFactory) NewResourceUsageClient() *ResourceUsageClient

func (*ClientFactory) NewRoutesClient added in v1.1.0

func (c *ClientFactory) NewRoutesClient() *RoutesClient

func (*ClientFactory) NewRuleSetsClient added in v1.1.0

func (c *ClientFactory) NewRuleSetsClient() *RuleSetsClient

func (*ClientFactory) NewRulesClient added in v1.1.0

func (c *ClientFactory) NewRulesClient() *RulesClient

func (*ClientFactory) NewSecretsClient added in v1.1.0

func (c *ClientFactory) NewSecretsClient() *SecretsClient

func (*ClientFactory) NewSecurityPoliciesClient added in v1.1.0

func (c *ClientFactory) NewSecurityPoliciesClient() *SecurityPoliciesClient

func (*ClientFactory) NewValidateClient added in v1.1.0

func (c *ClientFactory) NewValidateClient() *ValidateClient

type ClientPortMatchConditionParameters added in v0.3.0

type ClientPortMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *ClientPortOperator

	// REQUIRED
	TypeName *ClientPortMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

ClientPortMatchConditionParameters - Defines the parameters for ClientPort match conditions

func (ClientPortMatchConditionParameters) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ClientPortMatchConditionParameters.

func (*ClientPortMatchConditionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientPortMatchConditionParameters.

type ClientPortMatchConditionParametersTypeName added in v0.3.0

type ClientPortMatchConditionParametersTypeName string
const (
	ClientPortMatchConditionParametersTypeNameDeliveryRuleClientPortConditionParameters ClientPortMatchConditionParametersTypeName = "DeliveryRuleClientPortConditionParameters"
)

func PossibleClientPortMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleClientPortMatchConditionParametersTypeNameValues() []ClientPortMatchConditionParametersTypeName

PossibleClientPortMatchConditionParametersTypeNameValues returns the possible values for the ClientPortMatchConditionParametersTypeName const type.

type ClientPortOperator added in v0.3.0

type ClientPortOperator string

ClientPortOperator - Describes operator to be matched

const (
	ClientPortOperatorAny                ClientPortOperator = "Any"
	ClientPortOperatorBeginsWith         ClientPortOperator = "BeginsWith"
	ClientPortOperatorContains           ClientPortOperator = "Contains"
	ClientPortOperatorEndsWith           ClientPortOperator = "EndsWith"
	ClientPortOperatorEqual              ClientPortOperator = "Equal"
	ClientPortOperatorGreaterThan        ClientPortOperator = "GreaterThan"
	ClientPortOperatorGreaterThanOrEqual ClientPortOperator = "GreaterThanOrEqual"
	ClientPortOperatorLessThan           ClientPortOperator = "LessThan"
	ClientPortOperatorLessThanOrEqual    ClientPortOperator = "LessThanOrEqual"
	ClientPortOperatorRegEx              ClientPortOperator = "RegEx"
)

func PossibleClientPortOperatorValues added in v0.3.0

func PossibleClientPortOperatorValues() []ClientPortOperator

PossibleClientPortOperatorValues returns the possible values for the ClientPortOperator const type.

type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems

type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems struct {
	DateTime *time.Time
	Value    *float32
}

func (Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.

func (*Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.

type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems

type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems struct {
	DateTime *time.Time
	Value    *float32
}

func (Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.

func (*Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.

type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems

type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems struct {
	Metric     *string
	Percentage *float64
	Value      *int64
}

func (ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.

func (*ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.

type CompressionSettings

type CompressionSettings struct {
	// List of content types on which compression applies. The value should be a valid MIME type.
	ContentTypesToCompress []*string

	// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled,
	// content will be served as compressed if user requests for a compressed version.
	// Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
	IsCompressionEnabled *bool
}

CompressionSettings - settings for compression.

func (CompressionSettings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CompressionSettings.

func (*CompressionSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CompressionSettings.

type ContinentsResponse

type ContinentsResponse struct {
	Continents       []*ContinentsResponseContinentsItem
	CountryOrRegions []*ContinentsResponseCountryOrRegionsItem
}

ContinentsResponse - Continents Response

func (ContinentsResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContinentsResponse.

func (*ContinentsResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponse.

type ContinentsResponseContinentsItem

type ContinentsResponseContinentsItem struct {
	ID *string
}

func (ContinentsResponseContinentsItem) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ContinentsResponseContinentsItem.

func (*ContinentsResponseContinentsItem) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponseContinentsItem.

type ContinentsResponseCountryOrRegionsItem

type ContinentsResponseCountryOrRegionsItem struct {
	ContinentID *string
	ID          *string
}

func (ContinentsResponseCountryOrRegionsItem) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ContinentsResponseCountryOrRegionsItem.

func (*ContinentsResponseCountryOrRegionsItem) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponseCountryOrRegionsItem.

type CookiesMatchConditionParameters

type CookiesMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *CookiesOperator

	// REQUIRED
	TypeName *CookiesMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// Name of Cookies to be matched
	Selector *string

	// List of transforms
	Transforms []*Transform
}

CookiesMatchConditionParameters - Defines the parameters for Cookies match conditions

func (CookiesMatchConditionParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CookiesMatchConditionParameters.

func (*CookiesMatchConditionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CookiesMatchConditionParameters.

type CookiesMatchConditionParametersTypeName added in v0.3.0

type CookiesMatchConditionParametersTypeName string
const (
	CookiesMatchConditionParametersTypeNameDeliveryRuleCookiesConditionParameters CookiesMatchConditionParametersTypeName = "DeliveryRuleCookiesConditionParameters"
)

func PossibleCookiesMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleCookiesMatchConditionParametersTypeNameValues() []CookiesMatchConditionParametersTypeName

PossibleCookiesMatchConditionParametersTypeNameValues returns the possible values for the CookiesMatchConditionParametersTypeName const type.

type CookiesOperator

type CookiesOperator string

CookiesOperator - Describes operator to be matched

const (
	CookiesOperatorAny                CookiesOperator = "Any"
	CookiesOperatorBeginsWith         CookiesOperator = "BeginsWith"
	CookiesOperatorContains           CookiesOperator = "Contains"
	CookiesOperatorEndsWith           CookiesOperator = "EndsWith"
	CookiesOperatorEqual              CookiesOperator = "Equal"
	CookiesOperatorGreaterThan        CookiesOperator = "GreaterThan"
	CookiesOperatorGreaterThanOrEqual CookiesOperator = "GreaterThanOrEqual"
	CookiesOperatorLessThan           CookiesOperator = "LessThan"
	CookiesOperatorLessThanOrEqual    CookiesOperator = "LessThanOrEqual"
	CookiesOperatorRegEx              CookiesOperator = "RegEx"
)

func PossibleCookiesOperatorValues

func PossibleCookiesOperatorValues() []CookiesOperator

PossibleCookiesOperatorValues returns the possible values for the CookiesOperator const type.

type CustomDomain

type CustomDomain struct {
	// The JSON object that contains the properties of the custom domain to create.
	Properties *CustomDomainProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

CustomDomain - Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com.

func (CustomDomain) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomDomain.

func (*CustomDomain) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain.

type CustomDomainHTTPSParameters

type CustomDomainHTTPSParameters struct {
	// REQUIRED; Defines the source of the SSL certificate.
	CertificateSource *CertificateSource

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

	// TLS protocol version that will be used for Https
	MinimumTLSVersion *MinimumTLSVersion
}

CustomDomainHTTPSParameters - The JSON object that contains the properties to secure a custom domain.

func (*CustomDomainHTTPSParameters) GetCustomDomainHTTPSParameters

func (c *CustomDomainHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters

GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type CustomDomainHTTPSParameters.

func (CustomDomainHTTPSParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainHTTPSParameters.

func (*CustomDomainHTTPSParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainHTTPSParameters.

type CustomDomainHTTPSParametersClassification

type CustomDomainHTTPSParametersClassification interface {
	// GetCustomDomainHTTPSParameters returns the CustomDomainHTTPSParameters content of the underlying type.
	GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters
}

CustomDomainHTTPSParametersClassification provides polymorphic access to related types. Call the interface's GetCustomDomainHTTPSParameters() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *CustomDomainHTTPSParameters, *ManagedHTTPSParameters, *UserManagedHTTPSParameters

type CustomDomainListResult

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

	// READ-ONLY; List of CDN CustomDomains within an endpoint.
	Value []*CustomDomain
}

CustomDomainListResult - Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next set of results.

func (CustomDomainListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainListResult.

func (*CustomDomainListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainListResult.

type CustomDomainParameters

type CustomDomainParameters struct {
	// The JSON object that contains the properties of the custom domain to create.
	Properties *CustomDomainPropertiesParameters
}

CustomDomainParameters - The customDomain JSON object required for custom domain creation or update.

func (CustomDomainParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainParameters.

func (*CustomDomainParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainParameters.

type CustomDomainProperties

type CustomDomainProperties struct {
	// REQUIRED; The host name of the custom domain. Must be a domain name.
	HostName *string

	// Certificate parameters for securing custom HTTPS
	CustomHTTPSParameters CustomDomainHTTPSParametersClassification

	// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP
	// license number of a custom domain is required to deliver content in China.
	ValidationData *string

	// READ-ONLY; Provisioning status of the custom domain.
	CustomHTTPSProvisioningState *CustomHTTPSProvisioningState

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

	// READ-ONLY; Provisioning status of Custom Https of the custom domain.
	ProvisioningState *CustomHTTPSProvisioningState

	// READ-ONLY; Resource status of the custom domain.
	ResourceState *CustomDomainResourceState
}

CustomDomainProperties - The JSON object that contains the properties of the custom domain to create.

func (CustomDomainProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties.

func (*CustomDomainProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties.

type CustomDomainPropertiesParameters

type CustomDomainPropertiesParameters struct {
	// REQUIRED; The host name of the custom domain. Must be a domain name.
	HostName *string
}

CustomDomainPropertiesParameters - The JSON object that contains the properties of the custom domain to create.

func (CustomDomainPropertiesParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainPropertiesParameters.

func (*CustomDomainPropertiesParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainPropertiesParameters.

type CustomDomainResourceState

type CustomDomainResourceState string

CustomDomainResourceState - Resource status of the custom domain.

const (
	CustomDomainResourceStateActive   CustomDomainResourceState = "Active"
	CustomDomainResourceStateCreating CustomDomainResourceState = "Creating"
	CustomDomainResourceStateDeleting CustomDomainResourceState = "Deleting"
)

func PossibleCustomDomainResourceStateValues

func PossibleCustomDomainResourceStateValues() []CustomDomainResourceState

PossibleCustomDomainResourceStateValues returns the possible values for the CustomDomainResourceState const type.

type CustomDomainsClient

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

CustomDomainsClient contains the methods for the CustomDomains group. Don't use this type directly, use NewCustomDomainsClient() instead.

func NewCustomDomainsClient

func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error)

NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values.

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

func (*CustomDomainsClient) BeginCreate

func (client *CustomDomainsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, options *CustomDomainsClientBeginCreateOptions) (*runtime.Poller[CustomDomainsClientCreateResponse], error)

BeginCreate - Creates a new custom domain within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • customDomainName - Name of the custom domain within an endpoint.
  • customDomainProperties - Properties required to create a new custom domain.
  • options - CustomDomainsClientBeginCreateOptions contains the optional parameters for the CustomDomainsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginCreate(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", armcdn.CustomDomainParameters{
		Properties: &armcdn.CustomDomainPropertiesParameters{
			HostName: to.Ptr("www.someDomain.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.CustomDomain = armcdn.CustomDomain{
	// 	Name: to.Ptr("www-someDomain-net"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/customdomains"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net"),
	// 	Properties: &armcdn.CustomDomainProperties{
	// 		CustomHTTPSProvisioningState: to.Ptr(armcdn.CustomHTTPSProvisioningStateEnabling),
	// 		CustomHTTPSProvisioningSubstate: to.Ptr(armcdn.CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval),
	// 		HostName: to.Ptr("www.someDomain.net"),
	// 		ProvisioningState: to.Ptr(armcdn.CustomHTTPSProvisioningState("Succeeded")),
	// 		ResourceState: to.Ptr(armcdn.CustomDomainResourceStateActive),
	// 	},
	// }
}
Output:

func (*CustomDomainsClient) BeginDelete

func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error)

BeginDelete - Deletes an existing custom domain within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • customDomainName - Name of the custom domain within an endpoint.
  • options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginDelete(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", 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 (*CustomDomainsClient) DisableCustomHTTPS added in v0.3.0

func (client *CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientDisableCustomHTTPSOptions) (CustomDomainsClientDisableCustomHTTPSResponse, error)

DisableCustomHTTPS - Disable https delivery of the custom domain. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • customDomainName - Name of the custom domain within an endpoint.
  • options - CustomDomainsClientDisableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.DisableCustomHTTPS method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_DisableCustomHttps.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewCustomDomainsClient().DisableCustomHTTPS(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*CustomDomainsClient) EnableCustomHTTPS added in v0.3.0

func (client *CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientEnableCustomHTTPSOptions) (CustomDomainsClientEnableCustomHTTPSResponse, error)

EnableCustomHTTPS - Enable https delivery of the custom domain. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • customDomainName - Name of the custom domain within an endpoint.
  • options - CustomDomainsClientEnableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.EnableCustomHTTPS method.
Example (CustomDomainsEnableCustomHttpsUsingCdnManagedCertificate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewCustomDomainsClient().EnableCustomHTTPS(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", &armcdn.CustomDomainsClientEnableCustomHTTPSOptions{CustomDomainHTTPSParameters: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (CustomDomainsEnableCustomHttpsUsingYourOwnCertificate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewCustomDomainsClient().EnableCustomHTTPS(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", &armcdn.CustomDomainsClientEnableCustomHTTPSOptions{CustomDomainHTTPSParameters: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*CustomDomainsClient) Get

func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error)

Get - Gets an existing custom domain within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • customDomainName - Name of the custom domain within an endpoint.
  • options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomDomainsClient().Get(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", 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.CustomDomain = armcdn.CustomDomain{
	// 	Name: to.Ptr("www-someDomain-net"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/customdomains"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net"),
	// 	Properties: &armcdn.CustomDomainProperties{
	// 		CustomHTTPSProvisioningState: to.Ptr(armcdn.CustomHTTPSProvisioningStateDisabled),
	// 		CustomHTTPSProvisioningSubstate: to.Ptr(armcdn.CustomHTTPSProvisioningSubstate("None")),
	// 		HostName: to.Ptr("www.someDomain.net"),
	// 		ProvisioningState: to.Ptr(armcdn.CustomHTTPSProvisioningState("Succeeded")),
	// 		ResourceState: to.Ptr(armcdn.CustomDomainResourceStateActive),
	// 	},
	// }
}
Output:

func (*CustomDomainsClient) NewListByEndpointPager added in v0.5.0

func (client *CustomDomainsClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *CustomDomainsClientListByEndpointOptions) *runtime.Pager[CustomDomainsClientListByEndpointResponse]

NewListByEndpointPager - Lists all of the existing custom domains within an endpoint.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - CustomDomainsClientListByEndpointOptions contains the optional parameters for the CustomDomainsClient.NewListByEndpointPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_ListByEndpoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomDomainsClient().NewListByEndpointPager("RG", "profile1", "endpoint1", 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.CustomDomainListResult = armcdn.CustomDomainListResult{
		// 	Value: []*armcdn.CustomDomain{
		// 		{
		// 			Name: to.Ptr("www-someDomain-net"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/customdomains"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customdomains/www-someDomain-net"),
		// 			Properties: &armcdn.CustomDomainProperties{
		// 				CustomHTTPSProvisioningState: to.Ptr(armcdn.CustomHTTPSProvisioningStateDisabled),
		// 				CustomHTTPSProvisioningSubstate: to.Ptr(armcdn.CustomHTTPSProvisioningSubstate("None")),
		// 				HostName: to.Ptr("www.someDomain.net"),
		// 				ProvisioningState: to.Ptr(armcdn.CustomHTTPSProvisioningState("Succeeded")),
		// 				ResourceState: to.Ptr(armcdn.CustomDomainResourceStateActive),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CustomDomainsClientBeginCreateOptions added in v0.3.0

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

CustomDomainsClientBeginCreateOptions contains the optional parameters for the CustomDomainsClient.BeginCreate method.

type CustomDomainsClientBeginDeleteOptions added in v0.3.0

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

CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method.

type CustomDomainsClientCreateResponse added in v0.3.0

type CustomDomainsClientCreateResponse struct {
	CustomDomain
}

CustomDomainsClientCreateResponse contains the response from method CustomDomainsClient.BeginCreate.

type CustomDomainsClientDeleteResponse added in v0.3.0

type CustomDomainsClientDeleteResponse struct {
	CustomDomain
}

CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete.

type CustomDomainsClientDisableCustomHTTPSOptions added in v0.3.0

type CustomDomainsClientDisableCustomHTTPSOptions struct {
}

CustomDomainsClientDisableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.DisableCustomHTTPS method.

type CustomDomainsClientDisableCustomHTTPSResponse added in v0.3.0

type CustomDomainsClientDisableCustomHTTPSResponse struct {
	CustomDomain
}

CustomDomainsClientDisableCustomHTTPSResponse contains the response from method CustomDomainsClient.DisableCustomHTTPS.

type CustomDomainsClientEnableCustomHTTPSOptions added in v0.3.0

type CustomDomainsClientEnableCustomHTTPSOptions struct {
	// The configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate or user's own certificate.
	// If not specified, enabling ssl uses CDN managed certificate by
	// default.
	CustomDomainHTTPSParameters CustomDomainHTTPSParametersClassification
}

CustomDomainsClientEnableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.EnableCustomHTTPS method.

type CustomDomainsClientEnableCustomHTTPSResponse added in v0.3.0

type CustomDomainsClientEnableCustomHTTPSResponse struct {
	CustomDomain
}

CustomDomainsClientEnableCustomHTTPSResponse contains the response from method CustomDomainsClient.EnableCustomHTTPS.

type CustomDomainsClientGetOptions added in v0.3.0

type CustomDomainsClientGetOptions struct {
}

CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method.

type CustomDomainsClientGetResponse added in v0.3.0

type CustomDomainsClientGetResponse struct {
	CustomDomain
}

CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get.

type CustomDomainsClientListByEndpointOptions added in v0.3.0

type CustomDomainsClientListByEndpointOptions struct {
}

CustomDomainsClientListByEndpointOptions contains the optional parameters for the CustomDomainsClient.NewListByEndpointPager method.

type CustomDomainsClientListByEndpointResponse added in v0.3.0

type CustomDomainsClientListByEndpointResponse struct {
	CustomDomainListResult
}

CustomDomainsClientListByEndpointResponse contains the response from method CustomDomainsClient.NewListByEndpointPager.

type CustomHTTPSProvisioningState

type CustomHTTPSProvisioningState string

CustomHTTPSProvisioningState - Provisioning status of the custom domain.

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; Defines the name of the custom rule
	Name *string

	// REQUIRED; Defines in what order this rule be evaluated in the overall list of custom rules
	Priority *int32

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

CustomRule - Defines the common attributes for a custom rule that can be included in a waf policy

func (CustomRule) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomRule.

func (*CustomRule) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomRule.

type CustomRuleEnabledState

type CustomRuleEnabledState string

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

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

func PossibleCustomRuleEnabledStateValues

func PossibleCustomRuleEnabledStateValues() []CustomRuleEnabledState

PossibleCustomRuleEnabledStateValues returns the possible values for the CustomRuleEnabledState const type.

type CustomRuleList

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

CustomRuleList - Defines contents of custom rules

func (CustomRuleList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomRuleList.

func (*CustomRuleList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomRuleList.

type CustomerCertificate

type CustomerCertificate struct {
	// Resource reference to the Azure Key Vault certificate. Expected to be in format of
	// /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
	SecretSource *ResourceReference

	// Certificate version.
	SecretVersion *string

	// The list of SANs.
	SubjectAlternativeNames []*string

	// The type of the secret resource.
	Type *SecretType

	// Whether to use the latest version for the certificate
	UseLatestVersion *bool

	// READ-ONLY; Certificate issuing authority.
	CertificateAuthority *string

	// READ-ONLY; Certificate expiration date.
	ExpirationDate *string

	// READ-ONLY; Subject name in the certificate.
	Subject *string

	// READ-ONLY; Certificate thumbprint.
	Thumbprint *string
}

CustomerCertificate - Customer Certificate used for https

func (CustomerCertificate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomerCertificate.

func (*CustomerCertificate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomerCertificate.

type CustomerCertificateParameters

type CustomerCertificateParameters struct {
	// REQUIRED; Resource reference to the Azure Key Vault certificate. Expected to be in format of
	// /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
	SecretSource *ResourceReference

	// REQUIRED; The type of the secret resource.
	Type *SecretType

	// Version of the secret to be used
	SecretVersion *string

	// The list of SANs.
	SubjectAlternativeNames []*string

	// Whether to use the latest version for the certificate
	UseLatestVersion *bool

	// READ-ONLY; Certificate issuing authority.
	CertificateAuthority *string

	// READ-ONLY; Certificate expiration date.
	ExpirationDate *string

	// READ-ONLY; Subject name in the certificate.
	Subject *string

	// READ-ONLY; Certificate thumbprint.
	Thumbprint *string
}

CustomerCertificateParameters - Customer Certificate used for https

func (*CustomerCertificateParameters) GetSecretParameters added in v0.3.0

func (c *CustomerCertificateParameters) GetSecretParameters() *SecretParameters

GetSecretParameters implements the SecretParametersClassification interface for type CustomerCertificateParameters.

func (CustomerCertificateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomerCertificateParameters.

func (*CustomerCertificateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomerCertificateParameters.

type DeepCreatedOrigin

type DeepCreatedOrigin struct {
	// REQUIRED; Origin name which must be unique within the endpoint.
	Name *string

	// Properties of the origin created on the CDN endpoint.
	Properties *DeepCreatedOriginProperties
}

DeepCreatedOrigin - The main origin of CDN content which is added when creating a CDN endpoint.

func (DeepCreatedOrigin) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DeepCreatedOrigin.

func (*DeepCreatedOrigin) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOrigin.

type DeepCreatedOriginGroup

type DeepCreatedOriginGroup struct {
	// REQUIRED; Origin group name which must be unique within the endpoint.
	Name *string

	// Properties of the origin group created on the CDN endpoint.
	Properties *DeepCreatedOriginGroupProperties
}

DeepCreatedOriginGroup - The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the origin group based on origin health.

func (DeepCreatedOriginGroup) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginGroup.

func (*DeepCreatedOriginGroup) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginGroup.

type DeepCreatedOriginGroupProperties

type DeepCreatedOriginGroupProperties struct {
	// REQUIRED; The source of the content being delivered via CDN within given origin group.
	Origins []*ResourceReference

	// Health probe settings to the origin that is used to determine the health of the origin.
	HealthProbeSettings *HealthProbeParameters

	// The JSON object that contains the properties to determine origin health using real requests/responses.This property is
	// currently not supported.
	ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters

	// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint
	// is added. Default is 10 mins. This property is currently not supported.
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32
}

DeepCreatedOriginGroupProperties - Properties of the origin group created on the CDN endpoint.

func (DeepCreatedOriginGroupProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginGroupProperties.

func (*DeepCreatedOriginGroupProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginGroupProperties.

type DeepCreatedOriginProperties

type DeepCreatedOriginProperties struct {
	// REQUIRED; The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across
	// all origins in an endpoint.
	HostName *string

	// Origin is enabled for load balancing or not. By default, origin is always enabled.
	Enabled *bool

	// The value of the HTTP port. Must be between 1 and 65535.
	HTTPPort *int32

	// The value of the HTTPS port. Must be between 1 and 65535.
	HTTPSPort *int32

	// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this
	// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services
	// require this host header value to match the origin hostname by default.
	OriginHostHeader *string

	// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any
	// lower priority origin is healthy.Must be between 1 and 5.
	Priority *int32

	// The Alias of the Private Link resource. Populating this optional field indicates that this origin 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 the origin in given origin group for load balancing. Must be between 1 and 1000
	Weight *int32

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

DeepCreatedOriginProperties - Properties of the origin created on the CDN endpoint.

func (DeepCreatedOriginProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginProperties.

func (*DeepCreatedOriginProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginProperties.

type DeleteRule

type DeleteRule string

DeleteRule - Describes the action that shall be taken when the certificate is removed from Key Vault.

const (
	DeleteRuleNoAction DeleteRule = "NoAction"
)

func PossibleDeleteRuleValues

func PossibleDeleteRuleValues() []DeleteRule

PossibleDeleteRuleValues returns the possible values for the DeleteRule const type.

type DeliveryRule

type DeliveryRule struct {
	// REQUIRED; A list of actions that are executed when all the conditions of a rule are satisfied.
	Actions []DeliveryRuleActionAutoGeneratedClassification

	// REQUIRED; The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser
	// order will be applied before a rule with a greater order. Rule with order 0 is a special
	// rule. It does not require any condition and actions listed in it will always be applied.
	Order *int32

	// A list of conditions that must be matched for the actions to be executed
	Conditions []DeliveryRuleConditionClassification

	// Name of the rule
	Name *string
}

DeliveryRule - A rule that specifies a set of actions and conditions

func (DeliveryRule) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRule.

func (*DeliveryRule) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRule.

type DeliveryRuleAction

type DeliveryRuleAction string

DeliveryRuleAction - The name of the action for the delivery rule.

const (
	DeliveryRuleActionCacheExpiration            DeliveryRuleAction = "CacheExpiration"
	DeliveryRuleActionCacheKeyQueryString        DeliveryRuleAction = "CacheKeyQueryString"
	DeliveryRuleActionModifyRequestHeader        DeliveryRuleAction = "ModifyRequestHeader"
	DeliveryRuleActionModifyResponseHeader       DeliveryRuleAction = "ModifyResponseHeader"
	DeliveryRuleActionOriginGroupOverride        DeliveryRuleAction = "OriginGroupOverride"
	DeliveryRuleActionRouteConfigurationOverride DeliveryRuleAction = "RouteConfigurationOverride"
	DeliveryRuleActionURLRedirect                DeliveryRuleAction = "UrlRedirect"
	DeliveryRuleActionURLRewrite                 DeliveryRuleAction = "UrlRewrite"
	DeliveryRuleActionURLSigning                 DeliveryRuleAction = "UrlSigning"
)

func PossibleDeliveryRuleActionValues

func PossibleDeliveryRuleActionValues() []DeliveryRuleAction

PossibleDeliveryRuleActionValues returns the possible values for the DeliveryRuleAction const type.

type DeliveryRuleActionAutoGenerated

type DeliveryRuleActionAutoGenerated struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction
}

DeliveryRuleActionAutoGenerated - An action for the delivery rule.

func (*DeliveryRuleActionAutoGenerated) GetDeliveryRuleActionAutoGenerated

func (d *DeliveryRuleActionAutoGenerated) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleActionAutoGenerated.

func (DeliveryRuleActionAutoGenerated) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleActionAutoGenerated.

func (*DeliveryRuleActionAutoGenerated) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleActionAutoGenerated.

type DeliveryRuleActionAutoGeneratedClassification

type DeliveryRuleActionAutoGeneratedClassification interface {
	// GetDeliveryRuleActionAutoGenerated returns the DeliveryRuleActionAutoGenerated content of the underlying type.
	GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated
}

DeliveryRuleActionAutoGeneratedClassification provides polymorphic access to related types. Call the interface's GetDeliveryRuleActionAutoGenerated() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DeliveryRuleActionAutoGenerated, *DeliveryRuleCacheExpirationAction, *DeliveryRuleCacheKeyQueryStringAction, *DeliveryRuleRequestHeaderAction, - *DeliveryRuleResponseHeaderAction, *DeliveryRuleRouteConfigurationOverrideAction, *OriginGroupOverrideAction, *URLRedirectAction, - *URLRewriteAction, *URLSigningAction

type DeliveryRuleCacheExpirationAction

type DeliveryRuleCacheExpirationAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *CacheExpirationActionParameters
}

DeliveryRuleCacheExpirationAction - Defines the cache expiration action for the delivery rule.

func (*DeliveryRuleCacheExpirationAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (d *DeliveryRuleCacheExpirationAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleCacheExpirationAction.

func (DeliveryRuleCacheExpirationAction) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCacheExpirationAction.

func (*DeliveryRuleCacheExpirationAction) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCacheExpirationAction.

type DeliveryRuleCacheKeyQueryStringAction

type DeliveryRuleCacheKeyQueryStringAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *CacheKeyQueryStringActionParameters
}

DeliveryRuleCacheKeyQueryStringAction - Defines the cache-key query string action for the delivery rule.

func (*DeliveryRuleCacheKeyQueryStringAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (d *DeliveryRuleCacheKeyQueryStringAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleCacheKeyQueryStringAction.

func (DeliveryRuleCacheKeyQueryStringAction) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCacheKeyQueryStringAction.

func (*DeliveryRuleCacheKeyQueryStringAction) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCacheKeyQueryStringAction.

type DeliveryRuleClientPortCondition added in v0.3.0

type DeliveryRuleClientPortCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *ClientPortMatchConditionParameters
}

DeliveryRuleClientPortCondition - Defines the ClientPort condition for the delivery rule.

func (*DeliveryRuleClientPortCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleClientPortCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleClientPortCondition.

func (DeliveryRuleClientPortCondition) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleClientPortCondition.

func (*DeliveryRuleClientPortCondition) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleClientPortCondition.

type DeliveryRuleCondition

type DeliveryRuleCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable
}

DeliveryRuleCondition - A condition for the delivery rule.

func (*DeliveryRuleCondition) GetDeliveryRuleCondition

func (d *DeliveryRuleCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleCondition.

func (DeliveryRuleCondition) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCondition.

func (*DeliveryRuleCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCondition.

type DeliveryRuleConditionClassification

type DeliveryRuleConditionClassification interface {
	// GetDeliveryRuleCondition returns the DeliveryRuleCondition content of the underlying type.
	GetDeliveryRuleCondition() *DeliveryRuleCondition
}

DeliveryRuleConditionClassification provides polymorphic access to related types. Call the interface's GetDeliveryRuleCondition() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DeliveryRuleClientPortCondition, *DeliveryRuleCondition, *DeliveryRuleCookiesCondition, *DeliveryRuleHTTPVersionCondition, - *DeliveryRuleHostNameCondition, *DeliveryRuleIsDeviceCondition, *DeliveryRulePostArgsCondition, *DeliveryRuleQueryStringCondition, - *DeliveryRuleRemoteAddressCondition, *DeliveryRuleRequestBodyCondition, *DeliveryRuleRequestHeaderCondition, *DeliveryRuleRequestMethodCondition, - *DeliveryRuleRequestSchemeCondition, *DeliveryRuleRequestURICondition, *DeliveryRuleSSLProtocolCondition, *DeliveryRuleServerPortCondition, - *DeliveryRuleSocketAddrCondition, *DeliveryRuleURLFileExtensionCondition, *DeliveryRuleURLFileNameCondition, *DeliveryRuleURLPathCondition

type DeliveryRuleCookiesCondition

type DeliveryRuleCookiesCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *CookiesMatchConditionParameters
}

DeliveryRuleCookiesCondition - Defines the Cookies condition for the delivery rule.

func (*DeliveryRuleCookiesCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleCookiesCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleCookiesCondition.

func (DeliveryRuleCookiesCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCookiesCondition.

func (*DeliveryRuleCookiesCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCookiesCondition.

type DeliveryRuleHTTPVersionCondition

type DeliveryRuleHTTPVersionCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *HTTPVersionMatchConditionParameters
}

DeliveryRuleHTTPVersionCondition - Defines the HttpVersion condition for the delivery rule.

func (*DeliveryRuleHTTPVersionCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleHTTPVersionCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleHTTPVersionCondition.

func (DeliveryRuleHTTPVersionCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleHTTPVersionCondition.

func (*DeliveryRuleHTTPVersionCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleHTTPVersionCondition.

type DeliveryRuleHostNameCondition added in v0.3.0

type DeliveryRuleHostNameCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *HostNameMatchConditionParameters
}

DeliveryRuleHostNameCondition - Defines the HostName condition for the delivery rule.

func (*DeliveryRuleHostNameCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleHostNameCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleHostNameCondition.

func (DeliveryRuleHostNameCondition) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleHostNameCondition.

func (*DeliveryRuleHostNameCondition) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleHostNameCondition.

type DeliveryRuleIsDeviceCondition

type DeliveryRuleIsDeviceCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *IsDeviceMatchConditionParameters
}

DeliveryRuleIsDeviceCondition - Defines the IsDevice condition for the delivery rule.

func (*DeliveryRuleIsDeviceCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleIsDeviceCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleIsDeviceCondition.

func (DeliveryRuleIsDeviceCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleIsDeviceCondition.

func (*DeliveryRuleIsDeviceCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleIsDeviceCondition.

type DeliveryRulePostArgsCondition

type DeliveryRulePostArgsCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *PostArgsMatchConditionParameters
}

DeliveryRulePostArgsCondition - Defines the PostArgs condition for the delivery rule.

func (*DeliveryRulePostArgsCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRulePostArgsCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRulePostArgsCondition.

func (DeliveryRulePostArgsCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRulePostArgsCondition.

func (*DeliveryRulePostArgsCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRulePostArgsCondition.

type DeliveryRuleQueryStringCondition

type DeliveryRuleQueryStringCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *QueryStringMatchConditionParameters
}

DeliveryRuleQueryStringCondition - Defines the QueryString condition for the delivery rule.

func (*DeliveryRuleQueryStringCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleQueryStringCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleQueryStringCondition.

func (DeliveryRuleQueryStringCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleQueryStringCondition.

func (*DeliveryRuleQueryStringCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleQueryStringCondition.

type DeliveryRuleRemoteAddressCondition

type DeliveryRuleRemoteAddressCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *RemoteAddressMatchConditionParameters
}

DeliveryRuleRemoteAddressCondition - Defines the RemoteAddress condition for the delivery rule.

func (*DeliveryRuleRemoteAddressCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleRemoteAddressCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRemoteAddressCondition.

func (DeliveryRuleRemoteAddressCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRemoteAddressCondition.

func (*DeliveryRuleRemoteAddressCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRemoteAddressCondition.

type DeliveryRuleRequestBodyCondition

type DeliveryRuleRequestBodyCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *RequestBodyMatchConditionParameters
}

DeliveryRuleRequestBodyCondition - Defines the RequestBody condition for the delivery rule.

func (*DeliveryRuleRequestBodyCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleRequestBodyCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestBodyCondition.

func (DeliveryRuleRequestBodyCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestBodyCondition.

func (*DeliveryRuleRequestBodyCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestBodyCondition.

type DeliveryRuleRequestHeaderAction

type DeliveryRuleRequestHeaderAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *HeaderActionParameters
}

DeliveryRuleRequestHeaderAction - Defines the request header action for the delivery rule.

func (*DeliveryRuleRequestHeaderAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (d *DeliveryRuleRequestHeaderAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleRequestHeaderAction.

func (DeliveryRuleRequestHeaderAction) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestHeaderAction.

func (*DeliveryRuleRequestHeaderAction) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestHeaderAction.

type DeliveryRuleRequestHeaderCondition

type DeliveryRuleRequestHeaderCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *RequestHeaderMatchConditionParameters
}

DeliveryRuleRequestHeaderCondition - Defines the RequestHeader condition for the delivery rule.

func (*DeliveryRuleRequestHeaderCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleRequestHeaderCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestHeaderCondition.

func (DeliveryRuleRequestHeaderCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestHeaderCondition.

func (*DeliveryRuleRequestHeaderCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestHeaderCondition.

type DeliveryRuleRequestMethodCondition

type DeliveryRuleRequestMethodCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *RequestMethodMatchConditionParameters
}

DeliveryRuleRequestMethodCondition - Defines the RequestMethod condition for the delivery rule.

func (*DeliveryRuleRequestMethodCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleRequestMethodCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestMethodCondition.

func (DeliveryRuleRequestMethodCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestMethodCondition.

func (*DeliveryRuleRequestMethodCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestMethodCondition.

type DeliveryRuleRequestSchemeCondition

type DeliveryRuleRequestSchemeCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *RequestSchemeMatchConditionParameters
}

DeliveryRuleRequestSchemeCondition - Defines the RequestScheme condition for the delivery rule.

func (*DeliveryRuleRequestSchemeCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleRequestSchemeCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestSchemeCondition.

func (DeliveryRuleRequestSchemeCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestSchemeCondition.

func (*DeliveryRuleRequestSchemeCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestSchemeCondition.

type DeliveryRuleRequestURICondition

type DeliveryRuleRequestURICondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *RequestURIMatchConditionParameters
}

DeliveryRuleRequestURICondition - Defines the RequestUri condition for the delivery rule.

func (*DeliveryRuleRequestURICondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleRequestURICondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestURICondition.

func (DeliveryRuleRequestURICondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestURICondition.

func (*DeliveryRuleRequestURICondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestURICondition.

type DeliveryRuleResponseHeaderAction

type DeliveryRuleResponseHeaderAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *HeaderActionParameters
}

DeliveryRuleResponseHeaderAction - Defines the response header action for the delivery rule.

func (*DeliveryRuleResponseHeaderAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (d *DeliveryRuleResponseHeaderAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleResponseHeaderAction.

func (DeliveryRuleResponseHeaderAction) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleResponseHeaderAction.

func (*DeliveryRuleResponseHeaderAction) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleResponseHeaderAction.

type DeliveryRuleRouteConfigurationOverrideAction added in v0.3.0

type DeliveryRuleRouteConfigurationOverrideAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *RouteConfigurationOverrideActionParameters
}

DeliveryRuleRouteConfigurationOverrideAction - Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles.

func (*DeliveryRuleRouteConfigurationOverrideAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (d *DeliveryRuleRouteConfigurationOverrideAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleRouteConfigurationOverrideAction.

func (DeliveryRuleRouteConfigurationOverrideAction) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRouteConfigurationOverrideAction.

func (*DeliveryRuleRouteConfigurationOverrideAction) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRouteConfigurationOverrideAction.

type DeliveryRuleSSLProtocolCondition added in v0.3.0

type DeliveryRuleSSLProtocolCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *SSLProtocolMatchConditionParameters
}

DeliveryRuleSSLProtocolCondition - Defines the SslProtocol condition for the delivery rule.

func (*DeliveryRuleSSLProtocolCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleSSLProtocolCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleSSLProtocolCondition.

func (DeliveryRuleSSLProtocolCondition) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleSSLProtocolCondition.

func (*DeliveryRuleSSLProtocolCondition) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleSSLProtocolCondition.

type DeliveryRuleServerPortCondition added in v0.3.0

type DeliveryRuleServerPortCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *ServerPortMatchConditionParameters
}

DeliveryRuleServerPortCondition - Defines the ServerPort condition for the delivery rule.

func (*DeliveryRuleServerPortCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleServerPortCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleServerPortCondition.

func (DeliveryRuleServerPortCondition) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleServerPortCondition.

func (*DeliveryRuleServerPortCondition) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleServerPortCondition.

type DeliveryRuleSocketAddrCondition added in v0.3.0

type DeliveryRuleSocketAddrCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *SocketAddrMatchConditionParameters
}

DeliveryRuleSocketAddrCondition - Defines the SocketAddress condition for the delivery rule.

func (*DeliveryRuleSocketAddrCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleSocketAddrCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleSocketAddrCondition.

func (DeliveryRuleSocketAddrCondition) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleSocketAddrCondition.

func (*DeliveryRuleSocketAddrCondition) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleSocketAddrCondition.

type DeliveryRuleURLFileExtensionCondition

type DeliveryRuleURLFileExtensionCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *URLFileExtensionMatchConditionParameters
}

DeliveryRuleURLFileExtensionCondition - Defines the UrlFileExtension condition for the delivery rule.

func (*DeliveryRuleURLFileExtensionCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleURLFileExtensionCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLFileExtensionCondition.

func (DeliveryRuleURLFileExtensionCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLFileExtensionCondition.

func (*DeliveryRuleURLFileExtensionCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLFileExtensionCondition.

type DeliveryRuleURLFileNameCondition

type DeliveryRuleURLFileNameCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *URLFileNameMatchConditionParameters
}

DeliveryRuleURLFileNameCondition - Defines the UrlFileName condition for the delivery rule.

func (*DeliveryRuleURLFileNameCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleURLFileNameCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLFileNameCondition.

func (DeliveryRuleURLFileNameCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLFileNameCondition.

func (*DeliveryRuleURLFileNameCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLFileNameCondition.

type DeliveryRuleURLPathCondition

type DeliveryRuleURLPathCondition struct {
	// REQUIRED; The name of the condition for the delivery rule.
	Name *MatchVariable

	// REQUIRED; Defines the parameters for the condition.
	Parameters *URLPathMatchConditionParameters
}

DeliveryRuleURLPathCondition - Defines the UrlPath condition for the delivery rule.

func (*DeliveryRuleURLPathCondition) GetDeliveryRuleCondition added in v0.3.0

func (d *DeliveryRuleURLPathCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition

GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLPathCondition.

func (DeliveryRuleURLPathCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLPathCondition.

func (*DeliveryRuleURLPathCondition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLPathCondition.

type DeploymentStatus

type DeploymentStatus string
const (
	DeploymentStatusFailed     DeploymentStatus = "Failed"
	DeploymentStatusInProgress DeploymentStatus = "InProgress"
	DeploymentStatusNotStarted DeploymentStatus = "NotStarted"
	DeploymentStatusSucceeded  DeploymentStatus = "Succeeded"
)

func PossibleDeploymentStatusValues

func PossibleDeploymentStatusValues() []DeploymentStatus

PossibleDeploymentStatusValues returns the possible values for the DeploymentStatus const type.

type DestinationProtocol

type DestinationProtocol string

DestinationProtocol - Protocol to use for the redirect. The default value is MatchRequest

const (
	DestinationProtocolHTTP         DestinationProtocol = "Http"
	DestinationProtocolHTTPS        DestinationProtocol = "Https"
	DestinationProtocolMatchRequest DestinationProtocol = "MatchRequest"
)

func PossibleDestinationProtocolValues

func PossibleDestinationProtocolValues() []DestinationProtocol

PossibleDestinationProtocolValues returns the possible values for the DestinationProtocol const type.

type DimensionProperties added in v0.3.0

type DimensionProperties struct {
	// Display name of dimension.
	DisplayName *string

	// Internal name of dimension.
	InternalName *string

	// Name of dimension.
	Name *string
}

DimensionProperties - Type of operation: get, read, delete, etc.

func (DimensionProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DimensionProperties.

func (*DimensionProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DimensionProperties.

type DomainValidationProperties

type DomainValidationProperties struct {
	// READ-ONLY; The date time that the token expires
	ExpirationDate *string

	// READ-ONLY; Challenge used for DNS TXT record or file based validation
	ValidationToken *string
}

DomainValidationProperties - The JSON object that contains the properties to validate a domain.

func (DomainValidationProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DomainValidationProperties.

func (*DomainValidationProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DomainValidationProperties.

type DomainValidationState

type DomainValidationState string

DomainValidationState - Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation.

const (
	DomainValidationStateApproved                  DomainValidationState = "Approved"
	DomainValidationStateInternalError             DomainValidationState = "InternalError"
	DomainValidationStatePending                   DomainValidationState = "Pending"
	DomainValidationStatePendingRevalidation       DomainValidationState = "PendingRevalidation"
	DomainValidationStateRefreshingValidationToken DomainValidationState = "RefreshingValidationToken"
	DomainValidationStateRejected                  DomainValidationState = "Rejected"
	DomainValidationStateSubmitting                DomainValidationState = "Submitting"
	DomainValidationStateTimedOut                  DomainValidationState = "TimedOut"
	DomainValidationStateUnknown                   DomainValidationState = "Unknown"
)

func PossibleDomainValidationStateValues

func PossibleDomainValidationStateValues() []DomainValidationState

PossibleDomainValidationStateValues returns the possible values for the DomainValidationState const type.

type EdgeNode

type EdgeNode struct {
	// The JSON object that contains the properties required to create an edgenode.
	Properties *EdgeNodeProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

EdgeNode - Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users.

func (EdgeNode) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EdgeNode.

func (*EdgeNode) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EdgeNode.

type EdgeNodeProperties

type EdgeNodeProperties struct {
	// REQUIRED; List of ip address groups.
	IPAddressGroups []*IPAddressGroup
}

EdgeNodeProperties - The JSON object that contains the properties required to create an edgenode.

func (EdgeNodeProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EdgeNodeProperties.

func (*EdgeNodeProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EdgeNodeProperties.

type EdgeNodesClient

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

EdgeNodesClient contains the methods for the EdgeNodes group. Don't use this type directly, use NewEdgeNodesClient() instead.

func NewEdgeNodesClient

func NewEdgeNodesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EdgeNodesClient, error)

NewEdgeNodesClient creates a new instance of EdgeNodesClient with the specified values.

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

func (*EdgeNodesClient) NewListPager added in v0.5.0

NewListPager - Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users.

Generated from API version 2021-06-01

  • options - EdgeNodesClientListOptions contains the optional parameters for the EdgeNodesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/EdgeNodes_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEdgeNodesClient().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.EdgenodeResult = armcdn.EdgenodeResult{
		// 	Value: []*armcdn.EdgeNode{
		// 		{
		// 			Name: to.Ptr("Standard_Verizon"),
		// 			Type: to.Ptr("Microsoft.Cdn/edgenodes"),
		// 			ID: to.Ptr("/providers/Microsoft.Cdn/edgenodes/Standard_Verizon"),
		// 			Properties: &armcdn.EdgeNodeProperties{
		// 				IPAddressGroups: []*armcdn.IPAddressGroup{
		// 					{
		// 						DeliveryRegion: to.Ptr("All"),
		// 						IPv4Addresses: []*armcdn.CidrIPAddress{
		// 							{
		// 								BaseIPAddress: to.Ptr("192.229.176.0"),
		// 								PrefixLength: to.Ptr[int32](24),
		// 							},
		// 							{
		// 								BaseIPAddress: to.Ptr("180.240.184.128"),
		// 								PrefixLength: to.Ptr[int32](25),
		// 							},
		// 							{
		// 								BaseIPAddress: to.Ptr("152.195.27.0"),
		// 								PrefixLength: to.Ptr[int32](24),
		// 						}},
		// 						IPv6Addresses: []*armcdn.CidrIPAddress{
		// 							{
		// 								BaseIPAddress: to.Ptr("2606:2800:60f2::"),
		// 								PrefixLength: to.Ptr[int32](48),
		// 							},
		// 							{
		// 								BaseIPAddress: to.Ptr("2606:2800:700c::"),
		// 								PrefixLength: to.Ptr[int32](48),
		// 						}},
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Premium_Verizon"),
		// 			Type: to.Ptr("Microsoft.Cdn/edgenodes"),
		// 			ID: to.Ptr("/providers/Microsoft.Cdn/edgenodes/Premium_Verizon"),
		// 			Properties: &armcdn.EdgeNodeProperties{
		// 				IPAddressGroups: []*armcdn.IPAddressGroup{
		// 					{
		// 						DeliveryRegion: to.Ptr("All"),
		// 						IPv4Addresses: []*armcdn.CidrIPAddress{
		// 							{
		// 								BaseIPAddress: to.Ptr("192.229.176.0"),
		// 								PrefixLength: to.Ptr[int32](24),
		// 							},
		// 							{
		// 								BaseIPAddress: to.Ptr("152.195.27.0"),
		// 								PrefixLength: to.Ptr[int32](24),
		// 						}},
		// 						IPv6Addresses: []*armcdn.CidrIPAddress{
		// 							{
		// 								BaseIPAddress: to.Ptr("2606:2800:60f2::"),
		// 								PrefixLength: to.Ptr[int32](48),
		// 							},
		// 							{
		// 								BaseIPAddress: to.Ptr("2606:2800:700c::"),
		// 								PrefixLength: to.Ptr[int32](48),
		// 						}},
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Custom_Verizon"),
		// 			Type: to.Ptr("Microsoft.Cdn/edgenodes"),
		// 			ID: to.Ptr("/providers/Microsoft.Cdn/edgenodes/Custom_Verizon"),
		// 			Properties: &armcdn.EdgeNodeProperties{
		// 				IPAddressGroups: []*armcdn.IPAddressGroup{
		// 					{
		// 						DeliveryRegion: to.Ptr("All"),
		// 						IPv4Addresses: []*armcdn.CidrIPAddress{
		// 							{
		// 								BaseIPAddress: to.Ptr("192.229.176.0"),
		// 								PrefixLength: to.Ptr[int32](24),
		// 							},
		// 							{
		// 								BaseIPAddress: to.Ptr("2606:2800:420b::"),
		// 								PrefixLength: to.Ptr[int32](48),
		// 							},
		// 							{
		// 								BaseIPAddress: to.Ptr("2606:2800:700c::"),
		// 								PrefixLength: to.Ptr[int32](48),
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type EdgeNodesClientListOptions added in v0.3.0

type EdgeNodesClientListOptions struct {
}

EdgeNodesClientListOptions contains the optional parameters for the EdgeNodesClient.NewListPager method.

type EdgeNodesClientListResponse added in v0.3.0

type EdgeNodesClientListResponse struct {
	EdgenodeResult
}

EdgeNodesClientListResponse contains the response from method EdgeNodesClient.NewListPager.

type EdgenodeResult

type EdgenodeResult struct {
	// URL to get the next set of edgenode list results if there are any.
	NextLink *string

	// READ-ONLY; Edge node of CDN service.
	Value []*EdgeNode
}

EdgenodeResult - Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set of results.

func (EdgenodeResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EdgenodeResult.

func (*EdgenodeResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EdgenodeResult.

type EnabledState

type EnabledState string

EnabledState - Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'

const (
	EnabledStateDisabled EnabledState = "Disabled"
	EnabledStateEnabled  EnabledState = "Enabled"
)

func PossibleEnabledStateValues

func PossibleEnabledStateValues() []EnabledState

PossibleEnabledStateValues returns the possible values for the EnabledState const type.

type Endpoint

type Endpoint struct {
	// REQUIRED; Resource location.
	Location *string

	// The JSON object that contains the properties required to create an endpoint.
	Properties *EndpointProperties

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

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

Endpoint - CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net.

func (Endpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Endpoint.

func (*Endpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint.

type EndpointListResult

type EndpointListResult struct {
	// URL to get the next set of endpoint objects if there is any.
	NextLink *string

	// READ-ONLY; List of CDN endpoints within a profile
	Value []*Endpoint
}

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

func (EndpointListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointListResult.

func (*EndpointListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointListResult.

type EndpointProperties

type EndpointProperties struct {
	// REQUIRED; The source of the content being delivered via CDN.
	Origins []*DeepCreatedOrigin

	// List of content types on which compression applies. The value should be a valid MIME type.
	ContentTypesToCompress []*string

	// A reference to the origin group.
	DefaultOriginGroup *ResourceReference

	// A policy that specifies the delivery rules to be used for an endpoint.
	DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy

	// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified
	// path or content, e.g. block APAC for path /pictures/
	GeoFilters []*GeoFilter

	// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will
	// be served as compressed if user requests for a compressed version. Content
	// won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.
	IsCompressionEnabled *bool

	// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
	// must be allowed.
	IsHTTPAllowed *bool

	// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
	// must be allowed.
	IsHTTPSAllowed *bool

	// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this
	// information, CDN can apply scenario driven optimization.
	OptimizationType *OptimizationType

	// The origin groups comprising of origins that are used for load balancing the traffic based on availability.
	OriginGroups []*DeepCreatedOriginGroup

	// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses
	// single origin and can be overridden by the same property specified at origin.If
	// you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and
	// Cloud Services require this host header value to match the origin hostname by
	// default.
	OriginHostHeader *string

	// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
	OriginPath *string

	// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal
	// routes for the CDN. This is relative to the origin path. This property is only
	// relevant when using a single origin.
	ProbePath *string

	// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching
	// to prevent requests that contain query strings from being cached, or cache
	// every request with a unique URL.
	QueryStringCachingBehavior *QueryStringCachingBehavior

	// List of keys used to validate the signed URL hashes.
	URLSigningKeys []*URLSigningKey

	// Defines the Web Application Firewall policy for the endpoint (if applicable)
	WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink

	// READ-ONLY; The custom domains under the endpoint.
	CustomDomains []*CustomDomain

	// READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net
	HostName *string

	// READ-ONLY; Provisioning status of the endpoint.
	ProvisioningState *EndpointProvisioningState

	// READ-ONLY; Resource status of the endpoint.
	ResourceState *EndpointResourceState
}

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

func (EndpointProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointProperties.

func (*EndpointProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointProperties.

type EndpointPropertiesUpdateParameters

type EndpointPropertiesUpdateParameters struct {
	// List of content types on which compression applies. The value should be a valid MIME type.
	ContentTypesToCompress []*string

	// A reference to the origin group.
	DefaultOriginGroup *ResourceReference

	// A policy that specifies the delivery rules to be used for an endpoint.
	DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy

	// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified
	// path or content, e.g. block APAC for path /pictures/
	GeoFilters []*GeoFilter

	// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will
	// be served as compressed if user requests for a compressed version. Content
	// won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.
	IsCompressionEnabled *bool

	// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
	// must be allowed.
	IsHTTPAllowed *bool

	// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
	// must be allowed.
	IsHTTPSAllowed *bool

	// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this
	// information, CDN can apply scenario driven optimization.
	OptimizationType *OptimizationType

	// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses
	// single origin and can be overridden by the same property specified at origin.If
	// you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and
	// Cloud Services require this host header value to match the origin hostname by
	// default.
	OriginHostHeader *string

	// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
	OriginPath *string

	// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal
	// routes for the CDN. This is relative to the origin path. This property is only
	// relevant when using a single origin.
	ProbePath *string

	// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching
	// to prevent requests that contain query strings from being cached, or cache
	// every request with a unique URL.
	QueryStringCachingBehavior *QueryStringCachingBehavior

	// List of keys used to validate the signed URL hashes.
	URLSigningKeys []*URLSigningKey

	// Defines the Web Application Firewall policy for the endpoint (if applicable)
	WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink
}

EndpointPropertiesUpdateParameters - The JSON object containing endpoint update parameters.

func (EndpointPropertiesUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParameters.

func (*EndpointPropertiesUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParameters.

type EndpointPropertiesUpdateParametersDeliveryPolicy

type EndpointPropertiesUpdateParametersDeliveryPolicy struct {
	// REQUIRED; A list of the delivery rules.
	Rules []*DeliveryRule

	// User-friendly description of the policy.
	Description *string
}

EndpointPropertiesUpdateParametersDeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint.

func (EndpointPropertiesUpdateParametersDeliveryPolicy) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParametersDeliveryPolicy.

func (*EndpointPropertiesUpdateParametersDeliveryPolicy) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParametersDeliveryPolicy.

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

EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for the endpoint (if applicable)

func (EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.

func (*EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.

type EndpointProvisioningState added in v1.0.0

type EndpointProvisioningState string

EndpointProvisioningState - Provisioning status of the endpoint.

const (
	EndpointProvisioningStateCreating  EndpointProvisioningState = "Creating"
	EndpointProvisioningStateDeleting  EndpointProvisioningState = "Deleting"
	EndpointProvisioningStateFailed    EndpointProvisioningState = "Failed"
	EndpointProvisioningStateSucceeded EndpointProvisioningState = "Succeeded"
	EndpointProvisioningStateUpdating  EndpointProvisioningState = "Updating"
)

func PossibleEndpointProvisioningStateValues added in v1.0.0

func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState

PossibleEndpointProvisioningStateValues returns the possible values for the EndpointProvisioningState const type.

type EndpointResourceState

type EndpointResourceState string

EndpointResourceState - Resource status of the endpoint.

const (
	EndpointResourceStateCreating EndpointResourceState = "Creating"
	EndpointResourceStateDeleting EndpointResourceState = "Deleting"
	EndpointResourceStateRunning  EndpointResourceState = "Running"
	EndpointResourceStateStarting EndpointResourceState = "Starting"
	EndpointResourceStateStopped  EndpointResourceState = "Stopped"
	EndpointResourceStateStopping EndpointResourceState = "Stopping"
)

func PossibleEndpointResourceStateValues

func PossibleEndpointResourceStateValues() []EndpointResourceState

PossibleEndpointResourceStateValues returns the possible values for the EndpointResourceState const type.

type EndpointUpdateParameters

type EndpointUpdateParameters struct {
	// The JSON object containing endpoint update parameters.
	Properties *EndpointPropertiesUpdateParameters

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

EndpointUpdateParameters - Properties required to create or update an endpoint.

func (EndpointUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointUpdateParameters.

func (*EndpointUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointUpdateParameters.

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 - Azure Subscription ID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*EndpointsClient) BeginCreate

func (client *EndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, options *EndpointsClientBeginCreateOptions) (*runtime.Poller[EndpointsClientCreateResponse], error)

BeginCreate - Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • endpoint - Endpoint properties
  • options - EndpointsClientBeginCreateOptions contains the optional parameters for the EndpointsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginCreate(ctx, "RG", "profile1", "endpoint1", armcdn.Endpoint{
		Location: to.Ptr("WestUs"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armcdn.EndpointProperties{
			ContentTypesToCompress: []*string{
				to.Ptr("text/html"),
				to.Ptr("application/octet-stream")},
			DefaultOriginGroup: &armcdn.ResourceReference{
				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
			},
			DeliveryPolicy: &armcdn.EndpointPropertiesUpdateParametersDeliveryPolicy{
				Description: to.Ptr("Test description for a policy."),
				Rules: []*armcdn.DeliveryRule{
					{
						Name: to.Ptr("rule1"),
						Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
							&armcdn.DeliveryRuleCacheExpirationAction{
								Name: to.Ptr(armcdn.DeliveryRuleActionCacheExpiration),
								Parameters: &armcdn.CacheExpirationActionParameters{
									CacheBehavior: to.Ptr(armcdn.CacheBehaviorOverride),
									CacheDuration: to.Ptr("10:10:09"),
									CacheType:     to.Ptr(armcdn.CacheTypeAll),
									TypeName:      to.Ptr(armcdn.CacheExpirationActionParametersTypeNameDeliveryRuleCacheExpirationActionParameters),
								},
							},
							&armcdn.DeliveryRuleResponseHeaderAction{
								Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
								Parameters: &armcdn.HeaderActionParameters{
									HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
									HeaderName:   to.Ptr("Access-Control-Allow-Origin"),
									TypeName:     to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
									Value:        to.Ptr("*"),
								},
							},
							&armcdn.DeliveryRuleRequestHeaderAction{
								Name: to.Ptr(armcdn.DeliveryRuleActionModifyRequestHeader),
								Parameters: &armcdn.HeaderActionParameters{
									HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
									HeaderName:   to.Ptr("Accept-Encoding"),
									TypeName:     to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
									Value:        to.Ptr("gzip"),
								},
							}},
						Conditions: []armcdn.DeliveryRuleConditionClassification{
							&armcdn.DeliveryRuleRemoteAddressCondition{
								Name: to.Ptr(armcdn.MatchVariableRemoteAddress),
								Parameters: &armcdn.RemoteAddressMatchConditionParameters{
									MatchValues: []*string{
										to.Ptr("192.168.1.0/24"),
										to.Ptr("10.0.0.0/24")},
									NegateCondition: to.Ptr(true),
									Operator:        to.Ptr(armcdn.RemoteAddressOperatorIPMatch),
									TypeName:        to.Ptr(armcdn.RemoteAddressMatchConditionParametersTypeNameDeliveryRuleRemoteAddressConditionParameters),
								},
							}},
						Order: to.Ptr[int32](1),
					}},
			},
			IsCompressionEnabled:       to.Ptr(true),
			IsHTTPAllowed:              to.Ptr(true),
			IsHTTPSAllowed:             to.Ptr(true),
			OriginHostHeader:           to.Ptr("www.bing.com"),
			OriginPath:                 to.Ptr("/photos"),
			QueryStringCachingBehavior: to.Ptr(armcdn.QueryStringCachingBehaviorBypassCaching),
			OriginGroups: []*armcdn.DeepCreatedOriginGroup{
				{
					Name: to.Ptr("originGroup1"),
					Properties: &armcdn.DeepCreatedOriginGroupProperties{
						HealthProbeSettings: &armcdn.HealthProbeParameters{
							ProbeIntervalInSeconds: to.Ptr[int32](120),
							ProbePath:              to.Ptr("/health.aspx"),
							ProbeProtocol:          to.Ptr(armcdn.ProbeProtocolHTTP),
							ProbeRequestType:       to.Ptr(armcdn.HealthProbeRequestTypeGET),
						},
						Origins: []*armcdn.ResourceReference{
							{
								ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1"),
							},
							{
								ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin2"),
							}},
						ResponseBasedOriginErrorDetectionSettings: &armcdn.ResponseBasedOriginErrorDetectionParameters{
							ResponseBasedDetectedErrorTypes:          to.Ptr(armcdn.ResponseBasedDetectedErrorTypesTCPErrorsOnly),
							ResponseBasedFailoverThresholdPercentage: to.Ptr[int32](10),
						},
					},
				}},
			Origins: []*armcdn.DeepCreatedOrigin{
				{
					Name: to.Ptr("origin1"),
					Properties: &armcdn.DeepCreatedOriginProperties{
						Enabled:          to.Ptr(true),
						HostName:         to.Ptr("www.someDomain1.net"),
						HTTPPort:         to.Ptr[int32](80),
						HTTPSPort:        to.Ptr[int32](443),
						OriginHostHeader: to.Ptr("www.someDomain1.net"),
						Priority:         to.Ptr[int32](1),
						Weight:           to.Ptr[int32](50),
					},
				},
				{
					Name: to.Ptr("origin2"),
					Properties: &armcdn.DeepCreatedOriginProperties{
						Enabled:          to.Ptr(true),
						HostName:         to.Ptr("www.someDomain2.net"),
						HTTPPort:         to.Ptr[int32](80),
						HTTPSPort:        to.Ptr[int32](443),
						OriginHostHeader: to.Ptr("www.someDomain2.net"),
						Priority:         to.Ptr[int32](2),
						Weight:           to.Ptr[int32](50),
					},
				}},
		},
	}, 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.Endpoint = armcdn.Endpoint{
	// 	Name: to.Ptr("endpoint4899"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"kay1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armcdn.EndpointProperties{
	// 		ContentTypesToCompress: []*string{
	// 			to.Ptr("text/html"),
	// 			to.Ptr("application/octet-stream")},
	// 			DefaultOriginGroup: &armcdn.ResourceReference{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
	// 			},
	// 			DeliveryPolicy: &armcdn.EndpointPropertiesUpdateParametersDeliveryPolicy{
	// 				Description: to.Ptr("Test description for a policy."),
	// 				Rules: []*armcdn.DeliveryRule{
	// 					{
	// 						Name: to.Ptr("rule1"),
	// 						Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
	// 							&armcdn.DeliveryRuleCacheExpirationAction{
	// 								Name: to.Ptr(armcdn.DeliveryRuleActionCacheExpiration),
	// 								Parameters: &armcdn.CacheExpirationActionParameters{
	// 									CacheBehavior: to.Ptr(armcdn.CacheBehaviorOverride),
	// 									CacheDuration: to.Ptr("10:10:09"),
	// 									CacheType: to.Ptr(armcdn.CacheTypeAll),
	// 									TypeName: to.Ptr(armcdn.CacheExpirationActionParametersTypeNameDeliveryRuleCacheExpirationActionParameters),
	// 								},
	// 							},
	// 							&armcdn.DeliveryRuleResponseHeaderAction{
	// 								Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
	// 								Parameters: &armcdn.HeaderActionParameters{
	// 									HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
	// 									HeaderName: to.Ptr("Access-Control-Allow-Origin"),
	// 									TypeName: to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
	// 									Value: to.Ptr("*"),
	// 								},
	// 							},
	// 							&armcdn.DeliveryRuleRequestHeaderAction{
	// 								Name: to.Ptr(armcdn.DeliveryRuleActionModifyRequestHeader),
	// 								Parameters: &armcdn.HeaderActionParameters{
	// 									HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
	// 									HeaderName: to.Ptr("Accept-Encoding"),
	// 									TypeName: to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
	// 									Value: to.Ptr("gzip"),
	// 								},
	// 						}},
	// 						Conditions: []armcdn.DeliveryRuleConditionClassification{
	// 							&armcdn.DeliveryRuleRemoteAddressCondition{
	// 								Name: to.Ptr(armcdn.MatchVariableRemoteAddress),
	// 								Parameters: &armcdn.RemoteAddressMatchConditionParameters{
	// 									MatchValues: []*string{
	// 										to.Ptr("192.168.1.0/24"),
	// 										to.Ptr("10.0.0.0/24")},
	// 										NegateCondition: to.Ptr(true),
	// 										Operator: to.Ptr(armcdn.RemoteAddressOperatorIPMatch),
	// 										Transforms: []*armcdn.Transform{
	// 										},
	// 										TypeName: to.Ptr(armcdn.RemoteAddressMatchConditionParametersTypeNameDeliveryRuleRemoteAddressConditionParameters),
	// 									},
	// 							}},
	// 							Order: to.Ptr[int32](1),
	// 					}},
	// 				},
	// 				GeoFilters: []*armcdn.GeoFilter{
	// 				},
	// 				IsCompressionEnabled: to.Ptr(true),
	// 				IsHTTPAllowed: to.Ptr(true),
	// 				IsHTTPSAllowed: to.Ptr(true),
	// 				OriginHostHeader: to.Ptr("www.bing.com"),
	// 				OriginPath: to.Ptr("/photos"),
	// 				QueryStringCachingBehavior: to.Ptr(armcdn.QueryStringCachingBehaviorBypassCaching),
	// 				HostName: to.Ptr("endpoint4899.azureedge-test.net"),
	// 				OriginGroups: []*armcdn.DeepCreatedOriginGroup{
	// 					{
	// 						Name: to.Ptr("originGroup1"),
	// 						Properties: &armcdn.DeepCreatedOriginGroupProperties{
	// 							HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 								ProbeIntervalInSeconds: to.Ptr[int32](120),
	// 								ProbePath: to.Ptr("/health.aspx"),
	// 								ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 								ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
	// 							},
	// 							Origins: []*armcdn.ResourceReference{
	// 								{
	// 									ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1"),
	// 								},
	// 								{
	// 									ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin2"),
	// 							}},
	// 							ResponseBasedOriginErrorDetectionSettings: &armcdn.ResponseBasedOriginErrorDetectionParameters{
	// 								ResponseBasedDetectedErrorTypes: to.Ptr(armcdn.ResponseBasedDetectedErrorTypesTCPErrorsOnly),
	// 								ResponseBasedFailoverThresholdPercentage: to.Ptr[int32](10),
	// 							},
	// 						},
	// 				}},
	// 				Origins: []*armcdn.DeepCreatedOrigin{
	// 					{
	// 						Name: to.Ptr("origin1"),
	// 						Properties: &armcdn.DeepCreatedOriginProperties{
	// 							Enabled: to.Ptr(true),
	// 							HostName: to.Ptr("www.someDomain1.net"),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							OriginHostHeader: to.Ptr("www.someDomain1.net"),
	// 							Priority: to.Ptr[int32](1),
	// 							Weight: to.Ptr[int32](50),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("origin2"),
	// 						Properties: &armcdn.DeepCreatedOriginProperties{
	// 							Enabled: to.Ptr(true),
	// 							HostName: to.Ptr("www.someDomain2.net"),
	// 							HTTPPort: to.Ptr[int32](80),
	// 							HTTPSPort: to.Ptr[int32](443),
	// 							OriginHostHeader: to.Ptr("www.someDomain2.net"),
	// 							Priority: to.Ptr[int32](2),
	// 							Weight: to.Ptr[int32](50),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armcdn.EndpointProvisioningStateSucceeded),
	// 				ResourceState: to.Ptr(armcdn.EndpointResourceStateCreating),
	// 			},
	// 		}
}
Output:

func (*EndpointsClient) BeginDelete

func (client *EndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*runtime.Poller[EndpointsClientDeleteResponse], error)

BeginDelete - Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginDelete(ctx, "RG", "profile1", "endpoint1", 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 (*EndpointsClient) BeginLoadContent

func (client *EndpointsClient) BeginLoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, options *EndpointsClientBeginLoadContentOptions) (*runtime.Poller[EndpointsClientLoadContentResponse], error)

BeginLoadContent - Pre-loads a content to CDN. Available for Verizon Profiles. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • contentFilePaths - The path to the content to be loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads a single file
  • options - EndpointsClientBeginLoadContentOptions contains the optional parameters for the EndpointsClient.BeginLoadContent method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_LoadContent.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginLoadContent(ctx, "RG", "profile1", "endpoint1", armcdn.LoadParameters{
		ContentPaths: []*string{
			to.Ptr("/folder1")},
	}, 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 (*EndpointsClient) BeginPurgeContent

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

BeginPurgeContent - Removes a content from CDN. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • 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/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_PurgeContent.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginPurgeContent(ctx, "RG", "profile1", "endpoint1", armcdn.PurgeParameters{
		ContentPaths: []*string{
			to.Ptr("/folder1")},
	}, 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 (*EndpointsClient) BeginStart

func (client *EndpointsClient) BeginStart(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStartOptions) (*runtime.Poller[EndpointsClientStartResponse], error)

BeginStart - Starts an existing CDN endpoint that is on a stopped state. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - EndpointsClientBeginStartOptions contains the optional parameters for the EndpointsClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Start.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginStart(ctx, "RG", "profile1", "endpoint1", 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.Endpoint = armcdn.Endpoint{
	// 	Name: to.Ptr("endpoint4899"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"kay1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armcdn.EndpointProperties{
	// 		ContentTypesToCompress: []*string{
	// 		},
	// 		GeoFilters: []*armcdn.GeoFilter{
	// 		},
	// 		IsCompressionEnabled: to.Ptr(false),
	// 		IsHTTPAllowed: to.Ptr(true),
	// 		IsHTTPSAllowed: to.Ptr(true),
	// 		OptimizationType: to.Ptr(armcdn.OptimizationTypeDynamicSiteAcceleration),
	// 		OriginHostHeader: to.Ptr("www.bing.com"),
	// 		ProbePath: to.Ptr("/image"),
	// 		QueryStringCachingBehavior: to.Ptr(armcdn.QueryStringCachingBehaviorNotSet),
	// 		HostName: to.Ptr("endpoint1.azureedge.net"),
	// 		Origins: []*armcdn.DeepCreatedOrigin{
	// 			{
	// 				Name: to.Ptr("www-bing-com"),
	// 				Properties: &armcdn.DeepCreatedOriginProperties{
	// 					HostName: to.Ptr("www.bing.com"),
	// 					HTTPPort: to.Ptr[int32](80),
	// 					HTTPSPort: to.Ptr[int32](443),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armcdn.EndpointProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.EndpointResourceStateStarting),
	// 	},
	// }
}
Output:

func (*EndpointsClient) BeginStop

func (client *EndpointsClient) BeginStop(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStopOptions) (*runtime.Poller[EndpointsClientStopResponse], error)

BeginStop - Stops an existing running CDN endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - EndpointsClientBeginStopOptions contains the optional parameters for the EndpointsClient.BeginStop method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Stop.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginStop(ctx, "RG", "profile1", "endpoint1", 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.Endpoint = armcdn.Endpoint{
	// 	Name: to.Ptr("endpoint4899"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"kay1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armcdn.EndpointProperties{
	// 		ContentTypesToCompress: []*string{
	// 		},
	// 		GeoFilters: []*armcdn.GeoFilter{
	// 		},
	// 		IsCompressionEnabled: to.Ptr(false),
	// 		IsHTTPAllowed: to.Ptr(true),
	// 		IsHTTPSAllowed: to.Ptr(true),
	// 		OptimizationType: to.Ptr(armcdn.OptimizationTypeDynamicSiteAcceleration),
	// 		OriginHostHeader: to.Ptr("www.bing.com"),
	// 		ProbePath: to.Ptr("/image"),
	// 		QueryStringCachingBehavior: to.Ptr(armcdn.QueryStringCachingBehaviorNotSet),
	// 		HostName: to.Ptr("endpoint1.azureedge.net"),
	// 		Origins: []*armcdn.DeepCreatedOrigin{
	// 			{
	// 				Name: to.Ptr("www-bing-com"),
	// 				Properties: &armcdn.DeepCreatedOriginProperties{
	// 					HostName: to.Ptr("www.bing.com"),
	// 					HTTPPort: to.Ptr[int32](80),
	// 					HTTPSPort: to.Ptr[int32](443),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armcdn.EndpointProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.EndpointResourceStateStopping),
	// 	},
	// }
}
Output:

func (*EndpointsClient) BeginUpdate

func (client *EndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, options *EndpointsClientBeginUpdateOptions) (*runtime.Poller[EndpointsClientUpdateResponse], error)

BeginUpdate - Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • endpointUpdateProperties - Endpoint update properties
  • options - EndpointsClientBeginUpdateOptions contains the optional parameters for the EndpointsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewEndpointsClient().BeginUpdate(ctx, "RG", "profile1", "endpoint1", armcdn.EndpointUpdateParameters{
		Tags: map[string]*string{
			"additionalProperties": to.Ptr("Tag1"),
		},
	}, 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.Endpoint = armcdn.Endpoint{
	// 	Name: to.Ptr("endpoint1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1"),
	// 	Location: to.Ptr("WestCentralUs"),
	// 	Tags: map[string]*string{
	// 		"additionalProperties": to.Ptr("Tag1"),
	// 	},
	// 	Properties: &armcdn.EndpointProperties{
	// 		ContentTypesToCompress: []*string{
	// 		},
	// 		DefaultOriginGroup: &armcdn.ResourceReference{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
	// 		},
	// 		GeoFilters: []*armcdn.GeoFilter{
	// 		},
	// 		IsCompressionEnabled: to.Ptr(false),
	// 		IsHTTPAllowed: to.Ptr(true),
	// 		IsHTTPSAllowed: to.Ptr(true),
	// 		QueryStringCachingBehavior: to.Ptr(armcdn.QueryStringCachingBehaviorIgnoreQueryString),
	// 		HostName: to.Ptr("endpoint1.azureedge.net"),
	// 		OriginGroups: []*armcdn.DeepCreatedOriginGroup{
	// 			{
	// 				Name: to.Ptr("originGroup1"),
	// 				Properties: &armcdn.DeepCreatedOriginGroupProperties{
	// 					HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 						ProbeIntervalInSeconds: to.Ptr[int32](120),
	// 						ProbePath: to.Ptr("/health.aspx"),
	// 						ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 						ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
	// 					},
	// 					Origins: []*armcdn.ResourceReference{
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-bing-com"),
	// 					}},
	// 				},
	// 		}},
	// 		Origins: []*armcdn.DeepCreatedOrigin{
	// 			{
	// 				Name: to.Ptr("www-bing-com"),
	// 				Properties: &armcdn.DeepCreatedOriginProperties{
	// 					Enabled: to.Ptr(true),
	// 					HostName: to.Ptr("www.bing.com"),
	// 					HTTPPort: to.Ptr[int32](80),
	// 					HTTPSPort: to.Ptr[int32](443),
	// 					OriginHostHeader: to.Ptr("www.someDomain2.net"),
	// 					Priority: to.Ptr[int32](2),
	// 					Weight: to.Ptr[int32](50),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armcdn.EndpointProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.EndpointResourceStateCreating),
	// 	},
	// }
}
Output:

func (*EndpointsClient) Get

func (client *EndpointsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientGetOptions) (EndpointsClientGetResponse, error)

Get - Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().Get(ctx, "RG", "profile1", "endpoint1", 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.Endpoint = armcdn.Endpoint{
	// 	Name: to.Ptr("endpoint1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1"),
	// 	Location: to.Ptr("CentralUs"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armcdn.EndpointProperties{
	// 		ContentTypesToCompress: []*string{
	// 		},
	// 		DefaultOriginGroup: &armcdn.ResourceReference{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
	// 		},
	// 		GeoFilters: []*armcdn.GeoFilter{
	// 		},
	// 		IsCompressionEnabled: to.Ptr(false),
	// 		IsHTTPAllowed: to.Ptr(true),
	// 		IsHTTPSAllowed: to.Ptr(true),
	// 		OptimizationType: to.Ptr(armcdn.OptimizationTypeDynamicSiteAcceleration),
	// 		OriginHostHeader: to.Ptr("www.bing.com"),
	// 		ProbePath: to.Ptr("/image"),
	// 		QueryStringCachingBehavior: to.Ptr(armcdn.QueryStringCachingBehaviorNotSet),
	// 		CustomDomains: []*armcdn.CustomDomain{
	// 			{
	// 				Name: to.Ptr("www-someDomain-net"),
	// 				Properties: &armcdn.CustomDomainProperties{
	// 					HostName: to.Ptr("www.someDomain.Net"),
	// 				},
	// 		}},
	// 		HostName: to.Ptr("endpoint1.azureedge.net"),
	// 		OriginGroups: []*armcdn.DeepCreatedOriginGroup{
	// 			{
	// 				Name: to.Ptr("originGroup1"),
	// 				Properties: &armcdn.DeepCreatedOriginGroupProperties{
	// 					HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 						ProbeIntervalInSeconds: to.Ptr[int32](120),
	// 						ProbePath: to.Ptr("/health.aspx"),
	// 						ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 						ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
	// 					},
	// 					Origins: []*armcdn.ResourceReference{
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-bing-com"),
	// 					}},
	// 				},
	// 		}},
	// 		Origins: []*armcdn.DeepCreatedOrigin{
	// 			{
	// 				Name: to.Ptr("www-bing-com"),
	// 				Properties: &armcdn.DeepCreatedOriginProperties{
	// 					Enabled: to.Ptr(true),
	// 					HostName: to.Ptr("www.bing.com"),
	// 					HTTPPort: to.Ptr[int32](80),
	// 					HTTPSPort: to.Ptr[int32](443),
	// 					OriginHostHeader: to.Ptr("www.someDomain2.net"),
	// 					Priority: to.Ptr[int32](2),
	// 					Weight: to.Ptr[int32](50),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armcdn.EndpointProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.EndpointResourceStateRunning),
	// 	},
	// }
}
Output:

func (*EndpointsClient) NewListByProfilePager added in v0.5.0

func (client *EndpointsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *EndpointsClientListByProfileOptions) *runtime.Pager[EndpointsClientListByProfileResponse]

NewListByProfilePager - Lists existing CDN endpoints.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • options - EndpointsClientListByProfileOptions contains the optional parameters for the EndpointsClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_ListByProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEndpointsClient().NewListByProfilePager("RG", "profile1", 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.EndpointListResult = armcdn.EndpointListResult{
		// 	Value: []*armcdn.Endpoint{
		// 		{
		// 			Name: to.Ptr("endpoint1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/endpoints"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1"),
		// 			Location: to.Ptr("CentralUs"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armcdn.EndpointProperties{
		// 				ContentTypesToCompress: []*string{
		// 				},
		// 				DefaultOriginGroup: &armcdn.ResourceReference{
		// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
		// 				},
		// 				GeoFilters: []*armcdn.GeoFilter{
		// 				},
		// 				IsCompressionEnabled: to.Ptr(false),
		// 				IsHTTPAllowed: to.Ptr(true),
		// 				IsHTTPSAllowed: to.Ptr(true),
		// 				OptimizationType: to.Ptr(armcdn.OptimizationTypeDynamicSiteAcceleration),
		// 				OriginHostHeader: to.Ptr("www.bing.com"),
		// 				ProbePath: to.Ptr("/image"),
		// 				QueryStringCachingBehavior: to.Ptr(armcdn.QueryStringCachingBehaviorNotSet),
		// 				CustomDomains: []*armcdn.CustomDomain{
		// 					{
		// 						Name: to.Ptr("www-someDomain-net"),
		// 						Properties: &armcdn.CustomDomainProperties{
		// 							HostName: to.Ptr("www.someDomain.Net"),
		// 						},
		// 				}},
		// 				HostName: to.Ptr("endpoint1.azureedge.net"),
		// 				OriginGroups: []*armcdn.DeepCreatedOriginGroup{
		// 					{
		// 						Name: to.Ptr("originGroup1"),
		// 						Properties: &armcdn.DeepCreatedOriginGroupProperties{
		// 							HealthProbeSettings: &armcdn.HealthProbeParameters{
		// 								ProbeIntervalInSeconds: to.Ptr[int32](120),
		// 								ProbePath: to.Ptr("/health.aspx"),
		// 								ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
		// 								ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
		// 							},
		// 							Origins: []*armcdn.ResourceReference{
		// 								{
		// 									ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-bing-com"),
		// 							}},
		// 							ResponseBasedOriginErrorDetectionSettings: &armcdn.ResponseBasedOriginErrorDetectionParameters{
		// 								ResponseBasedDetectedErrorTypes: to.Ptr(armcdn.ResponseBasedDetectedErrorTypesTCPErrorsOnly),
		// 								ResponseBasedFailoverThresholdPercentage: to.Ptr[int32](10),
		// 							},
		// 						},
		// 				}},
		// 				Origins: []*armcdn.DeepCreatedOrigin{
		// 					{
		// 						Name: to.Ptr("www-bing-com"),
		// 						Properties: &armcdn.DeepCreatedOriginProperties{
		// 							Enabled: to.Ptr(true),
		// 							HostName: to.Ptr("www.bing.com"),
		// 							HTTPPort: to.Ptr[int32](80),
		// 							HTTPSPort: to.Ptr[int32](443),
		// 							OriginHostHeader: to.Ptr("www.someDomain2.net"),
		// 							Priority: to.Ptr[int32](2),
		// 							Weight: to.Ptr[int32](50),
		// 						},
		// 				}},
		// 				ProvisioningState: to.Ptr(armcdn.EndpointProvisioningStateSucceeded),
		// 				ResourceState: to.Ptr(armcdn.EndpointResourceStateRunning),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*EndpointsClient) NewListResourceUsagePager added in v0.5.0

func (client *EndpointsClient) NewListResourceUsagePager(resourceGroupName string, profileName string, endpointName string, options *EndpointsClientListResourceUsageOptions) *runtime.Pager[EndpointsClientListResourceUsageResponse]

NewListResourceUsagePager - Checks the quota and usage of geo filters and custom domains under the given endpoint.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - EndpointsClientListResourceUsageOptions contains the optional parameters for the EndpointsClient.NewListResourceUsagePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_ListResourceUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEndpointsClient().NewListResourceUsagePager("RG", "profile1", "endpoint1", 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.ResourceUsageListResult = armcdn.ResourceUsageListResult{
		// 	Value: []*armcdn.ResourceUsage{
		// 		{
		// 			CurrentValue: to.Ptr[int32](1),
		// 			Limit: to.Ptr[int32](20),
		// 			ResourceType: to.Ptr("customdomain"),
		// 			Unit: to.Ptr(armcdn.ResourceUsageUnitCount),
		// 		},
		// 		{
		// 			CurrentValue: to.Ptr[int32](0),
		// 			Limit: to.Ptr[int32](25),
		// 			ResourceType: to.Ptr("geofilter"),
		// 			Unit: to.Ptr(armcdn.ResourceUsageUnitCount),
		// 	}},
		// }
	}
}
Output:

func (*EndpointsClient) ValidateCustomDomain

func (client *EndpointsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput, options *EndpointsClientValidateCustomDomainOptions) (EndpointsClientValidateCustomDomainResponse, error)

ValidateCustomDomain - Validates the custom domain mapping to ensure it maps to the correct CDN 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • customDomainProperties - Custom domain to be validated.
  • options - EndpointsClientValidateCustomDomainOptions contains the optional parameters for the EndpointsClient.ValidateCustomDomain method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_ValidateCustomDomain.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEndpointsClient().ValidateCustomDomain(ctx, "RG", "profile1", "endpoint1", armcdn.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 = armcdn.ValidateCustomDomainOutput{
	// 	CustomDomainValidated: to.Ptr(true),
	// }
}
Output:

type EndpointsClientBeginCreateOptions added in v0.3.0

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

EndpointsClientBeginCreateOptions contains the optional parameters for the EndpointsClient.BeginCreate method.

type EndpointsClientBeginDeleteOptions added in v0.3.0

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

EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method.

type EndpointsClientBeginLoadContentOptions added in v0.3.0

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

EndpointsClientBeginLoadContentOptions contains the optional parameters for the EndpointsClient.BeginLoadContent method.

type EndpointsClientBeginPurgeContentOptions added in v0.3.0

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

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

type EndpointsClientBeginStartOptions added in v0.3.0

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

EndpointsClientBeginStartOptions contains the optional parameters for the EndpointsClient.BeginStart method.

type EndpointsClientBeginStopOptions added in v0.3.0

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

EndpointsClientBeginStopOptions contains the optional parameters for the EndpointsClient.BeginStop method.

type EndpointsClientBeginUpdateOptions added in v0.3.0

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

EndpointsClientBeginUpdateOptions contains the optional parameters for the EndpointsClient.BeginUpdate method.

type EndpointsClientCreateResponse added in v0.3.0

type EndpointsClientCreateResponse struct {
	Endpoint
}

EndpointsClientCreateResponse contains the response from method EndpointsClient.BeginCreate.

type EndpointsClientDeleteResponse added in v0.3.0

type EndpointsClientDeleteResponse struct {
}

EndpointsClientDeleteResponse contains the response from method EndpointsClient.BeginDelete.

type EndpointsClientGetOptions added in v0.3.0

type EndpointsClientGetOptions struct {
}

EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method.

type EndpointsClientGetResponse added in v0.3.0

type EndpointsClientGetResponse struct {
	Endpoint
}

EndpointsClientGetResponse contains the response from method EndpointsClient.Get.

type EndpointsClientListByProfileOptions added in v0.3.0

type EndpointsClientListByProfileOptions struct {
}

EndpointsClientListByProfileOptions contains the optional parameters for the EndpointsClient.NewListByProfilePager method.

type EndpointsClientListByProfileResponse added in v0.3.0

type EndpointsClientListByProfileResponse struct {
	EndpointListResult
}

EndpointsClientListByProfileResponse contains the response from method EndpointsClient.NewListByProfilePager.

type EndpointsClientListResourceUsageOptions added in v0.3.0

type EndpointsClientListResourceUsageOptions struct {
}

EndpointsClientListResourceUsageOptions contains the optional parameters for the EndpointsClient.NewListResourceUsagePager method.

type EndpointsClientListResourceUsageResponse added in v0.3.0

type EndpointsClientListResourceUsageResponse struct {
	ResourceUsageListResult
}

EndpointsClientListResourceUsageResponse contains the response from method EndpointsClient.NewListResourceUsagePager.

type EndpointsClientLoadContentResponse added in v0.3.0

type EndpointsClientLoadContentResponse struct {
}

EndpointsClientLoadContentResponse contains the response from method EndpointsClient.BeginLoadContent.

type EndpointsClientPurgeContentResponse added in v0.3.0

type EndpointsClientPurgeContentResponse struct {
}

EndpointsClientPurgeContentResponse contains the response from method EndpointsClient.BeginPurgeContent.

type EndpointsClientStartResponse added in v0.3.0

type EndpointsClientStartResponse struct {
	Endpoint
}

EndpointsClientStartResponse contains the response from method EndpointsClient.BeginStart.

type EndpointsClientStopResponse added in v0.3.0

type EndpointsClientStopResponse struct {
	Endpoint
}

EndpointsClientStopResponse contains the response from method EndpointsClient.BeginStop.

type EndpointsClientUpdateResponse added in v0.3.0

type EndpointsClientUpdateResponse struct {
	Endpoint
}

EndpointsClientUpdateResponse contains the response from method EndpointsClient.BeginUpdate.

type EndpointsClientValidateCustomDomainOptions added in v0.3.0

type EndpointsClientValidateCustomDomainOptions struct {
}

EndpointsClientValidateCustomDomainOptions contains the optional parameters for the EndpointsClient.ValidateCustomDomain method.

type EndpointsClientValidateCustomDomainResponse added in v0.3.0

type EndpointsClientValidateCustomDomainResponse struct {
	ValidateCustomDomainOutput
}

EndpointsClientValidateCustomDomainResponse contains the response from method EndpointsClient.ValidateCustomDomain.

type ErrorAdditionalInfo added in v0.4.0

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail added in v0.4.0

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

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

func (ErrorResponse) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ForwardingProtocol

type ForwardingProtocol string

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

const (
	ForwardingProtocolHTTPOnly     ForwardingProtocol = "HttpOnly"
	ForwardingProtocolHTTPSOnly    ForwardingProtocol = "HttpsOnly"
	ForwardingProtocolMatchRequest ForwardingProtocol = "MatchRequest"
)

func PossibleForwardingProtocolValues

func PossibleForwardingProtocolValues() []ForwardingProtocol

PossibleForwardingProtocolValues returns the possible values for the ForwardingProtocol const type.

type GeoFilter

type GeoFilter struct {
	// REQUIRED; Action of the geo filter, i.e. allow or block access.
	Action *GeoFilterActions

	// REQUIRED; Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US.
	CountryCodes []*string

	// REQUIRED; Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.)
	RelativePath *string
}

GeoFilter - Rules defining user's geo access within a CDN endpoint.

func (GeoFilter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GeoFilter.

func (*GeoFilter) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type GeoFilter.

type GeoFilterActions

type GeoFilterActions string

GeoFilterActions - Action of the geo filter, i.e. allow or block access.

const (
	GeoFilterActionsBlock GeoFilterActions = "Block"
	GeoFilterActionsAllow GeoFilterActions = "Allow"
)

func PossibleGeoFilterActionsValues

func PossibleGeoFilterActionsValues() []GeoFilterActions

PossibleGeoFilterActionsValues returns the possible values for the GeoFilterActions const type.

type HTTPErrorRangeParameters

type HTTPErrorRangeParameters struct {
	// The inclusive start of the http status code range.
	Begin *int32

	// The inclusive end of the http status code range.
	End *int32
}

HTTPErrorRangeParameters - The JSON object that represents the range for http status codes

func (HTTPErrorRangeParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type HTTPErrorRangeParameters.

func (*HTTPErrorRangeParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPErrorRangeParameters.

type HTTPSRedirect

type HTTPSRedirect string

HTTPSRedirect - Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.

const (
	HTTPSRedirectDisabled HTTPSRedirect = "Disabled"
	HTTPSRedirectEnabled  HTTPSRedirect = "Enabled"
)

func PossibleHTTPSRedirectValues

func PossibleHTTPSRedirectValues() []HTTPSRedirect

PossibleHTTPSRedirectValues returns the possible values for the HTTPSRedirect const type.

type HTTPVersionMatchConditionParameters

type HTTPVersionMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *HTTPVersionOperator

	// REQUIRED
	TypeName *HTTPVersionMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

HTTPVersionMatchConditionParameters - Defines the parameters for HttpVersion match conditions

func (HTTPVersionMatchConditionParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HTTPVersionMatchConditionParameters.

func (*HTTPVersionMatchConditionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPVersionMatchConditionParameters.

type HTTPVersionMatchConditionParametersTypeName added in v0.3.0

type HTTPVersionMatchConditionParametersTypeName string
const (
	HTTPVersionMatchConditionParametersTypeNameDeliveryRuleHTTPVersionConditionParameters HTTPVersionMatchConditionParametersTypeName = "DeliveryRuleHttpVersionConditionParameters"
)

func PossibleHTTPVersionMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleHTTPVersionMatchConditionParametersTypeNameValues() []HTTPVersionMatchConditionParametersTypeName

PossibleHTTPVersionMatchConditionParametersTypeNameValues returns the possible values for the HTTPVersionMatchConditionParametersTypeName const type.

type HTTPVersionOperator

type HTTPVersionOperator string

HTTPVersionOperator - Describes operator to be matched

const (
	HTTPVersionOperatorEqual HTTPVersionOperator = "Equal"
)

func PossibleHTTPVersionOperatorValues

func PossibleHTTPVersionOperatorValues() []HTTPVersionOperator

PossibleHTTPVersionOperatorValues returns the possible values for the HTTPVersionOperator const type.

type HeaderAction

type HeaderAction string

HeaderAction - Action to perform

const (
	HeaderActionAppend    HeaderAction = "Append"
	HeaderActionDelete    HeaderAction = "Delete"
	HeaderActionOverwrite HeaderAction = "Overwrite"
)

func PossibleHeaderActionValues

func PossibleHeaderActionValues() []HeaderAction

PossibleHeaderActionValues returns the possible values for the HeaderAction const type.

type HeaderActionParameters

type HeaderActionParameters struct {
	// REQUIRED; Action to perform
	HeaderAction *HeaderAction

	// REQUIRED; Name of the header to modify
	HeaderName *string

	// REQUIRED
	TypeName *HeaderActionParametersTypeName

	// Value for the specified action
	Value *string
}

HeaderActionParameters - Defines the parameters for the request header action.

func (HeaderActionParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type HeaderActionParameters.

func (*HeaderActionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HeaderActionParameters.

type HeaderActionParametersTypeName added in v0.3.0

type HeaderActionParametersTypeName string
const (
	HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters HeaderActionParametersTypeName = "DeliveryRuleHeaderActionParameters"
)

func PossibleHeaderActionParametersTypeNameValues added in v0.3.0

func PossibleHeaderActionParametersTypeNameValues() []HeaderActionParametersTypeName

PossibleHeaderActionParametersTypeNameValues returns the possible values for the HeaderActionParametersTypeName const type.

type HealthProbeParameters

type HealthProbeParameters struct {
	// The number of seconds between health probes.Default is 240sec.
	ProbeIntervalInSeconds *int32

	// The path relative to the origin that is used to determine the health of the origin.
	ProbePath *string

	// Protocol to use for health probe.
	ProbeProtocol *ProbeProtocol

	// The type of health probe request that is made.
	ProbeRequestType *HealthProbeRequestType
}

HealthProbeParameters - The JSON object that contains the properties to send health probes to origin.

func (HealthProbeParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type HealthProbeParameters.

func (*HealthProbeParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HealthProbeParameters.

type HealthProbeRequestType

type HealthProbeRequestType string

HealthProbeRequestType - The type of health probe request that is made.

const (
	HealthProbeRequestTypeNotSet HealthProbeRequestType = "NotSet"
	HealthProbeRequestTypeGET    HealthProbeRequestType = "GET"
	HealthProbeRequestTypeHEAD   HealthProbeRequestType = "HEAD"
)

func PossibleHealthProbeRequestTypeValues

func PossibleHealthProbeRequestTypeValues() []HealthProbeRequestType

PossibleHealthProbeRequestTypeValues returns the possible values for the HealthProbeRequestType const type.

type HostNameMatchConditionParameters added in v0.3.0

type HostNameMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *HostNameOperator

	// REQUIRED
	TypeName *HostNameMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

HostNameMatchConditionParameters - Defines the parameters for HostName match conditions

func (HostNameMatchConditionParameters) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type HostNameMatchConditionParameters.

func (*HostNameMatchConditionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HostNameMatchConditionParameters.

type HostNameMatchConditionParametersTypeName added in v0.3.0

type HostNameMatchConditionParametersTypeName string
const (
	HostNameMatchConditionParametersTypeNameDeliveryRuleHostNameConditionParameters HostNameMatchConditionParametersTypeName = "DeliveryRuleHostNameConditionParameters"
)

func PossibleHostNameMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleHostNameMatchConditionParametersTypeNameValues() []HostNameMatchConditionParametersTypeName

PossibleHostNameMatchConditionParametersTypeNameValues returns the possible values for the HostNameMatchConditionParametersTypeName const type.

type HostNameOperator added in v0.3.0

type HostNameOperator string

HostNameOperator - Describes operator to be matched

const (
	HostNameOperatorAny                HostNameOperator = "Any"
	HostNameOperatorBeginsWith         HostNameOperator = "BeginsWith"
	HostNameOperatorContains           HostNameOperator = "Contains"
	HostNameOperatorEndsWith           HostNameOperator = "EndsWith"
	HostNameOperatorEqual              HostNameOperator = "Equal"
	HostNameOperatorGreaterThan        HostNameOperator = "GreaterThan"
	HostNameOperatorGreaterThanOrEqual HostNameOperator = "GreaterThanOrEqual"
	HostNameOperatorLessThan           HostNameOperator = "LessThan"
	HostNameOperatorLessThanOrEqual    HostNameOperator = "LessThanOrEqual"
	HostNameOperatorRegEx              HostNameOperator = "RegEx"
)

func PossibleHostNameOperatorValues added in v0.3.0

func PossibleHostNameOperatorValues() []HostNameOperator

PossibleHostNameOperatorValues returns the possible values for the HostNameOperator const type.

type IPAddressGroup

type IPAddressGroup struct {
	// The delivery region of the ip address group
	DeliveryRegion *string

	// The list of ip v4 addresses.
	IPv4Addresses []*CidrIPAddress

	// The list of ip v6 addresses.
	IPv6Addresses []*CidrIPAddress
}

IPAddressGroup - CDN Ip address group

func (IPAddressGroup) MarshalJSON

func (i IPAddressGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPAddressGroup.

func (*IPAddressGroup) UnmarshalJSON added in v1.1.0

func (i *IPAddressGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressGroup.

type IdentityType

type IdentityType string

IdentityType - The type of identity that creates/modifies resources

const (
	IdentityTypeApplication     IdentityType = "application"
	IdentityTypeKey             IdentityType = "key"
	IdentityTypeManagedIdentity IdentityType = "managedIdentity"
	IdentityTypeUser            IdentityType = "user"
)

func PossibleIdentityTypeValues

func PossibleIdentityTypeValues() []IdentityType

PossibleIdentityTypeValues returns the possible values for the IdentityType const type.

type IsDeviceMatchConditionParameters

type IsDeviceMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *IsDeviceOperator

	// REQUIRED
	TypeName *IsDeviceMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*IsDeviceMatchConditionParametersMatchValuesItem

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

IsDeviceMatchConditionParameters - Defines the parameters for IsDevice match conditions

func (IsDeviceMatchConditionParameters) MarshalJSON

func (i IsDeviceMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IsDeviceMatchConditionParameters.

func (*IsDeviceMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (i *IsDeviceMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IsDeviceMatchConditionParameters.

type IsDeviceMatchConditionParametersMatchValuesItem

type IsDeviceMatchConditionParametersMatchValuesItem string
const (
	IsDeviceMatchConditionParametersMatchValuesItemDesktop IsDeviceMatchConditionParametersMatchValuesItem = "Desktop"
	IsDeviceMatchConditionParametersMatchValuesItemMobile  IsDeviceMatchConditionParametersMatchValuesItem = "Mobile"
)

func PossibleIsDeviceMatchConditionParametersMatchValuesItemValues

func PossibleIsDeviceMatchConditionParametersMatchValuesItemValues() []IsDeviceMatchConditionParametersMatchValuesItem

PossibleIsDeviceMatchConditionParametersMatchValuesItemValues returns the possible values for the IsDeviceMatchConditionParametersMatchValuesItem const type.

type IsDeviceMatchConditionParametersTypeName added in v0.3.0

type IsDeviceMatchConditionParametersTypeName string
const (
	IsDeviceMatchConditionParametersTypeNameDeliveryRuleIsDeviceConditionParameters IsDeviceMatchConditionParametersTypeName = "DeliveryRuleIsDeviceConditionParameters"
)

func PossibleIsDeviceMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleIsDeviceMatchConditionParametersTypeNameValues() []IsDeviceMatchConditionParametersTypeName

PossibleIsDeviceMatchConditionParametersTypeNameValues returns the possible values for the IsDeviceMatchConditionParametersTypeName const type.

type IsDeviceOperator

type IsDeviceOperator string

IsDeviceOperator - Describes operator to be matched

const (
	IsDeviceOperatorEqual IsDeviceOperator = "Equal"
)

func PossibleIsDeviceOperatorValues

func PossibleIsDeviceOperatorValues() []IsDeviceOperator

PossibleIsDeviceOperatorValues returns the possible values for the IsDeviceOperator const type.

type KeyVaultCertificateSourceParameters

type KeyVaultCertificateSourceParameters struct {
	// REQUIRED; Describes the action that shall be taken when the certificate is removed from Key Vault.
	DeleteRule *DeleteRule

	// REQUIRED; Resource group of the user's Key Vault containing the SSL certificate
	ResourceGroupName *string

	// REQUIRED; The name of Key Vault Secret (representing the full certificate PFX) in Key Vault.
	SecretName *string

	// REQUIRED; Subscription Id of the user's Key Vault containing the SSL certificate
	SubscriptionID *string

	// REQUIRED
	TypeName *KeyVaultCertificateSourceParametersTypeName

	// REQUIRED; Describes the action that shall be taken when the certificate is updated in Key Vault.
	UpdateRule *UpdateRule

	// REQUIRED; The name of the user's Key Vault containing the SSL certificate
	VaultName *string

	// The version(GUID) of Key Vault Secret in Key Vault.
	SecretVersion *string
}

KeyVaultCertificateSourceParameters - Describes the parameters for using a user's KeyVault certificate for securing custom domain.

func (KeyVaultCertificateSourceParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateSourceParameters.

func (*KeyVaultCertificateSourceParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateSourceParameters.

type KeyVaultCertificateSourceParametersTypeName added in v0.3.0

type KeyVaultCertificateSourceParametersTypeName string
const (
	KeyVaultCertificateSourceParametersTypeNameKeyVaultCertificateSourceParameters KeyVaultCertificateSourceParametersTypeName = "KeyVaultCertificateSourceParameters"
)

func PossibleKeyVaultCertificateSourceParametersTypeNameValues added in v0.3.0

func PossibleKeyVaultCertificateSourceParametersTypeNameValues() []KeyVaultCertificateSourceParametersTypeName

PossibleKeyVaultCertificateSourceParametersTypeNameValues returns the possible values for the KeyVaultCertificateSourceParametersTypeName const type.

type KeyVaultSigningKeyParameters

type KeyVaultSigningKeyParameters struct {
	// REQUIRED; Resource group of the user's Key Vault containing the secret
	ResourceGroupName *string

	// REQUIRED; The name of secret in Key Vault.
	SecretName *string

	// REQUIRED; The version(GUID) of secret in Key Vault.
	SecretVersion *string

	// REQUIRED; Subscription Id of the user's Key Vault containing the secret
	SubscriptionID *string

	// REQUIRED
	TypeName *KeyVaultSigningKeyParametersTypeName

	// REQUIRED; The name of the user's Key Vault containing the secret
	VaultName *string
}

KeyVaultSigningKeyParameters - Describes the parameters for using a user's KeyVault for URL Signing Key.

func (KeyVaultSigningKeyParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultSigningKeyParameters.

func (*KeyVaultSigningKeyParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSigningKeyParameters.

type KeyVaultSigningKeyParametersTypeName added in v0.3.0

type KeyVaultSigningKeyParametersTypeName string
const (
	KeyVaultSigningKeyParametersTypeNameKeyVaultSigningKeyParameters KeyVaultSigningKeyParametersTypeName = "KeyVaultSigningKeyParameters"
)

func PossibleKeyVaultSigningKeyParametersTypeNameValues added in v0.3.0

func PossibleKeyVaultSigningKeyParametersTypeNameValues() []KeyVaultSigningKeyParametersTypeName

PossibleKeyVaultSigningKeyParametersTypeNameValues returns the possible values for the KeyVaultSigningKeyParametersTypeName const type.

type LinkToDefaultDomain

type LinkToDefaultDomain string

LinkToDefaultDomain - whether this route will be linked to the default endpoint domain.

const (
	LinkToDefaultDomainDisabled LinkToDefaultDomain = "Disabled"
	LinkToDefaultDomainEnabled  LinkToDefaultDomain = "Enabled"
)

func PossibleLinkToDefaultDomainValues

func PossibleLinkToDefaultDomainValues() []LinkToDefaultDomain

PossibleLinkToDefaultDomainValues returns the possible values for the LinkToDefaultDomain const type.

type LinkedEndpoint added in v0.3.0

type LinkedEndpoint struct {
	// ARM Resource ID string.
	ID *string
}

LinkedEndpoint - Defines the ARM Resource ID for the linked endpoints

func (LinkedEndpoint) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LinkedEndpoint.

func (*LinkedEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedEndpoint.

type LoadBalancingSettingsParameters

type LoadBalancingSettingsParameters struct {
	// The additional latency in milliseconds for probes to fall into the lowest latency bucket
	AdditionalLatencyInMilliseconds *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
}

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

func (LoadBalancingSettingsParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsParameters.

func (*LoadBalancingSettingsParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingSettingsParameters.

type LoadParameters

type LoadParameters struct {
	// REQUIRED; The path to the content to be loaded. Path should be a relative file URL of the origin.
	ContentPaths []*string
}

LoadParameters - Parameters required for content load.

func (LoadParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoadParameters.

func (*LoadParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LoadParameters.

type LogAnalyticsClient

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

LogAnalyticsClient contains the methods for the LogAnalytics group. Don't use this type directly, use NewLogAnalyticsClient() instead.

func NewLogAnalyticsClient

func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogAnalyticsClient, error)

NewLogAnalyticsClient creates a new instance of LogAnalyticsClient with the specified values.

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

func (*LogAnalyticsClient) GetLogAnalyticsLocations

func (client *LogAnalyticsClient) GetLogAnalyticsLocations(ctx context.Context, resourceGroupName string, profileName string, options *LogAnalyticsClientGetLogAnalyticsLocationsOptions) (LogAnalyticsClientGetLogAnalyticsLocationsResponse, error)

GetLogAnalyticsLocations - Get all available location names for AFD log analytics report. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.
  • options - LogAnalyticsClientGetLogAnalyticsLocationsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsLocations method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetLogAnalyticsLocations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLogAnalyticsClient().GetLogAnalyticsLocations(ctx, "RG", "profile1", 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.ContinentsResponse = armcdn.ContinentsResponse{
	// 	Continents: []*armcdn.ContinentsResponseContinentsItem{
	// 		{
	// 			ID: to.Ptr("africa"),
	// 		},
	// 		{
	// 			ID: to.Ptr("antarctica"),
	// 		},
	// 		{
	// 			ID: to.Ptr("asia"),
	// 		},
	// 		{
	// 			ID: to.Ptr("europe"),
	// 		},
	// 		{
	// 			ID: to.Ptr("northAmerica"),
	// 		},
	// 		{
	// 			ID: to.Ptr("oceania"),
	// 		},
	// 		{
	// 			ID: to.Ptr("southAmerica"),
	// 	}},
	// 	CountryOrRegions: []*armcdn.ContinentsResponseCountryOrRegionsItem{
	// 		{
	// 			ContinentID: to.Ptr("africa"),
	// 			ID: to.Ptr("dz"),
	// 		},
	// 		{
	// 			ContinentID: to.Ptr("africa"),
	// 			ID: to.Ptr("ao"),
	// 		},
	// 		{
	// 			ContinentID: to.Ptr("africa"),
	// 			ID: to.Ptr("bw"),
	// 		},
	// 		{
	// 			ContinentID: to.Ptr("africa"),
	// 			ID: to.Ptr("bi"),
	// 	}},
	// }
}
Output:

func (*LogAnalyticsClient) GetLogAnalyticsMetrics

func (client *LogAnalyticsClient) GetLogAnalyticsMetrics(ctx context.Context, resourceGroupName string, profileName string, metrics []LogMetric, dateTimeBegin time.Time, dateTimeEnd time.Time, granularity LogMetricsGranularity, customDomains []string, protocols []string, options *LogAnalyticsClientGetLogAnalyticsMetricsOptions) (LogAnalyticsClientGetLogAnalyticsMetricsResponse, error)

GetLogAnalyticsMetrics - Get log report for AFD profile 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.
  • options - LogAnalyticsClientGetLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsMetrics method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetLogAnalyticsMetrics.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLogAnalyticsClient().GetLogAnalyticsMetrics(ctx, "RG", "profile1", []armcdn.LogMetric{
		armcdn.LogMetricClientRequestCount}, func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T04:30:00.000Z"); return t }(), func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T05:00:00.000Z"); return t }(), armcdn.LogMetricsGranularityPT5M, []string{
		"customdomain1.azurecdn.net",
		"customdomain2.azurecdn.net"}, []string{
		"https"}, &armcdn.LogAnalyticsClientGetLogAnalyticsMetricsOptions{GroupBy: []armcdn.LogMetricsGroupBy{
		armcdn.LogMetricsGroupByProtocol},
		Continents:       []string{},
		CountryOrRegions: []string{},
	})
	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.MetricsResponse = armcdn.MetricsResponse{
	// 	DateTimeBegin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T12:30:27.554+08:00"); return t}()),
	// 	DateTimeEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T13:00:27.554+08:00"); return t}()),
	// 	Granularity: to.Ptr(armcdn.MetricsResponseGranularityPT5M),
	// 	Series: []*armcdn.MetricsResponseSeriesItem{
	// 		{
	// 			Data: []*armcdn.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems{
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T04:35:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](4250),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T04:40:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](3120),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T04:45:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](2221),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T04:50:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](2466),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T04:55:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](2654),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T05:00:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](3565),
	// 			}},
	// 			Groups: []*armcdn.MetricsResponseSeriesPropertiesItemsItem{
	// 				{
	// 					Name: to.Ptr("protocol"),
	// 					Value: to.Ptr("https"),
	// 			}},
	// 			Metric: to.Ptr("clientRequestCount"),
	// 			Unit: to.Ptr(armcdn.MetricsResponseSeriesItemUnitCount),
	// 	}},
	// }
}
Output:

func (*LogAnalyticsClient) GetLogAnalyticsRankings

func (client *LogAnalyticsClient) GetLogAnalyticsRankings(ctx context.Context, resourceGroupName string, profileName string, rankings []LogRanking, metrics []LogRankingMetric, maxRanking int32, dateTimeBegin time.Time, dateTimeEnd time.Time, options *LogAnalyticsClientGetLogAnalyticsRankingsOptions) (LogAnalyticsClientGetLogAnalyticsRankingsResponse, error)

GetLogAnalyticsRankings - Get log analytics ranking report for AFD profile 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.
  • options - LogAnalyticsClientGetLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsRankings method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetLogAnalyticsRankings.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLogAnalyticsClient().GetLogAnalyticsRankings(ctx, "RG", "profile1", []armcdn.LogRanking{
		armcdn.LogRankingURL}, []armcdn.LogRankingMetric{
		armcdn.LogRankingMetricClientRequestCount}, 5, func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T06:49:27.554Z"); return t }(), func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T09:49:27.554Z"); return t }(), &armcdn.LogAnalyticsClientGetLogAnalyticsRankingsOptions{CustomDomains: []string{}})
	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.RankingsResponse = armcdn.RankingsResponse{
	// 	DateTimeBegin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T14:49:27.554+08:00"); return t}()),
	// 	DateTimeEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T17:49:27.554+08:00"); return t}()),
	// 	Tables: []*armcdn.RankingsResponseTablesItem{
	// 		{
	// 			Data: []*armcdn.RankingsResponseTablesPropertiesItemsItem{
	// 				{
	// 					Name: to.Ptr("https://testdomain.com/favicon.png"),
	// 					Metrics: []*armcdn.RankingsResponseTablesPropertiesItemsMetricsItem{
	// 						{
	// 							Metric: to.Ptr("clientRequestCount"),
	// 							Percentage: to.Ptr[float32](8.28133862733976),
	// 							Value: to.Ptr[int64](2336),
	// 					}},
	// 				},
	// 				{
	// 					Name: to.Ptr("https://testdomain.com/js/app.js"),
	// 					Metrics: []*armcdn.RankingsResponseTablesPropertiesItemsMetricsItem{
	// 						{
	// 							Metric: to.Ptr("clientRequestCount"),
	// 							Percentage: to.Ptr[float32](7.586500283607488),
	// 							Value: to.Ptr[int64](2140),
	// 					}},
	// 				},
	// 				{
	// 					Name: to.Ptr("https://testdomain.com/js/lang/en.js"),
	// 					Metrics: []*armcdn.RankingsResponseTablesPropertiesItemsMetricsItem{
	// 						{
	// 							Metric: to.Ptr("clientRequestCount"),
	// 							Percentage: to.Ptr[float32](5.445263754963131),
	// 							Value: to.Ptr[int64](1536),
	// 					}},
	// 				},
	// 				{
	// 					Name: to.Ptr("https://testdomain.com/js/lib.js"),
	// 					Metrics: []*armcdn.RankingsResponseTablesPropertiesItemsMetricsItem{
	// 						{
	// 							Metric: to.Ptr("clientRequestCount"),
	// 							Percentage: to.Ptr[float32](5.246738513896767),
	// 							Value: to.Ptr[int64](1480),
	// 					}},
	// 				},
	// 				{
	// 					Name: to.Ptr("https://cdn.exam.net/css/lib.css"),
	// 					Metrics: []*armcdn.RankingsResponseTablesPropertiesItemsMetricsItem{
	// 						{
	// 							Metric: to.Ptr("clientRequestCount"),
	// 							Percentage: to.Ptr[float32](5.147475893363584),
	// 							Value: to.Ptr[int64](1452),
	// 					}},
	// 			}},
	// 			Ranking: to.Ptr("url"),
	// 	}},
	// }
}
Output:

func (*LogAnalyticsClient) GetLogAnalyticsResources

func (client *LogAnalyticsClient) GetLogAnalyticsResources(ctx context.Context, resourceGroupName string, profileName string, options *LogAnalyticsClientGetLogAnalyticsResourcesOptions) (LogAnalyticsClientGetLogAnalyticsResourcesResponse, error)

GetLogAnalyticsResources - Get all endpoints and custom domains available for AFD log report 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.
  • options - LogAnalyticsClientGetLogAnalyticsResourcesOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsResources method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetLogAnalyticsResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLogAnalyticsClient().GetLogAnalyticsResources(ctx, "RG", "profile1", 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.ResourcesResponse = armcdn.ResourcesResponse{
	// 	CustomDomains: []*armcdn.ResourcesResponseCustomDomainsItem{
	// 		{
	// 			Name: to.Ptr("customdomain1.azurecdn.net"),
	// 			History: to.Ptr(true),
	// 			ID: to.Ptr("customdomain1.azurecdn.net"),
	// 		},
	// 		{
	// 			Name: to.Ptr("customdomain2.azurecdn.net"),
	// 			History: to.Ptr(true),
	// 			ID: to.Ptr("customdomain2.azurecdn.net"),
	// 		},
	// 		{
	// 			Name: to.Ptr("customdomain3.azurecdn.net"),
	// 			History: to.Ptr(true),
	// 			ID: to.Ptr("customdomain3.azurecdn.net"),
	// 	}},
	// 	Endpoints: []*armcdn.ResourcesResponseEndpointsItem{
	// 		{
	// 			Name: to.Ptr("endpoint1.azureedge.net"),
	// 			CustomDomains: []*armcdn.ResourcesResponseEndpointsPropertiesItemsItem{
	// 				{
	// 					Name: to.Ptr("customdomain1.azurecdn.net"),
	// 					EndpointID: to.Ptr("enbdpiont1"),
	// 					History: to.Ptr(true),
	// 					ID: to.Ptr("customdomain1.azurecdn.net"),
	// 				},
	// 				{
	// 					Name: to.Ptr("customdomain2.azurecdn.net"),
	// 					History: to.Ptr(true),
	// 					ID: to.Ptr("customdomain2.azurecdn.net"),
	// 			}},
	// 			History: to.Ptr(false),
	// 			ID: to.Ptr("endpoint1"),
	// 	}},
	// }
}
Output:

func (*LogAnalyticsClient) GetWafLogAnalyticsMetrics

func (client *LogAnalyticsClient) GetWafLogAnalyticsMetrics(ctx context.Context, resourceGroupName string, profileName string, metrics []WafMetric, dateTimeBegin time.Time, dateTimeEnd time.Time, granularity WafGranularity, options *LogAnalyticsClientGetWafLogAnalyticsMetricsOptions) (LogAnalyticsClientGetWafLogAnalyticsMetricsResponse, error)

GetWafLogAnalyticsMetrics - Get Waf related log analytics report for AFD profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.
  • options - LogAnalyticsClientGetWafLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsMetrics method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetWafLogAnalyticsMetrics.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLogAnalyticsClient().GetWafLogAnalyticsMetrics(ctx, "RG", "profile1", []armcdn.WafMetric{
		armcdn.WafMetricClientRequestCount}, func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T06:49:27.554Z"); return t }(), func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T09:49:27.554Z"); return t }(), armcdn.WafGranularityPT5M, &armcdn.LogAnalyticsClientGetWafLogAnalyticsMetricsOptions{Actions: []armcdn.WafAction{
		armcdn.WafActionBlock,
		armcdn.WafActionLog},
		GroupBy:   []armcdn.WafRankingGroupBy{},
		RuleTypes: []armcdn.WafRuleType{},
	})
	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.WafMetricsResponse = armcdn.WafMetricsResponse{
	// 	DateTimeBegin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T14:30:27.554+08:00"); return t}()),
	// 	DateTimeEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T17:00:27.554+08:00"); return t}()),
	// 	Granularity: to.Ptr(armcdn.WafMetricsResponseGranularityPT5M),
	// 	Series: []*armcdn.WafMetricsResponseSeriesItem{
	// 		{
	// 			Data: []*armcdn.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems{
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:05:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](2),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:10:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](32),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:15:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](31),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:20:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](63),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:25:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](50),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:30:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](12),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:35:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](8),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:40:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](21),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:45:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](30),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:50:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](18),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T07:55:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](28),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:00:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](3),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:05:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](58),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:10:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](42),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:15:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](17),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:20:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](21),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:25:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](41),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:30:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](8),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:35:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](15),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:40:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](25),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:45:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](13),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:50:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](17),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T08:55:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](29),
	// 				},
	// 				{
	// 					DateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T09:00:00+00:00"); return t}()),
	// 					Value: to.Ptr[float32](17),
	// 			}},
	// 			Groups: []*armcdn.WafMetricsResponseSeriesPropertiesItemsItem{
	// 			},
	// 			Metric: to.Ptr("clientRequestCount"),
	// 			Unit: to.Ptr(armcdn.WafMetricsResponseSeriesItemUnitCount),
	// 	}},
	// }
}
Output:

func (*LogAnalyticsClient) GetWafLogAnalyticsRankings

func (client *LogAnalyticsClient) GetWafLogAnalyticsRankings(ctx context.Context, resourceGroupName string, profileName string, metrics []WafMetric, dateTimeBegin time.Time, dateTimeEnd time.Time, maxRanking int32, rankings []WafRankingType, options *LogAnalyticsClientGetWafLogAnalyticsRankingsOptions) (LogAnalyticsClientGetWafLogAnalyticsRankingsResponse, error)

GetWafLogAnalyticsRankings - Get WAF log analytics charts for AFD profile 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.
  • options - LogAnalyticsClientGetWafLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsRankings method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetWafLogAnalyticsRankings.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLogAnalyticsClient().GetWafLogAnalyticsRankings(ctx, "RG", "profile1", []armcdn.WafMetric{
		armcdn.WafMetricClientRequestCount}, func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T06:49:27.554Z"); return t }(), func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T09:49:27.554Z"); return t }(), 5, []armcdn.WafRankingType{
		armcdn.WafRankingTypeRuleID}, &armcdn.LogAnalyticsClientGetWafLogAnalyticsRankingsOptions{Actions: []armcdn.WafAction{},
		RuleTypes: []armcdn.WafRuleType{},
	})
	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.WafRankingsResponse = armcdn.WafRankingsResponse{
	// 	Data: []*armcdn.WafRankingsResponseDataItem{
	// 		{
	// 			GroupValues: []*string{
	// 				to.Ptr("BlockRateLimit")},
	// 				Metrics: []*armcdn.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems{
	// 					{
	// 						Metric: to.Ptr("clientRequestCount"),
	// 						Percentage: to.Ptr[float64](0),
	// 						Value: to.Ptr[int64](1268),
	// 				}},
	// 		}},
	// 		DateTimeBegin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T14:49:27.554+08:00"); return t}()),
	// 		DateTimeEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-04T17:49:27.554+08:00"); return t}()),
	// 		Groups: []*string{
	// 			to.Ptr("ruleId")},
	// 		}
}
Output:

type LogAnalyticsClientGetLogAnalyticsLocationsOptions added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsLocationsOptions struct {
}

LogAnalyticsClientGetLogAnalyticsLocationsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsLocations method.

type LogAnalyticsClientGetLogAnalyticsLocationsResponse added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsLocationsResponse struct {
	ContinentsResponse
}

LogAnalyticsClientGetLogAnalyticsLocationsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsLocations.

type LogAnalyticsClientGetLogAnalyticsMetricsOptions added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsMetricsOptions struct {
	Continents       []string
	CountryOrRegions []string
	GroupBy          []LogMetricsGroupBy
}

LogAnalyticsClientGetLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsMetrics method.

type LogAnalyticsClientGetLogAnalyticsMetricsResponse added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsMetricsResponse struct {
	MetricsResponse
}

LogAnalyticsClientGetLogAnalyticsMetricsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsMetrics.

type LogAnalyticsClientGetLogAnalyticsRankingsOptions added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsRankingsOptions struct {
	CustomDomains []string
}

LogAnalyticsClientGetLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsRankings method.

type LogAnalyticsClientGetLogAnalyticsRankingsResponse added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsRankingsResponse struct {
	RankingsResponse
}

LogAnalyticsClientGetLogAnalyticsRankingsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsRankings.

type LogAnalyticsClientGetLogAnalyticsResourcesOptions added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsResourcesOptions struct {
}

LogAnalyticsClientGetLogAnalyticsResourcesOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsResources method.

type LogAnalyticsClientGetLogAnalyticsResourcesResponse added in v0.3.0

type LogAnalyticsClientGetLogAnalyticsResourcesResponse struct {
	ResourcesResponse
}

LogAnalyticsClientGetLogAnalyticsResourcesResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsResources.

type LogAnalyticsClientGetWafLogAnalyticsMetricsOptions added in v0.3.0

type LogAnalyticsClientGetWafLogAnalyticsMetricsOptions struct {
	Actions   []WafAction
	GroupBy   []WafRankingGroupBy
	RuleTypes []WafRuleType
}

LogAnalyticsClientGetWafLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsMetrics method.

type LogAnalyticsClientGetWafLogAnalyticsMetricsResponse added in v0.3.0

type LogAnalyticsClientGetWafLogAnalyticsMetricsResponse struct {
	WafMetricsResponse
}

LogAnalyticsClientGetWafLogAnalyticsMetricsResponse contains the response from method LogAnalyticsClient.GetWafLogAnalyticsMetrics.

type LogAnalyticsClientGetWafLogAnalyticsRankingsOptions added in v0.3.0

type LogAnalyticsClientGetWafLogAnalyticsRankingsOptions struct {
	Actions   []WafAction
	RuleTypes []WafRuleType
}

LogAnalyticsClientGetWafLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsRankings method.

type LogAnalyticsClientGetWafLogAnalyticsRankingsResponse added in v0.3.0

type LogAnalyticsClientGetWafLogAnalyticsRankingsResponse struct {
	WafRankingsResponse
}

LogAnalyticsClientGetWafLogAnalyticsRankingsResponse contains the response from method LogAnalyticsClient.GetWafLogAnalyticsRankings.

type LogMetric

type LogMetric string
const (
	LogMetricClientRequestBandwidth LogMetric = "clientRequestBandwidth"
	LogMetricClientRequestCount     LogMetric = "clientRequestCount"
	LogMetricClientRequestTraffic   LogMetric = "clientRequestTraffic"
	LogMetricOriginRequestBandwidth LogMetric = "originRequestBandwidth"
	LogMetricOriginRequestTraffic   LogMetric = "originRequestTraffic"
	LogMetricTotalLatency           LogMetric = "totalLatency"
)

func PossibleLogMetricValues

func PossibleLogMetricValues() []LogMetric

PossibleLogMetricValues returns the possible values for the LogMetric const type.

type LogMetricsGranularity

type LogMetricsGranularity string
const (
	LogMetricsGranularityP1D  LogMetricsGranularity = "P1D"
	LogMetricsGranularityPT1H LogMetricsGranularity = "PT1H"
	LogMetricsGranularityPT5M LogMetricsGranularity = "PT5M"
)

func PossibleLogMetricsGranularityValues

func PossibleLogMetricsGranularityValues() []LogMetricsGranularity

PossibleLogMetricsGranularityValues returns the possible values for the LogMetricsGranularity const type.

type LogMetricsGroupBy

type LogMetricsGroupBy string
const (
	LogMetricsGroupByCacheStatus     LogMetricsGroupBy = "cacheStatus"
	LogMetricsGroupByCountryOrRegion LogMetricsGroupBy = "countryOrRegion"
	LogMetricsGroupByCustomDomain    LogMetricsGroupBy = "customDomain"
	LogMetricsGroupByHTTPStatusCode  LogMetricsGroupBy = "httpStatusCode"
	LogMetricsGroupByProtocol        LogMetricsGroupBy = "protocol"
)

func PossibleLogMetricsGroupByValues

func PossibleLogMetricsGroupByValues() []LogMetricsGroupBy

PossibleLogMetricsGroupByValues returns the possible values for the LogMetricsGroupBy const type.

type LogRanking

type LogRanking string
const (
	LogRankingBrowser         LogRanking = "browser"
	LogRankingCountryOrRegion LogRanking = "countryOrRegion"
	LogRankingReferrer        LogRanking = "referrer"
	LogRankingURL             LogRanking = "url"
	LogRankingUserAgent       LogRanking = "userAgent"
)

func PossibleLogRankingValues

func PossibleLogRankingValues() []LogRanking

PossibleLogRankingValues returns the possible values for the LogRanking const type.

type LogRankingMetric

type LogRankingMetric string
const (
	LogRankingMetricClientRequestCount   LogRankingMetric = "clientRequestCount"
	LogRankingMetricClientRequestTraffic LogRankingMetric = "clientRequestTraffic"
	LogRankingMetricErrorCount           LogRankingMetric = "errorCount"
	LogRankingMetricHitCount             LogRankingMetric = "hitCount"
	LogRankingMetricMissCount            LogRankingMetric = "missCount"
	LogRankingMetricUserErrorCount       LogRankingMetric = "userErrorCount"
)

func PossibleLogRankingMetricValues

func PossibleLogRankingMetricValues() []LogRankingMetric

PossibleLogRankingMetricValues returns the possible values for the LogRankingMetric const type.

type LogSpecification added in v0.3.0

type LogSpecification struct {
	// Blob duration of specification.
	BlobDuration *string

	// Display name of log specification.
	DisplayName *string

	// Pattern to filter based on name
	LogFilterPattern *string

	// Name of log specification.
	Name *string
}

LogSpecification - Log specification of operation.

func (LogSpecification) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LogSpecification.

func (*LogSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.

type ManagedCertificate

type ManagedCertificate struct {
	// The type of the secret resource.
	Type *SecretType

	// READ-ONLY; Certificate expiration date.
	ExpirationDate *string

	// READ-ONLY; Subject name in the certificate.
	Subject *string
}

ManagedCertificate - Managed Certificate used for https

func (ManagedCertificate) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedCertificate.

func (*ManagedCertificate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCertificate.

type ManagedCertificateParameters

type ManagedCertificateParameters struct {
	// REQUIRED; The type of the secret resource.
	Type *SecretType

	// READ-ONLY; Certificate expiration date.
	ExpirationDate *string

	// READ-ONLY; Subject name in the certificate.
	Subject *string
}

ManagedCertificateParameters - Managed Certificate used for https

func (*ManagedCertificateParameters) GetSecretParameters added in v0.3.0

func (m *ManagedCertificateParameters) GetSecretParameters() *SecretParameters

GetSecretParameters implements the SecretParametersClassification interface for type ManagedCertificateParameters.

func (ManagedCertificateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedCertificateParameters.

func (*ManagedCertificateParameters) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCertificateParameters.

type ManagedHTTPSParameters added in v0.3.0

type ManagedHTTPSParameters struct {
	// REQUIRED; Defines the source of the SSL certificate.
	CertificateSource *CertificateSource

	// REQUIRED; Defines the certificate source parameters using CDN managed certificate for enabling SSL.
	CertificateSourceParameters *CertificateSourceParameters

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

	// TLS protocol version that will be used for Https
	MinimumTLSVersion *MinimumTLSVersion
}

ManagedHTTPSParameters - Defines the certificate source parameters using CDN managed certificate for enabling SSL.

func (*ManagedHTTPSParameters) GetCustomDomainHTTPSParameters added in v0.3.0

func (m *ManagedHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters

GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type ManagedHTTPSParameters.

func (ManagedHTTPSParameters) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedHTTPSParameters.

func (*ManagedHTTPSParameters) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHTTPSParameters.

type ManagedRuleDefinition

type ManagedRuleDefinition struct {
	// READ-ONLY; Describes the functionality of the managed rule.
	Description *string

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

ManagedRuleDefinition - Describes a managed rule definition.

func (ManagedRuleDefinition) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleDefinition.

func (*ManagedRuleDefinition) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleDefinition.

type ManagedRuleEnabledState

type ManagedRuleEnabledState string

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

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

func PossibleManagedRuleEnabledStateValues

func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState

PossibleManagedRuleEnabledStateValues returns the possible values for the ManagedRuleEnabledState const type.

type ManagedRuleGroupDefinition

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

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

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

ManagedRuleGroupDefinition - Describes a managed rule group.

func (ManagedRuleGroupDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupDefinition.

func (*ManagedRuleGroupDefinition) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupDefinition.

type ManagedRuleGroupOverride

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

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

ManagedRuleGroupOverride - Defines a managed rule group override setting.

func (ManagedRuleGroupOverride) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride.

func (*ManagedRuleGroupOverride) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupOverride.

type ManagedRuleOverride

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

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

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

ManagedRuleOverride - Defines a managed rule group override setting.

func (ManagedRuleOverride) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleOverride.

func (*ManagedRuleOverride) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleOverride.

type ManagedRuleSet

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

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

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

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

ManagedRuleSet - Defines a managed rule set.

func (ManagedRuleSet) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet.

func (*ManagedRuleSet) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSet.

type ManagedRuleSetDefinition

type ManagedRuleSetDefinition struct {
	// Describes managed rule set definition properties.
	Properties *ManagedRuleSetDefinitionProperties

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

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

ManagedRuleSetDefinition - Describes a managed rule set definition.

func (ManagedRuleSetDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinition.

func (*ManagedRuleSetDefinition) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinition.

type ManagedRuleSetDefinitionList

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

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

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

func (ManagedRuleSetDefinitionList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionList.

func (*ManagedRuleSetDefinitionList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionList.

type ManagedRuleSetDefinitionProperties

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

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

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

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

ManagedRuleSetDefinitionProperties - Properties for a managed rule set definition.

func (ManagedRuleSetDefinitionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionProperties.

func (*ManagedRuleSetDefinitionProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionProperties.

type ManagedRuleSetList

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

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

func (ManagedRuleSetList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetList.

func (*ManagedRuleSetList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetList.

type ManagedRuleSetsClient

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

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

func NewManagedRuleSetsClient

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

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

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

func (*ManagedRuleSetsClient) NewListPager added in v0.5.0

NewListPager - Lists all available managed rule sets.

Generated from API version 2021-06-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/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.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 = armcdn.ManagedRuleSetDefinitionList{
		// 	Value: []*armcdn.ManagedRuleSetDefinition{
		// 		{
		// 			Name: to.Ptr("DefaultRuleSet_1.0"),
		// 			Type: to.Ptr("Microsoft.Cdn/cdnwebapplicationfirewallmanagedrulesets"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.Cdn/CdnWebApplicationFirewallManagedRuleSets"),
		// 			Properties: &armcdn.ManagedRuleSetDefinitionProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				RuleGroups: []*armcdn.ManagedRuleGroupDefinition{
		// 					{
		// 						Description: to.Ptr("Description for rule group 1."),
		// 						RuleGroupName: to.Ptr("Group1"),
		// 						Rules: []*armcdn.ManagedRuleDefinition{
		// 							{
		// 								Description: to.Ptr("Generic managed web application firewall rule."),
		// 								RuleID: to.Ptr("GROUP1-0001"),
		// 							},
		// 							{
		// 								Description: to.Ptr("Generic managed web application firewall rule."),
		// 								RuleID: to.Ptr("GROUP1-0002"),
		// 						}},
		// 					},
		// 					{
		// 						Description: to.Ptr("Description for rule group 2."),
		// 						RuleGroupName: to.Ptr("Group2"),
		// 						Rules: []*armcdn.ManagedRuleDefinition{
		// 							{
		// 								Description: to.Ptr("Generic managed web application firewall rule."),
		// 								RuleID: to.Ptr("GROUP2-0001"),
		// 						}},
		// 				}},
		// 				RuleSetType: to.Ptr("DefaultRuleSet"),
		// 				RuleSetVersion: to.Ptr("preview-1.0"),
		// 			},
		// 			SKU: &armcdn.SKU{
		// 				Name: to.Ptr(armcdn.SKUNameStandardMicrosoft),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ManagedRuleSetsClientListOptions added in v0.3.0

type ManagedRuleSetsClientListOptions struct {
}

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

type ManagedRuleSetsClientListResponse added in v0.3.0

type ManagedRuleSetsClientListResponse struct {
	ManagedRuleSetDefinitionList
}

ManagedRuleSetsClientListResponse contains the response from method ManagedRuleSetsClient.NewListPager.

type ManagementClient added in v0.3.0

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

ManagementClient contains the methods for the CdnManagementClient group. Don't use this type directly, use NewManagementClient() instead.

func NewManagementClient added in v0.3.0

func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error)

NewManagementClient creates a new instance of ManagementClient with the specified values.

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

func (*ManagementClient) CheckEndpointNameAvailability added in v0.4.0

func (client *ManagementClient) CheckEndpointNameAvailability(ctx context.Context, resourceGroupName string, checkEndpointNameAvailabilityInput CheckEndpointNameAvailabilityInput, options *ManagementClientCheckEndpointNameAvailabilityOptions) (ManagementClientCheckEndpointNameAvailabilityResponse, error)

CheckEndpointNameAvailability - Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint. 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.
  • checkEndpointNameAvailabilityInput - Input to check.
  • options - ManagementClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckEndpointNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CheckEndpointNameAvailability.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagementClient().CheckEndpointNameAvailability(ctx, "myResourceGroup", armcdn.CheckEndpointNameAvailabilityInput{
		Name:                              to.Ptr("sampleName"),
		Type:                              to.Ptr(armcdn.ResourceTypeMicrosoftCdnProfilesAfdEndpoints),
		AutoGeneratedDomainNameLabelScope: to.Ptr(armcdn.AutoGeneratedDomainNameLabelScopeTenantReuse),
	}, 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.CheckEndpointNameAvailabilityOutput = armcdn.CheckEndpointNameAvailabilityOutput{
	// 	AvailableHostname: to.Ptr(""),
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

func (*ManagementClient) CheckNameAvailability added in v0.3.0

CheckNameAvailability - Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • checkNameAvailabilityInput - Input to check.
  • options - ManagementClientCheckNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CheckNameAvailability.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagementClient().CheckNameAvailability(ctx, armcdn.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armcdn.ResourceTypeMicrosoftCdnProfilesEndpoints),
	}, 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 = armcdn.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

func (*ManagementClient) CheckNameAvailabilityWithSubscription added in v0.3.0

CheckNameAvailabilityWithSubscription - Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • checkNameAvailabilityInput - Input to check.
  • options - ManagementClientCheckNameAvailabilityWithSubscriptionOptions contains the optional parameters for the ManagementClient.CheckNameAvailabilityWithSubscription method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CheckNameAvailabilityWithSubscription.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagementClient().CheckNameAvailabilityWithSubscription(ctx, armcdn.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armcdn.ResourceTypeMicrosoftCdnProfilesEndpoints),
	}, 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 = armcdn.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

func (*ManagementClient) ValidateProbe added in v0.3.0

ValidateProbe - Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • validateProbeInput - Input to check.
  • options - ManagementClientValidateProbeOptions contains the optional parameters for the ManagementClient.ValidateProbe method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/ValidateProbe.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagementClient().ValidateProbe(ctx, armcdn.ValidateProbeInput{
		ProbeURL: to.Ptr("https://www.bing.com/image"),
	}, 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.ValidateProbeOutput = armcdn.ValidateProbeOutput{
	// 	ErrorCode: to.Ptr("None"),
	// 	IsValid: to.Ptr(true),
	// }
}
Output:

type ManagementClientCheckEndpointNameAvailabilityOptions added in v0.4.0

type ManagementClientCheckEndpointNameAvailabilityOptions struct {
}

ManagementClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckEndpointNameAvailability method.

type ManagementClientCheckEndpointNameAvailabilityResponse added in v0.4.0

type ManagementClientCheckEndpointNameAvailabilityResponse struct {
	CheckEndpointNameAvailabilityOutput
}

ManagementClientCheckEndpointNameAvailabilityResponse contains the response from method ManagementClient.CheckEndpointNameAvailability.

type ManagementClientCheckNameAvailabilityOptions added in v0.3.0

type ManagementClientCheckNameAvailabilityOptions struct {
}

ManagementClientCheckNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckNameAvailability method.

type ManagementClientCheckNameAvailabilityResponse added in v0.3.0

type ManagementClientCheckNameAvailabilityResponse struct {
	CheckNameAvailabilityOutput
}

ManagementClientCheckNameAvailabilityResponse contains the response from method ManagementClient.CheckNameAvailability.

type ManagementClientCheckNameAvailabilityWithSubscriptionOptions added in v0.3.0

type ManagementClientCheckNameAvailabilityWithSubscriptionOptions struct {
}

ManagementClientCheckNameAvailabilityWithSubscriptionOptions contains the optional parameters for the ManagementClient.CheckNameAvailabilityWithSubscription method.

type ManagementClientCheckNameAvailabilityWithSubscriptionResponse added in v0.3.0

type ManagementClientCheckNameAvailabilityWithSubscriptionResponse struct {
	CheckNameAvailabilityOutput
}

ManagementClientCheckNameAvailabilityWithSubscriptionResponse contains the response from method ManagementClient.CheckNameAvailabilityWithSubscription.

type ManagementClientValidateProbeOptions added in v0.3.0

type ManagementClientValidateProbeOptions struct {
}

ManagementClientValidateProbeOptions contains the optional parameters for the ManagementClient.ValidateProbe method.

type ManagementClientValidateProbeResponse added in v0.3.0

type ManagementClientValidateProbeResponse struct {
	ValidateProbeOutput
}

ManagementClientValidateProbeResponse contains the response from method ManagementClient.ValidateProbe.

type MatchCondition

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

	// REQUIRED; Match variable to compare against.
	MatchVariable *WafMatchVariable

	// REQUIRED; Describes operator to be matched
	Operator *Operator

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

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

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

MatchCondition - Define match conditions

func (MatchCondition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MatchCondition.

func (*MatchCondition) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MatchCondition.

type MatchProcessingBehavior

type MatchProcessingBehavior string

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

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

func PossibleMatchProcessingBehaviorValues

func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior

PossibleMatchProcessingBehaviorValues returns the possible values for the MatchProcessingBehavior const type.

type MatchVariable

type MatchVariable string

MatchVariable - The name of the condition for the delivery rule.

const (
	MatchVariableClientPort       MatchVariable = "ClientPort"
	MatchVariableCookies          MatchVariable = "Cookies"
	MatchVariableHTTPVersion      MatchVariable = "HttpVersion"
	MatchVariableHostName         MatchVariable = "HostName"
	MatchVariableIsDevice         MatchVariable = "IsDevice"
	MatchVariablePostArgs         MatchVariable = "PostArgs"
	MatchVariableQueryString      MatchVariable = "QueryString"
	MatchVariableRemoteAddress    MatchVariable = "RemoteAddress"
	MatchVariableRequestBody      MatchVariable = "RequestBody"
	MatchVariableRequestHeader    MatchVariable = "RequestHeader"
	MatchVariableRequestMethod    MatchVariable = "RequestMethod"
	MatchVariableRequestScheme    MatchVariable = "RequestScheme"
	MatchVariableRequestURI       MatchVariable = "RequestUri"
	MatchVariableSSLProtocol      MatchVariable = "SslProtocol"
	MatchVariableServerPort       MatchVariable = "ServerPort"
	MatchVariableSocketAddr       MatchVariable = "SocketAddr"
	MatchVariableURLFileExtension MatchVariable = "UrlFileExtension"
	MatchVariableURLFileName      MatchVariable = "UrlFileName"
	MatchVariableURLPath          MatchVariable = "UrlPath"
)

func PossibleMatchVariableValues

func PossibleMatchVariableValues() []MatchVariable

PossibleMatchVariableValues returns the possible values for the MatchVariable const type.

type MetricAvailability added in v0.3.0

type MetricAvailability struct {
	BlobDuration *string
	TimeGrain    *string
}

MetricAvailability - Retention policy of a resource metric.

func (MetricAvailability) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MetricAvailability.

func (*MetricAvailability) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability.

type MetricSpecification added in v0.3.0

type MetricSpecification struct {
	// The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'.
	AggregationType *string

	// Retention policies of a resource metric.
	Availabilities []*MetricAvailability

	// The dimensions of metric
	Dimensions []*DimensionProperties

	// Display description of metric specification.
	DisplayDescription *string

	// Display name of metric specification.
	DisplayName *string

	// Property to specify whether to fill gap with zero.
	FillGapWithZero *bool

	// Property to specify metric is internal or not.
	IsInternal *bool

	// Pattern to filter based on name
	MetricFilterPattern *string

	// Name of metric specification.
	Name *string

	// The supported time grain types for the metrics.
	SupportedTimeGrainTypes []*string

	// The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'.
	Unit *string
}

MetricSpecification - Metric specification of operation.

func (MetricSpecification) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type MetricSpecification.

func (*MetricSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.

type MetricsResponse

type MetricsResponse struct {
	DateTimeBegin *time.Time
	DateTimeEnd   *time.Time
	Granularity   *MetricsResponseGranularity
	Series        []*MetricsResponseSeriesItem
}

MetricsResponse - Metrics Response

func (MetricsResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MetricsResponse.

func (*MetricsResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponse.

type MetricsResponseGranularity

type MetricsResponseGranularity string
const (
	MetricsResponseGranularityP1D  MetricsResponseGranularity = "P1D"
	MetricsResponseGranularityPT1H MetricsResponseGranularity = "PT1H"
	MetricsResponseGranularityPT5M MetricsResponseGranularity = "PT5M"
)

func PossibleMetricsResponseGranularityValues

func PossibleMetricsResponseGranularityValues() []MetricsResponseGranularity

PossibleMetricsResponseGranularityValues returns the possible values for the MetricsResponseGranularity const type.

type MetricsResponseSeriesItem

func (MetricsResponseSeriesItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MetricsResponseSeriesItem.

func (*MetricsResponseSeriesItem) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponseSeriesItem.

type MetricsResponseSeriesItemUnit

type MetricsResponseSeriesItemUnit string
const (
	MetricsResponseSeriesItemUnitBitsPerSecond MetricsResponseSeriesItemUnit = "bitsPerSecond"
	MetricsResponseSeriesItemUnitBytes         MetricsResponseSeriesItemUnit = "bytes"
	MetricsResponseSeriesItemUnitCount         MetricsResponseSeriesItemUnit = "count"
	MetricsResponseSeriesItemUnitMilliSeconds  MetricsResponseSeriesItemUnit = "milliSeconds"
)

func PossibleMetricsResponseSeriesItemUnitValues

func PossibleMetricsResponseSeriesItemUnitValues() []MetricsResponseSeriesItemUnit

PossibleMetricsResponseSeriesItemUnitValues returns the possible values for the MetricsResponseSeriesItemUnit const type.

type MetricsResponseSeriesPropertiesItemsItem

type MetricsResponseSeriesPropertiesItemsItem struct {
	Name  *string
	Value *string
}

func (MetricsResponseSeriesPropertiesItemsItem) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type MetricsResponseSeriesPropertiesItemsItem.

func (*MetricsResponseSeriesPropertiesItemsItem) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponseSeriesPropertiesItemsItem.

type MinimumTLSVersion

type MinimumTLSVersion string

MinimumTLSVersion - TLS protocol version that will be used for Https

const (
	MinimumTLSVersionNone  MinimumTLSVersion = "None"
	MinimumTLSVersionTLS10 MinimumTLSVersion = "TLS10"
	MinimumTLSVersionTLS12 MinimumTLSVersion = "TLS12"
)

func PossibleMinimumTLSVersionValues

func PossibleMinimumTLSVersionValues() []MinimumTLSVersion

PossibleMinimumTLSVersionValues returns the possible values for the MinimumTLSVersion const type.

type Operation

type Operation struct {
	// The object that represents the operation.
	Display *OperationDisplay

	// Indicates whether the operation is a data action
	IsDataAction *bool

	// Properties of operation, include metric specifications.
	OperationProperties *OperationProperties

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}
	Name *string

	// READ-ONLY; The origin of operations.
	Origin *string
}

Operation - CDN REST API operation

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Description of operation.
	Description *string

	// READ-ONLY; Operation type: Read, write, delete, etc.
	Operation *string

	// READ-ONLY; Service provider: Microsoft.Cdn
	Provider *string

	// READ-ONLY; Resource on which the operation is performed: Profile, endpoint, etc.
	Resource *string
}

OperationDisplay - The object that represents the operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationProperties added in v0.3.0

type OperationProperties struct {
	// One property of operation, include metric specifications.
	ServiceSpecification *ServiceSpecification
}

OperationProperties - Properties of operation, include metric specifications.

func (OperationProperties) MarshalJSON added in v1.1.0

func (o OperationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationProperties.

func (*OperationProperties) UnmarshalJSON added in v1.1.0

func (o *OperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

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

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists all of the available CDN REST API operations.

Generated from API version 2021-06-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().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.OperationsListResult = armcdn.OperationsListResult{
		// 	Value: []*armcdn.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/register/action"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("Registers the Microsoft.Cdn Resource Provider"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("Microsoft.Cdn Resource Provider"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/edgenodes/read"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("read"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("EdgeNode"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/edgenodes/write"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("write"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("EdgeNode"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/edgenodes/delete"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("delete"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("EdgeNode"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/profiles/read"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("read"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("Profile"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/profiles/write"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("write"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("Profile"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/operationresults/profileresults/write"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("write"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("Profile"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/operationresults/profileresults/delete"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("delete"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("Profile"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/operationresults/profileresults/CheckResourceUsage/action"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("CheckResourceUsage"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("Profile"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Cdn/operationresults/profileresults/GenerateSsoUri/action"),
		// 			Display: &armcdn.OperationDisplay{
		// 				Operation: to.Ptr("GenerateSsoUri"),
		// 				Provider: to.Ptr("Microsoft.Cdn"),
		// 				Resource: to.Ptr("Profile"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationsListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OperationsListResult

type OperationsListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string

	// List of CDN operations supported by the CDN resource provider.
	Value []*Operation
}

OperationsListResult - Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationsListResult) MarshalJSON

func (o OperationsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationsListResult.

func (*OperationsListResult) UnmarshalJSON added in v1.1.0

func (o *OperationsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationsListResult.

type Operator

type Operator string

Operator - Describes operator to be matched

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 OptimizationType

type OptimizationType string

OptimizationType - Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this information we can apply scenario driven optimization.

const (
	OptimizationTypeDynamicSiteAcceleration     OptimizationType = "DynamicSiteAcceleration"
	OptimizationTypeGeneralMediaStreaming       OptimizationType = "GeneralMediaStreaming"
	OptimizationTypeGeneralWebDelivery          OptimizationType = "GeneralWebDelivery"
	OptimizationTypeLargeFileDownload           OptimizationType = "LargeFileDownload"
	OptimizationTypeVideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming"
)

func PossibleOptimizationTypeValues

func PossibleOptimizationTypeValues() []OptimizationType

PossibleOptimizationTypeValues returns the possible values for the OptimizationType const type.

type Origin

type Origin struct {
	// The JSON object that contains the properties of the origin.
	Properties *OriginProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

Origin - CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins.

func (Origin) MarshalJSON

func (o Origin) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Origin.

func (*Origin) UnmarshalJSON added in v1.1.0

func (o *Origin) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Origin.

type OriginGroup

type OriginGroup struct {
	// The JSON object that contains the properties of the origin group.
	Properties *OriginGroupProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

OriginGroup - Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN.

func (OriginGroup) MarshalJSON

func (o OriginGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroup.

func (*OriginGroup) UnmarshalJSON added in v1.1.0

func (o *OriginGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroup.

type OriginGroupListResult

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

	// READ-ONLY; List of CDN origin groups within an endpoint
	Value []*OriginGroup
}

OriginGroupListResult - Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next set of results.

func (OriginGroupListResult) MarshalJSON

func (o OriginGroupListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroupListResult.

func (*OriginGroupListResult) UnmarshalJSON added in v1.1.0

func (o *OriginGroupListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupListResult.

type OriginGroupOverride added in v0.3.0

type OriginGroupOverride struct {
	// Protocol this rule will use when forwarding traffic to backends.
	ForwardingProtocol *ForwardingProtocol

	// defines the OriginGroup that would override the DefaultOriginGroup on route.
	OriginGroup *ResourceReference
}

OriginGroupOverride - Defines the parameters for the origin group override configuration.

func (OriginGroupOverride) MarshalJSON added in v1.1.0

func (o OriginGroupOverride) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroupOverride.

func (*OriginGroupOverride) UnmarshalJSON added in v1.1.0

func (o *OriginGroupOverride) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverride.

type OriginGroupOverrideAction

type OriginGroupOverrideAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *OriginGroupOverrideActionParameters
}

OriginGroupOverrideAction - Defines the origin group override action for the delivery rule.

func (*OriginGroupOverrideAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (o *OriginGroupOverrideAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type OriginGroupOverrideAction.

func (OriginGroupOverrideAction) MarshalJSON

func (o OriginGroupOverrideAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroupOverrideAction.

func (*OriginGroupOverrideAction) UnmarshalJSON

func (o *OriginGroupOverrideAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverrideAction.

type OriginGroupOverrideActionParameters

type OriginGroupOverrideActionParameters struct {
	// REQUIRED; defines the OriginGroup that would override the DefaultOriginGroup.
	OriginGroup *ResourceReference

	// REQUIRED
	TypeName *OriginGroupOverrideActionParametersTypeName
}

OriginGroupOverrideActionParameters - Defines the parameters for the origin group override action.

func (OriginGroupOverrideActionParameters) MarshalJSON added in v1.1.0

func (o OriginGroupOverrideActionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroupOverrideActionParameters.

func (*OriginGroupOverrideActionParameters) UnmarshalJSON added in v1.1.0

func (o *OriginGroupOverrideActionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverrideActionParameters.

type OriginGroupOverrideActionParametersTypeName added in v0.3.0

type OriginGroupOverrideActionParametersTypeName string
const (
	OriginGroupOverrideActionParametersTypeNameDeliveryRuleOriginGroupOverrideActionParameters OriginGroupOverrideActionParametersTypeName = "DeliveryRuleOriginGroupOverrideActionParameters"
)

func PossibleOriginGroupOverrideActionParametersTypeNameValues added in v0.3.0

func PossibleOriginGroupOverrideActionParametersTypeNameValues() []OriginGroupOverrideActionParametersTypeName

PossibleOriginGroupOverrideActionParametersTypeNameValues returns the possible values for the OriginGroupOverrideActionParametersTypeName const type.

type OriginGroupProperties

type OriginGroupProperties struct {
	// Health probe settings to the origin that is used to determine the health of the origin.
	HealthProbeSettings *HealthProbeParameters

	// The source of the content being delivered via CDN within given origin group.
	Origins []*ResourceReference

	// The JSON object that contains the properties to determine origin health using real requests/responses. This property is
	// currently not supported.
	ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters

	// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint
	// is added. Default is 10 mins. This property is currently not supported.
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32

	// READ-ONLY; Provisioning status of the origin group.
	ProvisioningState *OriginGroupProvisioningState

	// READ-ONLY; Resource status of the origin group.
	ResourceState *OriginGroupResourceState
}

OriginGroupProperties - The JSON object that contains the properties of the origin group.

func (OriginGroupProperties) MarshalJSON

func (o OriginGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroupProperties.

func (*OriginGroupProperties) UnmarshalJSON added in v1.1.0

func (o *OriginGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupProperties.

type OriginGroupProvisioningState added in v1.0.0

type OriginGroupProvisioningState string

OriginGroupProvisioningState - Provisioning status of the origin group.

const (
	OriginGroupProvisioningStateCreating  OriginGroupProvisioningState = "Creating"
	OriginGroupProvisioningStateDeleting  OriginGroupProvisioningState = "Deleting"
	OriginGroupProvisioningStateFailed    OriginGroupProvisioningState = "Failed"
	OriginGroupProvisioningStateSucceeded OriginGroupProvisioningState = "Succeeded"
	OriginGroupProvisioningStateUpdating  OriginGroupProvisioningState = "Updating"
)

func PossibleOriginGroupProvisioningStateValues added in v1.0.0

func PossibleOriginGroupProvisioningStateValues() []OriginGroupProvisioningState

PossibleOriginGroupProvisioningStateValues returns the possible values for the OriginGroupProvisioningState const type.

type OriginGroupResourceState

type OriginGroupResourceState string

OriginGroupResourceState - Resource status of the origin group.

const (
	OriginGroupResourceStateActive   OriginGroupResourceState = "Active"
	OriginGroupResourceStateCreating OriginGroupResourceState = "Creating"
	OriginGroupResourceStateDeleting OriginGroupResourceState = "Deleting"
)

func PossibleOriginGroupResourceStateValues

func PossibleOriginGroupResourceStateValues() []OriginGroupResourceState

PossibleOriginGroupResourceStateValues returns the possible values for the OriginGroupResourceState const type.

type OriginGroupUpdateParameters

type OriginGroupUpdateParameters struct {
	// The JSON object that contains the properties of the origin group.
	Properties *OriginGroupUpdatePropertiesParameters
}

OriginGroupUpdateParameters - Origin group properties needed for origin group creation or update.

func (OriginGroupUpdateParameters) MarshalJSON

func (o OriginGroupUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroupUpdateParameters.

func (*OriginGroupUpdateParameters) UnmarshalJSON added in v1.1.0

func (o *OriginGroupUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupUpdateParameters.

type OriginGroupUpdatePropertiesParameters

type OriginGroupUpdatePropertiesParameters struct {
	// Health probe settings to the origin that is used to determine the health of the origin.
	HealthProbeSettings *HealthProbeParameters

	// The source of the content being delivered via CDN within given origin group.
	Origins []*ResourceReference

	// The JSON object that contains the properties to determine origin health using real requests/responses. This property is
	// currently not supported.
	ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters

	// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint
	// is added. Default is 10 mins. This property is currently not supported.
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32
}

OriginGroupUpdatePropertiesParameters - The JSON object that contains the properties of the origin group.

func (OriginGroupUpdatePropertiesParameters) MarshalJSON

func (o OriginGroupUpdatePropertiesParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginGroupUpdatePropertiesParameters.

func (*OriginGroupUpdatePropertiesParameters) UnmarshalJSON added in v1.1.0

func (o *OriginGroupUpdatePropertiesParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupUpdatePropertiesParameters.

type OriginGroupsClient

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

OriginGroupsClient contains the methods for the OriginGroups group. Don't use this type directly, use NewOriginGroupsClient() instead.

func NewOriginGroupsClient

func NewOriginGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OriginGroupsClient, error)

NewOriginGroupsClient creates a new instance of OriginGroupsClient with the specified values.

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

func (*OriginGroupsClient) BeginCreate

func (client *OriginGroupsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, originGroup OriginGroup, options *OriginGroupsClientBeginCreateOptions) (*runtime.Poller[OriginGroupsClientCreateResponse], error)

BeginCreate - Creates a new origin group within the specified endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originGroupName - Name of the origin group which is unique within the endpoint.
  • originGroup - Origin group properties
  • options - OriginGroupsClientBeginCreateOptions contains the optional parameters for the OriginGroupsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOriginGroupsClient().BeginCreate(ctx, "RG", "profile1", "endpoint1", "origingroup1", armcdn.OriginGroup{
		Properties: &armcdn.OriginGroupProperties{
			HealthProbeSettings: &armcdn.HealthProbeParameters{
				ProbeIntervalInSeconds: to.Ptr[int32](120),
				ProbePath:              to.Ptr("/health.aspx"),
				ProbeProtocol:          to.Ptr(armcdn.ProbeProtocolHTTP),
				ProbeRequestType:       to.Ptr(armcdn.HealthProbeRequestTypeGET),
			},
			Origins: []*armcdn.ResourceReference{
				{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1"),
				}},
			ResponseBasedOriginErrorDetectionSettings: &armcdn.ResponseBasedOriginErrorDetectionParameters{
				ResponseBasedDetectedErrorTypes:          to.Ptr(armcdn.ResponseBasedDetectedErrorTypesTCPErrorsOnly),
				ResponseBasedFailoverThresholdPercentage: to.Ptr[int32](10),
			},
		},
	}, 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.OriginGroup = armcdn.OriginGroup{
	// 	Name: to.Ptr("origingroup1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origingroups"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
	// 	Properties: &armcdn.OriginGroupProperties{
	// 		HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 			ProbeIntervalInSeconds: to.Ptr[int32](120),
	// 			ProbePath: to.Ptr("/health.aspx"),
	// 			ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 			ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
	// 		},
	// 		Origins: []*armcdn.ResourceReference{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1"),
	// 		}},
	// 		ResponseBasedOriginErrorDetectionSettings: &armcdn.ResponseBasedOriginErrorDetectionParameters{
	// 			ResponseBasedDetectedErrorTypes: to.Ptr(armcdn.ResponseBasedDetectedErrorTypesTCPErrorsOnly),
	// 			ResponseBasedFailoverThresholdPercentage: to.Ptr[int32](10),
	// 		},
	// 		ProvisioningState: to.Ptr(armcdn.OriginGroupProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.OriginGroupResourceStateActive),
	// 	},
	// }
}
Output:

func (*OriginGroupsClient) BeginDelete

func (client *OriginGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, options *OriginGroupsClientBeginDeleteOptions) (*runtime.Poller[OriginGroupsClientDeleteResponse], error)

BeginDelete - Deletes an existing origin group within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originGroupName - Name of the origin group which is unique within the endpoint.
  • options - OriginGroupsClientBeginDeleteOptions contains the optional parameters for the OriginGroupsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOriginGroupsClient().BeginDelete(ctx, "RG", "profile1", "endpoint1", "originGroup1", 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 (*OriginGroupsClient) BeginUpdate

func (client *OriginGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, originGroupUpdateProperties OriginGroupUpdateParameters, options *OriginGroupsClientBeginUpdateOptions) (*runtime.Poller[OriginGroupsClientUpdateResponse], error)

BeginUpdate - Updates an existing origin group within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originGroupName - Name of the origin group which is unique within the endpoint.
  • originGroupUpdateProperties - Origin group properties
  • options - OriginGroupsClientBeginUpdateOptions contains the optional parameters for the OriginGroupsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOriginGroupsClient().BeginUpdate(ctx, "RG", "profile1", "endpoint1", "originGroup1", armcdn.OriginGroupUpdateParameters{
		Properties: &armcdn.OriginGroupUpdatePropertiesParameters{
			HealthProbeSettings: &armcdn.HealthProbeParameters{
				ProbeIntervalInSeconds: to.Ptr[int32](120),
				ProbePath:              to.Ptr("/health.aspx"),
				ProbeProtocol:          to.Ptr(armcdn.ProbeProtocolHTTP),
				ProbeRequestType:       to.Ptr(armcdn.HealthProbeRequestTypeGET),
			},
			Origins: []*armcdn.ResourceReference{
				{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin2"),
				}},
		},
	}, 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.OriginGroup = armcdn.OriginGroup{
	// 	Name: to.Ptr("www-someDomain-net"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origins"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net"),
	// 	Properties: &armcdn.OriginGroupProperties{
	// 		HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 			ProbeIntervalInSeconds: to.Ptr[int32](120),
	// 			ProbePath: to.Ptr("/health.aspx"),
	// 			ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 			ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
	// 		},
	// 		Origins: []*armcdn.ResourceReference{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin2"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armcdn.OriginGroupProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.OriginGroupResourceStateActive),
	// 	},
	// }
}
Output:

func (*OriginGroupsClient) Get

func (client *OriginGroupsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, options *OriginGroupsClientGetOptions) (OriginGroupsClientGetResponse, error)

Get - Gets an existing origin group within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originGroupName - Name of the origin group which is unique within the endpoint.
  • options - OriginGroupsClientGetOptions contains the optional parameters for the OriginGroupsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOriginGroupsClient().Get(ctx, "RG", "profile1", "endpoint1", "originGroup1", 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.OriginGroup = armcdn.OriginGroup{
	// 	Name: to.Ptr("origingroup1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origingroups"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
	// 	Properties: &armcdn.OriginGroupProperties{
	// 		HealthProbeSettings: &armcdn.HealthProbeParameters{
	// 			ProbeIntervalInSeconds: to.Ptr[int32](120),
	// 			ProbePath: to.Ptr("/health.aspx"),
	// 			ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
	// 			ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
	// 		},
	// 		Origins: []*armcdn.ResourceReference{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1"),
	// 		}},
	// 		ResponseBasedOriginErrorDetectionSettings: &armcdn.ResponseBasedOriginErrorDetectionParameters{
	// 			HTTPErrorRanges: []*armcdn.HTTPErrorRangeParameters{
	// 				{
	// 					Begin: to.Ptr[int32](500),
	// 					End: to.Ptr[int32](505),
	// 			}},
	// 			ResponseBasedDetectedErrorTypes: to.Ptr(armcdn.ResponseBasedDetectedErrorTypesTCPAndHTTPErrors),
	// 			ResponseBasedFailoverThresholdPercentage: to.Ptr[int32](10),
	// 		},
	// 		ProvisioningState: to.Ptr(armcdn.OriginGroupProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.OriginGroupResourceStateActive),
	// 	},
	// }
}
Output:

func (*OriginGroupsClient) NewListByEndpointPager added in v0.5.0

func (client *OriginGroupsClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *OriginGroupsClientListByEndpointOptions) *runtime.Pager[OriginGroupsClientListByEndpointResponse]

NewListByEndpointPager - Lists all of the existing origin groups within an endpoint.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - OriginGroupsClientListByEndpointOptions contains the optional parameters for the OriginGroupsClient.NewListByEndpointPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_ListByEndpoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOriginGroupsClient().NewListByEndpointPager("RG", "profile1", "endpoint1", 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.OriginGroupListResult = armcdn.OriginGroupListResult{
		// 	Value: []*armcdn.OriginGroup{
		// 		{
		// 			Name: to.Ptr("origingroup1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origingroups"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1"),
		// 			Properties: &armcdn.OriginGroupProperties{
		// 				HealthProbeSettings: &armcdn.HealthProbeParameters{
		// 					ProbeIntervalInSeconds: to.Ptr[int32](120),
		// 					ProbePath: to.Ptr("/health.aspx"),
		// 					ProbeProtocol: to.Ptr(armcdn.ProbeProtocolHTTP),
		// 					ProbeRequestType: to.Ptr(armcdn.HealthProbeRequestTypeGET),
		// 				},
		// 				Origins: []*armcdn.ResourceReference{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1"),
		// 				}},
		// 				ResponseBasedOriginErrorDetectionSettings: &armcdn.ResponseBasedOriginErrorDetectionParameters{
		// 					ResponseBasedDetectedErrorTypes: to.Ptr(armcdn.ResponseBasedDetectedErrorTypesTCPErrorsOnly),
		// 					ResponseBasedFailoverThresholdPercentage: to.Ptr[int32](10),
		// 				},
		// 				ProvisioningState: to.Ptr(armcdn.OriginGroupProvisioningStateSucceeded),
		// 				ResourceState: to.Ptr(armcdn.OriginGroupResourceStateActive),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OriginGroupsClientBeginCreateOptions added in v0.3.0

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

OriginGroupsClientBeginCreateOptions contains the optional parameters for the OriginGroupsClient.BeginCreate method.

type OriginGroupsClientBeginDeleteOptions added in v0.3.0

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

OriginGroupsClientBeginDeleteOptions contains the optional parameters for the OriginGroupsClient.BeginDelete method.

type OriginGroupsClientBeginUpdateOptions added in v0.3.0

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

OriginGroupsClientBeginUpdateOptions contains the optional parameters for the OriginGroupsClient.BeginUpdate method.

type OriginGroupsClientCreateResponse added in v0.3.0

type OriginGroupsClientCreateResponse struct {
	OriginGroup
}

OriginGroupsClientCreateResponse contains the response from method OriginGroupsClient.BeginCreate.

type OriginGroupsClientDeleteResponse added in v0.3.0

type OriginGroupsClientDeleteResponse struct {
}

OriginGroupsClientDeleteResponse contains the response from method OriginGroupsClient.BeginDelete.

type OriginGroupsClientGetOptions added in v0.3.0

type OriginGroupsClientGetOptions struct {
}

OriginGroupsClientGetOptions contains the optional parameters for the OriginGroupsClient.Get method.

type OriginGroupsClientGetResponse added in v0.3.0

type OriginGroupsClientGetResponse struct {
	OriginGroup
}

OriginGroupsClientGetResponse contains the response from method OriginGroupsClient.Get.

type OriginGroupsClientListByEndpointOptions added in v0.3.0

type OriginGroupsClientListByEndpointOptions struct {
}

OriginGroupsClientListByEndpointOptions contains the optional parameters for the OriginGroupsClient.NewListByEndpointPager method.

type OriginGroupsClientListByEndpointResponse added in v0.3.0

type OriginGroupsClientListByEndpointResponse struct {
	OriginGroupListResult
}

OriginGroupsClientListByEndpointResponse contains the response from method OriginGroupsClient.NewListByEndpointPager.

type OriginGroupsClientUpdateResponse added in v0.3.0

type OriginGroupsClientUpdateResponse struct {
	OriginGroup
}

OriginGroupsClientUpdateResponse contains the response from method OriginGroupsClient.BeginUpdate.

type OriginListResult

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

	// READ-ONLY; List of CDN origins within an endpoint
	Value []*Origin
}

OriginListResult - Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results.

func (OriginListResult) MarshalJSON

func (o OriginListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginListResult.

func (*OriginListResult) UnmarshalJSON added in v1.1.0

func (o *OriginListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginListResult.

type OriginProperties

type OriginProperties struct {
	// Origin is enabled for load balancing or not
	Enabled *bool

	// The value of the HTTP port. Must be between 1 and 65535.
	HTTPPort *int32

	// The value of the HTTPS port. Must be between 1 and 65535.
	HTTPSPort *int32

	// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across
	// all origins in an endpoint.
	HostName *string

	// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this
	// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services
	// require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint
	OriginHostHeader *string

	// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any
	// lower priority origin is healthy.Must be between 1 and 5
	Priority *int32

	// The Alias of the Private Link resource. Populating this optional field indicates that this origin 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 the origin in given origin group for load balancing. Must be between 1 and 1000
	Weight *int32

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

	// READ-ONLY; Provisioning status of the origin.
	ProvisioningState *OriginProvisioningState

	// READ-ONLY; Resource status of the origin.
	ResourceState *OriginResourceState
}

OriginProperties - The JSON object that contains the properties of the origin.

func (OriginProperties) MarshalJSON added in v1.1.0

func (o OriginProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginProperties.

func (*OriginProperties) UnmarshalJSON added in v1.1.0

func (o *OriginProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginProperties.

type OriginProvisioningState added in v1.0.0

type OriginProvisioningState string

OriginProvisioningState - Provisioning status of the origin.

const (
	OriginProvisioningStateCreating  OriginProvisioningState = "Creating"
	OriginProvisioningStateDeleting  OriginProvisioningState = "Deleting"
	OriginProvisioningStateFailed    OriginProvisioningState = "Failed"
	OriginProvisioningStateSucceeded OriginProvisioningState = "Succeeded"
	OriginProvisioningStateUpdating  OriginProvisioningState = "Updating"
)

func PossibleOriginProvisioningStateValues added in v1.0.0

func PossibleOriginProvisioningStateValues() []OriginProvisioningState

PossibleOriginProvisioningStateValues returns the possible values for the OriginProvisioningState const type.

type OriginResourceState

type OriginResourceState string

OriginResourceState - Resource status of the origin.

const (
	OriginResourceStateActive   OriginResourceState = "Active"
	OriginResourceStateCreating OriginResourceState = "Creating"
	OriginResourceStateDeleting OriginResourceState = "Deleting"
)

func PossibleOriginResourceStateValues

func PossibleOriginResourceStateValues() []OriginResourceState

PossibleOriginResourceStateValues returns the possible values for the OriginResourceState const type.

type OriginUpdateParameters

type OriginUpdateParameters struct {
	// The JSON object that contains the properties of the origin.
	Properties *OriginUpdatePropertiesParameters
}

OriginUpdateParameters - Origin properties needed for origin update.

func (OriginUpdateParameters) MarshalJSON

func (o OriginUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginUpdateParameters.

func (*OriginUpdateParameters) UnmarshalJSON added in v1.1.0

func (o *OriginUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginUpdateParameters.

type OriginUpdatePropertiesParameters

type OriginUpdatePropertiesParameters struct {
	// Origin is enabled for load balancing or not
	Enabled *bool

	// The value of the HTTP port. Must be between 1 and 65535.
	HTTPPort *int32

	// The value of the HTTPS port. Must be between 1 and 65535.
	HTTPSPort *int32

	// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across
	// all origins in an endpoint.
	HostName *string

	// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this
	// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services
	// require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint
	OriginHostHeader *string

	// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any
	// lower priority origin is healthy.Must be between 1 and 5
	Priority *int32

	// The Alias of the Private Link resource. Populating this optional field indicates that this origin 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 the origin in given origin group for load balancing. Must be between 1 and 1000
	Weight *int32
}

OriginUpdatePropertiesParameters - The JSON object that contains the properties of the origin.

func (OriginUpdatePropertiesParameters) MarshalJSON added in v1.1.0

func (o OriginUpdatePropertiesParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OriginUpdatePropertiesParameters.

func (*OriginUpdatePropertiesParameters) UnmarshalJSON added in v1.1.0

func (o *OriginUpdatePropertiesParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OriginUpdatePropertiesParameters.

type OriginsClient

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

OriginsClient contains the methods for the Origins group. Don't use this type directly, use NewOriginsClient() instead.

func NewOriginsClient

func NewOriginsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OriginsClient, error)

NewOriginsClient creates a new instance of OriginsClient with the specified values.

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

func (*OriginsClient) BeginCreate

func (client *OriginsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, origin Origin, options *OriginsClientBeginCreateOptions) (*runtime.Poller[OriginsClientCreateResponse], error)

BeginCreate - Creates a new origin within the specified endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originName - Name of the origin that is unique within the endpoint.
  • origin - Origin properties
  • options - OriginsClientBeginCreateOptions contains the optional parameters for the OriginsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOriginsClient().BeginCreate(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", armcdn.Origin{
		Properties: &armcdn.OriginProperties{
			Enabled:                    to.Ptr(true),
			HostName:                   to.Ptr("www.someDomain.net"),
			HTTPPort:                   to.Ptr[int32](80),
			HTTPSPort:                  to.Ptr[int32](443),
			OriginHostHeader:           to.Ptr("www.someDomain.net"),
			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](50),
		},
	}, 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.Origin = armcdn.Origin{
	// 	Name: to.Ptr("www-someDomain-net"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origins"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net"),
	// 	Properties: &armcdn.OriginProperties{
	// 		Enabled: to.Ptr(true),
	// 		HostName: to.Ptr("www.someDomain.net"),
	// 		HTTPPort: to.Ptr[int32](80),
	// 		HTTPSPort: to.Ptr[int32](443),
	// 		OriginHostHeader: to.Ptr("www.someDomain.net"),
	// 		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](50),
	// 		PrivateEndpointStatus: to.Ptr(armcdn.PrivateEndpointStatusPending),
	// 		ProvisioningState: to.Ptr(armcdn.OriginProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.OriginResourceStateActive),
	// 	},
	// }
}
Output:

func (*OriginsClient) BeginDelete

func (client *OriginsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, options *OriginsClientBeginDeleteOptions) (*runtime.Poller[OriginsClientDeleteResponse], error)

BeginDelete - Deletes an existing origin within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originName - Name of the origin which is unique within the endpoint.
  • options - OriginsClientBeginDeleteOptions contains the optional parameters for the OriginsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOriginsClient().BeginDelete(ctx, "RG", "profile1", "endpoint1", "origin1", 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 (*OriginsClient) BeginUpdate

func (client *OriginsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties OriginUpdateParameters, options *OriginsClientBeginUpdateOptions) (*runtime.Poller[OriginsClientUpdateResponse], error)

BeginUpdate - Updates an existing origin within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originName - Name of the origin which is unique within the endpoint.
  • originUpdateProperties - Origin properties
  • options - OriginsClientBeginUpdateOptions contains the optional parameters for the OriginsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOriginsClient().BeginUpdate(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", armcdn.OriginUpdateParameters{
		Properties: &armcdn.OriginUpdatePropertiesParameters{
			Enabled:          to.Ptr(true),
			HTTPPort:         to.Ptr[int32](42),
			HTTPSPort:        to.Ptr[int32](43),
			OriginHostHeader: to.Ptr("www.someDomain2.net"),
			Priority:         to.Ptr[int32](1),
			PrivateLinkAlias: to.Ptr("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"),
			Weight:           to.Ptr[int32](50),
		},
	}, 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.Origin = armcdn.Origin{
	// 	Name: to.Ptr("www-someDomain-net"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origins"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net"),
	// 	Properties: &armcdn.OriginProperties{
	// 		Enabled: to.Ptr(true),
	// 		HostName: to.Ptr("www.someDomain.net"),
	// 		HTTPPort: to.Ptr[int32](42),
	// 		HTTPSPort: to.Ptr[int32](43),
	// 		OriginHostHeader: to.Ptr("www.someDomain2.net"),
	// 		Priority: to.Ptr[int32](1),
	// 		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](50),
	// 		PrivateEndpointStatus: to.Ptr(armcdn.PrivateEndpointStatusPending),
	// 		ProvisioningState: to.Ptr(armcdn.OriginProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.OriginResourceStateActive),
	// 	},
	// }
}
Output:

func (*OriginsClient) Get

func (client *OriginsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, options *OriginsClientGetOptions) (OriginsClientGetResponse, error)

Get - Gets an existing origin within an endpoint. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • originName - Name of the origin which is unique within the endpoint.
  • options - OriginsClientGetOptions contains the optional parameters for the OriginsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOriginsClient().Get(ctx, "RG", "profile1", "endpoint1", "www-someDomain-net", 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.Origin = armcdn.Origin{
	// 	Name: to.Ptr("www-someDomain-net"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origins"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net"),
	// 	Properties: &armcdn.OriginProperties{
	// 		Enabled: to.Ptr(true),
	// 		HostName: to.Ptr("www.someDomain.net"),
	// 		OriginHostHeader: to.Ptr("www.someDomain.net"),
	// 		Priority: to.Ptr[int32](1),
	// 		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](50),
	// 		PrivateEndpointStatus: to.Ptr(armcdn.PrivateEndpointStatusPending),
	// 		ProvisioningState: to.Ptr(armcdn.OriginProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.OriginResourceStateActive),
	// 	},
	// }
}
Output:

func (*OriginsClient) NewListByEndpointPager added in v0.5.0

func (client *OriginsClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *OriginsClientListByEndpointOptions) *runtime.Pager[OriginsClientListByEndpointResponse]

NewListByEndpointPager - Lists all of the existing origins within an endpoint.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - OriginsClientListByEndpointOptions contains the optional parameters for the OriginsClient.NewListByEndpointPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_ListByEndpoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOriginsClient().NewListByEndpointPager("RG", "profile1", "endpoint1", 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.OriginListResult = armcdn.OriginListResult{
		// 	Value: []*armcdn.Origin{
		// 		{
		// 			Name: to.Ptr("www-someDomain-net"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/endpoints/origins"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net"),
		// 			Properties: &armcdn.OriginProperties{
		// 				Enabled: to.Ptr(true),
		// 				HostName: to.Ptr("www.someDomain.net"),
		// 				OriginHostHeader: to.Ptr("www.someDomain.net"),
		// 				Priority: to.Ptr[int32](1),
		// 				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](50),
		// 				PrivateEndpointStatus: to.Ptr(armcdn.PrivateEndpointStatusPending),
		// 				ProvisioningState: to.Ptr(armcdn.OriginProvisioningStateSucceeded),
		// 				ResourceState: to.Ptr(armcdn.OriginResourceStateActive),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OriginsClientBeginCreateOptions added in v0.3.0

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

OriginsClientBeginCreateOptions contains the optional parameters for the OriginsClient.BeginCreate method.

type OriginsClientBeginDeleteOptions added in v0.3.0

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

OriginsClientBeginDeleteOptions contains the optional parameters for the OriginsClient.BeginDelete method.

type OriginsClientBeginUpdateOptions added in v0.3.0

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

OriginsClientBeginUpdateOptions contains the optional parameters for the OriginsClient.BeginUpdate method.

type OriginsClientCreateResponse added in v0.3.0

type OriginsClientCreateResponse struct {
	Origin
}

OriginsClientCreateResponse contains the response from method OriginsClient.BeginCreate.

type OriginsClientDeleteResponse added in v0.3.0

type OriginsClientDeleteResponse struct {
}

OriginsClientDeleteResponse contains the response from method OriginsClient.BeginDelete.

type OriginsClientGetOptions added in v0.3.0

type OriginsClientGetOptions struct {
}

OriginsClientGetOptions contains the optional parameters for the OriginsClient.Get method.

type OriginsClientGetResponse added in v0.3.0

type OriginsClientGetResponse struct {
	Origin
}

OriginsClientGetResponse contains the response from method OriginsClient.Get.

type OriginsClientListByEndpointOptions added in v0.3.0

type OriginsClientListByEndpointOptions struct {
}

OriginsClientListByEndpointOptions contains the optional parameters for the OriginsClient.NewListByEndpointPager method.

type OriginsClientListByEndpointResponse added in v0.3.0

type OriginsClientListByEndpointResponse struct {
	OriginListResult
}

OriginsClientListByEndpointResponse contains the response from method OriginsClient.NewListByEndpointPager.

type OriginsClientUpdateResponse added in v0.3.0

type OriginsClientUpdateResponse struct {
	Origin
}

OriginsClientUpdateResponse contains the response from method OriginsClient.BeginUpdate.

type ParamIndicator

type ParamIndicator string

ParamIndicator - Indicates the purpose of the parameter

const (
	ParamIndicatorExpires   ParamIndicator = "Expires"
	ParamIndicatorKeyID     ParamIndicator = "KeyId"
	ParamIndicatorSignature ParamIndicator = "Signature"
)

func PossibleParamIndicatorValues

func PossibleParamIndicatorValues() []ParamIndicator

PossibleParamIndicatorValues returns the possible values for the ParamIndicator 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 - Azure Subscription ID.
  • 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, cdnWebApplicationFirewallPolicy 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 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • policyName - The name of the CdnWebApplicationFirewallPolicy.
  • cdnWebApplicationFirewallPolicy - 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/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginCreateOrUpdate(ctx, "rg1", "MicrosoftCdnWafPolicy", armcdn.WebApplicationFirewallPolicy{
		Location: to.Ptr("WestUs"),
		Properties: &armcdn.WebApplicationFirewallPolicyProperties{
			CustomRules: &armcdn.CustomRuleList{
				Rules: []*armcdn.CustomRule{
					{
						Name:         to.Ptr("CustomRule1"),
						Action:       to.Ptr(armcdn.ActionTypeBlock),
						EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
						MatchConditions: []*armcdn.MatchCondition{
							{
								MatchValue: []*string{
									to.Ptr("CH")},
								MatchVariable:   to.Ptr(armcdn.WafMatchVariableRemoteAddr),
								NegateCondition: to.Ptr(false),
								Operator:        to.Ptr(armcdn.OperatorGeoMatch),
								Transforms:      []*armcdn.TransformType{},
							},
							{
								MatchValue: []*string{
									to.Ptr("windows")},
								MatchVariable:   to.Ptr(armcdn.WafMatchVariableRequestHeader),
								NegateCondition: to.Ptr(false),
								Operator:        to.Ptr(armcdn.OperatorContains),
								Selector:        to.Ptr("UserAgent"),
								Transforms:      []*armcdn.TransformType{},
							},
							{
								MatchValue: []*string{
									to.Ptr("<?php"),
									to.Ptr("?>")},
								MatchVariable:   to.Ptr(armcdn.WafMatchVariableQueryString),
								NegateCondition: to.Ptr(false),
								Operator:        to.Ptr(armcdn.OperatorContains),
								Selector:        to.Ptr("search"),
								Transforms: []*armcdn.TransformType{
									to.Ptr(armcdn.TransformTypeURLDecode),
									to.Ptr(armcdn.TransformTypeLowercase)},
							}},
						Priority: to.Ptr[int32](2),
					}},
			},
			ManagedRules: &armcdn.ManagedRuleSetList{
				ManagedRuleSets: []*armcdn.ManagedRuleSet{
					{
						RuleGroupOverrides: []*armcdn.ManagedRuleGroupOverride{
							{
								RuleGroupName: to.Ptr("Group1"),
								Rules: []*armcdn.ManagedRuleOverride{
									{
										Action:       to.Ptr(armcdn.ActionTypeRedirect),
										EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateEnabled),
										RuleID:       to.Ptr("GROUP1-0001"),
									},
									{
										EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateDisabled),
										RuleID:       to.Ptr("GROUP1-0002"),
									}},
							}},
						RuleSetType:    to.Ptr("DefaultRuleSet"),
						RuleSetVersion: to.Ptr("preview-1.0"),
					}},
			},
			PolicySettings: &armcdn.PolicySettings{
				DefaultCustomBlockResponseBody:       to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
				DefaultCustomBlockResponseStatusCode: to.Ptr(armcdn.PolicySettingsDefaultCustomBlockResponseStatusCode(200)),
				DefaultRedirectURL:                   to.Ptr("http://www.bing.com"),
			},
			RateLimitRules: &armcdn.RateLimitRuleList{
				Rules: []*armcdn.RateLimitRule{
					{
						Name:         to.Ptr("RateLimitRule1"),
						Action:       to.Ptr(armcdn.ActionTypeBlock),
						EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
						MatchConditions: []*armcdn.MatchCondition{
							{
								MatchValue: []*string{
									to.Ptr("192.168.1.0/24"),
									to.Ptr("10.0.0.0/24")},
								MatchVariable:   to.Ptr(armcdn.WafMatchVariableRemoteAddr),
								NegateCondition: to.Ptr(false),
								Operator:        to.Ptr(armcdn.OperatorIPMatch),
								Transforms:      []*armcdn.TransformType{},
							}},
						Priority:                   to.Ptr[int32](1),
						RateLimitDurationInMinutes: to.Ptr[int32](0),
						RateLimitThreshold:         to.Ptr[int32](1000),
					}},
			},
		},
		SKU: &armcdn.SKU{
			Name: to.Ptr(armcdn.SKUNameStandardMicrosoft),
		},
	}, 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 = armcdn.WebApplicationFirewallPolicy{
	// 	Name: to.Ptr("MicrosoftCdnWafPolicy"),
	// 	Type: to.Ptr("Microsoft.Cdn/cdnwebapplicationfirewallpolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/MicrosoftCdnWafPolicy"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armcdn.WebApplicationFirewallPolicyProperties{
	// 		CustomRules: &armcdn.CustomRuleList{
	// 			Rules: []*armcdn.CustomRule{
	// 				{
	// 					Name: to.Ptr("CustomRule1"),
	// 					Action: to.Ptr(armcdn.ActionTypeBlock),
	// 					EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
	// 					MatchConditions: []*armcdn.MatchCondition{
	// 						{
	// 							MatchValue: []*string{
	// 								to.Ptr("CH")},
	// 								MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
	// 								NegateCondition: to.Ptr(false),
	// 								Operator: to.Ptr(armcdn.OperatorGeoMatch),
	// 								Transforms: []*armcdn.TransformType{
	// 								},
	// 							},
	// 							{
	// 								MatchValue: []*string{
	// 									to.Ptr("windows")},
	// 									MatchVariable: to.Ptr(armcdn.WafMatchVariableRequestHeader),
	// 									NegateCondition: to.Ptr(false),
	// 									Operator: to.Ptr(armcdn.OperatorContains),
	// 									Selector: to.Ptr("UserAgent"),
	// 									Transforms: []*armcdn.TransformType{
	// 									},
	// 								},
	// 								{
	// 									MatchValue: []*string{
	// 										to.Ptr("<?php"),
	// 										to.Ptr("?>")},
	// 										MatchVariable: to.Ptr(armcdn.WafMatchVariableQueryString),
	// 										NegateCondition: to.Ptr(false),
	// 										Operator: to.Ptr(armcdn.OperatorContains),
	// 										Selector: to.Ptr("search"),
	// 										Transforms: []*armcdn.TransformType{
	// 											to.Ptr(armcdn.TransformTypeURLDecode),
	// 											to.Ptr(armcdn.TransformTypeLowercase)},
	// 									}},
	// 									Priority: to.Ptr[int32](2),
	// 							}},
	// 						},
	// 						EndpointLinks: []*armcdn.LinkedEndpoint{
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint1"),
	// 							},
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint2"),
	// 						}},
	// 						ManagedRules: &armcdn.ManagedRuleSetList{
	// 							ManagedRuleSets: []*armcdn.ManagedRuleSet{
	// 								{
	// 									RuleGroupOverrides: []*armcdn.ManagedRuleGroupOverride{
	// 										{
	// 											RuleGroupName: to.Ptr("Group1"),
	// 											Rules: []*armcdn.ManagedRuleOverride{
	// 												{
	// 													Action: to.Ptr(armcdn.ActionTypeRedirect),
	// 													EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateEnabled),
	// 													RuleID: to.Ptr("GROUP1-0001"),
	// 												},
	// 												{
	// 													EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateDisabled),
	// 													RuleID: to.Ptr("GROUP1-0002"),
	// 											}},
	// 									}},
	// 									RuleSetType: to.Ptr("DefaultRuleSet"),
	// 									RuleSetVersion: to.Ptr("preview-1.0"),
	// 							}},
	// 						},
	// 						PolicySettings: &armcdn.PolicySettings{
	// 							DefaultCustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
	// 							DefaultCustomBlockResponseStatusCode: to.Ptr(armcdn.PolicySettingsDefaultCustomBlockResponseStatusCode(200)),
	// 							DefaultRedirectURL: to.Ptr("http://www.bing.com"),
	// 							EnabledState: to.Ptr(armcdn.PolicyEnabledStateEnabled),
	// 							Mode: to.Ptr(armcdn.PolicyModePrevention),
	// 						},
	// 						ProvisioningState: to.Ptr(armcdn.ProvisioningStateSucceeded),
	// 						RateLimitRules: &armcdn.RateLimitRuleList{
	// 							Rules: []*armcdn.RateLimitRule{
	// 								{
	// 									Name: to.Ptr("RateLimitRule1"),
	// 									Action: to.Ptr(armcdn.ActionTypeBlock),
	// 									EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
	// 									MatchConditions: []*armcdn.MatchCondition{
	// 										{
	// 											MatchValue: []*string{
	// 												to.Ptr("192.168.1.0/24"),
	// 												to.Ptr("10.0.0.0/24")},
	// 												MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
	// 												NegateCondition: to.Ptr(false),
	// 												Operator: to.Ptr(armcdn.OperatorIPMatch),
	// 												Transforms: []*armcdn.TransformType{
	// 												},
	// 										}},
	// 										Priority: to.Ptr[int32](1),
	// 										RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 										RateLimitThreshold: to.Ptr[int32](1000),
	// 								}},
	// 							},
	// 							ResourceState: to.Ptr(armcdn.PolicyResourceStateEnabled),
	// 						},
	// 						SKU: &armcdn.SKU{
	// 							Name: to.Ptr(armcdn.SKUNameStandardMicrosoft),
	// 						},
	// 					}
}
Output:

func (*PoliciesClient) BeginUpdate

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

BeginUpdate - Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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.
  • policyName - The name of the CdnWebApplicationFirewallPolicy.
  • cdnWebApplicationFirewallPolicyPatchParameters - CdnWebApplicationFirewallPolicy 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/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafPatchPolicy.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginUpdate(ctx, "rg1", "MicrosoftCdnWafPolicy", armcdn.WebApplicationFirewallPolicyPatchParameters{
		Tags: map[string]*string{
			"foo": to.Ptr("bar"),
		},
	}, 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 = armcdn.WebApplicationFirewallPolicy{
	// 	Name: to.Ptr("MicrosoftCdnWafPolicy"),
	// 	Type: to.Ptr("Microsoft.Cdn/cdnwebapplicationfirewallpolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/MicrosoftCdnWafPolicy"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"foo": to.Ptr("bar"),
	// 	},
	// 	Properties: &armcdn.WebApplicationFirewallPolicyProperties{
	// 		CustomRules: &armcdn.CustomRuleList{
	// 			Rules: []*armcdn.CustomRule{
	// 				{
	// 					Name: to.Ptr("CustomRule1"),
	// 					Action: to.Ptr(armcdn.ActionTypeBlock),
	// 					EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
	// 					MatchConditions: []*armcdn.MatchCondition{
	// 						{
	// 							MatchValue: []*string{
	// 								to.Ptr("CH")},
	// 								MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
	// 								NegateCondition: to.Ptr(false),
	// 								Operator: to.Ptr(armcdn.OperatorGeoMatch),
	// 								Transforms: []*armcdn.TransformType{
	// 								},
	// 							},
	// 							{
	// 								MatchValue: []*string{
	// 									to.Ptr("windows")},
	// 									MatchVariable: to.Ptr(armcdn.WafMatchVariableRequestHeader),
	// 									NegateCondition: to.Ptr(false),
	// 									Operator: to.Ptr(armcdn.OperatorContains),
	// 									Selector: to.Ptr("UserAgent"),
	// 									Transforms: []*armcdn.TransformType{
	// 									},
	// 								},
	// 								{
	// 									MatchValue: []*string{
	// 										to.Ptr("<?php"),
	// 										to.Ptr("?>")},
	// 										MatchVariable: to.Ptr(armcdn.WafMatchVariableQueryString),
	// 										NegateCondition: to.Ptr(false),
	// 										Operator: to.Ptr(armcdn.OperatorContains),
	// 										Selector: to.Ptr("search"),
	// 										Transforms: []*armcdn.TransformType{
	// 											to.Ptr(armcdn.TransformTypeURLDecode),
	// 											to.Ptr(armcdn.TransformTypeLowercase)},
	// 									}},
	// 									Priority: to.Ptr[int32](2),
	// 							}},
	// 						},
	// 						EndpointLinks: []*armcdn.LinkedEndpoint{
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint1"),
	// 							},
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint2"),
	// 						}},
	// 						ManagedRules: &armcdn.ManagedRuleSetList{
	// 							ManagedRuleSets: []*armcdn.ManagedRuleSet{
	// 								{
	// 									RuleGroupOverrides: []*armcdn.ManagedRuleGroupOverride{
	// 										{
	// 											RuleGroupName: to.Ptr("Group1"),
	// 											Rules: []*armcdn.ManagedRuleOverride{
	// 												{
	// 													Action: to.Ptr(armcdn.ActionTypeRedirect),
	// 													EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateEnabled),
	// 													RuleID: to.Ptr("GROUP1-0001"),
	// 												},
	// 												{
	// 													EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateDisabled),
	// 													RuleID: to.Ptr("GROUP1-0002"),
	// 											}},
	// 									}},
	// 									RuleSetType: to.Ptr("DefaultRuleSet"),
	// 									RuleSetVersion: to.Ptr("preview-1.0"),
	// 							}},
	// 						},
	// 						PolicySettings: &armcdn.PolicySettings{
	// 							DefaultCustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
	// 							DefaultCustomBlockResponseStatusCode: to.Ptr(armcdn.PolicySettingsDefaultCustomBlockResponseStatusCode(403)),
	// 							DefaultRedirectURL: to.Ptr("http://www.bing.com"),
	// 							EnabledState: to.Ptr(armcdn.PolicyEnabledStateEnabled),
	// 							Mode: to.Ptr(armcdn.PolicyModePrevention),
	// 						},
	// 						ProvisioningState: to.Ptr(armcdn.ProvisioningStateSucceeded),
	// 						RateLimitRules: &armcdn.RateLimitRuleList{
	// 							Rules: []*armcdn.RateLimitRule{
	// 								{
	// 									Name: to.Ptr("RateLimitRule1"),
	// 									Action: to.Ptr(armcdn.ActionTypeBlock),
	// 									EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
	// 									MatchConditions: []*armcdn.MatchCondition{
	// 										{
	// 											MatchValue: []*string{
	// 												to.Ptr("192.168.1.0/24"),
	// 												to.Ptr("10.0.0.0/24")},
	// 												MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
	// 												NegateCondition: to.Ptr(false),
	// 												Operator: to.Ptr(armcdn.OperatorIPMatch),
	// 												Transforms: []*armcdn.TransformType{
	// 												},
	// 										}},
	// 										Priority: to.Ptr[int32](1),
	// 										RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 										RateLimitThreshold: to.Ptr[int32](1000),
	// 								}},
	// 							},
	// 							ResourceState: to.Ptr(armcdn.PolicyResourceStateEnabled),
	// 						},
	// 						SKU: &armcdn.SKU{
	// 							Name: to.Ptr(armcdn.SKUNameStandardMicrosoft),
	// 						},
	// 					}
}
Output:

func (*PoliciesClient) Delete

func (client *PoliciesClient) Delete(ctx context.Context, resourceGroupName string, policyName string, options *PoliciesClientDeleteOptions) (PoliciesClientDeleteResponse, error)

Delete - Deletes Policy 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.
  • policyName - The name of the CdnWebApplicationFirewallPolicy.
  • options - PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewPoliciesClient().Delete(ctx, "rg1", "Policy1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
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 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • policyName - The name of the CdnWebApplicationFirewallPolicy.
  • 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/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPoliciesClient().Get(ctx, "rg1", "MicrosoftCdnWafPolicy", 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 = armcdn.WebApplicationFirewallPolicy{
	// 	Name: to.Ptr("MicrosoftCdnWafPolicy"),
	// 	Type: to.Ptr("Microsoft.Cdn/cdnwebapplicationfirewallpolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/MicrosoftCdnWafPolicy"),
	// 	Location: to.Ptr("WestUs"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 		"key2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armcdn.WebApplicationFirewallPolicyProperties{
	// 		CustomRules: &armcdn.CustomRuleList{
	// 			Rules: []*armcdn.CustomRule{
	// 				{
	// 					Name: to.Ptr("CustomRule1"),
	// 					Action: to.Ptr(armcdn.ActionTypeBlock),
	// 					EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
	// 					MatchConditions: []*armcdn.MatchCondition{
	// 						{
	// 							MatchValue: []*string{
	// 								to.Ptr("CH")},
	// 								MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
	// 								NegateCondition: to.Ptr(false),
	// 								Operator: to.Ptr(armcdn.OperatorGeoMatch),
	// 								Transforms: []*armcdn.TransformType{
	// 								},
	// 							},
	// 							{
	// 								MatchValue: []*string{
	// 									to.Ptr("windows")},
	// 									MatchVariable: to.Ptr(armcdn.WafMatchVariableRequestHeader),
	// 									NegateCondition: to.Ptr(false),
	// 									Operator: to.Ptr(armcdn.OperatorContains),
	// 									Selector: to.Ptr("UserAgent"),
	// 									Transforms: []*armcdn.TransformType{
	// 									},
	// 								},
	// 								{
	// 									MatchValue: []*string{
	// 										to.Ptr("<?php"),
	// 										to.Ptr("?>")},
	// 										MatchVariable: to.Ptr(armcdn.WafMatchVariableQueryString),
	// 										NegateCondition: to.Ptr(false),
	// 										Operator: to.Ptr(armcdn.OperatorContains),
	// 										Selector: to.Ptr("search"),
	// 										Transforms: []*armcdn.TransformType{
	// 											to.Ptr(armcdn.TransformTypeURLDecode),
	// 											to.Ptr(armcdn.TransformTypeLowercase)},
	// 									}},
	// 									Priority: to.Ptr[int32](2),
	// 							}},
	// 						},
	// 						EndpointLinks: []*armcdn.LinkedEndpoint{
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint1"),
	// 							},
	// 							{
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint2"),
	// 						}},
	// 						ManagedRules: &armcdn.ManagedRuleSetList{
	// 							ManagedRuleSets: []*armcdn.ManagedRuleSet{
	// 								{
	// 									RuleGroupOverrides: []*armcdn.ManagedRuleGroupOverride{
	// 										{
	// 											RuleGroupName: to.Ptr("Group1"),
	// 											Rules: []*armcdn.ManagedRuleOverride{
	// 												{
	// 													Action: to.Ptr(armcdn.ActionTypeRedirect),
	// 													EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateEnabled),
	// 													RuleID: to.Ptr("GROUP1-0001"),
	// 												},
	// 												{
	// 													EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateDisabled),
	// 													RuleID: to.Ptr("GROUP1-0002"),
	// 											}},
	// 									}},
	// 									RuleSetType: to.Ptr("DefaultRuleSet"),
	// 									RuleSetVersion: to.Ptr("preview-1.0"),
	// 							}},
	// 						},
	// 						PolicySettings: &armcdn.PolicySettings{
	// 							DefaultCustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
	// 							DefaultCustomBlockResponseStatusCode: to.Ptr(armcdn.PolicySettingsDefaultCustomBlockResponseStatusCode(429)),
	// 							DefaultRedirectURL: to.Ptr("http://www.bing.com"),
	// 							EnabledState: to.Ptr(armcdn.PolicyEnabledStateEnabled),
	// 							Mode: to.Ptr(armcdn.PolicyModePrevention),
	// 						},
	// 						ProvisioningState: to.Ptr(armcdn.ProvisioningStateSucceeded),
	// 						RateLimitRules: &armcdn.RateLimitRuleList{
	// 							Rules: []*armcdn.RateLimitRule{
	// 								{
	// 									Name: to.Ptr("RateLimitRule1"),
	// 									Action: to.Ptr(armcdn.ActionTypeBlock),
	// 									EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
	// 									MatchConditions: []*armcdn.MatchCondition{
	// 										{
	// 											MatchValue: []*string{
	// 												to.Ptr("192.168.1.0/24"),
	// 												to.Ptr("10.0.0.0/24")},
	// 												MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
	// 												NegateCondition: to.Ptr(false),
	// 												Operator: to.Ptr(armcdn.OperatorIPMatch),
	// 												Transforms: []*armcdn.TransformType{
	// 												},
	// 										}},
	// 										Priority: to.Ptr[int32](1),
	// 										RateLimitDurationInMinutes: to.Ptr[int32](0),
	// 										RateLimitThreshold: to.Ptr[int32](1000),
	// 								}},
	// 							},
	// 							ResourceState: to.Ptr(armcdn.PolicyResourceStateEnabled),
	// 						},
	// 						SKU: &armcdn.SKU{
	// 							Name: to.Ptr(armcdn.SKUNameStandardMicrosoft),
	// 						},
	// 					}
}
Output:

func (*PoliciesClient) NewListPager added in v0.5.0

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

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

Generated from API version 2021-06-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/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.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 = armcdn.WebApplicationFirewallPolicyList{
		// 	Value: []*armcdn.WebApplicationFirewallPolicy{
		// 		{
		// 			Name: to.Ptr("MicrosoftCdnWafPolicy"),
		// 			Type: to.Ptr("Microsoft.Cdn/cdnwebapplicationfirewallpolicies"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/MicrosoftCdnWafPolicy"),
		// 			Location: to.Ptr("WestUs"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 				"key2": to.Ptr("value2"),
		// 			},
		// 			Properties: &armcdn.WebApplicationFirewallPolicyProperties{
		// 				CustomRules: &armcdn.CustomRuleList{
		// 					Rules: []*armcdn.CustomRule{
		// 						{
		// 							Name: to.Ptr("CustomRule1"),
		// 							Action: to.Ptr(armcdn.ActionTypeBlock),
		// 							EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
		// 							MatchConditions: []*armcdn.MatchCondition{
		// 								{
		// 									MatchValue: []*string{
		// 										to.Ptr("CH")},
		// 										MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
		// 										NegateCondition: to.Ptr(false),
		// 										Operator: to.Ptr(armcdn.OperatorGeoMatch),
		// 										Transforms: []*armcdn.TransformType{
		// 										},
		// 									},
		// 									{
		// 										MatchValue: []*string{
		// 											to.Ptr("windows")},
		// 											MatchVariable: to.Ptr(armcdn.WafMatchVariableRequestHeader),
		// 											NegateCondition: to.Ptr(false),
		// 											Operator: to.Ptr(armcdn.OperatorContains),
		// 											Selector: to.Ptr("UserAgent"),
		// 											Transforms: []*armcdn.TransformType{
		// 											},
		// 										},
		// 										{
		// 											MatchValue: []*string{
		// 												to.Ptr("<?php"),
		// 												to.Ptr("?>")},
		// 												MatchVariable: to.Ptr(armcdn.WafMatchVariableQueryString),
		// 												NegateCondition: to.Ptr(false),
		// 												Operator: to.Ptr(armcdn.OperatorContains),
		// 												Selector: to.Ptr("search"),
		// 												Transforms: []*armcdn.TransformType{
		// 													to.Ptr(armcdn.TransformTypeURLDecode),
		// 													to.Ptr(armcdn.TransformTypeLowercase)},
		// 											}},
		// 											Priority: to.Ptr[int32](2),
		// 									}},
		// 								},
		// 								EndpointLinks: []*armcdn.LinkedEndpoint{
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint1"),
		// 									},
		// 									{
		// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint2"),
		// 								}},
		// 								ManagedRules: &armcdn.ManagedRuleSetList{
		// 									ManagedRuleSets: []*armcdn.ManagedRuleSet{
		// 										{
		// 											RuleGroupOverrides: []*armcdn.ManagedRuleGroupOverride{
		// 												{
		// 													RuleGroupName: to.Ptr("Group1"),
		// 													Rules: []*armcdn.ManagedRuleOverride{
		// 														{
		// 															Action: to.Ptr(armcdn.ActionTypeRedirect),
		// 															EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateEnabled),
		// 															RuleID: to.Ptr("GROUP1-0001"),
		// 														},
		// 														{
		// 															EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateDisabled),
		// 															RuleID: to.Ptr("GROUP1-0002"),
		// 													}},
		// 											}},
		// 											RuleSetType: to.Ptr("DefaultRuleSet"),
		// 											RuleSetVersion: to.Ptr("preview-1.0"),
		// 									}},
		// 								},
		// 								PolicySettings: &armcdn.PolicySettings{
		// 									DefaultCustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
		// 									DefaultCustomBlockResponseStatusCode: to.Ptr(armcdn.PolicySettingsDefaultCustomBlockResponseStatusCode(429)),
		// 									DefaultRedirectURL: to.Ptr("http://www.bing.com"),
		// 									EnabledState: to.Ptr(armcdn.PolicyEnabledStateEnabled),
		// 									Mode: to.Ptr(armcdn.PolicyModePrevention),
		// 								},
		// 								ProvisioningState: to.Ptr(armcdn.ProvisioningStateSucceeded),
		// 								RateLimitRules: &armcdn.RateLimitRuleList{
		// 									Rules: []*armcdn.RateLimitRule{
		// 										{
		// 											Name: to.Ptr("RateLimitRule1"),
		// 											Action: to.Ptr(armcdn.ActionTypeBlock),
		// 											EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
		// 											MatchConditions: []*armcdn.MatchCondition{
		// 												{
		// 													MatchValue: []*string{
		// 														to.Ptr("192.168.1.0/24"),
		// 														to.Ptr("10.0.0.0/24")},
		// 														MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
		// 														NegateCondition: to.Ptr(false),
		// 														Operator: to.Ptr(armcdn.OperatorIPMatch),
		// 														Transforms: []*armcdn.TransformType{
		// 														},
		// 												}},
		// 												Priority: to.Ptr[int32](1),
		// 												RateLimitDurationInMinutes: to.Ptr[int32](0),
		// 												RateLimitThreshold: to.Ptr[int32](1000),
		// 										}},
		// 									},
		// 									ResourceState: to.Ptr(armcdn.PolicyResourceStateEnabled),
		// 								},
		// 								SKU: &armcdn.SKU{
		// 									Name: to.Ptr(armcdn.SKUNameStandardMicrosoft),
		// 								},
		// 							},
		// 							{
		// 								Name: to.Ptr("VerizonStandardCdnWafPolicy"),
		// 								Type: to.Ptr("Microsoft.Cdn/cdnwebapplicationfirewallpolicies"),
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/VerizonStandardCdnWafPolicy"),
		// 								Location: to.Ptr("WestUs"),
		// 								Tags: map[string]*string{
		// 									"key1": to.Ptr("value1"),
		// 									"key2": to.Ptr("value2"),
		// 								},
		// 								Properties: &armcdn.WebApplicationFirewallPolicyProperties{
		// 									CustomRules: &armcdn.CustomRuleList{
		// 										Rules: []*armcdn.CustomRule{
		// 											{
		// 												Name: to.Ptr("CustomRule1"),
		// 												Action: to.Ptr(armcdn.ActionTypeBlock),
		// 												EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
		// 												MatchConditions: []*armcdn.MatchCondition{
		// 													{
		// 														MatchValue: []*string{
		// 															to.Ptr("CH")},
		// 															MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
		// 															NegateCondition: to.Ptr(false),
		// 															Operator: to.Ptr(armcdn.OperatorGeoMatch),
		// 															Transforms: []*armcdn.TransformType{
		// 															},
		// 														},
		// 														{
		// 															MatchValue: []*string{
		// 																to.Ptr("windows")},
		// 																MatchVariable: to.Ptr(armcdn.WafMatchVariableRequestHeader),
		// 																NegateCondition: to.Ptr(false),
		// 																Operator: to.Ptr(armcdn.OperatorContains),
		// 																Selector: to.Ptr("UserAgent"),
		// 															},
		// 															{
		// 																MatchValue: []*string{
		// 																	to.Ptr("<?php"),
		// 																	to.Ptr("?>")},
		// 																	MatchVariable: to.Ptr(armcdn.WafMatchVariableQueryString),
		// 																	NegateCondition: to.Ptr(false),
		// 																	Operator: to.Ptr(armcdn.OperatorContains),
		// 																	Selector: to.Ptr("search"),
		// 																	Transforms: []*armcdn.TransformType{
		// 																		to.Ptr(armcdn.TransformTypeURLDecode),
		// 																		to.Ptr(armcdn.TransformTypeLowercase)},
		// 																}},
		// 																Priority: to.Ptr[int32](2),
		// 														}},
		// 													},
		// 													EndpointLinks: []*armcdn.LinkedEndpoint{
		// 														{
		// 															ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint3"),
		// 													}},
		// 													ManagedRules: &armcdn.ManagedRuleSetList{
		// 														ManagedRuleSets: []*armcdn.ManagedRuleSet{
		// 															{
		// 																RuleGroupOverrides: []*armcdn.ManagedRuleGroupOverride{
		// 																	{
		// 																		RuleGroupName: to.Ptr("XSS"),
		// 																		Rules: []*armcdn.ManagedRuleOverride{
		// 																			{
		// 																				Action: to.Ptr(armcdn.ActionTypeRedirect),
		// 																				EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateEnabled),
		// 																				RuleID: to.Ptr("XSS-0001"),
		// 																			},
		// 																			{
		// 																				EnabledState: to.Ptr(armcdn.ManagedRuleEnabledStateDisabled),
		// 																				RuleID: to.Ptr("XSS-0002"),
		// 																		}},
		// 																}},
		// 																RuleSetType: to.Ptr("ECRS"),
		// 																RuleSetVersion: to.Ptr("2018-11-2"),
		// 														}},
		// 													},
		// 													PolicySettings: &armcdn.PolicySettings{
		// 														DefaultCustomBlockResponseBody: to.Ptr("PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="),
		// 														DefaultCustomBlockResponseStatusCode: to.Ptr(armcdn.PolicySettingsDefaultCustomBlockResponseStatusCode(429)),
		// 														DefaultRedirectURL: to.Ptr("http://www.bing.com"),
		// 														EnabledState: to.Ptr(armcdn.PolicyEnabledStateEnabled),
		// 														Mode: to.Ptr(armcdn.PolicyModePrevention),
		// 													},
		// 													ProvisioningState: to.Ptr(armcdn.ProvisioningStateSucceeded),
		// 													RateLimitRules: &armcdn.RateLimitRuleList{
		// 														Rules: []*armcdn.RateLimitRule{
		// 															{
		// 																Name: to.Ptr("RateLimitRule1"),
		// 																Action: to.Ptr(armcdn.ActionTypeBlock),
		// 																EnabledState: to.Ptr(armcdn.CustomRuleEnabledStateEnabled),
		// 																MatchConditions: []*armcdn.MatchCondition{
		// 																	{
		// 																		MatchValue: []*string{
		// 																			to.Ptr("192.168.1.0/24"),
		// 																			to.Ptr("10.0.0.0/24")},
		// 																			MatchVariable: to.Ptr(armcdn.WafMatchVariableRemoteAddr),
		// 																			NegateCondition: to.Ptr(false),
		// 																			Operator: to.Ptr(armcdn.OperatorIPMatch),
		// 																			Transforms: []*armcdn.TransformType{
		// 																			},
		// 																	}},
		// 																	Priority: to.Ptr[int32](1),
		// 																	RateLimitDurationInMinutes: to.Ptr[int32](0),
		// 																	RateLimitThreshold: to.Ptr[int32](1000),
		// 															}},
		// 														},
		// 														ResourceState: to.Ptr(armcdn.PolicyResourceStateEnabled),
		// 													},
		// 													SKU: &armcdn.SKU{
		// 														Name: to.Ptr(armcdn.SKUNameStandardVerizon),
		// 													},
		// 											}},
		// 										}
	}
}
Output:

type PoliciesClientBeginCreateOrUpdateOptions added in v0.3.0

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

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

type PoliciesClientBeginUpdateOptions added in v0.3.0

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

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

type PoliciesClientCreateOrUpdateResponse added in v0.3.0

type PoliciesClientCreateOrUpdateResponse struct {
	WebApplicationFirewallPolicy
}

PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.BeginCreateOrUpdate.

type PoliciesClientDeleteOptions added in v0.3.0

type PoliciesClientDeleteOptions struct {
}

PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method.

type PoliciesClientDeleteResponse added in v0.3.0

type PoliciesClientDeleteResponse struct {
}

PoliciesClientDeleteResponse contains the response from method PoliciesClient.Delete.

type PoliciesClientGetOptions added in v0.3.0

type PoliciesClientGetOptions struct {
}

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

type PoliciesClientGetResponse added in v0.3.0

type PoliciesClientGetResponse struct {
	WebApplicationFirewallPolicy
}

PoliciesClientGetResponse contains the response from method PoliciesClient.Get.

type PoliciesClientListOptions added in v0.3.0

type PoliciesClientListOptions struct {
}

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

type PoliciesClientListResponse added in v0.3.0

type PoliciesClientListResponse struct {
	WebApplicationFirewallPolicyList
}

PoliciesClientListResponse contains the response from method PoliciesClient.NewListPager.

type PoliciesClientUpdateResponse added in v0.3.0

type PoliciesClientUpdateResponse struct {
	WebApplicationFirewallPolicy
}

PoliciesClientUpdateResponse contains the response from method PoliciesClient.BeginUpdate.

type PolicyEnabledState

type PolicyEnabledState string

PolicyEnabledState - describes if the policy is in enabled state or disabled state

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 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.
	DefaultCustomBlockResponseBody *string

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

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

	// describes if the policy is in enabled state or disabled state
	EnabledState *PolicyEnabledState

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

PolicySettings - Defines contents of a web application firewall global configuration

func (PolicySettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PolicySettings.

func (*PolicySettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettings.

type PolicySettingsDefaultCustomBlockResponseStatusCode

type PolicySettingsDefaultCustomBlockResponseStatusCode int32

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

const (
	PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredFive       PolicySettingsDefaultCustomBlockResponseStatusCode = 405
	PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredSix        PolicySettingsDefaultCustomBlockResponseStatusCode = 406
	PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredThree      PolicySettingsDefaultCustomBlockResponseStatusCode = 403
	PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredTwentyNine PolicySettingsDefaultCustomBlockResponseStatusCode = 429
	PolicySettingsDefaultCustomBlockResponseStatusCodeTwoHundred            PolicySettingsDefaultCustomBlockResponseStatusCode = 200
)

func PossiblePolicySettingsDefaultCustomBlockResponseStatusCodeValues

func PossiblePolicySettingsDefaultCustomBlockResponseStatusCodeValues() []PolicySettingsDefaultCustomBlockResponseStatusCode

PossiblePolicySettingsDefaultCustomBlockResponseStatusCodeValues returns the possible values for the PolicySettingsDefaultCustomBlockResponseStatusCode const type.

type PostArgsMatchConditionParameters

type PostArgsMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *PostArgsOperator

	// REQUIRED
	TypeName *PostArgsMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// Name of PostArg to be matched
	Selector *string

	// List of transforms
	Transforms []*Transform
}

PostArgsMatchConditionParameters - Defines the parameters for PostArgs match conditions

func (PostArgsMatchConditionParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PostArgsMatchConditionParameters.

func (*PostArgsMatchConditionParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PostArgsMatchConditionParameters.

type PostArgsMatchConditionParametersTypeName added in v0.3.0

type PostArgsMatchConditionParametersTypeName string
const (
	PostArgsMatchConditionParametersTypeNameDeliveryRulePostArgsConditionParameters PostArgsMatchConditionParametersTypeName = "DeliveryRulePostArgsConditionParameters"
)

func PossiblePostArgsMatchConditionParametersTypeNameValues added in v0.3.0

func PossiblePostArgsMatchConditionParametersTypeNameValues() []PostArgsMatchConditionParametersTypeName

PossiblePostArgsMatchConditionParametersTypeNameValues returns the possible values for the PostArgsMatchConditionParametersTypeName const type.

type PostArgsOperator

type PostArgsOperator string

PostArgsOperator - Describes operator to be matched

const (
	PostArgsOperatorAny                PostArgsOperator = "Any"
	PostArgsOperatorBeginsWith         PostArgsOperator = "BeginsWith"
	PostArgsOperatorContains           PostArgsOperator = "Contains"
	PostArgsOperatorEndsWith           PostArgsOperator = "EndsWith"
	PostArgsOperatorEqual              PostArgsOperator = "Equal"
	PostArgsOperatorGreaterThan        PostArgsOperator = "GreaterThan"
	PostArgsOperatorGreaterThanOrEqual PostArgsOperator = "GreaterThanOrEqual"
	PostArgsOperatorLessThan           PostArgsOperator = "LessThan"
	PostArgsOperatorLessThanOrEqual    PostArgsOperator = "LessThanOrEqual"
	PostArgsOperatorRegEx              PostArgsOperator = "RegEx"
)

func PossiblePostArgsOperatorValues

func PossiblePostArgsOperatorValues() []PostArgsOperator

PossiblePostArgsOperatorValues returns the possible values for the PostArgsOperator const type.

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 ProbeProtocol

type ProbeProtocol string

ProbeProtocol - Protocol to use for health probe.

const (
	ProbeProtocolNotSet ProbeProtocol = "NotSet"
	ProbeProtocolHTTP   ProbeProtocol = "Http"
	ProbeProtocolHTTPS  ProbeProtocol = "Https"
)

func PossibleProbeProtocolValues

func PossibleProbeProtocolValues() []ProbeProtocol

PossibleProbeProtocolValues returns the possible values for the ProbeProtocol const type.

type Profile

type Profile struct {
	// REQUIRED; Resource location.
	Location *string

	// REQUIRED; The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the
	// profile.
	SKU *SKU

	// The JSON object that contains the properties required to create a profile.
	Properties *ProfileProperties

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

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

	// READ-ONLY; Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile.
	Kind *string

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

Profile - A profile is a logical grouping of endpoints that share the same settings.

func (Profile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Profile.

func (*Profile) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Profile.

type ProfileListResult

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

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

ProfileListResult - Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results.

func (ProfileListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProfileListResult.

func (*ProfileListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProfileListResult.

type ProfileProperties

type ProfileProperties struct {
	// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.
	OriginResponseTimeoutSeconds *int32

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

	// READ-ONLY; Provisioning status of the profile.
	ProvisioningState *ProfileProvisioningState

	// READ-ONLY; Resource status of the profile.
	ResourceState *ProfileResourceState
}

ProfileProperties - The JSON object that contains the properties required to create a profile.

func (ProfileProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ProfileProperties.

func (*ProfileProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProfileProperties.

type ProfilePropertiesUpdateParameters added in v0.4.0

type ProfilePropertiesUpdateParameters struct {
	// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.
	OriginResponseTimeoutSeconds *int32
}

ProfilePropertiesUpdateParameters - The JSON object containing profile update parameters.

func (ProfilePropertiesUpdateParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesUpdateParameters.

func (*ProfilePropertiesUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProfilePropertiesUpdateParameters.

type ProfileProvisioningState added in v1.0.0

type ProfileProvisioningState string

ProfileProvisioningState - Provisioning status of the profile.

const (
	ProfileProvisioningStateCreating  ProfileProvisioningState = "Creating"
	ProfileProvisioningStateDeleting  ProfileProvisioningState = "Deleting"
	ProfileProvisioningStateFailed    ProfileProvisioningState = "Failed"
	ProfileProvisioningStateSucceeded ProfileProvisioningState = "Succeeded"
	ProfileProvisioningStateUpdating  ProfileProvisioningState = "Updating"
)

func PossibleProfileProvisioningStateValues added in v1.0.0

func PossibleProfileProvisioningStateValues() []ProfileProvisioningState

PossibleProfileProvisioningStateValues returns the possible values for the ProfileProvisioningState const type.

type ProfileResourceState

type ProfileResourceState string

ProfileResourceState - Resource status of the profile.

const (
	ProfileResourceStateActive   ProfileResourceState = "Active"
	ProfileResourceStateCreating ProfileResourceState = "Creating"
	ProfileResourceStateDeleting ProfileResourceState = "Deleting"
	ProfileResourceStateDisabled ProfileResourceState = "Disabled"
)

func PossibleProfileResourceStateValues

func PossibleProfileResourceStateValues() []ProfileResourceState

PossibleProfileResourceStateValues returns the possible values for the ProfileResourceState const type.

type ProfileUpdateParameters

type ProfileUpdateParameters struct {
	// The JSON object containing profile update parameters.
	Properties *ProfilePropertiesUpdateParameters

	// Profile tags
	Tags map[string]*string
}

ProfileUpdateParameters - Properties required to update a profile.

func (ProfileUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProfileUpdateParameters.

func (*ProfileUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProfileUpdateParameters.

type ProfilesClient

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

ProfilesClient contains the methods for the Profiles group. Don't use this type directly, use NewProfilesClient() instead.

func NewProfilesClient

func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error)

NewProfilesClient creates a new instance of ProfilesClient with the specified values.

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

func (*ProfilesClient) BeginCreate

func (client *ProfilesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, profile Profile, options *ProfilesClientBeginCreateOptions) (*runtime.Poller[ProfilesClientCreateResponse], error)

BeginCreate - Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • profile - Profile properties needed to create a new profile.
  • options - ProfilesClientBeginCreateOptions contains the optional parameters for the ProfilesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProfilesClient().BeginCreate(ctx, "RG", "profile1", armcdn.Profile{
		Location: to.Ptr("global"),
		SKU: &armcdn.SKU{
			Name: to.Ptr(armcdn.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.Profile = armcdn.Profile{
	// 	Name: to.Ptr("profile1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"),
	// 	Location: to.Ptr("global"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Kind: to.Ptr("frontdoor"),
	// 	Properties: &armcdn.ProfileProperties{
	// 		FrontDoorID: to.Ptr("3b4682da-b3e2-47a1-96ca-08ab3cb7294e"),
	// 		OriginResponseTimeoutSeconds: to.Ptr[int32](30),
	// 		ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.ProfileResourceStateActive),
	// 	},
	// 	SKU: &armcdn.SKU{
	// 		Name: to.Ptr(armcdn.SKUNamePremiumAzureFrontDoor),
	// 	},
	// }
}
Output:

func (*ProfilesClient) BeginDelete

func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginDeleteOptions) (*runtime.Poller[ProfilesClientDeleteResponse], error)

BeginDelete - Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProfilesClient().BeginDelete(ctx, "RG", "profile1", 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 (*ProfilesClient) BeginUpdate

func (client *ProfilesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, options *ProfilesClientBeginUpdateOptions) (*runtime.Poller[ProfilesClientUpdateResponse], error)

BeginUpdate - Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • profileUpdateParameters - Profile properties needed to update an existing profile.
  • options - ProfilesClientBeginUpdateOptions contains the optional parameters for the ProfilesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProfilesClient().BeginUpdate(ctx, "RG", "profile1", armcdn.ProfileUpdateParameters{
		Tags: map[string]*string{
			"additionalProperties": to.Ptr("Tag1"),
		},
	}, 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 = armcdn.Profile{
	// 	Name: to.Ptr("profile1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"),
	// 	Location: to.Ptr("global"),
	// 	Tags: map[string]*string{
	// 		"additionalProperties": to.Ptr("Tag1"),
	// 	},
	// 	Kind: to.Ptr("frontdoor"),
	// 	Properties: &armcdn.ProfileProperties{
	// 		FrontDoorID: to.Ptr("3b4682da-b3e2-47a1-96ca-08ab3cb7294e"),
	// 		OriginResponseTimeoutSeconds: to.Ptr[int32](30),
	// 		ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.ProfileResourceStateActive),
	// 	},
	// 	SKU: &armcdn.SKU{
	// 		Name: to.Ptr(armcdn.SKUNamePremiumAzureFrontDoor),
	// 	},
	// }
}
Output:

func (*ProfilesClient) GenerateSsoURI

func (client *ProfilesClient) GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGenerateSsoURIOptions) (ProfilesClientGenerateSsoURIResponse, error)

GenerateSsoURI - Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes. 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.
  • profileName - Name of the CDN profile which is unique within the resource group.
  • options - ProfilesClientGenerateSsoURIOptions contains the optional parameters for the ProfilesClient.GenerateSsoURI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_GenerateSsoUri.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProfilesClient().GenerateSsoURI(ctx, "RG", "profile1", 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.SsoURI = armcdn.SsoURI{
	// 	SsoURIValue: to.Ptr("https://someuri.com"),
	// }
}
Output:

func (*ProfilesClient) Get

func (client *ProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, error)

Get - Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProfilesClient().Get(ctx, "RG", "profile1", 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 = armcdn.Profile{
	// 	Name: to.Ptr("profile1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"),
	// 	Location: to.Ptr("global"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Kind: to.Ptr("frontdoor"),
	// 	Properties: &armcdn.ProfileProperties{
	// 		FrontDoorID: to.Ptr("3b4682da-b3e2-47a1-96ca-08ab3cb7294e"),
	// 		OriginResponseTimeoutSeconds: to.Ptr[int32](30),
	// 		ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
	// 		ResourceState: to.Ptr(armcdn.ProfileResourceStateActive),
	// 	},
	// 	SKU: &armcdn.SKU{
	// 		Name: to.Ptr(armcdn.SKUNamePremiumAzureFrontDoor),
	// 	},
	// }
}
Output:

func (*ProfilesClient) ListSupportedOptimizationTypes

func (client *ProfilesClient) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientListSupportedOptimizationTypesOptions) (ProfilesClientListSupportedOptimizationTypesResponse, error)

ListSupportedOptimizationTypes - Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • options - ProfilesClientListSupportedOptimizationTypesOptions contains the optional parameters for the ProfilesClient.ListSupportedOptimizationTypes method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_ListSupportedOptimizationTypes.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProfilesClient().ListSupportedOptimizationTypes(ctx, "RG", "profile1", 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.SupportedOptimizationTypesListResult = armcdn.SupportedOptimizationTypesListResult{
	// 	SupportedOptimizationTypes: []*armcdn.OptimizationType{
	// 		to.Ptr(armcdn.OptimizationTypeGeneralWebDelivery),
	// 		to.Ptr(armcdn.OptimizationTypeDynamicSiteAcceleration)},
	// 	}
}
Output:

func (*ProfilesClient) NewListByResourceGroupPager added in v0.5.0

func (client *ProfilesClient) NewListByResourceGroupPager(resourceGroupName string, options *ProfilesClientListByResourceGroupOptions) *runtime.Pager[ProfilesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group.

Generated from API version 2021-06-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewProfilesClient().NewListByResourceGroupPager("RG", 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.ProfileListResult = armcdn.ProfileListResult{
		// 	Value: []*armcdn.Profile{
		// 		{
		// 			Name: to.Ptr("profile1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"),
		// 			Location: to.Ptr("global"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Kind: to.Ptr("frontdoor"),
		// 			Properties: &armcdn.ProfileProperties{
		// 				FrontDoorID: to.Ptr("3b4682da-b3e2-47a1-96ca-08ab3cb7294e"),
		// 				OriginResponseTimeoutSeconds: to.Ptr[int32](30),
		// 				ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
		// 				ResourceState: to.Ptr(armcdn.ProfileResourceStateActive),
		// 			},
		// 			SKU: &armcdn.SKU{
		// 				Name: to.Ptr(armcdn.SKUNamePremiumAzureFrontDoor),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("profile2"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile2"),
		// 			Location: to.Ptr("global"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Kind: to.Ptr("frontdoor"),
		// 			Properties: &armcdn.ProfileProperties{
		// 				FrontDoorID: to.Ptr("3b4682da-b3e2-47a1-96ca-08ab3cb7294e"),
		// 				OriginResponseTimeoutSeconds: to.Ptr[int32](30),
		// 				ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
		// 				ResourceState: to.Ptr(armcdn.ProfileResourceStateActive),
		// 			},
		// 			SKU: &armcdn.SKU{
		// 				Name: to.Ptr(armcdn.SKUNamePremiumAzureFrontDoor),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ProfilesClient) NewListPager added in v0.5.0

NewListPager - Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription.

Generated from API version 2021-06-01

  • options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewProfilesClient().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.ProfileListResult = armcdn.ProfileListResult{
		// 	Value: []*armcdn.Profile{
		// 		{
		// 			Name: to.Ptr("profile1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG1/providers/Microsoft.Cdn/profiles/profile1"),
		// 			Location: to.Ptr("global"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Kind: to.Ptr("frontdoor"),
		// 			Properties: &armcdn.ProfileProperties{
		// 				FrontDoorID: to.Ptr("3b4682da-b3e2-47a1-96ca-08ab3cb7294e"),
		// 				OriginResponseTimeoutSeconds: to.Ptr[int32](30),
		// 				ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
		// 				ResourceState: to.Ptr(armcdn.ProfileResourceStateActive),
		// 			},
		// 			SKU: &armcdn.SKU{
		// 				Name: to.Ptr(armcdn.SKUNamePremiumAzureFrontDoor),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("profile2"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG1/providers/Microsoft.Cdn/profiles/profile2"),
		// 			Location: to.Ptr("global"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Kind: to.Ptr("frontdoor"),
		// 			Properties: &armcdn.ProfileProperties{
		// 				FrontDoorID: to.Ptr("3b4682da-b3e2-47a1-96ca-08ab3cb7294e"),
		// 				OriginResponseTimeoutSeconds: to.Ptr[int32](30),
		// 				ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
		// 				ResourceState: to.Ptr(armcdn.ProfileResourceStateActive),
		// 			},
		// 			SKU: &armcdn.SKU{
		// 				Name: to.Ptr(armcdn.SKUNamePremiumAzureFrontDoor),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ProfilesClient) NewListResourceUsagePager added in v0.5.0

func (client *ProfilesClient) NewListResourceUsagePager(resourceGroupName string, profileName string, options *ProfilesClientListResourceUsageOptions) *runtime.Pager[ProfilesClientListResourceUsageResponse]

NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
  • options - ProfilesClientListResourceUsageOptions contains the optional parameters for the ProfilesClient.NewListResourceUsagePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_ListResourceUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewProfilesClient().NewListResourceUsagePager("RG", "profile1", 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.ResourceUsageListResult = armcdn.ResourceUsageListResult{
		// 	Value: []*armcdn.ResourceUsage{
		// 		{
		// 			CurrentValue: to.Ptr[int32](0),
		// 			Limit: to.Ptr[int32](25),
		// 			ResourceType: to.Ptr("endpoint"),
		// 			Unit: to.Ptr(armcdn.ResourceUsageUnitCount),
		// 	}},
		// }
	}
}
Output:

type ProfilesClientBeginCreateOptions added in v0.3.0

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

ProfilesClientBeginCreateOptions contains the optional parameters for the ProfilesClient.BeginCreate method.

type ProfilesClientBeginDeleteOptions added in v0.3.0

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

ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method.

type ProfilesClientBeginUpdateOptions added in v0.3.0

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

ProfilesClientBeginUpdateOptions contains the optional parameters for the ProfilesClient.BeginUpdate method.

type ProfilesClientCreateResponse added in v0.3.0

type ProfilesClientCreateResponse struct {
	Profile
}

ProfilesClientCreateResponse contains the response from method ProfilesClient.BeginCreate.

type ProfilesClientDeleteResponse added in v0.3.0

type ProfilesClientDeleteResponse struct {
}

ProfilesClientDeleteResponse contains the response from method ProfilesClient.BeginDelete.

type ProfilesClientGenerateSsoURIOptions added in v0.3.0

type ProfilesClientGenerateSsoURIOptions struct {
}

ProfilesClientGenerateSsoURIOptions contains the optional parameters for the ProfilesClient.GenerateSsoURI method.

type ProfilesClientGenerateSsoURIResponse added in v0.3.0

type ProfilesClientGenerateSsoURIResponse struct {
	SsoURI
}

ProfilesClientGenerateSsoURIResponse contains the response from method ProfilesClient.GenerateSsoURI.

type ProfilesClientGetOptions added in v0.3.0

type ProfilesClientGetOptions struct {
}

ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method.

type ProfilesClientGetResponse added in v0.3.0

type ProfilesClientGetResponse struct {
	Profile
}

ProfilesClientGetResponse contains the response from method ProfilesClient.Get.

type ProfilesClientListByResourceGroupOptions added in v0.3.0

type ProfilesClientListByResourceGroupOptions struct {
}

ProfilesClientListByResourceGroupOptions contains the optional parameters for the ProfilesClient.NewListByResourceGroupPager method.

type ProfilesClientListByResourceGroupResponse added in v0.3.0

type ProfilesClientListByResourceGroupResponse struct {
	ProfileListResult
}

ProfilesClientListByResourceGroupResponse contains the response from method ProfilesClient.NewListByResourceGroupPager.

type ProfilesClientListOptions added in v0.3.0

type ProfilesClientListOptions struct {
}

ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method.

type ProfilesClientListResourceUsageOptions added in v0.3.0

type ProfilesClientListResourceUsageOptions struct {
}

ProfilesClientListResourceUsageOptions contains the optional parameters for the ProfilesClient.NewListResourceUsagePager method.

type ProfilesClientListResourceUsageResponse added in v0.3.0

type ProfilesClientListResourceUsageResponse struct {
	ResourceUsageListResult
}

ProfilesClientListResourceUsageResponse contains the response from method ProfilesClient.NewListResourceUsagePager.

type ProfilesClientListResponse added in v0.3.0

type ProfilesClientListResponse struct {
	ProfileListResult
}

ProfilesClientListResponse contains the response from method ProfilesClient.NewListPager.

type ProfilesClientListSupportedOptimizationTypesOptions added in v0.3.0

type ProfilesClientListSupportedOptimizationTypesOptions struct {
}

ProfilesClientListSupportedOptimizationTypesOptions contains the optional parameters for the ProfilesClient.ListSupportedOptimizationTypes method.

type ProfilesClientListSupportedOptimizationTypesResponse added in v0.3.0

type ProfilesClientListSupportedOptimizationTypesResponse struct {
	SupportedOptimizationTypesListResult
}

ProfilesClientListSupportedOptimizationTypesResponse contains the response from method ProfilesClient.ListSupportedOptimizationTypes.

type ProfilesClientUpdateResponse added in v0.3.0

type ProfilesClientUpdateResponse struct {
	Profile
}

ProfilesClientUpdateResponse contains the response from method ProfilesClient.BeginUpdate.

type ProtocolType

type ProtocolType string

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

const (
	ProtocolTypeIPBased              ProtocolType = "IPBased"
	ProtocolTypeServerNameIndication ProtocolType = "ServerNameIndication"
)

func PossibleProtocolTypeValues

func PossibleProtocolTypeValues() []ProtocolType

PossibleProtocolTypeValues returns the possible values for the ProtocolType const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the WebApplicationFirewallPolicy.

const (
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Resource ID.
	ID *string

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags

func (ProxyResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PurgeParameters

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

PurgeParameters - Parameters required for content purge.

func (PurgeParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PurgeParameters.

func (*PurgeParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PurgeParameters.

type QueryStringBehavior

type QueryStringBehavior string

QueryStringBehavior - Caching behavior for the requests

const (
	QueryStringBehaviorExclude    QueryStringBehavior = "Exclude"
	QueryStringBehaviorExcludeAll QueryStringBehavior = "ExcludeAll"
	QueryStringBehaviorInclude    QueryStringBehavior = "Include"
	QueryStringBehaviorIncludeAll QueryStringBehavior = "IncludeAll"
)

func PossibleQueryStringBehaviorValues

func PossibleQueryStringBehaviorValues() []QueryStringBehavior

PossibleQueryStringBehaviorValues returns the possible values for the QueryStringBehavior const type.

type QueryStringCachingBehavior

type QueryStringCachingBehavior string

QueryStringCachingBehavior - Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.

const (
	QueryStringCachingBehaviorIgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString"
	QueryStringCachingBehaviorBypassCaching     QueryStringCachingBehavior = "BypassCaching"
	QueryStringCachingBehaviorUseQueryString    QueryStringCachingBehavior = "UseQueryString"
	QueryStringCachingBehaviorNotSet            QueryStringCachingBehavior = "NotSet"
)

func PossibleQueryStringCachingBehaviorValues

func PossibleQueryStringCachingBehaviorValues() []QueryStringCachingBehavior

PossibleQueryStringCachingBehaviorValues returns the possible values for the QueryStringCachingBehavior const type.

type QueryStringMatchConditionParameters

type QueryStringMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *QueryStringOperator

	// REQUIRED
	TypeName *QueryStringMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

QueryStringMatchConditionParameters - Defines the parameters for QueryString match conditions

func (QueryStringMatchConditionParameters) MarshalJSON

func (q QueryStringMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QueryStringMatchConditionParameters.

func (*QueryStringMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (q *QueryStringMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QueryStringMatchConditionParameters.

type QueryStringMatchConditionParametersTypeName added in v0.3.0

type QueryStringMatchConditionParametersTypeName string
const (
	QueryStringMatchConditionParametersTypeNameDeliveryRuleQueryStringConditionParameters QueryStringMatchConditionParametersTypeName = "DeliveryRuleQueryStringConditionParameters"
)

func PossibleQueryStringMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleQueryStringMatchConditionParametersTypeNameValues() []QueryStringMatchConditionParametersTypeName

PossibleQueryStringMatchConditionParametersTypeNameValues returns the possible values for the QueryStringMatchConditionParametersTypeName const type.

type QueryStringOperator

type QueryStringOperator string

QueryStringOperator - Describes operator to be matched

const (
	QueryStringOperatorAny                QueryStringOperator = "Any"
	QueryStringOperatorBeginsWith         QueryStringOperator = "BeginsWith"
	QueryStringOperatorContains           QueryStringOperator = "Contains"
	QueryStringOperatorEndsWith           QueryStringOperator = "EndsWith"
	QueryStringOperatorEqual              QueryStringOperator = "Equal"
	QueryStringOperatorGreaterThan        QueryStringOperator = "GreaterThan"
	QueryStringOperatorGreaterThanOrEqual QueryStringOperator = "GreaterThanOrEqual"
	QueryStringOperatorLessThan           QueryStringOperator = "LessThan"
	QueryStringOperatorLessThanOrEqual    QueryStringOperator = "LessThanOrEqual"
	QueryStringOperatorRegEx              QueryStringOperator = "RegEx"
)

func PossibleQueryStringOperatorValues

func PossibleQueryStringOperatorValues() []QueryStringOperator

PossibleQueryStringOperatorValues returns the possible values for the QueryStringOperator const type.

type RankingsResponse

type RankingsResponse struct {
	DateTimeBegin *time.Time
	DateTimeEnd   *time.Time
	Tables        []*RankingsResponseTablesItem
}

RankingsResponse - Rankings Response

func (RankingsResponse) MarshalJSON

func (r RankingsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RankingsResponse.

func (*RankingsResponse) UnmarshalJSON

func (r *RankingsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponse.

type RankingsResponseTablesItem

type RankingsResponseTablesItem struct {
	Data    []*RankingsResponseTablesPropertiesItemsItem
	Ranking *string
}

func (RankingsResponseTablesItem) MarshalJSON

func (r RankingsResponseTablesItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesItem.

func (*RankingsResponseTablesItem) UnmarshalJSON added in v1.1.0

func (r *RankingsResponseTablesItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesItem.

type RankingsResponseTablesPropertiesItemsItem

type RankingsResponseTablesPropertiesItemsItem struct {
	Metrics []*RankingsResponseTablesPropertiesItemsMetricsItem
	Name    *string
}

func (RankingsResponseTablesPropertiesItemsItem) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesPropertiesItemsItem.

func (*RankingsResponseTablesPropertiesItemsItem) UnmarshalJSON added in v1.1.0

func (r *RankingsResponseTablesPropertiesItemsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesPropertiesItemsItem.

type RankingsResponseTablesPropertiesItemsMetricsItem

type RankingsResponseTablesPropertiesItemsMetricsItem struct {
	Metric     *string
	Percentage *float32
	Value      *int64
}

func (RankingsResponseTablesPropertiesItemsMetricsItem) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesPropertiesItemsMetricsItem.

func (*RankingsResponseTablesPropertiesItemsMetricsItem) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesPropertiesItemsMetricsItem.

type RateLimitRule

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

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

	// REQUIRED; Defines the name of the custom rule
	Name *string

	// REQUIRED; Defines in what order this rule be evaluated in the overall list of custom rules
	Priority *int32

	// REQUIRED; Defines rate limit duration. Default is 1 minute.
	RateLimitDurationInMinutes *int32

	// REQUIRED; Defines rate limit threshold.
	RateLimitThreshold *int32

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

RateLimitRule - Defines a rate limiting rule that can be included in a waf policy

func (RateLimitRule) MarshalJSON

func (r RateLimitRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RateLimitRule.

func (*RateLimitRule) UnmarshalJSON added in v1.1.0

func (r *RateLimitRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RateLimitRule.

type RateLimitRuleList

type RateLimitRuleList struct {
	// List of rules
	Rules []*RateLimitRule
}

RateLimitRuleList - Defines contents of rate limit rules

func (RateLimitRuleList) MarshalJSON

func (r RateLimitRuleList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RateLimitRuleList.

func (*RateLimitRuleList) UnmarshalJSON added in v1.1.0

func (r *RateLimitRuleList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RateLimitRuleList.

type RedirectType

type RedirectType string

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

const (
	RedirectTypeFound             RedirectType = "Found"
	RedirectTypeMoved             RedirectType = "Moved"
	RedirectTypePermanentRedirect RedirectType = "PermanentRedirect"
	RedirectTypeTemporaryRedirect RedirectType = "TemporaryRedirect"
)

func PossibleRedirectTypeValues

func PossibleRedirectTypeValues() []RedirectType

PossibleRedirectTypeValues returns the possible values for the RedirectType const type.

type RemoteAddressMatchConditionParameters

type RemoteAddressMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *RemoteAddressOperator

	// REQUIRED
	TypeName *RemoteAddressMatchConditionParametersTypeName

	// 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.
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

RemoteAddressMatchConditionParameters - Defines the parameters for RemoteAddress match conditions

func (RemoteAddressMatchConditionParameters) MarshalJSON

func (r RemoteAddressMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RemoteAddressMatchConditionParameters.

func (*RemoteAddressMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (r *RemoteAddressMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RemoteAddressMatchConditionParameters.

type RemoteAddressMatchConditionParametersTypeName added in v0.3.0

type RemoteAddressMatchConditionParametersTypeName string
const (
	RemoteAddressMatchConditionParametersTypeNameDeliveryRuleRemoteAddressConditionParameters RemoteAddressMatchConditionParametersTypeName = "DeliveryRuleRemoteAddressConditionParameters"
)

func PossibleRemoteAddressMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleRemoteAddressMatchConditionParametersTypeNameValues() []RemoteAddressMatchConditionParametersTypeName

PossibleRemoteAddressMatchConditionParametersTypeNameValues returns the possible values for the RemoteAddressMatchConditionParametersTypeName const type.

type RemoteAddressOperator

type RemoteAddressOperator string

RemoteAddressOperator - Describes operator to be matched

const (
	RemoteAddressOperatorAny      RemoteAddressOperator = "Any"
	RemoteAddressOperatorGeoMatch RemoteAddressOperator = "GeoMatch"
	RemoteAddressOperatorIPMatch  RemoteAddressOperator = "IPMatch"
)

func PossibleRemoteAddressOperatorValues

func PossibleRemoteAddressOperatorValues() []RemoteAddressOperator

PossibleRemoteAddressOperatorValues returns the possible values for the RemoteAddressOperator const type.

type RequestBodyMatchConditionParameters

type RequestBodyMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *RequestBodyOperator

	// REQUIRED
	TypeName *RequestBodyMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

RequestBodyMatchConditionParameters - Defines the parameters for RequestBody match conditions

func (RequestBodyMatchConditionParameters) MarshalJSON

func (r RequestBodyMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestBodyMatchConditionParameters.

func (*RequestBodyMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (r *RequestBodyMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestBodyMatchConditionParameters.

type RequestBodyMatchConditionParametersTypeName added in v0.3.0

type RequestBodyMatchConditionParametersTypeName string
const (
	RequestBodyMatchConditionParametersTypeNameDeliveryRuleRequestBodyConditionParameters RequestBodyMatchConditionParametersTypeName = "DeliveryRuleRequestBodyConditionParameters"
)

func PossibleRequestBodyMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleRequestBodyMatchConditionParametersTypeNameValues() []RequestBodyMatchConditionParametersTypeName

PossibleRequestBodyMatchConditionParametersTypeNameValues returns the possible values for the RequestBodyMatchConditionParametersTypeName const type.

type RequestBodyOperator

type RequestBodyOperator string

RequestBodyOperator - Describes operator to be matched

const (
	RequestBodyOperatorAny                RequestBodyOperator = "Any"
	RequestBodyOperatorBeginsWith         RequestBodyOperator = "BeginsWith"
	RequestBodyOperatorContains           RequestBodyOperator = "Contains"
	RequestBodyOperatorEndsWith           RequestBodyOperator = "EndsWith"
	RequestBodyOperatorEqual              RequestBodyOperator = "Equal"
	RequestBodyOperatorGreaterThan        RequestBodyOperator = "GreaterThan"
	RequestBodyOperatorGreaterThanOrEqual RequestBodyOperator = "GreaterThanOrEqual"
	RequestBodyOperatorLessThan           RequestBodyOperator = "LessThan"
	RequestBodyOperatorLessThanOrEqual    RequestBodyOperator = "LessThanOrEqual"
	RequestBodyOperatorRegEx              RequestBodyOperator = "RegEx"
)

func PossibleRequestBodyOperatorValues

func PossibleRequestBodyOperatorValues() []RequestBodyOperator

PossibleRequestBodyOperatorValues returns the possible values for the RequestBodyOperator const type.

type RequestHeaderMatchConditionParameters

type RequestHeaderMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *RequestHeaderOperator

	// REQUIRED
	TypeName *RequestHeaderMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// Name of Header to be matched
	Selector *string

	// List of transforms
	Transforms []*Transform
}

RequestHeaderMatchConditionParameters - Defines the parameters for RequestHeader match conditions

func (RequestHeaderMatchConditionParameters) MarshalJSON

func (r RequestHeaderMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestHeaderMatchConditionParameters.

func (*RequestHeaderMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (r *RequestHeaderMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestHeaderMatchConditionParameters.

type RequestHeaderMatchConditionParametersTypeName added in v0.3.0

type RequestHeaderMatchConditionParametersTypeName string
const (
	RequestHeaderMatchConditionParametersTypeNameDeliveryRuleRequestHeaderConditionParameters RequestHeaderMatchConditionParametersTypeName = "DeliveryRuleRequestHeaderConditionParameters"
)

func PossibleRequestHeaderMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleRequestHeaderMatchConditionParametersTypeNameValues() []RequestHeaderMatchConditionParametersTypeName

PossibleRequestHeaderMatchConditionParametersTypeNameValues returns the possible values for the RequestHeaderMatchConditionParametersTypeName const type.

type RequestHeaderOperator

type RequestHeaderOperator string

RequestHeaderOperator - Describes operator to be matched

const (
	RequestHeaderOperatorAny                RequestHeaderOperator = "Any"
	RequestHeaderOperatorBeginsWith         RequestHeaderOperator = "BeginsWith"
	RequestHeaderOperatorContains           RequestHeaderOperator = "Contains"
	RequestHeaderOperatorEndsWith           RequestHeaderOperator = "EndsWith"
	RequestHeaderOperatorEqual              RequestHeaderOperator = "Equal"
	RequestHeaderOperatorGreaterThan        RequestHeaderOperator = "GreaterThan"
	RequestHeaderOperatorGreaterThanOrEqual RequestHeaderOperator = "GreaterThanOrEqual"
	RequestHeaderOperatorLessThan           RequestHeaderOperator = "LessThan"
	RequestHeaderOperatorLessThanOrEqual    RequestHeaderOperator = "LessThanOrEqual"
	RequestHeaderOperatorRegEx              RequestHeaderOperator = "RegEx"
)

func PossibleRequestHeaderOperatorValues

func PossibleRequestHeaderOperatorValues() []RequestHeaderOperator

PossibleRequestHeaderOperatorValues returns the possible values for the RequestHeaderOperator const type.

type RequestMethodMatchConditionParameters

type RequestMethodMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *RequestMethodOperator

	// REQUIRED
	TypeName *RequestMethodMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*RequestMethodMatchConditionParametersMatchValuesItem

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

RequestMethodMatchConditionParameters - Defines the parameters for RequestMethod match conditions

func (RequestMethodMatchConditionParameters) MarshalJSON

func (r RequestMethodMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestMethodMatchConditionParameters.

func (*RequestMethodMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (r *RequestMethodMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestMethodMatchConditionParameters.

type RequestMethodMatchConditionParametersMatchValuesItem

type RequestMethodMatchConditionParametersMatchValuesItem string
const (
	RequestMethodMatchConditionParametersMatchValuesItemDELETE  RequestMethodMatchConditionParametersMatchValuesItem = "DELETE"
	RequestMethodMatchConditionParametersMatchValuesItemGET     RequestMethodMatchConditionParametersMatchValuesItem = "GET"
	RequestMethodMatchConditionParametersMatchValuesItemHEAD    RequestMethodMatchConditionParametersMatchValuesItem = "HEAD"
	RequestMethodMatchConditionParametersMatchValuesItemOPTIONS RequestMethodMatchConditionParametersMatchValuesItem = "OPTIONS"
	RequestMethodMatchConditionParametersMatchValuesItemPOST    RequestMethodMatchConditionParametersMatchValuesItem = "POST"
	RequestMethodMatchConditionParametersMatchValuesItemPUT     RequestMethodMatchConditionParametersMatchValuesItem = "PUT"
	RequestMethodMatchConditionParametersMatchValuesItemTRACE   RequestMethodMatchConditionParametersMatchValuesItem = "TRACE"
)

func PossibleRequestMethodMatchConditionParametersMatchValuesItemValues

func PossibleRequestMethodMatchConditionParametersMatchValuesItemValues() []RequestMethodMatchConditionParametersMatchValuesItem

PossibleRequestMethodMatchConditionParametersMatchValuesItemValues returns the possible values for the RequestMethodMatchConditionParametersMatchValuesItem const type.

type RequestMethodMatchConditionParametersTypeName added in v0.3.0

type RequestMethodMatchConditionParametersTypeName string
const (
	RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters RequestMethodMatchConditionParametersTypeName = "DeliveryRuleRequestMethodConditionParameters"
)

func PossibleRequestMethodMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleRequestMethodMatchConditionParametersTypeNameValues() []RequestMethodMatchConditionParametersTypeName

PossibleRequestMethodMatchConditionParametersTypeNameValues returns the possible values for the RequestMethodMatchConditionParametersTypeName const type.

type RequestMethodOperator

type RequestMethodOperator string

RequestMethodOperator - Describes operator to be matched

const (
	RequestMethodOperatorEqual RequestMethodOperator = "Equal"
)

func PossibleRequestMethodOperatorValues

func PossibleRequestMethodOperatorValues() []RequestMethodOperator

PossibleRequestMethodOperatorValues returns the possible values for the RequestMethodOperator const type.

type RequestSchemeMatchConditionParameters

type RequestSchemeMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *RequestSchemeMatchConditionParametersOperator

	// REQUIRED
	TypeName *RequestSchemeMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*RequestSchemeMatchConditionParametersMatchValuesItem

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

RequestSchemeMatchConditionParameters - Defines the parameters for RequestScheme match conditions

func (RequestSchemeMatchConditionParameters) MarshalJSON

func (r RequestSchemeMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestSchemeMatchConditionParameters.

func (*RequestSchemeMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (r *RequestSchemeMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestSchemeMatchConditionParameters.

type RequestSchemeMatchConditionParametersMatchValuesItem

type RequestSchemeMatchConditionParametersMatchValuesItem string
const (
	RequestSchemeMatchConditionParametersMatchValuesItemHTTP  RequestSchemeMatchConditionParametersMatchValuesItem = "HTTP"
	RequestSchemeMatchConditionParametersMatchValuesItemHTTPS RequestSchemeMatchConditionParametersMatchValuesItem = "HTTPS"
)

func PossibleRequestSchemeMatchConditionParametersMatchValuesItemValues

func PossibleRequestSchemeMatchConditionParametersMatchValuesItemValues() []RequestSchemeMatchConditionParametersMatchValuesItem

PossibleRequestSchemeMatchConditionParametersMatchValuesItemValues returns the possible values for the RequestSchemeMatchConditionParametersMatchValuesItem const type.

type RequestSchemeMatchConditionParametersOperator

type RequestSchemeMatchConditionParametersOperator string

RequestSchemeMatchConditionParametersOperator - Describes operator to be matched

const (
	RequestSchemeMatchConditionParametersOperatorEqual RequestSchemeMatchConditionParametersOperator = "Equal"
)

func PossibleRequestSchemeMatchConditionParametersOperatorValues

func PossibleRequestSchemeMatchConditionParametersOperatorValues() []RequestSchemeMatchConditionParametersOperator

PossibleRequestSchemeMatchConditionParametersOperatorValues returns the possible values for the RequestSchemeMatchConditionParametersOperator const type.

type RequestSchemeMatchConditionParametersTypeName added in v0.3.0

type RequestSchemeMatchConditionParametersTypeName string
const (
	RequestSchemeMatchConditionParametersTypeNameDeliveryRuleRequestSchemeConditionParameters RequestSchemeMatchConditionParametersTypeName = "DeliveryRuleRequestSchemeConditionParameters"
)

func PossibleRequestSchemeMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleRequestSchemeMatchConditionParametersTypeNameValues() []RequestSchemeMatchConditionParametersTypeName

PossibleRequestSchemeMatchConditionParametersTypeNameValues returns the possible values for the RequestSchemeMatchConditionParametersTypeName const type.

type RequestURIMatchConditionParameters

type RequestURIMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *RequestURIOperator

	// REQUIRED
	TypeName *RequestURIMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

RequestURIMatchConditionParameters - Defines the parameters for RequestUri match conditions

func (RequestURIMatchConditionParameters) MarshalJSON

func (r RequestURIMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestURIMatchConditionParameters.

func (*RequestURIMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (r *RequestURIMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestURIMatchConditionParameters.

type RequestURIMatchConditionParametersTypeName added in v0.3.0

type RequestURIMatchConditionParametersTypeName string
const (
	RequestURIMatchConditionParametersTypeNameDeliveryRuleRequestURIConditionParameters RequestURIMatchConditionParametersTypeName = "DeliveryRuleRequestUriConditionParameters"
)

func PossibleRequestURIMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleRequestURIMatchConditionParametersTypeNameValues() []RequestURIMatchConditionParametersTypeName

PossibleRequestURIMatchConditionParametersTypeNameValues returns the possible values for the RequestURIMatchConditionParametersTypeName const type.

type RequestURIOperator

type RequestURIOperator string

RequestURIOperator - Describes operator to be matched

const (
	RequestURIOperatorAny                RequestURIOperator = "Any"
	RequestURIOperatorBeginsWith         RequestURIOperator = "BeginsWith"
	RequestURIOperatorContains           RequestURIOperator = "Contains"
	RequestURIOperatorEndsWith           RequestURIOperator = "EndsWith"
	RequestURIOperatorEqual              RequestURIOperator = "Equal"
	RequestURIOperatorGreaterThan        RequestURIOperator = "GreaterThan"
	RequestURIOperatorGreaterThanOrEqual RequestURIOperator = "GreaterThanOrEqual"
	RequestURIOperatorLessThan           RequestURIOperator = "LessThan"
	RequestURIOperatorLessThanOrEqual    RequestURIOperator = "LessThanOrEqual"
	RequestURIOperatorRegEx              RequestURIOperator = "RegEx"
)

func PossibleRequestURIOperatorValues

func PossibleRequestURIOperatorValues() []RequestURIOperator

PossibleRequestURIOperatorValues returns the possible values for the RequestURIOperator const type.

type Resource

type Resource struct {
	// READ-ONLY; Resource ID.
	ID *string

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

Resource - The core properties of ARM resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceReference

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

ResourceReference - Reference to another resource.

func (ResourceReference) MarshalJSON added in v1.1.0

func (r ResourceReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceReference.

func (*ResourceReference) UnmarshalJSON added in v1.1.0

func (r *ResourceReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference.

type ResourceType added in v0.3.0

type ResourceType string

ResourceType - Type of CDN resource used in CheckNameAvailability.

const (
	ResourceTypeMicrosoftCdnProfilesAfdEndpoints ResourceType = "Microsoft.Cdn/Profiles/AfdEndpoints"
	ResourceTypeMicrosoftCdnProfilesEndpoints    ResourceType = "Microsoft.Cdn/Profiles/Endpoints"
)

func PossibleResourceTypeValues added in v0.3.0

func PossibleResourceTypeValues() []ResourceType

PossibleResourceTypeValues returns the possible values for the ResourceType const type.

type ResourceUsage

type ResourceUsage struct {
	// READ-ONLY; Actual value of usage on the specified resource type.
	CurrentValue *int32

	// READ-ONLY; Quota of the specified resource type.
	Limit *int32

	// READ-ONLY; Resource type for which the usage is provided.
	ResourceType *string

	// READ-ONLY; Unit of the usage. e.g. count.
	Unit *ResourceUsageUnit
}

ResourceUsage - Output of check resource usage API.

func (ResourceUsage) MarshalJSON added in v1.1.0

func (r ResourceUsage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUsage.

func (*ResourceUsage) UnmarshalJSON added in v1.1.0

func (r *ResourceUsage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsage.

type ResourceUsageClient

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

ResourceUsageClient contains the methods for the ResourceUsage group. Don't use this type directly, use NewResourceUsageClient() instead.

func NewResourceUsageClient

func NewResourceUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceUsageClient, error)

NewResourceUsageClient creates a new instance of ResourceUsageClient with the specified values.

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

func (*ResourceUsageClient) NewListPager added in v0.5.0

NewListPager - Check the quota and actual usage of the CDN profiles under the given subscription.

Generated from API version 2021-06-01

  • options - ResourceUsageClientListOptions contains the optional parameters for the ResourceUsageClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/ResourceUsage_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewResourceUsageClient().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.ResourceUsageListResult = armcdn.ResourceUsageListResult{
		// 	Value: []*armcdn.ResourceUsage{
		// 		{
		// 			CurrentValue: to.Ptr[int32](31),
		// 			Limit: to.Ptr[int32](200),
		// 			ResourceType: to.Ptr("profile"),
		// 			Unit: to.Ptr(armcdn.ResourceUsageUnitCount),
		// 	}},
		// }
	}
}
Output:

type ResourceUsageClientListOptions added in v0.3.0

type ResourceUsageClientListOptions struct {
}

ResourceUsageClientListOptions contains the optional parameters for the ResourceUsageClient.NewListPager method.

type ResourceUsageClientListResponse added in v0.3.0

type ResourceUsageClientListResponse struct {
	ResourceUsageListResult
}

ResourceUsageClientListResponse contains the response from method ResourceUsageClient.NewListPager.

type ResourceUsageListResult

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

	// READ-ONLY; List of resource usages.
	Value []*ResourceUsage
}

ResourceUsageListResult - Output of check resource usage API.

func (ResourceUsageListResult) MarshalJSON

func (r ResourceUsageListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUsageListResult.

func (*ResourceUsageListResult) UnmarshalJSON added in v1.1.0

func (r *ResourceUsageListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsageListResult.

type ResourceUsageUnit added in v1.0.0

type ResourceUsageUnit string

ResourceUsageUnit - Unit of the usage. e.g. count.

const (
	ResourceUsageUnitCount ResourceUsageUnit = "count"
)

func PossibleResourceUsageUnitValues added in v1.0.0

func PossibleResourceUsageUnitValues() []ResourceUsageUnit

PossibleResourceUsageUnitValues returns the possible values for the ResourceUsageUnit const type.

type ResourcesResponse

type ResourcesResponse struct {
	CustomDomains []*ResourcesResponseCustomDomainsItem
	Endpoints     []*ResourcesResponseEndpointsItem
}

ResourcesResponse - Resources Response

func (ResourcesResponse) MarshalJSON

func (r ResourcesResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourcesResponse.

func (*ResourcesResponse) UnmarshalJSON added in v1.1.0

func (r *ResourcesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponse.

type ResourcesResponseCustomDomainsItem

type ResourcesResponseCustomDomainsItem struct {
	EndpointID *string
	History    *bool
	ID         *string
	Name       *string
}

func (ResourcesResponseCustomDomainsItem) MarshalJSON added in v1.1.0

func (r ResourcesResponseCustomDomainsItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourcesResponseCustomDomainsItem.

func (*ResourcesResponseCustomDomainsItem) UnmarshalJSON added in v1.1.0

func (r *ResourcesResponseCustomDomainsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseCustomDomainsItem.

type ResourcesResponseEndpointsItem

type ResourcesResponseEndpointsItem struct {
	CustomDomains []*ResourcesResponseEndpointsPropertiesItemsItem
	History       *bool
	ID            *string
	Name          *string
}

func (ResourcesResponseEndpointsItem) MarshalJSON

func (r ResourcesResponseEndpointsItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourcesResponseEndpointsItem.

func (*ResourcesResponseEndpointsItem) UnmarshalJSON added in v1.1.0

func (r *ResourcesResponseEndpointsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseEndpointsItem.

type ResourcesResponseEndpointsPropertiesItemsItem

type ResourcesResponseEndpointsPropertiesItemsItem struct {
	EndpointID *string
	History    *bool
	ID         *string
	Name       *string
}

func (ResourcesResponseEndpointsPropertiesItemsItem) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type ResourcesResponseEndpointsPropertiesItemsItem.

func (*ResourcesResponseEndpointsPropertiesItemsItem) UnmarshalJSON added in v1.1.0

func (r *ResourcesResponseEndpointsPropertiesItemsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseEndpointsPropertiesItemsItem.

type ResponseBasedDetectedErrorTypes

type ResponseBasedDetectedErrorTypes string

ResponseBasedDetectedErrorTypes - Type of response errors for real user requests for which origin will be deemed unhealthy

const (
	ResponseBasedDetectedErrorTypesNone             ResponseBasedDetectedErrorTypes = "None"
	ResponseBasedDetectedErrorTypesTCPErrorsOnly    ResponseBasedDetectedErrorTypes = "TcpErrorsOnly"
	ResponseBasedDetectedErrorTypesTCPAndHTTPErrors ResponseBasedDetectedErrorTypes = "TcpAndHttpErrors"
)

func PossibleResponseBasedDetectedErrorTypesValues

func PossibleResponseBasedDetectedErrorTypesValues() []ResponseBasedDetectedErrorTypes

PossibleResponseBasedDetectedErrorTypesValues returns the possible values for the ResponseBasedDetectedErrorTypes const type.

type ResponseBasedOriginErrorDetectionParameters

type ResponseBasedOriginErrorDetectionParameters struct {
	// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.
	HTTPErrorRanges []*HTTPErrorRangeParameters

	// Type of response errors for real user requests for which origin will be deemed unhealthy
	ResponseBasedDetectedErrorTypes *ResponseBasedDetectedErrorTypes

	// The percentage of failed requests in the sample where failover should trigger.
	ResponseBasedFailoverThresholdPercentage *int32
}

ResponseBasedOriginErrorDetectionParameters - The JSON object that contains the properties to determine origin health using real requests/responses.

func (ResponseBasedOriginErrorDetectionParameters) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ResponseBasedOriginErrorDetectionParameters.

func (*ResponseBasedOriginErrorDetectionParameters) UnmarshalJSON added in v1.1.0

func (r *ResponseBasedOriginErrorDetectionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResponseBasedOriginErrorDetectionParameters.

type Route

type Route struct {
	// The JSON object that contains the properties of the Routes to create.
	Properties *RouteProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

Route - Friendly Routes name mapping to the any Routes or secret related information.

func (Route) MarshalJSON

func (r Route) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Route.

func (*Route) UnmarshalJSON added in v1.1.0

func (r *Route) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Route.

type RouteConfigurationOverrideActionParameters added in v0.3.0

type RouteConfigurationOverrideActionParameters struct {
	// REQUIRED
	TypeName *RouteConfigurationOverrideActionParametersTypeName

	// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object.
	CacheConfiguration *CacheConfiguration

	// A reference to the origin group override configuration. Leave empty to use the default origin group on route.
	OriginGroupOverride *OriginGroupOverride
}

RouteConfigurationOverrideActionParameters - Defines the parameters for the route configuration override action.

func (RouteConfigurationOverrideActionParameters) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type RouteConfigurationOverrideActionParameters.

func (*RouteConfigurationOverrideActionParameters) UnmarshalJSON added in v1.1.0

func (r *RouteConfigurationOverrideActionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RouteConfigurationOverrideActionParameters.

type RouteConfigurationOverrideActionParametersTypeName added in v0.3.0

type RouteConfigurationOverrideActionParametersTypeName string
const (
	RouteConfigurationOverrideActionParametersTypeNameDeliveryRuleRouteConfigurationOverrideActionParameters RouteConfigurationOverrideActionParametersTypeName = "DeliveryRuleRouteConfigurationOverrideActionParameters"
)

func PossibleRouteConfigurationOverrideActionParametersTypeNameValues added in v0.3.0

func PossibleRouteConfigurationOverrideActionParametersTypeNameValues() []RouteConfigurationOverrideActionParametersTypeName

PossibleRouteConfigurationOverrideActionParametersTypeNameValues returns the possible values for the RouteConfigurationOverrideActionParametersTypeName const type.

type RouteListResult

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

	// READ-ONLY; List of AzureFrontDoor routes within a profile.
	Value []*Route
}

RouteListResult - Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results.

func (RouteListResult) MarshalJSON

func (r RouteListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RouteListResult.

func (*RouteListResult) UnmarshalJSON added in v1.1.0

func (r *RouteListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RouteListResult.

type RouteProperties

type RouteProperties struct {
	// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.
	CacheConfiguration *AfdRouteCacheConfiguration

	// Domains referenced by this endpoint.
	CustomDomains []*ActivatedResourceReference

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

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

	// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it
	// will be the first rule that gets executed.
	HTTPSRedirect *HTTPSRedirect

	// whether this route will be linked to the default endpoint domain.
	LinkToDefaultDomain *LinkToDefaultDomain

	// A reference to the origin group.
	OriginGroup *ResourceReference

	// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
	OriginPath *string

	// The route patterns of the rule.
	PatternsToMatch []*string

	// rule sets referenced by this endpoint.
	RuleSets []*ResourceReference

	// List of supported protocols for this route.
	SupportedProtocols []*AFDEndpointProtocols

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; The name of the endpoint which holds the route.
	EndpointName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

RouteProperties - The JSON object that contains the properties of the Routes to create.

func (RouteProperties) MarshalJSON added in v0.3.0

func (r RouteProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RouteProperties.

func (*RouteProperties) UnmarshalJSON added in v1.1.0

func (r *RouteProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RouteProperties.

type RouteUpdateParameters

type RouteUpdateParameters struct {
	// The JSON object that contains the properties of the domain to create.
	Properties *RouteUpdatePropertiesParameters
}

RouteUpdateParameters - The domain JSON object required for domain creation or update.

func (RouteUpdateParameters) MarshalJSON

func (r RouteUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RouteUpdateParameters.

func (*RouteUpdateParameters) UnmarshalJSON added in v1.1.0

func (r *RouteUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RouteUpdateParameters.

type RouteUpdatePropertiesParameters

type RouteUpdatePropertiesParameters struct {
	// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.
	CacheConfiguration *AfdRouteCacheConfiguration

	// Domains referenced by this endpoint.
	CustomDomains []*ActivatedResourceReference

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

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

	// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it
	// will be the first rule that gets executed.
	HTTPSRedirect *HTTPSRedirect

	// whether this route will be linked to the default endpoint domain.
	LinkToDefaultDomain *LinkToDefaultDomain

	// A reference to the origin group.
	OriginGroup *ResourceReference

	// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
	OriginPath *string

	// The route patterns of the rule.
	PatternsToMatch []*string

	// rule sets referenced by this endpoint.
	RuleSets []*ResourceReference

	// List of supported protocols for this route.
	SupportedProtocols []*AFDEndpointProtocols

	// READ-ONLY; The name of the endpoint which holds the route.
	EndpointName *string
}

RouteUpdatePropertiesParameters - The JSON object that contains the properties of the domain to create.

func (RouteUpdatePropertiesParameters) MarshalJSON

func (r RouteUpdatePropertiesParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RouteUpdatePropertiesParameters.

func (*RouteUpdatePropertiesParameters) UnmarshalJSON

func (r *RouteUpdatePropertiesParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RouteUpdatePropertiesParameters.

type RoutesClient

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

RoutesClient contains the methods for the Routes group. Don't use this type directly, use NewRoutesClient() instead.

func NewRoutesClient

func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error)

NewRoutesClient creates a new instance of RoutesClient with the specified values.

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

func (*RoutesClient) BeginCreate

func (client *RoutesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, route Route, options *RoutesClientBeginCreateOptions) (*runtime.Poller[RoutesClientCreateResponse], error)

BeginCreate - Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • routeName - Name of the routing rule.
  • route - Route properties
  • options - RoutesClientBeginCreateOptions contains the optional parameters for the RoutesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRoutesClient().BeginCreate(ctx, "RG", "profile1", "endpoint1", "route1", armcdn.Route{
		Properties: &armcdn.RouteProperties{
			CacheConfiguration: &armcdn.AfdRouteCacheConfiguration{
				CompressionSettings: &armcdn.CompressionSettings{
					ContentTypesToCompress: []*string{
						to.Ptr("text/html"),
						to.Ptr("application/octet-stream")},
					IsCompressionEnabled: to.Ptr(true),
				},
				QueryParameters:            to.Ptr("querystring=test"),
				QueryStringCachingBehavior: to.Ptr(armcdn.AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings),
			},
			CustomDomains: []*armcdn.ActivatedResourceReference{
				{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
				}},
			EnabledState:        to.Ptr(armcdn.EnabledStateEnabled),
			ForwardingProtocol:  to.Ptr(armcdn.ForwardingProtocolMatchRequest),
			HTTPSRedirect:       to.Ptr(armcdn.HTTPSRedirectEnabled),
			LinkToDefaultDomain: to.Ptr(armcdn.LinkToDefaultDomainEnabled),
			OriginGroup: &armcdn.ResourceReference{
				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"),
			},
			PatternsToMatch: []*string{
				to.Ptr("/*")},
			RuleSets: []*armcdn.ResourceReference{
				{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
				}},
			SupportedProtocols: []*armcdn.AFDEndpointProtocols{
				to.Ptr(armcdn.AFDEndpointProtocolsHTTPS),
				to.Ptr(armcdn.AFDEndpointProtocolsHTTP)},
		},
	}, 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.Route = armcdn.Route{
	// 	Name: to.Ptr("route1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints/routes"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1"),
	// 	Properties: &armcdn.RouteProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		CacheConfiguration: &armcdn.AfdRouteCacheConfiguration{
	// 			CompressionSettings: &armcdn.CompressionSettings{
	// 				ContentTypesToCompress: []*string{
	// 					to.Ptr("text/html"),
	// 					to.Ptr("application/octet-stream")},
	// 					IsCompressionEnabled: to.Ptr(true),
	// 				},
	// 				QueryParameters: to.Ptr("querystring=test"),
	// 				QueryStringCachingBehavior: to.Ptr(armcdn.AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings),
	// 			},
	// 			CustomDomains: []*armcdn.ActivatedResourceReference{
	// 				{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
	// 			}},
	// 			EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 			ForwardingProtocol: to.Ptr(armcdn.ForwardingProtocolMatchRequest),
	// 			HTTPSRedirect: to.Ptr(armcdn.HTTPSRedirectEnabled),
	// 			LinkToDefaultDomain: to.Ptr(armcdn.LinkToDefaultDomainEnabled),
	// 			OriginGroup: &armcdn.ResourceReference{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"),
	// 			},
	// 			PatternsToMatch: []*string{
	// 				to.Ptr("/*")},
	// 				RuleSets: []*armcdn.ResourceReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
	// 				}},
	// 				SupportedProtocols: []*armcdn.AFDEndpointProtocols{
	// 					to.Ptr(armcdn.AFDEndpointProtocolsHTTPS),
	// 					to.Ptr(armcdn.AFDEndpointProtocolsHTTP)},
	// 				},
	// 			}
}
Output:

func (*RoutesClient) BeginDelete

func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientBeginDeleteOptions) (*runtime.Poller[RoutesClientDeleteResponse], error)

BeginDelete - Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • routeName - Name of the routing rule.
  • options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRoutesClient().BeginDelete(ctx, "RG", "profile1", "endpoint1", "route1", 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 (*RoutesClient) BeginUpdate

func (client *RoutesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, routeUpdateProperties RouteUpdateParameters, options *RoutesClientBeginUpdateOptions) (*runtime.Poller[RoutesClientUpdateResponse], error)

BeginUpdate - Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • routeName - Name of the routing rule.
  • routeUpdateProperties - Route update properties
  • options - RoutesClientBeginUpdateOptions contains the optional parameters for the RoutesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRoutesClient().BeginUpdate(ctx, "RG", "profile1", "endpoint1", "route1", armcdn.RouteUpdateParameters{
		Properties: &armcdn.RouteUpdatePropertiesParameters{
			CacheConfiguration: &armcdn.AfdRouteCacheConfiguration{
				CompressionSettings: &armcdn.CompressionSettings{
					ContentTypesToCompress: []*string{
						to.Ptr("text/html"),
						to.Ptr("application/octet-stream")},
					IsCompressionEnabled: to.Ptr(true),
				},
				QueryStringCachingBehavior: to.Ptr(armcdn.AfdQueryStringCachingBehaviorIgnoreQueryString),
			},
			CustomDomains: []*armcdn.ActivatedResourceReference{
				{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
				}},
			EnabledState:        to.Ptr(armcdn.EnabledStateEnabled),
			ForwardingProtocol:  to.Ptr(armcdn.ForwardingProtocolMatchRequest),
			HTTPSRedirect:       to.Ptr(armcdn.HTTPSRedirectEnabled),
			LinkToDefaultDomain: to.Ptr(armcdn.LinkToDefaultDomainEnabled),
			OriginGroup: &armcdn.ResourceReference{
				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"),
			},
			PatternsToMatch: []*string{
				to.Ptr("/*")},
			RuleSets: []*armcdn.ResourceReference{
				{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
				}},
			SupportedProtocols: []*armcdn.AFDEndpointProtocols{
				to.Ptr(armcdn.AFDEndpointProtocolsHTTPS),
				to.Ptr(armcdn.AFDEndpointProtocolsHTTP)},
		},
	}, 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.Route = armcdn.Route{
	// 	Name: to.Ptr("route1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints/routes"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1"),
	// 	Properties: &armcdn.RouteProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		CacheConfiguration: &armcdn.AfdRouteCacheConfiguration{
	// 			CompressionSettings: &armcdn.CompressionSettings{
	// 				ContentTypesToCompress: []*string{
	// 					to.Ptr("text/html"),
	// 					to.Ptr("application/octet-stream")},
	// 					IsCompressionEnabled: to.Ptr(true),
	// 				},
	// 				QueryStringCachingBehavior: to.Ptr(armcdn.AfdQueryStringCachingBehaviorIgnoreQueryString),
	// 			},
	// 			CustomDomains: []*armcdn.ActivatedResourceReference{
	// 				{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
	// 			}},
	// 			EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 			ForwardingProtocol: to.Ptr(armcdn.ForwardingProtocolMatchRequest),
	// 			HTTPSRedirect: to.Ptr(armcdn.HTTPSRedirectEnabled),
	// 			LinkToDefaultDomain: to.Ptr(armcdn.LinkToDefaultDomainEnabled),
	// 			OriginGroup: &armcdn.ResourceReference{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"),
	// 			},
	// 			PatternsToMatch: []*string{
	// 				to.Ptr("/*")},
	// 				RuleSets: []*armcdn.ResourceReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
	// 				}},
	// 				SupportedProtocols: []*armcdn.AFDEndpointProtocols{
	// 					to.Ptr(armcdn.AFDEndpointProtocolsHTTPS),
	// 					to.Ptr(armcdn.AFDEndpointProtocolsHTTP)},
	// 				},
	// 			}
}
Output:

func (*RoutesClient) Get

func (client *RoutesClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientGetOptions) (RoutesClientGetResponse, error)

Get - Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • routeName - Name of the routing rule.
  • options - RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoutesClient().Get(ctx, "RG", "profile1", "endpoint1", "route1", 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.Route = armcdn.Route{
	// 	Name: to.Ptr("route1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints/routes"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1"),
	// 	Properties: &armcdn.RouteProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		CacheConfiguration: &armcdn.AfdRouteCacheConfiguration{
	// 			CompressionSettings: &armcdn.CompressionSettings{
	// 				ContentTypesToCompress: []*string{
	// 					to.Ptr("text/html"),
	// 					to.Ptr("application/octet-stream")},
	// 					IsCompressionEnabled: to.Ptr(true),
	// 				},
	// 				QueryStringCachingBehavior: to.Ptr(armcdn.AfdQueryStringCachingBehaviorIgnoreQueryString),
	// 			},
	// 			CustomDomains: []*armcdn.ActivatedResourceReference{
	// 				{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
	// 			}},
	// 			EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
	// 			ForwardingProtocol: to.Ptr(armcdn.ForwardingProtocolMatchRequest),
	// 			HTTPSRedirect: to.Ptr(armcdn.HTTPSRedirectEnabled),
	// 			LinkToDefaultDomain: to.Ptr(armcdn.LinkToDefaultDomainEnabled),
	// 			OriginGroup: &armcdn.ResourceReference{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"),
	// 			},
	// 			PatternsToMatch: []*string{
	// 				to.Ptr("/*")},
	// 				RuleSets: []*armcdn.ResourceReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
	// 				}},
	// 				SupportedProtocols: []*armcdn.AFDEndpointProtocols{
	// 					to.Ptr(armcdn.AFDEndpointProtocolsHTTPS),
	// 					to.Ptr(armcdn.AFDEndpointProtocolsHTTP)},
	// 				},
	// 			}
}
Output:

func (*RoutesClient) NewListByEndpointPager added in v0.5.0

func (client *RoutesClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *RoutesClientListByEndpointOptions) *runtime.Pager[RoutesClientListByEndpointResponse]

NewListByEndpointPager - Lists all of the existing origins within a profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • endpointName - Name of the endpoint under the profile which is unique globally.
  • options - RoutesClientListByEndpointOptions contains the optional parameters for the RoutesClient.NewListByEndpointPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_ListByEndpoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoutesClient().NewListByEndpointPager("RG", "profile1", "endpoint1", 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.RouteListResult = armcdn.RouteListResult{
		// 	Value: []*armcdn.Route{
		// 		{
		// 			Name: to.Ptr("route1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/afdendpoints/routes"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1"),
		// 			Properties: &armcdn.RouteProperties{
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 				CacheConfiguration: &armcdn.AfdRouteCacheConfiguration{
		// 					CompressionSettings: &armcdn.CompressionSettings{
		// 						ContentTypesToCompress: []*string{
		// 							to.Ptr("text/html"),
		// 							to.Ptr("application/octet-stream")},
		// 							IsCompressionEnabled: to.Ptr(true),
		// 						},
		// 						QueryStringCachingBehavior: to.Ptr(armcdn.AfdQueryStringCachingBehaviorIgnoreQueryString),
		// 					},
		// 					CustomDomains: []*armcdn.ActivatedResourceReference{
		// 						{
		// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"),
		// 					}},
		// 					EnabledState: to.Ptr(armcdn.EnabledStateEnabled),
		// 					ForwardingProtocol: to.Ptr(armcdn.ForwardingProtocolMatchRequest),
		// 					HTTPSRedirect: to.Ptr(armcdn.HTTPSRedirectEnabled),
		// 					LinkToDefaultDomain: to.Ptr(armcdn.LinkToDefaultDomainEnabled),
		// 					OriginGroup: &armcdn.ResourceReference{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"),
		// 					},
		// 					PatternsToMatch: []*string{
		// 						to.Ptr("/*")},
		// 						RuleSets: []*armcdn.ResourceReference{
		// 							{
		// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"),
		// 						}},
		// 						SupportedProtocols: []*armcdn.AFDEndpointProtocols{
		// 							to.Ptr(armcdn.AFDEndpointProtocolsHTTPS),
		// 							to.Ptr(armcdn.AFDEndpointProtocolsHTTP)},
		// 						},
		// 				}},
		// 			}
	}
}
Output:

type RoutesClientBeginCreateOptions added in v0.3.0

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

RoutesClientBeginCreateOptions contains the optional parameters for the RoutesClient.BeginCreate method.

type RoutesClientBeginDeleteOptions added in v0.3.0

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

RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method.

type RoutesClientBeginUpdateOptions added in v0.3.0

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

RoutesClientBeginUpdateOptions contains the optional parameters for the RoutesClient.BeginUpdate method.

type RoutesClientCreateResponse added in v0.3.0

type RoutesClientCreateResponse struct {
	Route
}

RoutesClientCreateResponse contains the response from method RoutesClient.BeginCreate.

type RoutesClientDeleteResponse added in v0.3.0

type RoutesClientDeleteResponse struct {
}

RoutesClientDeleteResponse contains the response from method RoutesClient.BeginDelete.

type RoutesClientGetOptions added in v0.3.0

type RoutesClientGetOptions struct {
}

RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method.

type RoutesClientGetResponse added in v0.3.0

type RoutesClientGetResponse struct {
	Route
}

RoutesClientGetResponse contains the response from method RoutesClient.Get.

type RoutesClientListByEndpointOptions added in v0.3.0

type RoutesClientListByEndpointOptions struct {
}

RoutesClientListByEndpointOptions contains the optional parameters for the RoutesClient.NewListByEndpointPager method.

type RoutesClientListByEndpointResponse added in v0.3.0

type RoutesClientListByEndpointResponse struct {
	RouteListResult
}

RoutesClientListByEndpointResponse contains the response from method RoutesClient.NewListByEndpointPager.

type RoutesClientUpdateResponse added in v0.3.0

type RoutesClientUpdateResponse struct {
	Route
}

RoutesClientUpdateResponse contains the response from method RoutesClient.BeginUpdate.

type Rule

type Rule struct {
	// The JSON object that contains the properties of the Rules to create.
	Properties *RuleProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

Rule - Friendly Rules name mapping to the any Rules or secret related information.

func (Rule) MarshalJSON

func (r Rule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Rule.

func (*Rule) UnmarshalJSON added in v1.1.0

func (r *Rule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Rule.

type RuleCacheBehavior added in v0.3.0

type RuleCacheBehavior string

RuleCacheBehavior - Caching behavior for the requests

const (
	RuleCacheBehaviorHonorOrigin             RuleCacheBehavior = "HonorOrigin"
	RuleCacheBehaviorOverrideAlways          RuleCacheBehavior = "OverrideAlways"
	RuleCacheBehaviorOverrideIfOriginMissing RuleCacheBehavior = "OverrideIfOriginMissing"
)

func PossibleRuleCacheBehaviorValues added in v0.3.0

func PossibleRuleCacheBehaviorValues() []RuleCacheBehavior

PossibleRuleCacheBehaviorValues returns the possible values for the RuleCacheBehavior const type.

type RuleIsCompressionEnabled added in v0.3.0

type RuleIsCompressionEnabled string

RuleIsCompressionEnabled - Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.

const (
	RuleIsCompressionEnabledDisabled RuleIsCompressionEnabled = "Disabled"
	RuleIsCompressionEnabledEnabled  RuleIsCompressionEnabled = "Enabled"
)

func PossibleRuleIsCompressionEnabledValues added in v0.3.0

func PossibleRuleIsCompressionEnabledValues() []RuleIsCompressionEnabled

PossibleRuleIsCompressionEnabledValues returns the possible values for the RuleIsCompressionEnabled const type.

type RuleListResult

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

	// READ-ONLY; List of AzureFrontDoor rules within a rule set.
	Value []*Rule
}

RuleListResult - Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results.

func (RuleListResult) MarshalJSON

func (r RuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleListResult.

func (*RuleListResult) UnmarshalJSON added in v1.1.0

func (r *RuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleListResult.

type RuleProperties

type RuleProperties struct {
	// A list of actions that are executed when all the conditions of a rule are satisfied.
	Actions []DeliveryRuleActionAutoGeneratedClassification

	// A list of conditions that must be matched for the actions to be executed
	Conditions []DeliveryRuleConditionClassification

	// 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

	// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will
	// be applied before a rule with a greater order. Rule with order 0 is a special
	// rule. It does not require any condition and actions listed in it will always be applied.
	Order *int32

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState

	// READ-ONLY; The name of the rule set containing the rule.
	RuleSetName *string
}

RuleProperties - The JSON object that contains the properties of the Rules to create.

func (RuleProperties) MarshalJSON added in v0.3.0

func (r RuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleProperties.

func (*RuleProperties) UnmarshalJSON added in v0.3.0

func (r *RuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleProperties.

type RuleQueryStringCachingBehavior added in v0.3.0

type RuleQueryStringCachingBehavior string

RuleQueryStringCachingBehavior - Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.

const (
	RuleQueryStringCachingBehaviorIgnoreQueryString            RuleQueryStringCachingBehavior = "IgnoreQueryString"
	RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings  RuleQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings"
	RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings"
	RuleQueryStringCachingBehaviorUseQueryString               RuleQueryStringCachingBehavior = "UseQueryString"
)

func PossibleRuleQueryStringCachingBehaviorValues added in v0.3.0

func PossibleRuleQueryStringCachingBehaviorValues() []RuleQueryStringCachingBehavior

PossibleRuleQueryStringCachingBehaviorValues returns the possible values for the RuleQueryStringCachingBehavior const type.

type RuleSet

type RuleSet struct {
	// The JSON object that contains the properties of the Rule Set to create.
	Properties *RuleSetProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

RuleSet - Friendly RuleSet name mapping to the any RuleSet or secret related information.

func (RuleSet) MarshalJSON

func (r RuleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleSet.

func (*RuleSet) UnmarshalJSON added in v1.1.0

func (r *RuleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleSet.

type RuleSetListResult

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

	// READ-ONLY; List of AzureFrontDoor rule sets within a profile.
	Value []*RuleSet
}

RuleSetListResult - Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of results.

func (RuleSetListResult) MarshalJSON

func (r RuleSetListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleSetListResult.

func (*RuleSetListResult) UnmarshalJSON added in v1.1.0

func (r *RuleSetListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleSetListResult.

type RuleSetProperties

type RuleSetProperties struct {
	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; The name of the profile which holds the rule set.
	ProfileName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

RuleSetProperties - The JSON object that contains the properties of the Rule Set to create.

func (RuleSetProperties) MarshalJSON added in v1.1.0

func (r RuleSetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleSetProperties.

func (*RuleSetProperties) UnmarshalJSON added in v1.1.0

func (r *RuleSetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleSetProperties.

type RuleSetsClient

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

RuleSetsClient contains the methods for the RuleSets group. Don't use this type directly, use NewRuleSetsClient() instead.

func NewRuleSetsClient

func NewRuleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RuleSetsClient, error)

NewRuleSetsClient creates a new instance of RuleSetsClient with the specified values.

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

func (*RuleSetsClient) BeginDelete

func (client *RuleSetsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, options *RuleSetsClientBeginDeleteOptions) (*runtime.Poller[RuleSetsClientDeleteResponse], error)

BeginDelete - Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile which is unique globally.
  • options - RuleSetsClientBeginDeleteOptions contains the optional parameters for the RuleSetsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRuleSetsClient().BeginDelete(ctx, "RG", "profile1", "ruleSet1", 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 (*RuleSetsClient) Create added in v0.3.0

func (client *RuleSetsClient) Create(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, options *RuleSetsClientCreateOptions) (RuleSetsClientCreateResponse, error)

Create - Creates a new rule set within the specified profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile which is unique globally
  • options - RuleSetsClientCreateOptions contains the optional parameters for the RuleSetsClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRuleSetsClient().Create(ctx, "RG", "profile1", "ruleSet1", 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.RuleSet = armcdn.RuleSet{
	// 	Name: to.Ptr("ruleSet1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/rulesets"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1"),
	// 	Properties: &armcdn.RuleSetProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*RuleSetsClient) Get

func (client *RuleSetsClient) Get(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, options *RuleSetsClientGetOptions) (RuleSetsClientGetResponse, error)

Get - Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile which is unique globally.
  • options - RuleSetsClientGetOptions contains the optional parameters for the RuleSetsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRuleSetsClient().Get(ctx, "RG", "profile1", "ruleSet1", 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.RuleSet = armcdn.RuleSet{
	// 	Name: to.Ptr("ruleSet1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/rulesets"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1"),
	// 	Properties: &armcdn.RuleSetProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*RuleSetsClient) NewListByProfilePager added in v0.5.0

func (client *RuleSetsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *RuleSetsClientListByProfileOptions) *runtime.Pager[RuleSetsClientListByProfileResponse]

NewListByProfilePager - Lists existing AzureFrontDoor rule sets within a profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • options - RuleSetsClientListByProfileOptions contains the optional parameters for the RuleSetsClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_ListByProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRuleSetsClient().NewListByProfilePager("RG", "profile1", 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.RuleSetListResult = armcdn.RuleSetListResult{
		// 	Value: []*armcdn.RuleSet{
		// 		{
		// 			Name: to.Ptr("ruleSet1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/rulesets"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1"),
		// 			Properties: &armcdn.RuleSetProperties{
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*RuleSetsClient) NewListResourceUsagePager added in v0.5.0

func (client *RuleSetsClient) NewListResourceUsagePager(resourceGroupName string, profileName string, ruleSetName string, options *RuleSetsClientListResourceUsageOptions) *runtime.Pager[RuleSetsClientListResourceUsageResponse]

NewListResourceUsagePager - Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile which is unique globally.
  • options - RuleSetsClientListResourceUsageOptions contains the optional parameters for the RuleSetsClient.NewListResourceUsagePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_ListResourceUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRuleSetsClient().NewListResourceUsagePager("RG", "profile1", "ruleSet1", 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.UsagesListResult = armcdn.UsagesListResult{
		// 	Value: []*armcdn.Usage{
		// 		{
		// 			Name: &armcdn.UsageName{
		// 				LocalizedValue: to.Ptr("rule"),
		// 				Value: to.Ptr("rule"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1/rules/rule1"),
		// 			Limit: to.Ptr[int64](25),
		// 			Unit: to.Ptr(armcdn.UsageUnitCount),
		// 	}},
		// }
	}
}
Output:

type RuleSetsClientBeginDeleteOptions added in v0.3.0

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

RuleSetsClientBeginDeleteOptions contains the optional parameters for the RuleSetsClient.BeginDelete method.

type RuleSetsClientCreateOptions added in v0.3.0

type RuleSetsClientCreateOptions struct {
}

RuleSetsClientCreateOptions contains the optional parameters for the RuleSetsClient.Create method.

type RuleSetsClientCreateResponse added in v0.3.0

type RuleSetsClientCreateResponse struct {
	RuleSet
}

RuleSetsClientCreateResponse contains the response from method RuleSetsClient.Create.

type RuleSetsClientDeleteResponse added in v0.3.0

type RuleSetsClientDeleteResponse struct {
}

RuleSetsClientDeleteResponse contains the response from method RuleSetsClient.BeginDelete.

type RuleSetsClientGetOptions added in v0.3.0

type RuleSetsClientGetOptions struct {
}

RuleSetsClientGetOptions contains the optional parameters for the RuleSetsClient.Get method.

type RuleSetsClientGetResponse added in v0.3.0

type RuleSetsClientGetResponse struct {
	RuleSet
}

RuleSetsClientGetResponse contains the response from method RuleSetsClient.Get.

type RuleSetsClientListByProfileOptions added in v0.3.0

type RuleSetsClientListByProfileOptions struct {
}

RuleSetsClientListByProfileOptions contains the optional parameters for the RuleSetsClient.NewListByProfilePager method.

type RuleSetsClientListByProfileResponse added in v0.3.0

type RuleSetsClientListByProfileResponse struct {
	RuleSetListResult
}

RuleSetsClientListByProfileResponse contains the response from method RuleSetsClient.NewListByProfilePager.

type RuleSetsClientListResourceUsageOptions added in v0.3.0

type RuleSetsClientListResourceUsageOptions struct {
}

RuleSetsClientListResourceUsageOptions contains the optional parameters for the RuleSetsClient.NewListResourceUsagePager method.

type RuleSetsClientListResourceUsageResponse added in v0.3.0

type RuleSetsClientListResourceUsageResponse struct {
	UsagesListResult
}

RuleSetsClientListResourceUsageResponse contains the response from method RuleSetsClient.NewListResourceUsagePager.

type RuleUpdateParameters

type RuleUpdateParameters struct {
	// The JSON object that contains the properties of the rule to update.
	Properties *RuleUpdatePropertiesParameters
}

RuleUpdateParameters - The domain JSON object required for domain creation or update.

func (RuleUpdateParameters) MarshalJSON

func (r RuleUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleUpdateParameters.

func (*RuleUpdateParameters) UnmarshalJSON added in v1.1.0

func (r *RuleUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleUpdateParameters.

type RuleUpdatePropertiesParameters

type RuleUpdatePropertiesParameters struct {
	// A list of actions that are executed when all the conditions of a rule are satisfied.
	Actions []DeliveryRuleActionAutoGeneratedClassification

	// A list of conditions that must be matched for the actions to be executed
	Conditions []DeliveryRuleConditionClassification

	// 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

	// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will
	// be applied before a rule with a greater order. Rule with order 0 is a special
	// rule. It does not require any condition and actions listed in it will always be applied.
	Order *int32

	// READ-ONLY; The name of the rule set containing the rule.
	RuleSetName *string
}

RuleUpdatePropertiesParameters - The JSON object that contains the properties of the rule to update.

func (RuleUpdatePropertiesParameters) MarshalJSON

func (r RuleUpdatePropertiesParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RuleUpdatePropertiesParameters.

func (*RuleUpdatePropertiesParameters) UnmarshalJSON

func (r *RuleUpdatePropertiesParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RuleUpdatePropertiesParameters.

type RulesClient

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

RulesClient contains the methods for the Rules group. Don't use this type directly, use NewRulesClient() instead.

func NewRulesClient

func NewRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RulesClient, error)

NewRulesClient creates a new instance of RulesClient with the specified values.

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

func (*RulesClient) BeginCreate

func (client *RulesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, rule Rule, options *RulesClientBeginCreateOptions) (*runtime.Poller[RulesClientCreateResponse], error)

BeginCreate - Creates a new delivery rule within the specified rule set. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile.
  • ruleName - Name of the delivery rule which is unique within the endpoint.
  • rule - The delivery rule properties.
  • options - RulesClientBeginCreateOptions contains the optional parameters for the RulesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRulesClient().BeginCreate(ctx, "RG", "profile1", "ruleSet1", "rule1", armcdn.Rule{
		Properties: &armcdn.RuleProperties{
			Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
				&armcdn.DeliveryRuleResponseHeaderAction{
					Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
					Parameters: &armcdn.HeaderActionParameters{
						HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
						HeaderName:   to.Ptr("X-CDN"),
						TypeName:     to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
						Value:        to.Ptr("MSFT"),
					},
				}},
			Conditions: []armcdn.DeliveryRuleConditionClassification{
				&armcdn.DeliveryRuleRequestMethodCondition{
					Name: to.Ptr(armcdn.MatchVariableRequestMethod),
					Parameters: &armcdn.RequestMethodMatchConditionParameters{
						MatchValues: []*armcdn.RequestMethodMatchConditionParametersMatchValuesItem{
							to.Ptr(armcdn.RequestMethodMatchConditionParametersMatchValuesItemGET)},
						NegateCondition: to.Ptr(false),
						Operator:        to.Ptr(armcdn.RequestMethodOperatorEqual),
						TypeName:        to.Ptr(armcdn.RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters),
					},
				}},
			Order: to.Ptr[int32](1),
		},
	}, 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.Rule = armcdn.Rule{
	// 	Name: to.Ptr("rule1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/rulesets/rules"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1/rules/rule1"),
	// 	Properties: &armcdn.RuleProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
	// 			&armcdn.DeliveryRuleResponseHeaderAction{
	// 				Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
	// 				Parameters: &armcdn.HeaderActionParameters{
	// 					HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
	// 					HeaderName: to.Ptr("X-CDN"),
	// 					TypeName: to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
	// 					Value: to.Ptr("MSFT"),
	// 				},
	// 		}},
	// 		Conditions: []armcdn.DeliveryRuleConditionClassification{
	// 			&armcdn.DeliveryRuleRequestMethodCondition{
	// 				Name: to.Ptr(armcdn.MatchVariableRequestMethod),
	// 				Parameters: &armcdn.RequestMethodMatchConditionParameters{
	// 					MatchValues: []*armcdn.RequestMethodMatchConditionParametersMatchValuesItem{
	// 						to.Ptr(armcdn.RequestMethodMatchConditionParametersMatchValuesItemGET)},
	// 						NegateCondition: to.Ptr(false),
	// 						Operator: to.Ptr(armcdn.RequestMethodOperatorEqual),
	// 						Transforms: []*armcdn.Transform{
	// 						},
	// 						TypeName: to.Ptr(armcdn.RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters),
	// 					},
	// 			}},
	// 			MatchProcessingBehavior: to.Ptr(armcdn.MatchProcessingBehaviorContinue),
	// 			Order: to.Ptr[int32](1),
	// 		},
	// 	}
}
Output:

func (*RulesClient) BeginDelete

func (client *RulesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, options *RulesClientBeginDeleteOptions) (*runtime.Poller[RulesClientDeleteResponse], error)

BeginDelete - Deletes an existing delivery rule within a rule set. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile.
  • ruleName - Name of the delivery rule which is unique within the endpoint.
  • options - RulesClientBeginDeleteOptions contains the optional parameters for the RulesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRulesClient().BeginDelete(ctx, "RG", "profile1", "ruleSet1", "rule1", 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 (*RulesClient) BeginUpdate

func (client *RulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, ruleUpdateProperties RuleUpdateParameters, options *RulesClientBeginUpdateOptions) (*runtime.Poller[RulesClientUpdateResponse], error)

BeginUpdate - Updates an existing delivery rule within a rule set. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile.
  • ruleName - Name of the delivery rule which is unique within the endpoint.
  • ruleUpdateProperties - Delivery rule properties
  • options - RulesClientBeginUpdateOptions contains the optional parameters for the RulesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Update.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRulesClient().BeginUpdate(ctx, "RG", "profile1", "ruleSet1", "rule1", armcdn.RuleUpdateParameters{
		Properties: &armcdn.RuleUpdatePropertiesParameters{
			Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
				&armcdn.DeliveryRuleResponseHeaderAction{
					Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
					Parameters: &armcdn.HeaderActionParameters{
						HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
						HeaderName:   to.Ptr("X-CDN"),
						TypeName:     to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
						Value:        to.Ptr("MSFT"),
					},
				}},
			Order: to.Ptr[int32](1),
		},
	}, 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.Rule = armcdn.Rule{
	// 	Name: to.Ptr("rule1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/rulesets/rules"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1/rules/rule1"),
	// 	Properties: &armcdn.RuleProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
	// 			&armcdn.DeliveryRuleResponseHeaderAction{
	// 				Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
	// 				Parameters: &armcdn.HeaderActionParameters{
	// 					HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
	// 					HeaderName: to.Ptr("X-CDN"),
	// 					TypeName: to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
	// 					Value: to.Ptr("MSFT"),
	// 				},
	// 		}},
	// 		Conditions: []armcdn.DeliveryRuleConditionClassification{
	// 			&armcdn.DeliveryRuleRequestMethodCondition{
	// 				Name: to.Ptr(armcdn.MatchVariableRequestMethod),
	// 				Parameters: &armcdn.RequestMethodMatchConditionParameters{
	// 					MatchValues: []*armcdn.RequestMethodMatchConditionParametersMatchValuesItem{
	// 						to.Ptr(armcdn.RequestMethodMatchConditionParametersMatchValuesItemGET)},
	// 						NegateCondition: to.Ptr(false),
	// 						Operator: to.Ptr(armcdn.RequestMethodOperatorEqual),
	// 						Transforms: []*armcdn.Transform{
	// 						},
	// 						TypeName: to.Ptr(armcdn.RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters),
	// 					},
	// 			}},
	// 			MatchProcessingBehavior: to.Ptr(armcdn.MatchProcessingBehaviorContinue),
	// 			Order: to.Ptr[int32](1),
	// 		},
	// 	}
}
Output:

func (*RulesClient) Get

func (client *RulesClient) Get(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, options *RulesClientGetOptions) (RulesClientGetResponse, error)

Get - Gets an existing delivery rule within a rule set. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile.
  • ruleName - Name of the delivery rule which is unique within the endpoint.
  • options - RulesClientGetOptions contains the optional parameters for the RulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRulesClient().Get(ctx, "RG", "profile1", "ruleSet1", "rule1", 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.Rule = armcdn.Rule{
	// 	Name: to.Ptr("rule1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/rulesets/rules"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1/rules/rule1"),
	// 	Properties: &armcdn.RuleProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
	// 			&armcdn.DeliveryRuleResponseHeaderAction{
	// 				Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
	// 				Parameters: &armcdn.HeaderActionParameters{
	// 					HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
	// 					HeaderName: to.Ptr("X-CDN"),
	// 					TypeName: to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
	// 					Value: to.Ptr("MSFT"),
	// 				},
	// 		}},
	// 		Conditions: []armcdn.DeliveryRuleConditionClassification{
	// 			&armcdn.DeliveryRuleRequestMethodCondition{
	// 				Name: to.Ptr(armcdn.MatchVariableRequestMethod),
	// 				Parameters: &armcdn.RequestMethodMatchConditionParameters{
	// 					MatchValues: []*armcdn.RequestMethodMatchConditionParametersMatchValuesItem{
	// 						to.Ptr(armcdn.RequestMethodMatchConditionParametersMatchValuesItemGET)},
	// 						NegateCondition: to.Ptr(false),
	// 						Operator: to.Ptr(armcdn.RequestMethodOperatorEqual),
	// 						Transforms: []*armcdn.Transform{
	// 						},
	// 						TypeName: to.Ptr(armcdn.RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters),
	// 					},
	// 			}},
	// 			MatchProcessingBehavior: to.Ptr(armcdn.MatchProcessingBehaviorContinue),
	// 			Order: to.Ptr[int32](1),
	// 		},
	// 	}
}
Output:

func (*RulesClient) NewListByRuleSetPager added in v0.5.0

func (client *RulesClient) NewListByRuleSetPager(resourceGroupName string, profileName string, ruleSetName string, options *RulesClientListByRuleSetOptions) *runtime.Pager[RulesClientListByRuleSetResponse]

NewListByRuleSetPager - Lists all of the existing delivery rules within a rule set.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • ruleSetName - Name of the rule set under the profile.
  • options - RulesClientListByRuleSetOptions contains the optional parameters for the RulesClient.NewListByRuleSetPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_ListByRuleSet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRulesClient().NewListByRuleSetPager("RG", "profile1", "ruleSet1", 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.RuleListResult = armcdn.RuleListResult{
		// 	Value: []*armcdn.Rule{
		// 		{
		// 			Name: to.Ptr("rule1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/rulesets/rules"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1/rules/rule1"),
		// 			Properties: &armcdn.RuleProperties{
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 				Actions: []armcdn.DeliveryRuleActionAutoGeneratedClassification{
		// 					&armcdn.DeliveryRuleResponseHeaderAction{
		// 						Name: to.Ptr(armcdn.DeliveryRuleActionModifyResponseHeader),
		// 						Parameters: &armcdn.HeaderActionParameters{
		// 							HeaderAction: to.Ptr(armcdn.HeaderActionOverwrite),
		// 							HeaderName: to.Ptr("X-CDN"),
		// 							TypeName: to.Ptr(armcdn.HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters),
		// 							Value: to.Ptr("MSFT"),
		// 						},
		// 				}},
		// 				Conditions: []armcdn.DeliveryRuleConditionClassification{
		// 					&armcdn.DeliveryRuleRequestMethodCondition{
		// 						Name: to.Ptr(armcdn.MatchVariableRequestMethod),
		// 						Parameters: &armcdn.RequestMethodMatchConditionParameters{
		// 							MatchValues: []*armcdn.RequestMethodMatchConditionParametersMatchValuesItem{
		// 								to.Ptr(armcdn.RequestMethodMatchConditionParametersMatchValuesItemGET)},
		// 								NegateCondition: to.Ptr(false),
		// 								Operator: to.Ptr(armcdn.RequestMethodOperatorEqual),
		// 								Transforms: []*armcdn.Transform{
		// 								},
		// 								TypeName: to.Ptr(armcdn.RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters),
		// 							},
		// 					}},
		// 					MatchProcessingBehavior: to.Ptr(armcdn.MatchProcessingBehaviorContinue),
		// 					Order: to.Ptr[int32](1),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type RulesClientBeginCreateOptions added in v0.3.0

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

RulesClientBeginCreateOptions contains the optional parameters for the RulesClient.BeginCreate method.

type RulesClientBeginDeleteOptions added in v0.3.0

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

RulesClientBeginDeleteOptions contains the optional parameters for the RulesClient.BeginDelete method.

type RulesClientBeginUpdateOptions added in v0.3.0

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

RulesClientBeginUpdateOptions contains the optional parameters for the RulesClient.BeginUpdate method.

type RulesClientCreateResponse added in v0.3.0

type RulesClientCreateResponse struct {
	Rule
}

RulesClientCreateResponse contains the response from method RulesClient.BeginCreate.

type RulesClientDeleteResponse added in v0.3.0

type RulesClientDeleteResponse struct {
}

RulesClientDeleteResponse contains the response from method RulesClient.BeginDelete.

type RulesClientGetOptions added in v0.3.0

type RulesClientGetOptions struct {
}

RulesClientGetOptions contains the optional parameters for the RulesClient.Get method.

type RulesClientGetResponse added in v0.3.0

type RulesClientGetResponse struct {
	Rule
}

RulesClientGetResponse contains the response from method RulesClient.Get.

type RulesClientListByRuleSetOptions added in v0.3.0

type RulesClientListByRuleSetOptions struct {
}

RulesClientListByRuleSetOptions contains the optional parameters for the RulesClient.NewListByRuleSetPager method.

type RulesClientListByRuleSetResponse added in v0.3.0

type RulesClientListByRuleSetResponse struct {
	RuleListResult
}

RulesClientListByRuleSetResponse contains the response from method RulesClient.NewListByRuleSetPager.

type RulesClientUpdateResponse added in v0.3.0

type RulesClientUpdateResponse struct {
	Rule
}

RulesClientUpdateResponse contains the response from method RulesClient.BeginUpdate.

type SKU

type SKU struct {
	// Name of the pricing tier.
	Name *SKUName
}

SKU - StandardVerizon = The SKU name for a Standard Verizon CDN profile. PremiumVerizon = The SKU name for a Premium Verizon CDN profile. CustomVerizon = The SKU name for a Custom Verizon CDN profile. StandardAkamai = The SKU name for an Akamai CDN profile. StandardChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. StandardMicrosoft = The SKU name for a Standard Microsoft CDN profile. StandardAzureFrontDoor = The SKU name for an Azure Front Door Standard profile. PremiumAzureFrontDoor = The SKU name for an Azure Front Door Premium profile. Standard955BandWidthChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak bandwidth billing model. StandardAvgBandWidthChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly average peak bandwidth billing model. StandardPlusChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. StandardPlus955BandWidthChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing model. StandardPlusAvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth billing model.

func (SKU) MarshalJSON added in v1.1.0

func (s SKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.1.0

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUName

type SKUName string

SKUName - Name of the pricing tier.

const (
	SKUNameCustomVerizon                    SKUName = "Custom_Verizon"
	SKUNamePremiumAzureFrontDoor            SKUName = "Premium_AzureFrontDoor"
	SKUNamePremiumVerizon                   SKUName = "Premium_Verizon"
	SKUNameStandard955BandWidthChinaCdn     SKUName = "Standard_955BandWidth_ChinaCdn"
	SKUNameStandardAkamai                   SKUName = "Standard_Akamai"
	SKUNameStandardAvgBandWidthChinaCdn     SKUName = "Standard_AvgBandWidth_ChinaCdn"
	SKUNameStandardAzureFrontDoor           SKUName = "Standard_AzureFrontDoor"
	SKUNameStandardChinaCdn                 SKUName = "Standard_ChinaCdn"
	SKUNameStandardMicrosoft                SKUName = "Standard_Microsoft"
	SKUNameStandardPlus955BandWidthChinaCdn SKUName = "StandardPlus_955BandWidth_ChinaCdn"
	SKUNameStandardPlusAvgBandWidthChinaCdn SKUName = "StandardPlus_AvgBandWidth_ChinaCdn"
	SKUNameStandardPlusChinaCdn             SKUName = "StandardPlus_ChinaCdn"
	SKUNameStandardVerizon                  SKUName = "Standard_Verizon"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type SSLProtocol added in v0.3.0

type SSLProtocol string

SSLProtocol - The protocol of an established TLS connection.

const (
	SSLProtocolTLSv1  SSLProtocol = "TLSv1"
	SSLProtocolTLSv11 SSLProtocol = "TLSv1.1"
	SSLProtocolTLSv12 SSLProtocol = "TLSv1.2"
)

func PossibleSSLProtocolValues added in v0.3.0

func PossibleSSLProtocolValues() []SSLProtocol

PossibleSSLProtocolValues returns the possible values for the SSLProtocol const type.

type SSLProtocolMatchConditionParameters added in v0.3.0

type SSLProtocolMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *SSLProtocolOperator

	// REQUIRED
	TypeName *SSLProtocolMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*SSLProtocol

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

SSLProtocolMatchConditionParameters - Defines the parameters for SslProtocol match conditions

func (SSLProtocolMatchConditionParameters) MarshalJSON added in v0.3.0

func (s SSLProtocolMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SSLProtocolMatchConditionParameters.

func (*SSLProtocolMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (s *SSLProtocolMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SSLProtocolMatchConditionParameters.

type SSLProtocolMatchConditionParametersTypeName added in v0.3.0

type SSLProtocolMatchConditionParametersTypeName string
const (
	SSLProtocolMatchConditionParametersTypeNameDeliveryRuleSSLProtocolConditionParameters SSLProtocolMatchConditionParametersTypeName = "DeliveryRuleSslProtocolConditionParameters"
)

func PossibleSSLProtocolMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleSSLProtocolMatchConditionParametersTypeNameValues() []SSLProtocolMatchConditionParametersTypeName

PossibleSSLProtocolMatchConditionParametersTypeNameValues returns the possible values for the SSLProtocolMatchConditionParametersTypeName const type.

type SSLProtocolOperator added in v0.3.0

type SSLProtocolOperator string

SSLProtocolOperator - Describes operator to be matched

const (
	SSLProtocolOperatorEqual SSLProtocolOperator = "Equal"
)

func PossibleSSLProtocolOperatorValues added in v0.3.0

func PossibleSSLProtocolOperatorValues() []SSLProtocolOperator

PossibleSSLProtocolOperatorValues returns the possible values for the SSLProtocolOperator const type.

type Secret

type Secret struct {
	// The JSON object that contains the properties of the Secret to create.
	Properties *SecretProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

Secret - Friendly Secret name mapping to the any Secret or secret related information.

func (Secret) MarshalJSON

func (s Secret) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Secret.

func (*Secret) UnmarshalJSON added in v1.1.0

func (s *Secret) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Secret.

type SecretListResult

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

	// READ-ONLY; List of AzureFrontDoor secrets within a profile.
	Value []*Secret
}

SecretListResult - Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results.

func (SecretListResult) MarshalJSON

func (s SecretListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretListResult.

func (*SecretListResult) UnmarshalJSON added in v1.1.0

func (s *SecretListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretListResult.

type SecretParameters

type SecretParameters struct {
	// REQUIRED; The type of the secret resource.
	Type *SecretType
}

SecretParameters - The json object containing secret parameters

func (*SecretParameters) GetSecretParameters

func (s *SecretParameters) GetSecretParameters() *SecretParameters

GetSecretParameters implements the SecretParametersClassification interface for type SecretParameters.

func (SecretParameters) MarshalJSON added in v1.1.0

func (s SecretParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretParameters.

func (*SecretParameters) UnmarshalJSON

func (s *SecretParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretParameters.

type SecretParametersClassification

type SecretParametersClassification interface {
	// GetSecretParameters returns the SecretParameters content of the underlying type.
	GetSecretParameters() *SecretParameters
}

SecretParametersClassification provides polymorphic access to related types. Call the interface's GetSecretParameters() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureFirstPartyManagedCertificateParameters, *CustomerCertificateParameters, *ManagedCertificateParameters, *SecretParameters, - *URLSigningKeyParameters

type SecretProperties

type SecretProperties struct {
	// object which contains secret parameters
	Parameters SecretParametersClassification

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; The name of the profile which holds the secret.
	ProfileName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

SecretProperties - The JSON object that contains the properties of the Secret to create.

func (SecretProperties) MarshalJSON

func (s SecretProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecretProperties.

func (*SecretProperties) UnmarshalJSON

func (s *SecretProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecretProperties.

type SecretType

type SecretType string

SecretType - The type of the secret resource.

const (
	SecretTypeAzureFirstPartyManagedCertificate SecretType = "AzureFirstPartyManagedCertificate"
	SecretTypeCustomerCertificate               SecretType = "CustomerCertificate"
	SecretTypeManagedCertificate                SecretType = "ManagedCertificate"
	SecretTypeURLSigningKey                     SecretType = "UrlSigningKey"
)

func PossibleSecretTypeValues

func PossibleSecretTypeValues() []SecretType

PossibleSecretTypeValues returns the possible values for the SecretType const type.

type SecretsClient

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

SecretsClient contains the methods for the Secrets group. Don't use this type directly, use NewSecretsClient() instead.

func NewSecretsClient

func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretsClient, error)

NewSecretsClient creates a new instance of SecretsClient with the specified values.

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

func (*SecretsClient) BeginCreate

func (client *SecretsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, secretName string, secret Secret, options *SecretsClientBeginCreateOptions) (*runtime.Poller[SecretsClientCreateResponse], error)

BeginCreate - Creates a new Secret within the specified profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • secretName - Name of the Secret under the profile.
  • secret - The Secret properties.
  • options - SecretsClientBeginCreateOptions contains the optional parameters for the SecretsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSecretsClient().BeginCreate(ctx, "RG", "profile1", "secret1", armcdn.Secret{
		Properties: &armcdn.SecretProperties{
			Parameters: &armcdn.CustomerCertificateParameters{
				Type: to.Ptr(armcdn.SecretTypeCustomerCertificate),
				SecretSource: &armcdn.ResourceReference{
					ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/secrets/certificatename"),
				},
				SecretVersion:    to.Ptr("abcdef1234578900abcdef1234567890"),
				UseLatestVersion: to.Ptr(false),
			},
		},
	}, 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.Secret = armcdn.Secret{
	// 	Name: to.Ptr("secret1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/secrets"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/secrets/secret1"),
	// 	Properties: &armcdn.SecretProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Parameters: &armcdn.CustomerCertificateParameters{
	// 			Type: to.Ptr(armcdn.SecretTypeCustomerCertificate),
	// 			CertificateAuthority: to.Ptr("Symantec"),
	// 			ExpirationDate: to.Ptr("2025-01-01T00:00:00-00:00"),
	// 			SecretSource: &armcdn.ResourceReference{
	// 				ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vaults/keyvaultname/secrets/certificatename"),
	// 			},
	// 			SecretVersion: to.Ptr("abcdef1234578900abcdef1234567890"),
	// 			Subject: to.Ptr("*.contoso.com"),
	// 			SubjectAlternativeNames: []*string{
	// 				to.Ptr("foo.contoso.com"),
	// 				to.Ptr("www3.foo.contoso.com")},
	// 				Thumbprint: to.Ptr("ABCDEF1234567890ABCDEF1234567890ABCDEF12"),
	// 				UseLatestVersion: to.Ptr(true),
	// 			},
	// 		},
	// 	}
}
Output:

func (*SecretsClient) BeginDelete

func (client *SecretsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, secretName string, options *SecretsClientBeginDeleteOptions) (*runtime.Poller[SecretsClientDeleteResponse], error)

BeginDelete - Deletes an existing Secret within profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • secretName - Name of the Secret under the profile.
  • options - SecretsClientBeginDeleteOptions contains the optional parameters for the SecretsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSecretsClient().BeginDelete(ctx, "RG", "profile1", "secret1", 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 (*SecretsClient) Get

func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, profileName string, secretName string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error)

Get - Gets an existing Secret within a profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • secretName - Name of the Secret under the profile.
  • options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSecretsClient().Get(ctx, "RG", "profile1", "secret1", 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.Secret = armcdn.Secret{
	// 	Name: to.Ptr("secret1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/secrets"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/secrets/secret1"),
	// 	Properties: &armcdn.SecretProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Parameters: &armcdn.CustomerCertificateParameters{
	// 			Type: to.Ptr(armcdn.SecretTypeCustomerCertificate),
	// 			CertificateAuthority: to.Ptr("Symantec"),
	// 			ExpirationDate: to.Ptr("2025-01-01T00:00:00-00:00"),
	// 			SecretSource: &armcdn.ResourceReference{
	// 				ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vaults/keyvaultname/secrets/certificatename"),
	// 			},
	// 			SecretVersion: to.Ptr("abcdef1234578900abcdef1234567890"),
	// 			Subject: to.Ptr("*.contoso.com"),
	// 			SubjectAlternativeNames: []*string{
	// 				to.Ptr("foo.contoso.com"),
	// 				to.Ptr("www3.foo.contoso.com")},
	// 				Thumbprint: to.Ptr("ABCDEF1234567890ABCDEF1234567890ABCDEF12"),
	// 				UseLatestVersion: to.Ptr(true),
	// 			},
	// 		},
	// 	}
}
Output:

func (*SecretsClient) NewListByProfilePager added in v0.5.0

func (client *SecretsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *SecretsClientListByProfileOptions) *runtime.Pager[SecretsClientListByProfileResponse]

NewListByProfilePager - Lists existing AzureFrontDoor secrets.

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • options - SecretsClientListByProfileOptions contains the optional parameters for the SecretsClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_ListByProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecretsClient().NewListByProfilePager("RG", "profile1", 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.SecretListResult = armcdn.SecretListResult{
		// 	Value: []*armcdn.Secret{
		// 		{
		// 			Name: to.Ptr("secret1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/secrets"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/secrets/secret1"),
		// 			Properties: &armcdn.SecretProperties{
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 				Parameters: &armcdn.CustomerCertificateParameters{
		// 					Type: to.Ptr(armcdn.SecretTypeCustomerCertificate),
		// 					CertificateAuthority: to.Ptr("Symantec"),
		// 					ExpirationDate: to.Ptr("2025-01-01T00:00:00-00:00"),
		// 					SecretSource: &armcdn.ResourceReference{
		// 						ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vaults/keyvaultname/secrets/certificatename"),
		// 					},
		// 					SecretVersion: to.Ptr("abcdef1234578900abcdef1234567890"),
		// 					Subject: to.Ptr("*.contoso.com"),
		// 					SubjectAlternativeNames: []*string{
		// 						to.Ptr("foo.contoso.com"),
		// 						to.Ptr("www3.foo.contoso.com")},
		// 						Thumbprint: to.Ptr("ABCDEF1234567890ABCDEF1234567890ABCDEF12"),
		// 						UseLatestVersion: to.Ptr(true),
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("69f05517-6aaf-4a1e-a96d-f8c02f66c756-test12-afdx-test-domains-azfdtest-xyz"),
		// 				Type: to.Ptr("Microsoft.Cdn/profiles/secrets"),
		// 				ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/secrets/autogenerated_secret_name"),
		// 				Properties: &armcdn.SecretProperties{
		// 					DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 					ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 					Parameters: &armcdn.ManagedCertificateParameters{
		// 						Type: to.Ptr(armcdn.SecretTypeManagedCertificate),
		// 						ExpirationDate: to.Ptr("2025-01-01T00:00:00-00:00"),
		// 						Subject: to.Ptr("bar.contoso.com"),
		// 					},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type SecretsClientBeginCreateOptions added in v0.3.0

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

SecretsClientBeginCreateOptions contains the optional parameters for the SecretsClient.BeginCreate method.

type SecretsClientBeginDeleteOptions added in v0.3.0

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

SecretsClientBeginDeleteOptions contains the optional parameters for the SecretsClient.BeginDelete method.

type SecretsClientCreateResponse added in v0.3.0

type SecretsClientCreateResponse struct {
	Secret
}

SecretsClientCreateResponse contains the response from method SecretsClient.BeginCreate.

type SecretsClientDeleteResponse added in v0.3.0

type SecretsClientDeleteResponse struct {
}

SecretsClientDeleteResponse contains the response from method SecretsClient.BeginDelete.

type SecretsClientGetOptions added in v0.3.0

type SecretsClientGetOptions struct {
}

SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method.

type SecretsClientGetResponse added in v0.3.0

type SecretsClientGetResponse struct {
	Secret
}

SecretsClientGetResponse contains the response from method SecretsClient.Get.

type SecretsClientListByProfileOptions added in v0.3.0

type SecretsClientListByProfileOptions struct {
}

SecretsClientListByProfileOptions contains the optional parameters for the SecretsClient.NewListByProfilePager method.

type SecretsClientListByProfileResponse added in v0.3.0

type SecretsClientListByProfileResponse struct {
	SecretListResult
}

SecretsClientListByProfileResponse contains the response from method SecretsClient.NewListByProfilePager.

type SecurityPoliciesClient

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

SecurityPoliciesClient contains the methods for the SecurityPolicies group. Don't use this type directly, use NewSecurityPoliciesClient() instead.

func NewSecurityPoliciesClient

func NewSecurityPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPoliciesClient, error)

NewSecurityPoliciesClient creates a new instance of SecurityPoliciesClient with the specified values.

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

func (*SecurityPoliciesClient) BeginCreate

func (client *SecurityPoliciesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, securityPolicy SecurityPolicy, options *SecurityPoliciesClientBeginCreateOptions) (*runtime.Poller[SecurityPoliciesClientCreateResponse], error)

BeginCreate - Creates a new security policy within the specified profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • securityPolicyName - Name of the security policy under the profile.
  • securityPolicy - The security policy properties.
  • options - SecurityPoliciesClientBeginCreateOptions contains the optional parameters for the SecurityPoliciesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Create.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSecurityPoliciesClient().BeginCreate(ctx, "RG", "profile1", "securityPolicy1", armcdn.SecurityPolicy{
		Properties: &armcdn.SecurityPolicyProperties{
			Parameters: &armcdn.SecurityPolicyWebApplicationFirewallParameters{
				Type: to.Ptr(armcdn.SecurityPolicyTypeWebApplicationFirewall),
				Associations: []*armcdn.SecurityPolicyWebApplicationFirewallAssociation{
					{
						Domains: []*armcdn.ActivatedResourceReference{
							{
								ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"),
							},
							{
								ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"),
							}},
						PatternsToMatch: []*string{
							to.Ptr("/*")},
					}},
				WafPolicy: &armcdn.ResourceReference{
					ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"),
				},
			},
		},
	}, 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.SecurityPolicy = armcdn.SecurityPolicy{
	// 	Name: to.Ptr("securityPolicy1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/securitypolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securitypolicies/securityPolicy1"),
	// 	Properties: &armcdn.SecurityPolicyProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Parameters: &armcdn.SecurityPolicyWebApplicationFirewallParameters{
	// 			Type: to.Ptr(armcdn.SecurityPolicyTypeWebApplicationFirewall),
	// 			Associations: []*armcdn.SecurityPolicyWebApplicationFirewallAssociation{
	// 				{
	// 					Domains: []*armcdn.ActivatedResourceReference{
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"),
	// 						},
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"),
	// 					}},
	// 					PatternsToMatch: []*string{
	// 						to.Ptr("/*")},
	// 				}},
	// 				WafPolicy: &armcdn.ResourceReference{
	// 					ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"),
	// 				},
	// 			},
	// 		},
	// 	}
}
Output:

func (*SecurityPoliciesClient) BeginDelete

func (client *SecurityPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, options *SecurityPoliciesClientBeginDeleteOptions) (*runtime.Poller[SecurityPoliciesClientDeleteResponse], error)

BeginDelete - Deletes an existing security policy within profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • securityPolicyName - Name of the security policy under the profile.
  • options - SecurityPoliciesClientBeginDeleteOptions contains the optional parameters for the SecurityPoliciesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSecurityPoliciesClient().BeginDelete(ctx, "RG", "profile1", "securityPolicy1", 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 (*SecurityPoliciesClient) BeginPatch

func (client *SecurityPoliciesClient) BeginPatch(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, securityPolicyUpdateProperties SecurityPolicyUpdateParameters, options *SecurityPoliciesClientBeginPatchOptions) (*runtime.Poller[SecurityPoliciesClientPatchResponse], error)

BeginPatch - Updates an existing security policy within a profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • securityPolicyName - Name of the security policy under the profile.
  • securityPolicyUpdateProperties - Security policy update properties
  • options - SecurityPoliciesClientBeginPatchOptions contains the optional parameters for the SecurityPoliciesClient.BeginPatch method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Patch.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSecurityPoliciesClient().BeginPatch(ctx, "RG", "profile1", "securityPolicy1", armcdn.SecurityPolicyUpdateParameters{
		Properties: &armcdn.SecurityPolicyUpdateProperties{
			Parameters: &armcdn.SecurityPolicyWebApplicationFirewallParameters{
				Type: to.Ptr(armcdn.SecurityPolicyTypeWebApplicationFirewall),
				Associations: []*armcdn.SecurityPolicyWebApplicationFirewallAssociation{
					{
						Domains: []*armcdn.ActivatedResourceReference{
							{
								ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"),
							},
							{
								ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"),
							}},
						PatternsToMatch: []*string{
							to.Ptr("/*")},
					}},
				WafPolicy: &armcdn.ResourceReference{
					ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"),
				},
			},
		},
	}, 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.SecurityPolicy = armcdn.SecurityPolicy{
	// 	Name: to.Ptr("securityPolicy1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/securitypolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securitypolicies/securityPolicy1"),
	// 	Properties: &armcdn.SecurityPolicyProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Parameters: &armcdn.SecurityPolicyWebApplicationFirewallParameters{
	// 			Type: to.Ptr(armcdn.SecurityPolicyTypeWebApplicationFirewall),
	// 			Associations: []*armcdn.SecurityPolicyWebApplicationFirewallAssociation{
	// 				{
	// 					Domains: []*armcdn.ActivatedResourceReference{
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"),
	// 						},
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"),
	// 					}},
	// 					PatternsToMatch: []*string{
	// 						to.Ptr("/*")},
	// 				}},
	// 				WafPolicy: &armcdn.ResourceReference{
	// 					ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"),
	// 				},
	// 			},
	// 		},
	// 	}
}
Output:

func (*SecurityPoliciesClient) Get

func (client *SecurityPoliciesClient) Get(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, options *SecurityPoliciesClientGetOptions) (SecurityPoliciesClientGetResponse, error)

Get - Gets an existing security policy within a profile. 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.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • securityPolicyName - Name of the security policy under the profile.
  • options - SecurityPoliciesClientGetOptions contains the optional parameters for the SecurityPoliciesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSecurityPoliciesClient().Get(ctx, "RG", "profile1", "securityPolicy1", 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.SecurityPolicy = armcdn.SecurityPolicy{
	// 	Name: to.Ptr("securityPolicy1"),
	// 	Type: to.Ptr("Microsoft.Cdn/profiles/securitypolicies"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securitypolicies/securityPolicy1"),
	// 	Properties: &armcdn.SecurityPolicyProperties{
	// 		DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
	// 		ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
	// 		Parameters: &armcdn.SecurityPolicyWebApplicationFirewallParameters{
	// 			Type: to.Ptr(armcdn.SecurityPolicyTypeWebApplicationFirewall),
	// 			Associations: []*armcdn.SecurityPolicyWebApplicationFirewallAssociation{
	// 				{
	// 					Domains: []*armcdn.ActivatedResourceReference{
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"),
	// 						},
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"),
	// 					}},
	// 					PatternsToMatch: []*string{
	// 						to.Ptr("/*")},
	// 				}},
	// 				WafPolicy: &armcdn.ResourceReference{
	// 					ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"),
	// 				},
	// 			},
	// 		},
	// 	}
}
Output:

func (*SecurityPoliciesClient) NewListByProfilePager added in v0.5.0

func (client *SecurityPoliciesClient) NewListByProfilePager(resourceGroupName string, profileName string, options *SecurityPoliciesClientListByProfileOptions) *runtime.Pager[SecurityPoliciesClientListByProfileResponse]

NewListByProfilePager - Lists security policies associated with the profile

Generated from API version 2021-06-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
  • options - SecurityPoliciesClientListByProfileOptions contains the optional parameters for the SecurityPoliciesClient.NewListByProfilePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_ListByProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSecurityPoliciesClient().NewListByProfilePager("RG", "profile1", 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.SecurityPolicyListResult = armcdn.SecurityPolicyListResult{
		// 	Value: []*armcdn.SecurityPolicy{
		// 		{
		// 			Name: to.Ptr("securityPolicy1"),
		// 			Type: to.Ptr("Microsoft.Cdn/profiles/securitypolicies"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securitypolicies/securityPolicy1"),
		// 			Properties: &armcdn.SecurityPolicyProperties{
		// 				DeploymentStatus: to.Ptr(armcdn.DeploymentStatusNotStarted),
		// 				ProvisioningState: to.Ptr(armcdn.AfdProvisioningStateSucceeded),
		// 				Parameters: &armcdn.SecurityPolicyWebApplicationFirewallParameters{
		// 					Type: to.Ptr(armcdn.SecurityPolicyTypeWebApplicationFirewall),
		// 					Associations: []*armcdn.SecurityPolicyWebApplicationFirewallAssociation{
		// 						{
		// 							Domains: []*armcdn.ActivatedResourceReference{
		// 								{
		// 									ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"),
		// 								},
		// 								{
		// 									ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"),
		// 							}},
		// 							PatternsToMatch: []*string{
		// 								to.Ptr("/*")},
		// 						}},
		// 						WafPolicy: &armcdn.ResourceReference{
		// 							ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"),
		// 						},
		// 					},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type SecurityPoliciesClientBeginCreateOptions added in v0.3.0

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

SecurityPoliciesClientBeginCreateOptions contains the optional parameters for the SecurityPoliciesClient.BeginCreate method.

type SecurityPoliciesClientBeginDeleteOptions added in v0.3.0

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

SecurityPoliciesClientBeginDeleteOptions contains the optional parameters for the SecurityPoliciesClient.BeginDelete method.

type SecurityPoliciesClientBeginPatchOptions added in v0.3.0

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

SecurityPoliciesClientBeginPatchOptions contains the optional parameters for the SecurityPoliciesClient.BeginPatch method.

type SecurityPoliciesClientCreateResponse added in v0.3.0

type SecurityPoliciesClientCreateResponse struct {
	SecurityPolicy
}

SecurityPoliciesClientCreateResponse contains the response from method SecurityPoliciesClient.BeginCreate.

type SecurityPoliciesClientDeleteResponse added in v0.3.0

type SecurityPoliciesClientDeleteResponse struct {
}

SecurityPoliciesClientDeleteResponse contains the response from method SecurityPoliciesClient.BeginDelete.

type SecurityPoliciesClientGetOptions added in v0.3.0

type SecurityPoliciesClientGetOptions struct {
}

SecurityPoliciesClientGetOptions contains the optional parameters for the SecurityPoliciesClient.Get method.

type SecurityPoliciesClientGetResponse added in v0.3.0

type SecurityPoliciesClientGetResponse struct {
	SecurityPolicy
}

SecurityPoliciesClientGetResponse contains the response from method SecurityPoliciesClient.Get.

type SecurityPoliciesClientListByProfileOptions added in v0.3.0

type SecurityPoliciesClientListByProfileOptions struct {
}

SecurityPoliciesClientListByProfileOptions contains the optional parameters for the SecurityPoliciesClient.NewListByProfilePager method.

type SecurityPoliciesClientListByProfileResponse added in v0.3.0

type SecurityPoliciesClientListByProfileResponse struct {
	SecurityPolicyListResult
}

SecurityPoliciesClientListByProfileResponse contains the response from method SecurityPoliciesClient.NewListByProfilePager.

type SecurityPoliciesClientPatchResponse added in v0.3.0

type SecurityPoliciesClientPatchResponse struct {
	SecurityPolicy
}

SecurityPoliciesClientPatchResponse contains the response from method SecurityPoliciesClient.BeginPatch.

type SecurityPolicy

type SecurityPolicy struct {
	// The json object that contains properties required to create a security policy
	Properties *SecurityPolicyProperties

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

SecurityPolicy association for AzureFrontDoor profile

func (SecurityPolicy) MarshalJSON

func (s SecurityPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityPolicy.

func (*SecurityPolicy) UnmarshalJSON added in v1.1.0

func (s *SecurityPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicy.

type SecurityPolicyListResult

type SecurityPolicyListResult struct {
	// URL to get the next set of security policy objects if there is any.
	NextLink *string

	// READ-ONLY; List of Security policies within a profile
	Value []*SecurityPolicy
}

SecurityPolicyListResult - Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the next set of results.

func (SecurityPolicyListResult) MarshalJSON

func (s SecurityPolicyListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyListResult.

func (*SecurityPolicyListResult) UnmarshalJSON added in v1.1.0

func (s *SecurityPolicyListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyListResult.

type SecurityPolicyProperties

type SecurityPolicyProperties struct {
	// object which contains security policy parameters
	Parameters SecurityPolicyPropertiesParametersClassification

	// READ-ONLY
	DeploymentStatus *DeploymentStatus

	// READ-ONLY; The name of the profile which holds the security policy.
	ProfileName *string

	// READ-ONLY; Provisioning status
	ProvisioningState *AfdProvisioningState
}

SecurityPolicyProperties - The json object that contains properties required to create a security policy

func (SecurityPolicyProperties) MarshalJSON

func (s SecurityPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyProperties.

func (*SecurityPolicyProperties) UnmarshalJSON

func (s *SecurityPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyProperties.

type SecurityPolicyPropertiesParameters added in v0.3.0

type SecurityPolicyPropertiesParameters struct {
	// REQUIRED; The type of the Security policy to create.
	Type *SecurityPolicyType
}

SecurityPolicyPropertiesParameters - The json object containing security policy parameters

func (*SecurityPolicyPropertiesParameters) GetSecurityPolicyPropertiesParameters added in v0.3.0

func (s *SecurityPolicyPropertiesParameters) GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters

GetSecurityPolicyPropertiesParameters implements the SecurityPolicyPropertiesParametersClassification interface for type SecurityPolicyPropertiesParameters.

func (SecurityPolicyPropertiesParameters) MarshalJSON added in v1.1.0

func (s SecurityPolicyPropertiesParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyPropertiesParameters.

func (*SecurityPolicyPropertiesParameters) UnmarshalJSON added in v1.1.0

func (s *SecurityPolicyPropertiesParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyPropertiesParameters.

type SecurityPolicyPropertiesParametersClassification added in v0.3.0

type SecurityPolicyPropertiesParametersClassification interface {
	// GetSecurityPolicyPropertiesParameters returns the SecurityPolicyPropertiesParameters content of the underlying type.
	GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters
}

SecurityPolicyPropertiesParametersClassification provides polymorphic access to related types. Call the interface's GetSecurityPolicyPropertiesParameters() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *SecurityPolicyPropertiesParameters, *SecurityPolicyWebApplicationFirewallParameters

type SecurityPolicyType

type SecurityPolicyType string

SecurityPolicyType - The type of the Security policy to create.

const (
	SecurityPolicyTypeWebApplicationFirewall SecurityPolicyType = "WebApplicationFirewall"
)

func PossibleSecurityPolicyTypeValues

func PossibleSecurityPolicyTypeValues() []SecurityPolicyType

PossibleSecurityPolicyTypeValues returns the possible values for the SecurityPolicyType const type.

type SecurityPolicyUpdateParameters added in v0.3.0

type SecurityPolicyUpdateParameters struct {
	// The json object that contains properties required to update a security policy
	Properties *SecurityPolicyUpdateProperties
}

SecurityPolicyUpdateParameters - The JSON object containing security policy update parameters.

func (SecurityPolicyUpdateParameters) MarshalJSON added in v0.3.0

func (s SecurityPolicyUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyUpdateParameters.

func (*SecurityPolicyUpdateParameters) UnmarshalJSON added in v1.1.0

func (s *SecurityPolicyUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyUpdateParameters.

type SecurityPolicyUpdateProperties added in v0.3.0

type SecurityPolicyUpdateProperties struct {
	// object which contains security policy parameters
	Parameters SecurityPolicyPropertiesParametersClassification
}

SecurityPolicyUpdateProperties - The json object that contains properties required to update a security policy

func (SecurityPolicyUpdateProperties) MarshalJSON added in v0.3.0

func (s SecurityPolicyUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyUpdateProperties.

func (*SecurityPolicyUpdateProperties) UnmarshalJSON added in v0.3.0

func (s *SecurityPolicyUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyUpdateProperties.

type SecurityPolicyWebApplicationFirewallAssociation

type SecurityPolicyWebApplicationFirewallAssociation struct {
	// List of domains.
	Domains []*ActivatedResourceReference

	// List of paths
	PatternsToMatch []*string
}

SecurityPolicyWebApplicationFirewallAssociation - settings for security policy patterns to match

func (SecurityPolicyWebApplicationFirewallAssociation) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyWebApplicationFirewallAssociation.

func (*SecurityPolicyWebApplicationFirewallAssociation) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyWebApplicationFirewallAssociation.

type SecurityPolicyWebApplicationFirewallParameters

type SecurityPolicyWebApplicationFirewallParameters struct {
	// REQUIRED; The type of the Security policy to create.
	Type *SecurityPolicyType

	// Waf associations
	Associations []*SecurityPolicyWebApplicationFirewallAssociation

	// Resource ID.
	WafPolicy *ResourceReference
}

SecurityPolicyWebApplicationFirewallParameters - The json object containing security policy waf parameters

func (*SecurityPolicyWebApplicationFirewallParameters) GetSecurityPolicyPropertiesParameters added in v0.3.0

func (s *SecurityPolicyWebApplicationFirewallParameters) GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters

GetSecurityPolicyPropertiesParameters implements the SecurityPolicyPropertiesParametersClassification interface for type SecurityPolicyWebApplicationFirewallParameters.

func (SecurityPolicyWebApplicationFirewallParameters) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type SecurityPolicyWebApplicationFirewallParameters.

func (*SecurityPolicyWebApplicationFirewallParameters) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyWebApplicationFirewallParameters.

type ServerPortMatchConditionParameters added in v0.3.0

type ServerPortMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *ServerPortOperator

	// REQUIRED
	TypeName *ServerPortMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

ServerPortMatchConditionParameters - Defines the parameters for ServerPort match conditions

func (ServerPortMatchConditionParameters) MarshalJSON added in v0.3.0

func (s ServerPortMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServerPortMatchConditionParameters.

func (*ServerPortMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (s *ServerPortMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerPortMatchConditionParameters.

type ServerPortMatchConditionParametersTypeName added in v0.3.0

type ServerPortMatchConditionParametersTypeName string
const (
	ServerPortMatchConditionParametersTypeNameDeliveryRuleServerPortConditionParameters ServerPortMatchConditionParametersTypeName = "DeliveryRuleServerPortConditionParameters"
)

func PossibleServerPortMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleServerPortMatchConditionParametersTypeNameValues() []ServerPortMatchConditionParametersTypeName

PossibleServerPortMatchConditionParametersTypeNameValues returns the possible values for the ServerPortMatchConditionParametersTypeName const type.

type ServerPortOperator added in v0.3.0

type ServerPortOperator string

ServerPortOperator - Describes operator to be matched

const (
	ServerPortOperatorAny                ServerPortOperator = "Any"
	ServerPortOperatorBeginsWith         ServerPortOperator = "BeginsWith"
	ServerPortOperatorContains           ServerPortOperator = "Contains"
	ServerPortOperatorEndsWith           ServerPortOperator = "EndsWith"
	ServerPortOperatorEqual              ServerPortOperator = "Equal"
	ServerPortOperatorGreaterThan        ServerPortOperator = "GreaterThan"
	ServerPortOperatorGreaterThanOrEqual ServerPortOperator = "GreaterThanOrEqual"
	ServerPortOperatorLessThan           ServerPortOperator = "LessThan"
	ServerPortOperatorLessThanOrEqual    ServerPortOperator = "LessThanOrEqual"
	ServerPortOperatorRegEx              ServerPortOperator = "RegEx"
)

func PossibleServerPortOperatorValues added in v0.3.0

func PossibleServerPortOperatorValues() []ServerPortOperator

PossibleServerPortOperatorValues returns the possible values for the ServerPortOperator const type.

type ServiceSpecification added in v0.3.0

type ServiceSpecification struct {
	// Log specifications of operation.
	LogSpecifications []*LogSpecification

	// Metric specifications of operation.
	MetricSpecifications []*MetricSpecification
}

ServiceSpecification - One property of operation, include log specifications.

func (ServiceSpecification) MarshalJSON added in v0.3.0

func (s ServiceSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.

func (*ServiceSpecification) UnmarshalJSON added in v1.1.0

func (s *ServiceSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.

type SharedPrivateLinkResourceProperties

type SharedPrivateLinkResourceProperties struct {
	// The group id from the provider of resource the shared private link resource is for.
	GroupID *string

	// The resource id of the resource the shared private link resource is for.
	PrivateLink *ResourceReference

	// The location of the shared private link resource
	PrivateLinkLocation *string

	// The request message for requesting approval of the shared private link resource.
	RequestMessage *string

	// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.
	Status *SharedPrivateLinkResourceStatus
}

SharedPrivateLinkResourceProperties - Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin.

func (SharedPrivateLinkResourceProperties) MarshalJSON added in v1.1.0

func (s SharedPrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperties.

func (*SharedPrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

func (s *SharedPrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperties.

type SharedPrivateLinkResourceStatus

type SharedPrivateLinkResourceStatus string

SharedPrivateLinkResourceStatus - Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.

const (
	SharedPrivateLinkResourceStatusPending      SharedPrivateLinkResourceStatus = "Pending"
	SharedPrivateLinkResourceStatusApproved     SharedPrivateLinkResourceStatus = "Approved"
	SharedPrivateLinkResourceStatusRejected     SharedPrivateLinkResourceStatus = "Rejected"
	SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected"
	SharedPrivateLinkResourceStatusTimeout      SharedPrivateLinkResourceStatus = "Timeout"
)

func PossibleSharedPrivateLinkResourceStatusValues

func PossibleSharedPrivateLinkResourceStatusValues() []SharedPrivateLinkResourceStatus

PossibleSharedPrivateLinkResourceStatusValues returns the possible values for the SharedPrivateLinkResourceStatus const type.

type SocketAddrMatchConditionParameters added in v0.3.0

type SocketAddrMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *SocketAddrOperator

	// REQUIRED
	TypeName *SocketAddrMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

SocketAddrMatchConditionParameters - Defines the parameters for SocketAddress match conditions

func (SocketAddrMatchConditionParameters) MarshalJSON added in v0.3.0

func (s SocketAddrMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SocketAddrMatchConditionParameters.

func (*SocketAddrMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (s *SocketAddrMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SocketAddrMatchConditionParameters.

type SocketAddrMatchConditionParametersTypeName added in v0.3.0

type SocketAddrMatchConditionParametersTypeName string
const (
	SocketAddrMatchConditionParametersTypeNameDeliveryRuleSocketAddrConditionParameters SocketAddrMatchConditionParametersTypeName = "DeliveryRuleSocketAddrConditionParameters"
)

func PossibleSocketAddrMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleSocketAddrMatchConditionParametersTypeNameValues() []SocketAddrMatchConditionParametersTypeName

PossibleSocketAddrMatchConditionParametersTypeNameValues returns the possible values for the SocketAddrMatchConditionParametersTypeName const type.

type SocketAddrOperator added in v0.3.0

type SocketAddrOperator string

SocketAddrOperator - Describes operator to be matched

const (
	SocketAddrOperatorAny     SocketAddrOperator = "Any"
	SocketAddrOperatorIPMatch SocketAddrOperator = "IPMatch"
)

func PossibleSocketAddrOperatorValues added in v0.3.0

func PossibleSocketAddrOperatorValues() []SocketAddrOperator

PossibleSocketAddrOperatorValues returns the possible values for the SocketAddrOperator const type.

type SsoURI

type SsoURI struct {
	// READ-ONLY; The URI used to login to the supplemental portal.
	SsoURIValue *string
}

SsoURI - The URI required to login to the supplemental portal from the Azure portal.

func (SsoURI) MarshalJSON added in v1.1.0

func (s SsoURI) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SsoURI.

func (*SsoURI) UnmarshalJSON added in v1.1.0

func (s *SsoURI) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SsoURI.

type Status

type Status string

Status - The validation status.

const (
	StatusAccessDenied       Status = "AccessDenied"
	StatusCertificateExpired Status = "CertificateExpired"
	StatusInvalid            Status = "Invalid"
	StatusValid              Status = "Valid"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type SupportedOptimizationTypesListResult

type SupportedOptimizationTypesListResult struct {
	// READ-ONLY; Supported optimization types for a profile.
	SupportedOptimizationTypes []*OptimizationType
}

SupportedOptimizationTypesListResult - The result of the GetSupportedOptimizationTypes API

func (SupportedOptimizationTypesListResult) MarshalJSON

func (s SupportedOptimizationTypesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SupportedOptimizationTypesListResult.

func (*SupportedOptimizationTypesListResult) UnmarshalJSON added in v1.1.0

func (s *SupportedOptimizationTypesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOptimizationTypesListResult.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC)
	CreatedAt *time.Time

	// An identifier for the identity that created the resource
	CreatedBy *string

	// The type of identity that created the resource
	CreatedByType *IdentityType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// An identifier for the identity that last modified the resource
	LastModifiedBy *string

	// The type of identity that last modified the resource
	LastModifiedByType *IdentityType
}

SystemData - Read only system data

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; Resource location.
	Location *string

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

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

TrackedResource - The resource model definition for a ARM tracked top level resource.

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v1.1.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type Transform

type Transform string

Transform - Describes what transforms are applied before matching

const (
	TransformLowercase   Transform = "Lowercase"
	TransformRemoveNulls Transform = "RemoveNulls"
	TransformTrim        Transform = "Trim"
	TransformURLDecode   Transform = "UrlDecode"
	TransformURLEncode   Transform = "UrlEncode"
	TransformUppercase   Transform = "Uppercase"
)

func PossibleTransformValues

func PossibleTransformValues() []Transform

PossibleTransformValues returns the possible values for the Transform const type.

type TransformType

type TransformType string

TransformType - Describes what transforms were 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 URLFileExtensionMatchConditionParameters

type URLFileExtensionMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *URLFileExtensionOperator

	// REQUIRED
	TypeName *URLFileExtensionMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

URLFileExtensionMatchConditionParameters - Defines the parameters for UrlFileExtension match conditions

func (URLFileExtensionMatchConditionParameters) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type URLFileExtensionMatchConditionParameters.

func (*URLFileExtensionMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (u *URLFileExtensionMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLFileExtensionMatchConditionParameters.

type URLFileExtensionMatchConditionParametersTypeName added in v0.3.0

type URLFileExtensionMatchConditionParametersTypeName string
const (
	URLFileExtensionMatchConditionParametersTypeNameDeliveryRuleURLFileExtensionMatchConditionParameters URLFileExtensionMatchConditionParametersTypeName = "DeliveryRuleUrlFileExtensionMatchConditionParameters"
)

func PossibleURLFileExtensionMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleURLFileExtensionMatchConditionParametersTypeNameValues() []URLFileExtensionMatchConditionParametersTypeName

PossibleURLFileExtensionMatchConditionParametersTypeNameValues returns the possible values for the URLFileExtensionMatchConditionParametersTypeName const type.

type URLFileExtensionOperator

type URLFileExtensionOperator string

URLFileExtensionOperator - Describes operator to be matched

const (
	URLFileExtensionOperatorAny                URLFileExtensionOperator = "Any"
	URLFileExtensionOperatorBeginsWith         URLFileExtensionOperator = "BeginsWith"
	URLFileExtensionOperatorContains           URLFileExtensionOperator = "Contains"
	URLFileExtensionOperatorEndsWith           URLFileExtensionOperator = "EndsWith"
	URLFileExtensionOperatorEqual              URLFileExtensionOperator = "Equal"
	URLFileExtensionOperatorGreaterThan        URLFileExtensionOperator = "GreaterThan"
	URLFileExtensionOperatorGreaterThanOrEqual URLFileExtensionOperator = "GreaterThanOrEqual"
	URLFileExtensionOperatorLessThan           URLFileExtensionOperator = "LessThan"
	URLFileExtensionOperatorLessThanOrEqual    URLFileExtensionOperator = "LessThanOrEqual"
	URLFileExtensionOperatorRegEx              URLFileExtensionOperator = "RegEx"
)

func PossibleURLFileExtensionOperatorValues

func PossibleURLFileExtensionOperatorValues() []URLFileExtensionOperator

PossibleURLFileExtensionOperatorValues returns the possible values for the URLFileExtensionOperator const type.

type URLFileNameMatchConditionParameters

type URLFileNameMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *URLFileNameOperator

	// REQUIRED
	TypeName *URLFileNameMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

URLFileNameMatchConditionParameters - Defines the parameters for UrlFilename match conditions

func (URLFileNameMatchConditionParameters) MarshalJSON

func (u URLFileNameMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLFileNameMatchConditionParameters.

func (*URLFileNameMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (u *URLFileNameMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLFileNameMatchConditionParameters.

type URLFileNameMatchConditionParametersTypeName added in v0.3.0

type URLFileNameMatchConditionParametersTypeName string
const (
	URLFileNameMatchConditionParametersTypeNameDeliveryRuleURLFilenameConditionParameters URLFileNameMatchConditionParametersTypeName = "DeliveryRuleUrlFilenameConditionParameters"
)

func PossibleURLFileNameMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleURLFileNameMatchConditionParametersTypeNameValues() []URLFileNameMatchConditionParametersTypeName

PossibleURLFileNameMatchConditionParametersTypeNameValues returns the possible values for the URLFileNameMatchConditionParametersTypeName const type.

type URLFileNameOperator

type URLFileNameOperator string

URLFileNameOperator - Describes operator to be matched

const (
	URLFileNameOperatorAny                URLFileNameOperator = "Any"
	URLFileNameOperatorBeginsWith         URLFileNameOperator = "BeginsWith"
	URLFileNameOperatorContains           URLFileNameOperator = "Contains"
	URLFileNameOperatorEndsWith           URLFileNameOperator = "EndsWith"
	URLFileNameOperatorEqual              URLFileNameOperator = "Equal"
	URLFileNameOperatorGreaterThan        URLFileNameOperator = "GreaterThan"
	URLFileNameOperatorGreaterThanOrEqual URLFileNameOperator = "GreaterThanOrEqual"
	URLFileNameOperatorLessThan           URLFileNameOperator = "LessThan"
	URLFileNameOperatorLessThanOrEqual    URLFileNameOperator = "LessThanOrEqual"
	URLFileNameOperatorRegEx              URLFileNameOperator = "RegEx"
)

func PossibleURLFileNameOperatorValues

func PossibleURLFileNameOperatorValues() []URLFileNameOperator

PossibleURLFileNameOperatorValues returns the possible values for the URLFileNameOperator const type.

type URLPathMatchConditionParameters

type URLPathMatchConditionParameters struct {
	// REQUIRED; Describes operator to be matched
	Operator *URLPathOperator

	// REQUIRED
	TypeName *URLPathMatchConditionParametersTypeName

	// The match value for the condition of the delivery rule
	MatchValues []*string

	// Describes if this is negate condition or not
	NegateCondition *bool

	// List of transforms
	Transforms []*Transform
}

URLPathMatchConditionParameters - Defines the parameters for UrlPath match conditions

func (URLPathMatchConditionParameters) MarshalJSON

func (u URLPathMatchConditionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLPathMatchConditionParameters.

func (*URLPathMatchConditionParameters) UnmarshalJSON added in v1.1.0

func (u *URLPathMatchConditionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLPathMatchConditionParameters.

type URLPathMatchConditionParametersTypeName added in v0.3.0

type URLPathMatchConditionParametersTypeName string
const (
	URLPathMatchConditionParametersTypeNameDeliveryRuleURLPathMatchConditionParameters URLPathMatchConditionParametersTypeName = "DeliveryRuleUrlPathMatchConditionParameters"
)

func PossibleURLPathMatchConditionParametersTypeNameValues added in v0.3.0

func PossibleURLPathMatchConditionParametersTypeNameValues() []URLPathMatchConditionParametersTypeName

PossibleURLPathMatchConditionParametersTypeNameValues returns the possible values for the URLPathMatchConditionParametersTypeName const type.

type URLPathOperator

type URLPathOperator string

URLPathOperator - Describes operator to be matched

const (
	URLPathOperatorAny                URLPathOperator = "Any"
	URLPathOperatorBeginsWith         URLPathOperator = "BeginsWith"
	URLPathOperatorContains           URLPathOperator = "Contains"
	URLPathOperatorEndsWith           URLPathOperator = "EndsWith"
	URLPathOperatorEqual              URLPathOperator = "Equal"
	URLPathOperatorGreaterThan        URLPathOperator = "GreaterThan"
	URLPathOperatorGreaterThanOrEqual URLPathOperator = "GreaterThanOrEqual"
	URLPathOperatorLessThan           URLPathOperator = "LessThan"
	URLPathOperatorLessThanOrEqual    URLPathOperator = "LessThanOrEqual"
	URLPathOperatorRegEx              URLPathOperator = "RegEx"
	URLPathOperatorWildcard           URLPathOperator = "Wildcard"
)

func PossibleURLPathOperatorValues

func PossibleURLPathOperatorValues() []URLPathOperator

PossibleURLPathOperatorValues returns the possible values for the URLPathOperator const type.

type URLRedirectAction

type URLRedirectAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *URLRedirectActionParameters
}

URLRedirectAction - Defines the url redirect action for the delivery rule.

func (*URLRedirectAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (u *URLRedirectAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLRedirectAction.

func (URLRedirectAction) MarshalJSON

func (u URLRedirectAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLRedirectAction.

func (*URLRedirectAction) UnmarshalJSON

func (u *URLRedirectAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLRedirectAction.

type URLRedirectActionParameters

type URLRedirectActionParameters struct {
	// REQUIRED; The redirect type the rule will use when redirecting traffic.
	RedirectType *RedirectType

	// REQUIRED
	TypeName *URLRedirectActionParametersTypeName

	// 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.
	CustomHostname *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. ? and & will be added automatically so do not include them.
	CustomQueryString *string

	// Protocol to use for the redirect. The default value is MatchRequest
	DestinationProtocol *DestinationProtocol
}

URLRedirectActionParameters - Defines the parameters for the url redirect action.

func (URLRedirectActionParameters) MarshalJSON added in v1.1.0

func (u URLRedirectActionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLRedirectActionParameters.

func (*URLRedirectActionParameters) UnmarshalJSON added in v1.1.0

func (u *URLRedirectActionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLRedirectActionParameters.

type URLRedirectActionParametersTypeName added in v0.3.0

type URLRedirectActionParametersTypeName string
const (
	URLRedirectActionParametersTypeNameDeliveryRuleURLRedirectActionParameters URLRedirectActionParametersTypeName = "DeliveryRuleUrlRedirectActionParameters"
)

func PossibleURLRedirectActionParametersTypeNameValues added in v0.3.0

func PossibleURLRedirectActionParametersTypeNameValues() []URLRedirectActionParametersTypeName

PossibleURLRedirectActionParametersTypeNameValues returns the possible values for the URLRedirectActionParametersTypeName const type.

type URLRewriteAction

type URLRewriteAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *URLRewriteActionParameters
}

URLRewriteAction - Defines the url rewrite action for the delivery rule.

func (*URLRewriteAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (u *URLRewriteAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLRewriteAction.

func (URLRewriteAction) MarshalJSON

func (u URLRewriteAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLRewriteAction.

func (*URLRewriteAction) UnmarshalJSON

func (u *URLRewriteAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLRewriteAction.

type URLRewriteActionParameters

type URLRewriteActionParameters struct {
	// REQUIRED; Define the relative URL to which the above requests will be rewritten by.
	Destination *string

	// REQUIRED; define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all
	// strings are matched.
	SourcePattern *string

	// REQUIRED
	TypeName *URLRewriteActionParametersTypeName

	// Whether to preserve unmatched path. Default value is true.
	PreserveUnmatchedPath *bool
}

URLRewriteActionParameters - Defines the parameters for the url rewrite action.

func (URLRewriteActionParameters) MarshalJSON added in v1.1.0

func (u URLRewriteActionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLRewriteActionParameters.

func (*URLRewriteActionParameters) UnmarshalJSON added in v1.1.0

func (u *URLRewriteActionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLRewriteActionParameters.

type URLRewriteActionParametersTypeName added in v0.3.0

type URLRewriteActionParametersTypeName string
const (
	URLRewriteActionParametersTypeNameDeliveryRuleURLRewriteActionParameters URLRewriteActionParametersTypeName = "DeliveryRuleUrlRewriteActionParameters"
)

func PossibleURLRewriteActionParametersTypeNameValues added in v0.3.0

func PossibleURLRewriteActionParametersTypeNameValues() []URLRewriteActionParametersTypeName

PossibleURLRewriteActionParametersTypeNameValues returns the possible values for the URLRewriteActionParametersTypeName const type.

type URLSigningAction

type URLSigningAction struct {
	// REQUIRED; The name of the action for the delivery rule.
	Name *DeliveryRuleAction

	// REQUIRED; Defines the parameters for the action.
	Parameters *URLSigningActionParameters
}

URLSigningAction - Defines the url signing action for the delivery rule.

func (*URLSigningAction) GetDeliveryRuleActionAutoGenerated added in v0.3.0

func (u *URLSigningAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated

GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLSigningAction.

func (URLSigningAction) MarshalJSON

func (u URLSigningAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLSigningAction.

func (*URLSigningAction) UnmarshalJSON

func (u *URLSigningAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningAction.

type URLSigningActionParameters

type URLSigningActionParameters struct {
	// REQUIRED
	TypeName *URLSigningActionParametersTypeName

	// Algorithm to use for URL signing
	Algorithm *Algorithm

	// Defines which query string parameters in the url to be considered for expires, key id etc.
	ParameterNameOverride []*URLSigningParamIdentifier
}

URLSigningActionParameters - Defines the parameters for the Url Signing action.

func (URLSigningActionParameters) MarshalJSON

func (u URLSigningActionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLSigningActionParameters.

func (*URLSigningActionParameters) UnmarshalJSON added in v1.1.0

func (u *URLSigningActionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningActionParameters.

type URLSigningActionParametersTypeName added in v0.3.0

type URLSigningActionParametersTypeName string
const (
	URLSigningActionParametersTypeNameDeliveryRuleURLSigningActionParameters URLSigningActionParametersTypeName = "DeliveryRuleUrlSigningActionParameters"
)

func PossibleURLSigningActionParametersTypeNameValues added in v0.3.0

func PossibleURLSigningActionParametersTypeNameValues() []URLSigningActionParametersTypeName

PossibleURLSigningActionParametersTypeNameValues returns the possible values for the URLSigningActionParametersTypeName const type.

type URLSigningKey

type URLSigningKey struct {
	// REQUIRED; Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form
	// the hash.
	KeyID *string

	// REQUIRED; Defines the parameters for using customer key vault for Url Signing Key.
	KeySourceParameters *KeyVaultSigningKeyParameters
}

URLSigningKey - Url signing key

func (URLSigningKey) MarshalJSON added in v1.1.0

func (u URLSigningKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLSigningKey.

func (*URLSigningKey) UnmarshalJSON added in v1.1.0

func (u *URLSigningKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningKey.

type URLSigningKeyParameters

type URLSigningKeyParameters struct {
	// REQUIRED; Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form
	// the hash.
	KeyID *string

	// REQUIRED; Resource reference to the Azure Key Vault secret. Expected to be in format of
	// /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
	SecretSource *ResourceReference

	// REQUIRED; The type of the secret resource.
	Type *SecretType

	// Version of the secret to be used
	SecretVersion *string
}

URLSigningKeyParameters - Url signing key parameters

func (*URLSigningKeyParameters) GetSecretParameters added in v0.3.0

func (u *URLSigningKeyParameters) GetSecretParameters() *SecretParameters

GetSecretParameters implements the SecretParametersClassification interface for type URLSigningKeyParameters.

func (URLSigningKeyParameters) MarshalJSON

func (u URLSigningKeyParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLSigningKeyParameters.

func (*URLSigningKeyParameters) UnmarshalJSON

func (u *URLSigningKeyParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningKeyParameters.

type URLSigningParamIdentifier

type URLSigningParamIdentifier struct {
	// REQUIRED; Indicates the purpose of the parameter
	ParamIndicator *ParamIndicator

	// REQUIRED; Parameter name
	ParamName *string
}

URLSigningParamIdentifier - Defines how to identify a parameter for a specific purpose e.g. expires

func (URLSigningParamIdentifier) MarshalJSON added in v1.1.0

func (u URLSigningParamIdentifier) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLSigningParamIdentifier.

func (*URLSigningParamIdentifier) UnmarshalJSON added in v1.1.0

func (u *URLSigningParamIdentifier) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningParamIdentifier.

type UpdateRule

type UpdateRule string

UpdateRule - Describes the action that shall be taken when the certificate is updated in Key Vault.

const (
	UpdateRuleNoAction UpdateRule = "NoAction"
)

func PossibleUpdateRuleValues

func PossibleUpdateRuleValues() []UpdateRule

PossibleUpdateRuleValues returns the possible values for the UpdateRule const type.

type Usage

type Usage struct {
	// REQUIRED; The current value of the usage.
	CurrentValue *int64

	// REQUIRED; The limit of usage.
	Limit *int64

	// REQUIRED; The name of the type of usage.
	Name *UsageName

	// REQUIRED; An enum describing the unit of measurement.
	Unit *UsageUnit

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

Usage - Describes resource usage.

func (Usage) MarshalJSON added in v1.1.0

func (u Usage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Usage.

func (*Usage) UnmarshalJSON added in v1.1.0

func (u *Usage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Usage.

type UsageName

type UsageName struct {
	// A localized string describing the resource name.
	LocalizedValue *string

	// A string describing the resource name.
	Value *string
}

UsageName - The usage names.

func (UsageName) MarshalJSON added in v1.1.0

func (u UsageName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsageName.

func (*UsageName) UnmarshalJSON added in v1.1.0

func (u *UsageName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageName.

type UsageUnit

type UsageUnit string

UsageUnit - An enum describing the unit of measurement.

const (
	UsageUnitCount UsageUnit = "Count"
)

func PossibleUsageUnitValues

func PossibleUsageUnitValues() []UsageUnit

PossibleUsageUnitValues returns the possible values for the UsageUnit const type.

type UsagesListResult

type UsagesListResult struct {
	// URL to get the next set of results.
	NextLink *string

	// The list of resource usages.
	Value []*Usage
}

UsagesListResult - The list usages operation response.

func (UsagesListResult) MarshalJSON

func (u UsagesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsagesListResult.

func (*UsagesListResult) UnmarshalJSON added in v1.1.0

func (u *UsagesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsagesListResult.

type UserManagedHTTPSParameters

type UserManagedHTTPSParameters struct {
	// REQUIRED; Defines the source of the SSL certificate.
	CertificateSource *CertificateSource

	// REQUIRED; Defines the certificate source parameters using user's keyvault certificate for enabling SSL.
	CertificateSourceParameters *KeyVaultCertificateSourceParameters

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

	// TLS protocol version that will be used for Https
	MinimumTLSVersion *MinimumTLSVersion
}

UserManagedHTTPSParameters - Defines the certificate source parameters using user's keyvault certificate for enabling SSL.

func (*UserManagedHTTPSParameters) GetCustomDomainHTTPSParameters added in v0.3.0

func (u *UserManagedHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters

GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type UserManagedHTTPSParameters.

func (UserManagedHTTPSParameters) MarshalJSON

func (u UserManagedHTTPSParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserManagedHTTPSParameters.

func (*UserManagedHTTPSParameters) UnmarshalJSON

func (u *UserManagedHTTPSParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserManagedHTTPSParameters.

type ValidateClient

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

ValidateClient contains the methods for the Validate group. Don't use this type directly, use NewValidateClient() instead.

func NewValidateClient

func NewValidateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateClient, error)

NewValidateClient creates a new instance of ValidateClient with the specified values.

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

func (*ValidateClient) Secret

Secret - Validate a Secret in the profile. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-06-01

  • validateSecretInput - The Secret source.
  • options - ValidateClientSecretOptions contains the optional parameters for the ValidateClient.Secret method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Validate_Secret.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/cdn/armcdn"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewValidateClient().Secret(ctx, armcdn.ValidateSecretInput{
		SecretSource: &armcdn.ResourceReference{
			ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName"),
		},
		SecretType: to.Ptr(armcdn.SecretTypeCustomerCertificate),
	}, 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.ValidateSecretOutput = armcdn.ValidateSecretOutput{
	// 	Status: to.Ptr(armcdn.StatusValid),
	// }
}
Output:

type ValidateClientSecretOptions added in v0.3.0

type ValidateClientSecretOptions struct {
}

ValidateClientSecretOptions contains the optional parameters for the ValidateClient.Secret method.

type ValidateClientSecretResponse added in v0.3.0

type ValidateClientSecretResponse struct {
	ValidateSecretOutput
}

ValidateClientSecretResponse contains the response from method ValidateClient.Secret.

type ValidateCustomDomainInput

type ValidateCustomDomainInput struct {
	// REQUIRED; The host name of the custom domain. Must be a domain name.
	HostName *string
}

ValidateCustomDomainInput - Input of the custom domain to be validated for DNS mapping.

func (ValidateCustomDomainInput) MarshalJSON added in v1.1.0

func (v ValidateCustomDomainInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainInput.

func (*ValidateCustomDomainInput) UnmarshalJSON added in v1.1.0

func (v *ValidateCustomDomainInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainInput.

type ValidateCustomDomainOutput

type ValidateCustomDomainOutput struct {
	// READ-ONLY; Indicates whether the custom domain is valid or not.
	CustomDomainValidated *bool

	// READ-ONLY; Error message describing why the custom domain is not valid.
	Message *string

	// READ-ONLY; The reason why the custom domain is not valid.
	Reason *string
}

ValidateCustomDomainOutput - Output of custom domain validation.

func (ValidateCustomDomainOutput) MarshalJSON added in v1.1.0

func (v ValidateCustomDomainOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainOutput.

func (*ValidateCustomDomainOutput) UnmarshalJSON added in v1.1.0

func (v *ValidateCustomDomainOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainOutput.

type ValidateProbeInput

type ValidateProbeInput struct {
	// REQUIRED; The probe URL to validate.
	ProbeURL *string
}

ValidateProbeInput - Input of the validate probe API.

func (ValidateProbeInput) MarshalJSON added in v1.1.0

func (v ValidateProbeInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateProbeInput.

func (*ValidateProbeInput) UnmarshalJSON added in v1.1.0

func (v *ValidateProbeInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProbeInput.

type ValidateProbeOutput

type ValidateProbeOutput struct {
	// READ-ONLY; Specifies the error code when the probe url is not accepted.
	ErrorCode *string

	// READ-ONLY; Indicates whether the probe URL is accepted or not.
	IsValid *bool

	// READ-ONLY; The detailed error message describing why the probe URL is not accepted.
	Message *string
}

ValidateProbeOutput - Output of the validate probe API.

func (ValidateProbeOutput) MarshalJSON added in v1.1.0

func (v ValidateProbeOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateProbeOutput.

func (*ValidateProbeOutput) UnmarshalJSON added in v1.1.0

func (v *ValidateProbeOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProbeOutput.

type ValidateSecretInput

type ValidateSecretInput struct {
	// REQUIRED; Resource reference to the Azure Key Vault secret. Expected to be in format of
	// /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
	SecretSource *ResourceReference

	// REQUIRED; The secret type.
	SecretType *SecretType

	// Secret version, if customer is using a specific version.
	SecretVersion *string
}

ValidateSecretInput - Input of the secret to be validated.

func (ValidateSecretInput) MarshalJSON added in v1.1.0

func (v ValidateSecretInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateSecretInput.

func (*ValidateSecretInput) UnmarshalJSON added in v1.1.0

func (v *ValidateSecretInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateSecretInput.

type ValidateSecretOutput

type ValidateSecretOutput struct {
	// Detailed error message
	Message *string

	// The validation status.
	Status *Status
}

ValidateSecretOutput - Output of the validated secret.

func (ValidateSecretOutput) MarshalJSON added in v1.1.0

func (v ValidateSecretOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidateSecretOutput.

func (*ValidateSecretOutput) UnmarshalJSON added in v1.1.0

func (v *ValidateSecretOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidateSecretOutput.

type ValidationToken

type ValidationToken struct {
	// READ-ONLY
	Token *string
}

ValidationToken - The validation token.

func (ValidationToken) MarshalJSON added in v1.1.0

func (v ValidationToken) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidationToken.

func (*ValidationToken) UnmarshalJSON added in v1.1.0

func (v *ValidationToken) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidationToken.

type WafAction

type WafAction string
const (
	WafActionAllow    WafAction = "allow"
	WafActionBlock    WafAction = "block"
	WafActionLog      WafAction = "log"
	WafActionRedirect WafAction = "redirect"
)

func PossibleWafActionValues

func PossibleWafActionValues() []WafAction

PossibleWafActionValues returns the possible values for the WafAction const type.

type WafGranularity

type WafGranularity string
const (
	WafGranularityP1D  WafGranularity = "P1D"
	WafGranularityPT1H WafGranularity = "PT1H"
	WafGranularityPT5M WafGranularity = "PT5M"
)

func PossibleWafGranularityValues

func PossibleWafGranularityValues() []WafGranularity

PossibleWafGranularityValues returns the possible values for the WafGranularity const type.

type WafMatchVariable added in v0.3.0

type WafMatchVariable string

WafMatchVariable - Match variable to compare against.

const (
	WafMatchVariableCookies       WafMatchVariable = "Cookies"
	WafMatchVariablePostArgs      WafMatchVariable = "PostArgs"
	WafMatchVariableQueryString   WafMatchVariable = "QueryString"
	WafMatchVariableRemoteAddr    WafMatchVariable = "RemoteAddr"
	WafMatchVariableRequestBody   WafMatchVariable = "RequestBody"
	WafMatchVariableRequestHeader WafMatchVariable = "RequestHeader"
	WafMatchVariableRequestMethod WafMatchVariable = "RequestMethod"
	WafMatchVariableRequestURI    WafMatchVariable = "RequestUri"
	WafMatchVariableSocketAddr    WafMatchVariable = "SocketAddr"
)

func PossibleWafMatchVariableValues added in v0.3.0

func PossibleWafMatchVariableValues() []WafMatchVariable

PossibleWafMatchVariableValues returns the possible values for the WafMatchVariable const type.

type WafMetric

type WafMetric string
const (
	WafMetricClientRequestCount WafMetric = "clientRequestCount"
)

func PossibleWafMetricValues

func PossibleWafMetricValues() []WafMetric

PossibleWafMetricValues returns the possible values for the WafMetric const type.

type WafMetricsResponse

type WafMetricsResponse struct {
	DateTimeBegin *time.Time
	DateTimeEnd   *time.Time
	Granularity   *WafMetricsResponseGranularity
	Series        []*WafMetricsResponseSeriesItem
}

WafMetricsResponse - Waf Metrics Response

func (WafMetricsResponse) MarshalJSON

func (w WafMetricsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WafMetricsResponse.

func (*WafMetricsResponse) UnmarshalJSON

func (w *WafMetricsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponse.

type WafMetricsResponseGranularity

type WafMetricsResponseGranularity string
const (
	WafMetricsResponseGranularityP1D  WafMetricsResponseGranularity = "P1D"
	WafMetricsResponseGranularityPT1H WafMetricsResponseGranularity = "PT1H"
	WafMetricsResponseGranularityPT5M WafMetricsResponseGranularity = "PT5M"
)

func PossibleWafMetricsResponseGranularityValues

func PossibleWafMetricsResponseGranularityValues() []WafMetricsResponseGranularity

PossibleWafMetricsResponseGranularityValues returns the possible values for the WafMetricsResponseGranularity const type.

type WafMetricsResponseSeriesItem

func (WafMetricsResponseSeriesItem) MarshalJSON

func (w WafMetricsResponseSeriesItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WafMetricsResponseSeriesItem.

func (*WafMetricsResponseSeriesItem) UnmarshalJSON added in v1.1.0

func (w *WafMetricsResponseSeriesItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponseSeriesItem.

type WafMetricsResponseSeriesItemUnit

type WafMetricsResponseSeriesItemUnit string
const (
	WafMetricsResponseSeriesItemUnitCount WafMetricsResponseSeriesItemUnit = "count"
)

func PossibleWafMetricsResponseSeriesItemUnitValues

func PossibleWafMetricsResponseSeriesItemUnitValues() []WafMetricsResponseSeriesItemUnit

PossibleWafMetricsResponseSeriesItemUnitValues returns the possible values for the WafMetricsResponseSeriesItemUnit const type.

type WafMetricsResponseSeriesPropertiesItemsItem

type WafMetricsResponseSeriesPropertiesItemsItem struct {
	Name  *string
	Value *string
}

func (WafMetricsResponseSeriesPropertiesItemsItem) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type WafMetricsResponseSeriesPropertiesItemsItem.

func (*WafMetricsResponseSeriesPropertiesItemsItem) UnmarshalJSON added in v1.1.0

func (w *WafMetricsResponseSeriesPropertiesItemsItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponseSeriesPropertiesItemsItem.

type WafRankingGroupBy

type WafRankingGroupBy string
const (
	WafRankingGroupByCustomDomain   WafRankingGroupBy = "customDomain"
	WafRankingGroupByHTTPStatusCode WafRankingGroupBy = "httpStatusCode"
)

func PossibleWafRankingGroupByValues

func PossibleWafRankingGroupByValues() []WafRankingGroupBy

PossibleWafRankingGroupByValues returns the possible values for the WafRankingGroupBy const type.

type WafRankingType

type WafRankingType string
const (
	WafRankingTypeAction          WafRankingType = "action"
	WafRankingTypeClientIP        WafRankingType = "clientIp"
	WafRankingTypeCountryOrRegion WafRankingType = "countryOrRegion"
	WafRankingTypeRuleGroup       WafRankingType = "ruleGroup"
	WafRankingTypeRuleID          WafRankingType = "ruleId"
	WafRankingTypeRuleType        WafRankingType = "ruleType"
	WafRankingTypeURL             WafRankingType = "url"
	WafRankingTypeUserAgent       WafRankingType = "userAgent"
)

func PossibleWafRankingTypeValues

func PossibleWafRankingTypeValues() []WafRankingType

PossibleWafRankingTypeValues returns the possible values for the WafRankingType const type.

type WafRankingsResponse

type WafRankingsResponse struct {
	Data          []*WafRankingsResponseDataItem
	DateTimeBegin *time.Time
	DateTimeEnd   *time.Time
	Groups        []*string
}

WafRankingsResponse - Waf Rankings Response

func (WafRankingsResponse) MarshalJSON

func (w WafRankingsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WafRankingsResponse.

func (*WafRankingsResponse) UnmarshalJSON

func (w *WafRankingsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WafRankingsResponse.

type WafRankingsResponseDataItem

type WafRankingsResponseDataItem struct {
	GroupValues []*string
	Metrics     []*ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems
}

func (WafRankingsResponseDataItem) MarshalJSON

func (w WafRankingsResponseDataItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WafRankingsResponseDataItem.

func (*WafRankingsResponseDataItem) UnmarshalJSON added in v1.1.0

func (w *WafRankingsResponseDataItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WafRankingsResponseDataItem.

type WafRuleType

type WafRuleType string
const (
	WafRuleTypeBot     WafRuleType = "bot"
	WafRuleTypeCustom  WafRuleType = "custom"
	WafRuleTypeManaged WafRuleType = "managed"
)

func PossibleWafRuleTypeValues

func PossibleWafRuleTypeValues() []WafRuleType

PossibleWafRuleTypeValues returns the possible values for the WafRuleType const type.

type WebApplicationFirewallPolicy added in v0.3.0

type WebApplicationFirewallPolicy struct {
	// REQUIRED; Resource location.
	Location *string

	// REQUIRED; The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.
	SKU *SKU

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

	// Properties of the web application firewall policy.
	Properties *WebApplicationFirewallPolicyProperties

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

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

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

	// READ-ONLY; Read only system data
	SystemData *SystemData

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

WebApplicationFirewallPolicy - Defines web application firewall policy for Azure CDN.

func (WebApplicationFirewallPolicy) MarshalJSON added in v0.3.0

func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy.

func (*WebApplicationFirewallPolicy) UnmarshalJSON added in v1.1.0

func (w *WebApplicationFirewallPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicy.

type WebApplicationFirewallPolicyList added in v0.3.0

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

	// READ-ONLY; List of Azure CDN WebApplicationFirewallPolicies within a resource group.
	Value []*WebApplicationFirewallPolicy
}

WebApplicationFirewallPolicyList - Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.

func (WebApplicationFirewallPolicyList) MarshalJSON added in v0.3.0

func (w WebApplicationFirewallPolicyList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyList.

func (*WebApplicationFirewallPolicyList) UnmarshalJSON added in v1.1.0

func (w *WebApplicationFirewallPolicyList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyList.

type WebApplicationFirewallPolicyPatchParameters added in v0.3.0

type WebApplicationFirewallPolicyPatchParameters struct {
	// CdnWebApplicationFirewallPolicy tags
	Tags map[string]*string
}

WebApplicationFirewallPolicyPatchParameters - Properties required to update a CdnWebApplicationFirewallPolicy.

func (WebApplicationFirewallPolicyPatchParameters) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPatchParameters.

func (*WebApplicationFirewallPolicyPatchParameters) UnmarshalJSON added in v1.1.0

func (w *WebApplicationFirewallPolicyPatchParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyPatchParameters.

type WebApplicationFirewallPolicyProperties added in v0.3.0

type WebApplicationFirewallPolicyProperties struct {
	// Describes custom rules inside the policy.
	CustomRules *CustomRuleList

	// Describes managed rules inside the policy.
	ManagedRules *ManagedRuleSetList

	// Describes policySettings for policy
	PolicySettings *PolicySettings

	// Describes rate limit rules inside the policy.
	RateLimitRules *RateLimitRuleList

	// READ-ONLY; Describes Azure CDN endpoints associated with this Web Application Firewall policy.
	EndpointLinks []*LinkedEndpoint

	// READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Resource status of the policy.
	ResourceState *PolicyResourceState
}

WebApplicationFirewallPolicyProperties - Defines CDN web application firewall policy properties.

func (WebApplicationFirewallPolicyProperties) MarshalJSON added in v0.3.0

func (w WebApplicationFirewallPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyProperties.

func (*WebApplicationFirewallPolicyProperties) UnmarshalJSON added in v1.1.0

func (w *WebApplicationFirewallPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyProperties.

Jump to

Keyboard shortcuts

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