armcdn

package module
v2.2.0 Latest Latest
Warning

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

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

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/v2

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.NewAFDCustomDomainsClient()

Fakes

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

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

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the 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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Create.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Delete.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_RefreshValidationToken.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Update.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Get.json

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

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

NewListByProfilePager - Lists existing AzureFrontDoor domains.

Generated from API version 2024-02-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 - AFDCustomDomainsClientListByProfileOptions contains the optional parameters for the AFDCustomDomainsClient.NewListByProfilePager method.
Example

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

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

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

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

type AFDCustomDomainsClientBeginDeleteOptions

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

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

type AFDCustomDomainsClientBeginRefreshValidationTokenOptions

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

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

type AFDCustomDomainsClientBeginUpdateOptions

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

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

type AFDCustomDomainsClientCreateResponse

type AFDCustomDomainsClientCreateResponse struct {
	// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com.
	AFDDomain
}

AFDCustomDomainsClientCreateResponse contains the response from method AFDCustomDomainsClient.BeginCreate.

type AFDCustomDomainsClientDeleteResponse

type AFDCustomDomainsClientDeleteResponse struct {
}

AFDCustomDomainsClientDeleteResponse contains the response from method AFDCustomDomainsClient.BeginDelete.

type AFDCustomDomainsClientGetOptions

type AFDCustomDomainsClientGetOptions struct {
}

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

type AFDCustomDomainsClientGetResponse

type AFDCustomDomainsClientGetResponse struct {
	// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com.
	AFDDomain
}

AFDCustomDomainsClientGetResponse contains the response from method AFDCustomDomainsClient.Get.

type AFDCustomDomainsClientListByProfileOptions

type AFDCustomDomainsClientListByProfileOptions struct {
}

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

type AFDCustomDomainsClientListByProfileResponse

type AFDCustomDomainsClientListByProfileResponse struct {
	// 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.
	AFDDomainListResult
}

AFDCustomDomainsClientListByProfileResponse contains the response from method AFDCustomDomainsClient.NewListByProfilePager.

type AFDCustomDomainsClientRefreshValidationTokenResponse

type AFDCustomDomainsClientRefreshValidationTokenResponse struct {
}

AFDCustomDomainsClientRefreshValidationTokenResponse contains the response from method AFDCustomDomainsClient.BeginRefreshValidationToken.

type AFDCustomDomainsClientUpdateResponse

type AFDCustomDomainsClientUpdateResponse struct {
	// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com.
	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

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

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

MarshalJSON implements the json.Marshaller interface for type AFDDomainHTTPSParameters.

func (*AFDDomainHTTPSParameters) UnmarshalJSON

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

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

	// Key-Value pair representing migration properties for domains.
	ExtendedProperties map[string]*string

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

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 - Azure Front Door endpoint is the entity within a Azure Front Door 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

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

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

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Create.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Delete.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_PurgeContent.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Update.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Get.json

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

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

NewListByProfilePager - Lists existing AzureFrontDoor endpoints.

Generated from API version 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ListByProfile.json

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

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

NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door profile.

Generated from API version 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ListResourceUsage.json

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 Azure Front Door endpoint in DNS. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • 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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ValidateCustomDomain.json

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

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

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

type AFDEndpointsClientBeginDeleteOptions

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

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

type AFDEndpointsClientBeginPurgeContentOptions

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

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

type AFDEndpointsClientBeginUpdateOptions

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

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

type AFDEndpointsClientCreateResponse

type AFDEndpointsClientCreateResponse struct {
	// Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as
	// origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format <endpointname>.azureedge.net.
	AFDEndpoint
}

AFDEndpointsClientCreateResponse contains the response from method AFDEndpointsClient.BeginCreate.

type AFDEndpointsClientDeleteResponse

type AFDEndpointsClientDeleteResponse struct {
}

AFDEndpointsClientDeleteResponse contains the response from method AFDEndpointsClient.BeginDelete.

type AFDEndpointsClientGetOptions

type AFDEndpointsClientGetOptions struct {
}

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

type AFDEndpointsClientGetResponse

type AFDEndpointsClientGetResponse struct {
	// Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as
	// origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format <endpointname>.azureedge.net.
	AFDEndpoint
}

AFDEndpointsClientGetResponse contains the response from method AFDEndpointsClient.Get.

type AFDEndpointsClientListByProfileOptions

type AFDEndpointsClientListByProfileOptions struct {
}

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

type AFDEndpointsClientListByProfileResponse

type AFDEndpointsClientListByProfileResponse struct {
	// 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.
	AFDEndpointListResult
}

AFDEndpointsClientListByProfileResponse contains the response from method AFDEndpointsClient.NewListByProfilePager.

type AFDEndpointsClientListResourceUsageOptions

type AFDEndpointsClientListResourceUsageOptions struct {
}

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

type AFDEndpointsClientListResourceUsageResponse

type AFDEndpointsClientListResourceUsageResponse struct {
	// The list usages operation response.
	UsagesListResult
}

AFDEndpointsClientListResourceUsageResponse contains the response from method AFDEndpointsClient.NewListResourceUsagePager.

type AFDEndpointsClientPurgeContentResponse

type AFDEndpointsClientPurgeContentResponse struct {
}

AFDEndpointsClientPurgeContentResponse contains the response from method AFDEndpointsClient.BeginPurgeContent.

type AFDEndpointsClientUpdateResponse

type AFDEndpointsClientUpdateResponse struct {
	// Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as
	// origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format <endpointname>.azureedge.net.
	AFDEndpoint
}

AFDEndpointsClientUpdateResponse contains the response from method AFDEndpointsClient.BeginUpdate.

type AFDEndpointsClientValidateCustomDomainOptions

type AFDEndpointsClientValidateCustomDomainOptions struct {
}

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

type AFDEndpointsClientValidateCustomDomainResponse

type AFDEndpointsClientValidateCustomDomainResponse struct {
	// Output of custom domain validation.
	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 - Azure Front Door origin is the source of the content being delivered via Azure Front Door. 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

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 Azure Front Door.

func (AFDOriginGroup) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginGroup.

func (*AFDOriginGroup) UnmarshalJSON

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 Azure Front Door origin groups within an Azure Front Door 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

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

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupProperties.

func (*AFDOriginGroupProperties) UnmarshalJSON

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

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Create.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Delete.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Update.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Get.json

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

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_ListByProfile.json

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

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

NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door profile..

Generated from API version 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_ListResourceUsage.json

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

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

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

type AFDOriginGroupsClientBeginDeleteOptions

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

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

type AFDOriginGroupsClientBeginUpdateOptions

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

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

type AFDOriginGroupsClientCreateResponse

type AFDOriginGroupsClientCreateResponse struct {
	// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure
	// Front Door.
	AFDOriginGroup
}

AFDOriginGroupsClientCreateResponse contains the response from method AFDOriginGroupsClient.BeginCreate.

type AFDOriginGroupsClientDeleteResponse

type AFDOriginGroupsClientDeleteResponse struct {
}

AFDOriginGroupsClientDeleteResponse contains the response from method AFDOriginGroupsClient.BeginDelete.

type AFDOriginGroupsClientGetOptions

type AFDOriginGroupsClientGetOptions struct {
}

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

type AFDOriginGroupsClientGetResponse

type AFDOriginGroupsClientGetResponse struct {
	// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure
	// Front Door.
	AFDOriginGroup
}

AFDOriginGroupsClientGetResponse contains the response from method AFDOriginGroupsClient.Get.

type AFDOriginGroupsClientListByProfileOptions

type AFDOriginGroupsClientListByProfileOptions struct {
}

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

type AFDOriginGroupsClientListByProfileResponse

type AFDOriginGroupsClientListByProfileResponse struct {
	// 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.
	AFDOriginGroupListResult
}

AFDOriginGroupsClientListByProfileResponse contains the response from method AFDOriginGroupsClient.NewListByProfilePager.

type AFDOriginGroupsClientListResourceUsageOptions

type AFDOriginGroupsClientListResourceUsageOptions struct {
}

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

type AFDOriginGroupsClientListResourceUsageResponse

type AFDOriginGroupsClientListResourceUsageResponse struct {
	// The list usages operation response.
	UsagesListResult
}

AFDOriginGroupsClientListResourceUsageResponse contains the response from method AFDOriginGroupsClient.NewListResourceUsagePager.

type AFDOriginGroupsClientUpdateResponse

type AFDOriginGroupsClientUpdateResponse struct {
	// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure
	// Front Door.
	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 Azure Front Door origins within an Azure Front Door 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

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 Front Door 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

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

MarshalJSON implements the json.Marshaller interface for type AFDOriginProperties.

func (*AFDOriginProperties) UnmarshalJSON

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

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 Front Door 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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Create.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Delete.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Update.json

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Get.json

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

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 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_ListByOriginGroup.json

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

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

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

type AFDOriginsClientBeginDeleteOptions

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

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

type AFDOriginsClientBeginUpdateOptions

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

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

type AFDOriginsClientCreateResponse

type AFDOriginsClientCreateResponse struct {
	// Azure Front Door origin is the source of the content being delivered via Azure Front Door. 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.
	AFDOrigin
}

AFDOriginsClientCreateResponse contains the response from method AFDOriginsClient.BeginCreate.

type AFDOriginsClientDeleteResponse

type AFDOriginsClientDeleteResponse struct {
}

AFDOriginsClientDeleteResponse contains the response from method AFDOriginsClient.BeginDelete.

type AFDOriginsClientGetOptions

type AFDOriginsClientGetOptions struct {
}

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

type AFDOriginsClientGetResponse

type AFDOriginsClientGetResponse struct {
	// Azure Front Door origin is the source of the content being delivered via Azure Front Door. 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.
	AFDOrigin
}

AFDOriginsClientGetResponse contains the response from method AFDOriginsClient.Get.

type AFDOriginsClientListByOriginGroupOptions

type AFDOriginsClientListByOriginGroupOptions struct {
}

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

type AFDOriginsClientListByOriginGroupResponse

type AFDOriginsClientListByOriginGroupResponse struct {
	// 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.
	AFDOriginListResult
}

AFDOriginsClientListByOriginGroupResponse contains the response from method AFDOriginsClient.NewListByOriginGroupPager.

type AFDOriginsClientUpdateResponse

type AFDOriginsClientUpdateResponse struct {
	// Azure Front Door origin is the source of the content being delivered via Azure Front Door. 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.
	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) BeginUpgrade

func (client *AFDProfilesClient) BeginUpgrade(ctx context.Context, resourceGroupName string, profileName string, profileUpgradeParameters ProfileUpgradeParameters, options *AFDProfilesClientBeginUpgradeOptions) (*runtime.Poller[AFDProfilesClientUpgradeResponse], error)

BeginUpgrade - Upgrade a profile from StandardAzureFrontDoor to PremiumAzureFrontDoor. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - Name of the Resource group within the Azure subscription.
  • profileName - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
  • profileUpgradeParameters - Profile upgrade input parameter.
  • options - AFDProfilesClientBeginUpgradeOptions contains the optional parameters for the AFDProfilesClient.BeginUpgrade method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_Upgrade.json

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.NewAFDProfilesClient().BeginUpgrade(ctx, "RG", "profile1", armcdn.ProfileUpgradeParameters{
	WafMappingList: []*armcdn.ProfileChangeSKUWafMapping{
		{
			ChangeToWafPolicy: &armcdn.ResourceReference{
				ID: to.Ptr("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/waf2"),
			},
			SecurityPolicyName: to.Ptr("securityPolicy1"),
		}},
}, 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{
// 		ExtendedProperties: map[string]*string{
// 		},
// 		FrontDoorID: to.Ptr("id"),
// 		OriginResponseTimeoutSeconds: to.Ptr[int32](60),
// 		ProvisioningState: to.Ptr(armcdn.ProfileProvisioningStateSucceeded),
// 		ResourceState: to.Ptr(armcdn.ProfileResourceState("Enabled")),
// 	},
// 	SKU: &armcdn.SKU{
// 		Name: to.Ptr(armcdn.SKUNameStandardAzureFrontDoor),
// 	},
// }
Output:

func (*AFDProfilesClient)