armcognitiveservices

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 11

README

Azure Cognitive Services Module for Go

PkgGoDev

The armcognitiveservices module provides operations for working with Azure Cognitive Services.

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 Cognitive Services module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Cognitive Services. 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 Cognitive Services 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 := armX.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 := armcognitiveservices.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armcognitiveservices.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.NewAccountsClient()

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 Cognitive Services 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 APIKeys

type APIKeys struct {
	// Gets the value of key 1.
	Key1 *string

	// Gets the value of key 2.
	Key2 *string
}

APIKeys - The access keys for the cognitive services account.

func (APIKeys) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type APIKeys.

func (*APIKeys) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIKeys.

type APIProperties

type APIProperties struct {
	// (Metrics Advisor Only) The Azure AD Client Id (Application Id).
	AADClientID *string

	// (Metrics Advisor Only) The Azure AD Tenant Id.
	AADTenantID *string

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]any

	// (Personalization Only) The flag to enable statistics of Bing Search.
	EventHubConnectionString *string

	// (QnAMaker Only) The Azure Search endpoint id of QnAMaker.
	QnaAzureSearchEndpointID *string

	// (QnAMaker Only) The Azure Search endpoint key of QnAMaker.
	QnaAzureSearchEndpointKey *string

	// (QnAMaker Only) The runtime endpoint of QnAMaker.
	QnaRuntimeEndpoint *string

	// (Bing Search Only) The flag to enable statistics of Bing Search.
	StatisticsEnabled *bool

	// (Personalization Only) The storage account connection string.
	StorageAccountConnectionString *string

	// (Metrics Advisor Only) The super user of Metrics Advisor.
	SuperUser *string

	// (Metrics Advisor Only) The website name of Metrics Advisor.
	WebsiteName *string
}

APIProperties - The api properties for special APIs.

func (APIProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIProperties.

func (*APIProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIProperties.

type AbusePenalty added in v1.5.0

type AbusePenalty struct {
	// The action of AbusePenalty.
	Action *AbusePenaltyAction

	// The datetime of expiration of the AbusePenalty.
	Expiration *time.Time

	// The percentage of rate limit.
	RateLimitPercentage *float32
}

AbusePenalty - The abuse penalty.

func (AbusePenalty) MarshalJSON added in v1.5.0

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

MarshalJSON implements the json.Marshaller interface for type AbusePenalty.

func (*AbusePenalty) UnmarshalJSON added in v1.5.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AbusePenalty.

type AbusePenaltyAction added in v1.5.0

type AbusePenaltyAction string

AbusePenaltyAction - The action of AbusePenalty.

const (
	AbusePenaltyActionBlock    AbusePenaltyAction = "Block"
	AbusePenaltyActionThrottle AbusePenaltyAction = "Throttle"
)

func PossibleAbusePenaltyActionValues added in v1.5.0

func PossibleAbusePenaltyActionValues() []AbusePenaltyAction

PossibleAbusePenaltyActionValues returns the possible values for the AbusePenaltyAction const type.

type Account

type Account struct {
	// Identity for the resource.
	Identity *Identity

	// The Kind of the resource.
	Kind *string

	// The geo-location where the resource lives
	Location *string

	// Properties of Cognitive Services account.
	Properties *AccountProperties

	// The resource model definition representing SKU
	SKU *SKU

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

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Account - Cognitive Services account is an Azure resource representing the provisioned account, it's type, location and SKU.

func (Account) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Account.

func (*Account) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Account.

type AccountListResult

type AccountListResult struct {
	// The link used to get the next page of accounts.
	NextLink *string

	// READ-ONLY; Gets the list of Cognitive Services accounts and their properties.
	Value []*Account
}

AccountListResult - The list of cognitive services accounts operation response.

func (AccountListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountListResult.

func (*AccountListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountListResult.

type AccountModel added in v0.4.0

type AccountModel struct {
	// Base Model Identifier.
	BaseModel *DeploymentModel

	// The capabilities.
	Capabilities map[string]*string

	// Cognitive Services account ModelDeprecationInfo.
	Deprecation *ModelDeprecationInfo

	// The capabilities for finetune models.
	FinetuneCapabilities map[string]*string

	// Deployment model format.
	Format *string

	// If the model is default version.
	IsDefaultVersion *bool

	// Model lifecycle status.
	LifecycleStatus *ModelLifecycleStatus

	// The max capacity.
	MaxCapacity *int32

	// Deployment model name.
	Name *string

	// The list of Model Sku.
	SKUs []*ModelSKU

	// Optional. Deployment model source ARM resource ID.
	Source *string

	// Optional. Deployment model version. If version is not specified, a default version will be assigned. The default version
	// is different for different models and might change when there is new version
	// available for a model. Default version for a model could be found from list models API.
	Version *string

	// READ-ONLY; The call rate limit Cognitive Services account.
	CallRateLimit *CallRateLimit

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData
}

AccountModel - Cognitive Services account Model.

func (AccountModel) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccountModel.

func (*AccountModel) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountModel.

type AccountModelListResult added in v0.4.0

type AccountModelListResult struct {
	// The link used to get the next page of Model.
	NextLink *string

	// Gets the list of Cognitive Services accounts Model and their properties.
	Value []*AccountModel
}

AccountModelListResult - The list of cognitive services accounts operation response.

func (AccountModelListResult) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccountModelListResult.

func (*AccountModelListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountModelListResult.

type AccountProperties

type AccountProperties struct {
	// The api properties for special APIs.
	APIProperties   *APIProperties
	AllowedFqdnList []*string

	// Optional subdomain name used for token-based authentication.
	CustomSubDomainName *string
	DisableLocalAuth    *bool

	// The flag to enable dynamic throttling.
	DynamicThrottlingEnabled *bool

	// The encryption properties for this resource.
	Encryption *Encryption

	// The multiregion settings of Cognitive Services account.
	Locations *MultiRegionSettings

	// Resource migration token.
	MigrationToken *string

	// A collection of rules governing the accessibility from specific network locations.
	NetworkACLs *NetworkRuleSet

	// Whether or not public endpoint access is allowed for this account.
	PublicNetworkAccess           *PublicNetworkAccess
	Restore                       *bool
	RestrictOutboundNetworkAccess *bool

	// The storage accounts for this resource.
	UserOwnedStorage []*UserOwnedStorage

	// READ-ONLY; The abuse penalty.
	AbusePenalty *AbusePenalty

	// READ-ONLY; The call rate limit Cognitive Services account.
	CallRateLimit *CallRateLimit

	// READ-ONLY; Gets the capabilities of the cognitive services account. Each item indicates the capability of a specific feature.
	// The values are read-only and for reference only.
	Capabilities []*SKUCapability

	// READ-ONLY; The commitment plan associations of Cognitive Services account.
	CommitmentPlanAssociations []*CommitmentPlanAssociation

	// READ-ONLY; Gets the date of cognitive services account creation.
	DateCreated *string

	// READ-ONLY; The deletion date, only available for deleted account.
	DeletionDate *string

	// READ-ONLY; Endpoint of the created account.
	Endpoint *string

	// READ-ONLY; Dictionary of
	Endpoints map[string]*string

	// READ-ONLY; The internal identifier (deprecated, do not use this property).
	InternalID *string

	// READ-ONLY; If the resource is migrated from an existing key.
	IsMigrated *bool

	// READ-ONLY; The private endpoint connection associated with the Cognitive Services account.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; Gets the status of the cognitive services account at the time the operation was called.
	ProvisioningState *ProvisioningState

	// READ-ONLY
	QuotaLimit *QuotaLimit

	// READ-ONLY; Sku change info of account.
	SKUChangeInfo *SKUChangeInfo

	// READ-ONLY; The scheduled purge date, only available for deleted account.
	ScheduledPurgeDate *string
}

AccountProperties - Properties of Cognitive Services account.

func (AccountProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountProperties.

func (*AccountProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties.

type AccountSKU

type AccountSKU struct {
	// Resource Namespace and Type
	ResourceType *string

	// The SKU of Cognitive Services account.
	SKU *SKU
}

AccountSKU - Cognitive Services resource type and SKU.

func (AccountSKU) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type AccountSKU.

func (*AccountSKU) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountSKU.

type AccountSKUListResult

type AccountSKUListResult struct {
	// Gets the list of Cognitive Services accounts and their properties.
	Value []*AccountSKU
}

AccountSKUListResult - The list of cognitive services accounts operation response.

func (AccountSKUListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountSKUListResult.

func (*AccountSKUListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountSKUListResult.

type AccountsClient

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

AccountsClient contains the methods for the Accounts group. Don't use this type directly, use NewAccountsClient() instead.

func NewAccountsClient

func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error)

NewAccountsClient creates a new instance of AccountsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AccountsClient) BeginCreate

func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, account Account, options *AccountsClientBeginCreateOptions) (*runtime.Poller[AccountsClientCreateResponse], error)

BeginCreate - Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • account - The parameters to provide for the created account.
  • options - AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.
Example (CreateAccount)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccount.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "myResourceGroup", "testCreate1", armcognitiveservices.Account{
		Identity: &armcognitiveservices.Identity{
			Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
		},
		Kind:     to.Ptr("Emotion"),
		Location: to.Ptr("West US"),
		Properties: &armcognitiveservices.AccountProperties{
			Encryption: &armcognitiveservices.Encryption{
				KeySource: to.Ptr(armcognitiveservices.KeySourceMicrosoftKeyVault),
				KeyVaultProperties: &armcognitiveservices.KeyVaultProperties{
					KeyName:     to.Ptr("KeyName"),
					KeyVaultURI: to.Ptr("https://pltfrmscrts-use-pc-dev.vault.azure.net/"),
					KeyVersion:  to.Ptr("891CF236-D241-4738-9462-D506AF493DFA"),
				},
			},
			UserOwnedStorage: []*armcognitiveservices.UserOwnedStorage{
				{
					ResourceID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
				}},
		},
		SKU: &armcognitiveservices.SKU{
			Name: to.Ptr("S0"),
		},
	}, 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.Account = armcognitiveservices.Account{
	// 	Name: to.Ptr("testCreate1"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1"),
	// 	Etag: to.Ptr("W/\"datetime'2017-04-10T08%3A00%3A05.445595Z'\""),
	// 	Identity: &armcognitiveservices.Identity{
	// 		Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("b5cf119e-a5c2-42c7-802f-592e0efb169f"),
	// 		TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 	},
	// 	Kind: to.Ptr("Emotion"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armcognitiveservices.AccountProperties{
	// 		Encryption: &armcognitiveservices.Encryption{
	// 			KeySource: to.Ptr(armcognitiveservices.KeySourceMicrosoftKeyVault),
	// 			KeyVaultProperties: &armcognitiveservices.KeyVaultProperties{
	// 				KeyName: to.Ptr("FakeKeyName"),
	// 				KeyVaultURI: to.Ptr("https://pltfrmscrts-use-pc-dev.vault.azure.net/"),
	// 				KeyVersion: to.Ptr("891CF236-D241-4738-9462-D506AF493DFA"),
	// 			},
	// 		},
	// 		Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/emotion/v1.0"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
	// 		UserOwnedStorage: []*armcognitiveservices.UserOwnedStorage{
	// 			{
	// 				ResourceID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
	// 		}},
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("S0"),
	// 	},
	// }
}
Output:

Example (CreateAccountMin)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateAccountMin.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "myResourceGroup", "testCreate1", armcognitiveservices.Account{
		Identity: &armcognitiveservices.Identity{
			Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
		},
		Kind:       to.Ptr("CognitiveServices"),
		Location:   to.Ptr("West US"),
		Properties: &armcognitiveservices.AccountProperties{},
		SKU: &armcognitiveservices.SKU{
			Name: to.Ptr("S0"),
		},
	}, 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.Account = armcognitiveservices.Account{
	// 	Name: to.Ptr("testCreate1"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/testCreate1"),
	// 	Etag: to.Ptr("W/\"datetime'2017-04-10T08%3A00%3A05.445595Z'\""),
	// 	Identity: &armcognitiveservices.Identity{
	// 		Type: to.Ptr(armcognitiveservices.ResourceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("b5cf119e-a5c2-42c7-802f-592e0efb169f"),
	// 		TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 	},
	// 	Kind: to.Ptr("Emotion"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armcognitiveservices.AccountProperties{
	// 		Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/emotion/v1.0"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("S0"),
	// 	},
	// }
}
Output:

func (*AccountsClient) BeginDelete

func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*runtime.Poller[AccountsClientDeleteResponse], error)

BeginDelete - Deletes a Cognitive Services account from the resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteAccount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

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

func (client *AccountsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, account Account, options *AccountsClientBeginUpdateOptions) (*runtime.Poller[AccountsClientUpdateResponse], error)

BeginUpdate - Updates a Cognitive Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • account - The parameters to provide for the created account.
  • options - AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateAccount.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAccountsClient().BeginUpdate(ctx, "bvttest", "bingSearch", armcognitiveservices.Account{
		Location: to.Ptr("global"),
		SKU: &armcognitiveservices.SKU{
			Name: to.Ptr("S2"),
		},
	}, 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.Account = armcognitiveservices.Account{
	// 	Name: to.Ptr("bingSearch"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/bingSearch"),
	// 	Etag: to.Ptr("W/\"datetime'2017-04-10T07%3A46%3A21.5618831Z'\""),
	// 	Kind: to.Ptr("Bing.Search"),
	// 	Location: to.Ptr("global"),
	// 	Properties: &armcognitiveservices.AccountProperties{
	// 		Endpoint: to.Ptr("https://api.cognitive.microsoft.com/bing/v5.0"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("S2"),
	// 	},
	// }
}
Output:

func (*AccountsClient) Get

func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error)

Get - Returns a Cognitive Services account specified by the parameters. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetAccount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().Get(ctx, "myResourceGroup", "myAccount", 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.Account = armcognitiveservices.Account{
	// 	Name: to.Ptr("myAccount"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/myAccount"),
	// 	Etag: to.Ptr("W/\"datetime'2017-04-10T04%3A42%3A19.7067387Z'\""),
	// 	Kind: to.Ptr("Emotion"),
	// 	Location: to.Ptr("westus"),
	// 	Properties: &armcognitiveservices.AccountProperties{
	// 		Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/emotion/v1.0"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("F0"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"ExpiredDate": to.Ptr("2017/09/01"),
	// 		"Owner": to.Ptr("felixwa"),
	// 	},
	// }
}
Output:

func (*AccountsClient) ListKeys

func (client *AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientListKeysOptions) (AccountsClientListKeysResponse, error)

ListKeys - Lists the account keys for the specified Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().ListKeys(ctx, "myResourceGroup", "myAccount", 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.APIKeys = armcognitiveservices.APIKeys{
	// 	Key1: to.Ptr("KEY1"),
	// 	Key2: to.Ptr("KEY2"),
	// }
}
Output:

func (*AccountsClient) ListSKUs

func (client *AccountsClient) ListSKUs(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientListSKUsOptions) (AccountsClientListSKUsResponse, error)

ListSKUs - List available SKUs for the requested Cognitive Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - AccountsClientListSKUsOptions contains the optional parameters for the AccountsClient.ListSKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().ListSKUs(ctx, "myResourceGroup", "myAccount", 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.AccountSKUListResult = armcognitiveservices.AccountSKUListResult{
	// 	Value: []*armcognitiveservices.AccountSKU{
	// 		{
	// 			ResourceType: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 			SKU: &armcognitiveservices.SKU{
	// 				Name: to.Ptr("F0"),
	// 				Tier: to.Ptr(armcognitiveservices.SKUTierFree),
	// 			},
	// 		},
	// 		{
	// 			ResourceType: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 			SKU: &armcognitiveservices.SKU{
	// 				Name: to.Ptr("S0"),
	// 				Tier: to.Ptr(armcognitiveservices.SKUTierStandard),
	// 			},
	// 	}},
	// }
}
Output:

func (*AccountsClient) ListUsages

func (client *AccountsClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientListUsagesOptions) (AccountsClientListUsagesResponse, error)

ListUsages - Get usages for the requested Cognitive Services account If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - AccountsClientListUsagesOptions contains the optional parameters for the AccountsClient.ListUsages method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().ListUsages(ctx, "myResourceGroup", "TestUsage02", &armcognitiveservices.AccountsClientListUsagesOptions{Filter: 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.UsageListResult = armcognitiveservices.UsageListResult{
	// 	Value: []*armcognitiveservices.Usage{
	// 		{
	// 			Name: &armcognitiveservices.MetricName{
	// 				LocalizedValue: to.Ptr("Face.Transactions"),
	// 				Value: to.Ptr("Face.Transactions"),
	// 			},
	// 			CurrentValue: to.Ptr[float64](3),
	// 			Limit: to.Ptr[float64](30000),
	// 			NextResetTime: to.Ptr("2018-03-28T09:33:51Z"),
	// 			QuotaPeriod: to.Ptr("30.00:00:00"),
	// 			Status: to.Ptr(armcognitiveservices.QuotaUsageStatusIncluded),
	// 			Unit: to.Ptr(armcognitiveservices.UnitTypeCount),
	// 	}},
	// }
}
Output:

func (*AccountsClient) NewListByResourceGroupPager added in v0.6.0

func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountsClientListByResourceGroupOptions) *runtime.Pager[AccountsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Returns all the resources of a particular type belonging to a resource group

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountsClient().NewListByResourceGroupPager("myResourceGroup", 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.AccountListResult = armcognitiveservices.AccountListResult{
		// 	Value: []*armcognitiveservices.Account{
		// 		{
		// 			Name: to.Ptr("myAccount"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/myAccount"),
		// 			Etag: to.Ptr("W/\"datetime'2017-04-10T04%3A42%3A19.7067387Z'\""),
		// 			Kind: to.Ptr("Emotion"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/emotion/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("F0"),
		// 			},
		// 			Tags: map[string]*string{
		// 				"ExpiredDate": to.Ptr("2017/09/01"),
		// 				"Owner": to.Ptr("felixwa"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("TestPropertyWU2"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.CognitiveServices/accounts/TestPropertyWU2"),
		// 			Etag: to.Ptr("W/\"datetime'2017-04-07T04%3A32%3A38.9187216Z'\""),
		// 			Kind: to.Ptr("Face"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/face/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 			Tags: map[string]*string{
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AccountsClient) NewListModelsPager added in v0.6.0

func (client *AccountsClient) NewListModelsPager(resourceGroupName string, accountName string, options *AccountsClientListModelsOptions) *runtime.Pager[AccountsClientListModelsResponse]

NewListModelsPager - List available Models for the requested Cognitive Services account

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - AccountsClientListModelsOptions contains the optional parameters for the AccountsClient.NewListModelsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountModels.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountsClient().NewListModelsPager("resourceGroupName", "accountName", 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.AccountModelListResult = armcognitiveservices.AccountModelListResult{
		// 	Value: []*armcognitiveservices.AccountModel{
		// 		{
		// 			Name: to.Ptr("ada.1"),
		// 			Format: to.Ptr("OpenAI"),
		// 			Version: to.Ptr("1"),
		// 			BaseModel: &armcognitiveservices.DeploymentModel{
		// 				Name: to.Ptr("ada"),
		// 				Format: to.Ptr("OpenAI"),
		// 				Version: to.Ptr("1"),
		// 			},
		// 			Capabilities: map[string]*string{
		// 				"fineTune": to.Ptr("true"),
		// 			},
		// 			Deprecation: &armcognitiveservices.ModelDeprecationInfo{
		// 				FineTune: to.Ptr("2024-01-01T00:00:00Z"),
		// 				Inference: to.Ptr("2024-01-01T00:00:00Z"),
		// 			},
		// 			MaxCapacity: to.Ptr[int32](10),
		// 		},
		// 		{
		// 			Name: to.Ptr("davinci"),
		// 			Format: to.Ptr("OpenAI"),
		// 			Version: to.Ptr("1"),
		// 			Capabilities: map[string]*string{
		// 				"fineTune": to.Ptr("true"),
		// 			},
		// 			Deprecation: &armcognitiveservices.ModelDeprecationInfo{
		// 				FineTune: to.Ptr("2024-01-01T00:00:00Z"),
		// 				Inference: to.Ptr("2024-01-01T00:00:00Z"),
		// 			},
		// 			MaxCapacity: to.Ptr[int32](10),
		// 	}},
		// }
	}
}
Output:

func (*AccountsClient) NewListPager added in v0.6.0

NewListPager - Returns all the resources of a particular type belonging to a subscription.

Generated from API version 2023-05-01

  • options - AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListAccountsBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountListResult = armcognitiveservices.AccountListResult{
		// 	Value: []*armcognitiveservices.Account{
		// 		{
		// 			Name: to.Ptr("bingSearch"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/bingSearch"),
		// 			Etag: to.Ptr("W/\"datetime'2017-03-27T11%3A19%3A08.762494Z'\""),
		// 			Kind: to.Ptr("Bing.Search"),
		// 			Location: to.Ptr("global"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://api.cognitive.microsoft.com/bing/v5.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S1"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("CrisProd"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/CrisProd"),
		// 			Etag: to.Ptr("W/\"datetime'2017-03-31T08%3A57%3A07.4499566Z'\""),
		// 			Kind: to.Ptr("CRIS"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/sts/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 			Tags: map[string]*string{
		// 				"can't delete it successfully": to.Ptr("v-yunjin"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("rayrptest0308"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/rayrptest0308"),
		// 			Etag: to.Ptr("W/\"datetime'2017-03-27T11%3A15%3A23.5232645Z'\""),
		// 			Kind: to.Ptr("Face"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/face/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("raytest02"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/raytest02"),
		// 			Etag: to.Ptr("W/\"datetime'2017-04-04T02%3A07%3A07.3957572Z'\""),
		// 			Kind: to.Ptr("Emotion"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/emotion/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AccountsClient) RegenerateKey

func (client *AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters RegenerateKeyParameters, options *AccountsClientRegenerateKeyOptions) (AccountsClientRegenerateKeyResponse, error)

RegenerateKey - Regenerates the specified account key for the specified Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • parameters - regenerate key parameters.
  • options - AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/RegenerateKey.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().RegenerateKey(ctx, "myResourceGroup", "myAccount", armcognitiveservices.RegenerateKeyParameters{
		KeyName: to.Ptr(armcognitiveservices.KeyNameKey2),
	}, 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.APIKeys = armcognitiveservices.APIKeys{
	// 	Key1: to.Ptr("KEY1"),
	// 	Key2: to.Ptr("KEY2"),
	// }
}
Output:

type AccountsClientBeginCreateOptions added in v0.3.0

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

AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.

type AccountsClientBeginDeleteOptions added in v0.3.0

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

AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.

type AccountsClientBeginUpdateOptions added in v0.3.0

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

AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.

type AccountsClientCreateResponse added in v0.3.0

type AccountsClientCreateResponse struct {
	// Cognitive Services account is an Azure resource representing the provisioned account, it's type, location and SKU.
	Account
}

AccountsClientCreateResponse contains the response from method AccountsClient.BeginCreate.

type AccountsClientDeleteResponse added in v0.3.0

type AccountsClientDeleteResponse struct {
}

AccountsClientDeleteResponse contains the response from method AccountsClient.BeginDelete.

type AccountsClientGetOptions added in v0.3.0

type AccountsClientGetOptions struct {
}

AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.

type AccountsClientGetResponse added in v0.3.0

type AccountsClientGetResponse struct {
	// Cognitive Services account is an Azure resource representing the provisioned account, it's type, location and SKU.
	Account
}

AccountsClientGetResponse contains the response from method AccountsClient.Get.

type AccountsClientListByResourceGroupOptions added in v0.3.0

type AccountsClientListByResourceGroupOptions struct {
}

AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.

type AccountsClientListByResourceGroupResponse added in v0.3.0

type AccountsClientListByResourceGroupResponse struct {
	// The list of cognitive services accounts operation response.
	AccountListResult
}

AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.NewListByResourceGroupPager.

type AccountsClientListKeysOptions added in v0.3.0

type AccountsClientListKeysOptions struct {
}

AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method.

type AccountsClientListKeysResponse added in v0.3.0

type AccountsClientListKeysResponse struct {
	// The access keys for the cognitive services account.
	APIKeys
}

AccountsClientListKeysResponse contains the response from method AccountsClient.ListKeys.

type AccountsClientListModelsOptions added in v0.4.0

type AccountsClientListModelsOptions struct {
}

AccountsClientListModelsOptions contains the optional parameters for the AccountsClient.NewListModelsPager method.

type AccountsClientListModelsResponse added in v0.4.0

type AccountsClientListModelsResponse struct {
	// The list of cognitive services accounts operation response.
	AccountModelListResult
}

AccountsClientListModelsResponse contains the response from method AccountsClient.NewListModelsPager.

type AccountsClientListOptions added in v0.3.0

type AccountsClientListOptions struct {
}

AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method.

type AccountsClientListResponse added in v0.3.0

type AccountsClientListResponse struct {
	// The list of cognitive services accounts operation response.
	AccountListResult
}

AccountsClientListResponse contains the response from method AccountsClient.NewListPager.

type AccountsClientListSKUsOptions added in v0.3.0

type AccountsClientListSKUsOptions struct {
}

AccountsClientListSKUsOptions contains the optional parameters for the AccountsClient.ListSKUs method.

type AccountsClientListSKUsResponse added in v0.3.0

type AccountsClientListSKUsResponse struct {
	// The list of cognitive services accounts operation response.
	AccountSKUListResult
}

AccountsClientListSKUsResponse contains the response from method AccountsClient.ListSKUs.

type AccountsClientListUsagesOptions added in v0.3.0

type AccountsClientListUsagesOptions struct {
	// An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of
	// the metric, can have an or of multiple names).
	Filter *string
}

AccountsClientListUsagesOptions contains the optional parameters for the AccountsClient.ListUsages method.

type AccountsClientListUsagesResponse added in v0.3.0

type AccountsClientListUsagesResponse struct {
	// The response to a list usage request.
	UsageListResult
}

AccountsClientListUsagesResponse contains the response from method AccountsClient.ListUsages.

type AccountsClientRegenerateKeyOptions added in v0.3.0

type AccountsClientRegenerateKeyOptions struct {
}

AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method.

type AccountsClientRegenerateKeyResponse added in v0.3.0

type AccountsClientRegenerateKeyResponse struct {
	// The access keys for the cognitive services account.
	APIKeys
}

AccountsClientRegenerateKeyResponse contains the response from method AccountsClient.RegenerateKey.

type AccountsClientUpdateResponse added in v0.3.0

type AccountsClientUpdateResponse struct {
	// Cognitive Services account is an Azure resource representing the provisioned account, it's type, location and SKU.
	Account
}

AccountsClientUpdateResponse contains the response from method AccountsClient.BeginUpdate.

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AzureEntityResource

type AzureEntityResource struct {
	// READ-ONLY; Resource Etag.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AzureEntityResource - The resource model definition for an Azure Resource Manager resource with an etag.

func (AzureEntityResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureEntityResource.

func (*AzureEntityResource) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureEntityResource.

type CallRateLimit

type CallRateLimit struct {
	// The count value of Call Rate Limit.
	Count *float32

	// The renewal period in seconds of Call Rate Limit.
	RenewalPeriod *float32
	Rules         []*ThrottlingRule
}

CallRateLimit - The call rate limit Cognitive Services account.

func (CallRateLimit) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CallRateLimit.

func (*CallRateLimit) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CallRateLimit.

type CapacityConfig added in v1.5.0

type CapacityConfig struct {
	// The default capacity.
	Default *int32

	// The maximum capacity.
	Maximum *int32

	// The minimum capacity.
	Minimum *int32

	// The minimal incremental between allowed values for capacity.
	Step *int32
}

CapacityConfig - The capacity configuration.

func (CapacityConfig) MarshalJSON added in v1.5.0

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

MarshalJSON implements the json.Marshaller interface for type CapacityConfig.

func (*CapacityConfig) UnmarshalJSON added in v1.5.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapacityConfig.

type CheckDomainAvailabilityParameter

type CheckDomainAvailabilityParameter struct {
	// REQUIRED; The subdomain name to use.
	SubdomainName *string

	// REQUIRED; The Type of the resource.
	Type *string

	// The Kind of the resource.
	Kind *string
}

CheckDomainAvailabilityParameter - Check Domain availability parameter.

func (CheckDomainAvailabilityParameter) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CheckDomainAvailabilityParameter.

func (*CheckDomainAvailabilityParameter) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckDomainAvailabilityParameter.

type CheckSKUAvailabilityParameter

type CheckSKUAvailabilityParameter struct {
	// REQUIRED; The Kind of the resource.
	Kind *string

	// REQUIRED; The SKU of the resource.
	SKUs []*string

	// REQUIRED; The Type of the resource.
	Type *string
}

CheckSKUAvailabilityParameter - Check SKU availability parameter.

func (CheckSKUAvailabilityParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckSKUAvailabilityParameter.

func (*CheckSKUAvailabilityParameter) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckSKUAvailabilityParameter.

type ClientFactory added in v1.4.0

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

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

func NewClientFactory added in v1.4.0

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

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

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAccountsClient added in v1.4.0

func (c *ClientFactory) NewAccountsClient() *AccountsClient

NewAccountsClient creates a new instance of AccountsClient.

func (*ClientFactory) NewCommitmentPlansClient added in v1.4.0

func (c *ClientFactory) NewCommitmentPlansClient() *CommitmentPlansClient

NewCommitmentPlansClient creates a new instance of CommitmentPlansClient.

func (*ClientFactory) NewCommitmentTiersClient added in v1.4.0

func (c *ClientFactory) NewCommitmentTiersClient() *CommitmentTiersClient

NewCommitmentTiersClient creates a new instance of CommitmentTiersClient.

func (*ClientFactory) NewDeletedAccountsClient added in v1.4.0

func (c *ClientFactory) NewDeletedAccountsClient() *DeletedAccountsClient

NewDeletedAccountsClient creates a new instance of DeletedAccountsClient.

func (*ClientFactory) NewDeploymentsClient added in v1.4.0

func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient

NewDeploymentsClient creates a new instance of DeploymentsClient.

func (*ClientFactory) NewManagementClient added in v1.4.0

func (c *ClientFactory) NewManagementClient() *ManagementClient

NewManagementClient creates a new instance of ManagementClient.

func (*ClientFactory) NewModelsClient added in v1.5.0

func (c *ClientFactory) NewModelsClient() *ModelsClient

NewModelsClient creates a new instance of ModelsClient.

func (*ClientFactory) NewOperationsClient added in v1.4.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.4.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.4.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewResourceSKUsClient added in v1.4.0

func (c *ClientFactory) NewResourceSKUsClient() *ResourceSKUsClient

NewResourceSKUsClient creates a new instance of ResourceSKUsClient.

func (*ClientFactory) NewUsagesClient added in v1.5.0

func (c *ClientFactory) NewUsagesClient() *UsagesClient

NewUsagesClient creates a new instance of UsagesClient.

type CommitmentCost added in v0.3.0

type CommitmentCost struct {
	// Commitment meter Id.
	CommitmentMeterID *string

	// Overage meter Id.
	OverageMeterID *string
}

CommitmentCost - Cognitive Services account commitment cost.

func (CommitmentCost) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentCost.

func (*CommitmentCost) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentCost.

type CommitmentPeriod added in v0.3.0

type CommitmentPeriod struct {
	// Commitment period commitment count.
	Count *int32

	// Commitment period commitment tier.
	Tier *string

	// READ-ONLY; Commitment period end date.
	EndDate *string

	// READ-ONLY; Cognitive Services account commitment quota.
	Quota *CommitmentQuota

	// READ-ONLY; Commitment period start date.
	StartDate *string
}

CommitmentPeriod - Cognitive Services account commitment period.

func (CommitmentPeriod) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentPeriod.

func (*CommitmentPeriod) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPeriod.

type CommitmentPlan added in v0.3.0

type CommitmentPlan struct {
	// The Kind of the resource.
	Kind *string

	// The geo-location where the resource lives
	Location *string

	// Properties of Cognitive Services account commitment plan.
	Properties *CommitmentPlanProperties

	// The resource model definition representing SKU
	SKU *SKU

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

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CommitmentPlan - Cognitive Services account commitment plan.

func (CommitmentPlan) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentPlan.

func (*CommitmentPlan) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPlan.

type CommitmentPlanAccountAssociation added in v1.3.0

type CommitmentPlanAccountAssociation struct {
	// Properties of Cognitive Services account commitment plan association.
	Properties *CommitmentPlanAccountAssociationProperties

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CommitmentPlanAccountAssociation - The commitment plan association.

func (CommitmentPlanAccountAssociation) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentPlanAccountAssociation.

func (*CommitmentPlanAccountAssociation) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPlanAccountAssociation.

type CommitmentPlanAccountAssociationListResult added in v1.3.0

type CommitmentPlanAccountAssociationListResult struct {
	// The link used to get the next page of Commitment Plan Account Association.
	NextLink *string

	// READ-ONLY; Gets the list of Cognitive Services Commitment Plan Account Association and their properties.
	Value []*CommitmentPlanAccountAssociation
}

CommitmentPlanAccountAssociationListResult - The list of cognitive services Commitment Plan Account Association operation response.

func (CommitmentPlanAccountAssociationListResult) MarshalJSON added in v1.3.0

MarshalJSON implements the json.Marshaller interface for type CommitmentPlanAccountAssociationListResult.

func (*CommitmentPlanAccountAssociationListResult) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPlanAccountAssociationListResult.

type CommitmentPlanAccountAssociationProperties added in v1.3.0

type CommitmentPlanAccountAssociationProperties struct {
	// The Azure resource id of the account.
	AccountID *string
}

CommitmentPlanAccountAssociationProperties - The commitment plan account association properties.

func (CommitmentPlanAccountAssociationProperties) MarshalJSON added in v1.3.0

MarshalJSON implements the json.Marshaller interface for type CommitmentPlanAccountAssociationProperties.

func (*CommitmentPlanAccountAssociationProperties) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPlanAccountAssociationProperties.

type CommitmentPlanAssociation added in v1.3.0

type CommitmentPlanAssociation struct {
	// The Azure resource id of the commitment plan.
	CommitmentPlanID *string

	// The location of of the commitment plan.
	CommitmentPlanLocation *string
}

CommitmentPlanAssociation - The commitment plan association.

func (CommitmentPlanAssociation) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentPlanAssociation.

func (*CommitmentPlanAssociation) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPlanAssociation.

type CommitmentPlanListResult added in v0.3.0

type CommitmentPlanListResult struct {
	// The link used to get the next page of CommitmentPlan.
	NextLink *string

	// READ-ONLY; Gets the list of Cognitive Services accounts CommitmentPlan and their properties.
	Value []*CommitmentPlan
}

CommitmentPlanListResult - The list of cognitive services accounts operation response.

func (CommitmentPlanListResult) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentPlanListResult.

func (*CommitmentPlanListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPlanListResult.

type CommitmentPlanProperties added in v0.3.0

type CommitmentPlanProperties struct {
	// AutoRenew commitment plan.
	AutoRenew *bool

	// Commitment plan guid.
	CommitmentPlanGUID *string

	// Cognitive Services account commitment period.
	Current *CommitmentPeriod

	// Account hosting model.
	HostingModel *HostingModel

	// Cognitive Services account commitment period.
	Next *CommitmentPeriod

	// Commitment plan type.
	PlanType *string

	// READ-ONLY; Cognitive Services account commitment period.
	Last *CommitmentPeriod

	// READ-ONLY; The list of ProvisioningIssue.
	ProvisioningIssues []*string

	// READ-ONLY; Gets the status of the resource at the time the operation was called.
	ProvisioningState *CommitmentPlanProvisioningState
}

CommitmentPlanProperties - Properties of Cognitive Services account commitment plan.

func (CommitmentPlanProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentPlanProperties.

func (*CommitmentPlanProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentPlanProperties.

type CommitmentPlanProvisioningState added in v1.3.0

type CommitmentPlanProvisioningState string

CommitmentPlanProvisioningState - Gets the status of the resource at the time the operation was called.

const (
	CommitmentPlanProvisioningStateAccepted  CommitmentPlanProvisioningState = "Accepted"
	CommitmentPlanProvisioningStateCanceled  CommitmentPlanProvisioningState = "Canceled"
	CommitmentPlanProvisioningStateCreating  CommitmentPlanProvisioningState = "Creating"
	CommitmentPlanProvisioningStateDeleting  CommitmentPlanProvisioningState = "Deleting"
	CommitmentPlanProvisioningStateFailed    CommitmentPlanProvisioningState = "Failed"
	CommitmentPlanProvisioningStateMoving    CommitmentPlanProvisioningState = "Moving"
	CommitmentPlanProvisioningStateSucceeded CommitmentPlanProvisioningState = "Succeeded"
)

func PossibleCommitmentPlanProvisioningStateValues added in v1.3.0

func PossibleCommitmentPlanProvisioningStateValues() []CommitmentPlanProvisioningState

PossibleCommitmentPlanProvisioningStateValues returns the possible values for the CommitmentPlanProvisioningState const type.

type CommitmentPlansClient added in v0.3.0

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

CommitmentPlansClient contains the methods for the CommitmentPlans group. Don't use this type directly, use NewCommitmentPlansClient() instead.

func NewCommitmentPlansClient added in v0.3.0

func NewCommitmentPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommitmentPlansClient, error)

NewCommitmentPlansClient creates a new instance of CommitmentPlansClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CommitmentPlansClient) BeginCreateOrUpdateAssociation added in v1.3.0

func (client *CommitmentPlansClient) BeginCreateOrUpdateAssociation(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlanAssociationName string, association CommitmentPlanAccountAssociation, options *CommitmentPlansClientBeginCreateOrUpdateAssociationOptions) (*runtime.Poller[CommitmentPlansClientCreateOrUpdateAssociationResponse], error)

BeginCreateOrUpdateAssociation - Create or update the association of the Cognitive Services commitment plan. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • commitmentPlanAssociationName - The name of the commitment plan association with the Cognitive Services Account
  • association - The commitmentPlan properties.
  • options - CommitmentPlansClientBeginCreateOrUpdateAssociationOptions contains the optional parameters for the CommitmentPlansClient.BeginCreateOrUpdateAssociation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlanAssociation.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommitmentPlansClient().BeginCreateOrUpdateAssociation(ctx, "resourceGroupName", "commitmentPlanName", "commitmentPlanAssociationName", armcognitiveservices.CommitmentPlanAccountAssociation{
		Properties: &armcognitiveservices.CommitmentPlanAccountAssociationProperties{
			AccountID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName"),
		},
	}, 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.CommitmentPlanAccountAssociation = armcognitiveservices.CommitmentPlanAccountAssociation{
	// 	Name: to.Ptr("commitmentPlanAssociationName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans/accountAssociations"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName/accountAssociations/commitmentPlanAssociationName"),
	// 	Properties: &armcognitiveservices.CommitmentPlanAccountAssociationProperties{
	// 		AccountID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName"),
	// 	},
	// }
}
Output:

func (*CommitmentPlansClient) BeginCreateOrUpdatePlan added in v1.3.0

func (client *CommitmentPlansClient) BeginCreateOrUpdatePlan(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlan CommitmentPlan, options *CommitmentPlansClientBeginCreateOrUpdatePlanOptions) (*runtime.Poller[CommitmentPlansClientCreateOrUpdatePlanResponse], error)

BeginCreateOrUpdatePlan - Create Cognitive Services commitment plan. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • commitmentPlan - The parameters to provide for the created commitment plan.
  • options - CommitmentPlansClientBeginCreateOrUpdatePlanOptions contains the optional parameters for the CommitmentPlansClient.BeginCreateOrUpdatePlan method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CreateSharedCommitmentPlan.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommitmentPlansClient().BeginCreateOrUpdatePlan(ctx, "resourceGroupName", "commitmentPlanName", armcognitiveservices.CommitmentPlan{
		Kind:     to.Ptr("SpeechServices"),
		Location: to.Ptr("West US"),
		Properties: &armcognitiveservices.CommitmentPlanProperties{
			AutoRenew: to.Ptr(true),
			Current: &armcognitiveservices.CommitmentPeriod{
				Tier: to.Ptr("T1"),
			},
			HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
			PlanType:     to.Ptr("STT"),
		},
		SKU: &armcognitiveservices.SKU{
			Name: to.Ptr("S0"),
		},
	}, 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.CommitmentPlan = armcognitiveservices.CommitmentPlan{
	// 	Name: to.Ptr("commitmentPlanName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName"),
	// 	Kind: to.Ptr("SpeechServices"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armcognitiveservices.CommitmentPlanProperties{
	// 		AutoRenew: to.Ptr(true),
	// 		Current: &armcognitiveservices.CommitmentPeriod{
	// 			Tier: to.Ptr("T1"),
	// 		},
	// 		HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
	// 		PlanType: to.Ptr("STT"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.CommitmentPlanProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("S0"),
	// 	},
	// }
}
Output:

func (*CommitmentPlansClient) BeginDelete added in v0.3.0

func (client *CommitmentPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, commitmentPlanName string, options *CommitmentPlansClientBeginDeleteOptions) (*runtime.Poller[CommitmentPlansClientDeleteResponse], error)

BeginDelete - Deletes the specified commitmentPlan associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • options - CommitmentPlansClientBeginDeleteOptions contains the optional parameters for the CommitmentPlansClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteCommitmentPlan.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommitmentPlansClient().BeginDelete(ctx, "resourceGroupName", "accountName", "commitmentPlanName", 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 (*CommitmentPlansClient) BeginDeleteAssociation added in v1.3.0

func (client *CommitmentPlansClient) BeginDeleteAssociation(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlanAssociationName string, options *CommitmentPlansClientBeginDeleteAssociationOptions) (*runtime.Poller[CommitmentPlansClientDeleteAssociationResponse], error)

BeginDeleteAssociation - Deletes the association of the Cognitive Services commitment plan. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • commitmentPlanAssociationName - The name of the commitment plan association with the Cognitive Services Account
  • options - CommitmentPlansClientBeginDeleteAssociationOptions contains the optional parameters for the CommitmentPlansClient.BeginDeleteAssociation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlanAssociation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommitmentPlansClient().BeginDeleteAssociation(ctx, "resourceGroupName", "commitmentPlanName", "commitmentPlanAssociationName", 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 (*CommitmentPlansClient) BeginDeletePlan added in v1.3.0

func (client *CommitmentPlansClient) BeginDeletePlan(ctx context.Context, resourceGroupName string, commitmentPlanName string, options *CommitmentPlansClientBeginDeletePlanOptions) (*runtime.Poller[CommitmentPlansClientDeletePlanResponse], error)

BeginDeletePlan - Deletes a Cognitive Services commitment plan from the resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • options - CommitmentPlansClientBeginDeletePlanOptions contains the optional parameters for the CommitmentPlansClient.BeginDeletePlan method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteSharedCommitmentPlan.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommitmentPlansClient().BeginDeletePlan(ctx, "resourceGroupName", "commitmentPlanName", 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 (*CommitmentPlansClient) BeginUpdatePlan added in v1.3.0

func (client *CommitmentPlansClient) BeginUpdatePlan(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlan PatchResourceTagsAndSKU, options *CommitmentPlansClientBeginUpdatePlanOptions) (*runtime.Poller[CommitmentPlansClientUpdatePlanResponse], error)

BeginUpdatePlan - Create Cognitive Services commitment plan. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • commitmentPlan - The parameters to provide for the created commitment plan.
  • options - CommitmentPlansClientBeginUpdatePlanOptions contains the optional parameters for the CommitmentPlansClient.BeginUpdatePlan method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/UpdateSharedCommitmentPlan.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommitmentPlansClient().BeginUpdatePlan(ctx, "resourceGroupName", "commitmentPlanName", armcognitiveservices.PatchResourceTagsAndSKU{
		Tags: map[string]*string{
			"name": to.Ptr("value"),
		},
	}, 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.CommitmentPlan = armcognitiveservices.CommitmentPlan{
	// 	Name: to.Ptr("commitmentPlanName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName"),
	// 	Kind: to.Ptr("SpeechServices"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armcognitiveservices.CommitmentPlanProperties{
	// 		AutoRenew: to.Ptr(true),
	// 		Current: &armcognitiveservices.CommitmentPeriod{
	// 			Tier: to.Ptr("T1"),
	// 		},
	// 		HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
	// 		PlanType: to.Ptr("STT"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.CommitmentPlanProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("S0"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"name": to.Ptr("value"),
	// 	},
	// }
}
Output:

func (*CommitmentPlansClient) CreateOrUpdate added in v0.3.0

func (client *CommitmentPlansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, commitmentPlanName string, commitmentPlan CommitmentPlan, options *CommitmentPlansClientCreateOrUpdateOptions) (CommitmentPlansClientCreateOrUpdateResponse, error)

CreateOrUpdate - Update the state of specified commitmentPlans associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • commitmentPlan - The commitmentPlan properties.
  • options - CommitmentPlansClientCreateOrUpdateOptions contains the optional parameters for the CommitmentPlansClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutCommitmentPlan.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCommitmentPlansClient().CreateOrUpdate(ctx, "resourceGroupName", "accountName", "commitmentPlanName", armcognitiveservices.CommitmentPlan{
		Properties: &armcognitiveservices.CommitmentPlanProperties{
			AutoRenew: to.Ptr(true),
			Current: &armcognitiveservices.CommitmentPeriod{
				Tier: to.Ptr("T1"),
			},
			HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
			PlanType:     to.Ptr("Speech2Text"),
		},
	}, 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.CommitmentPlan = armcognitiveservices.CommitmentPlan{
	// 	Name: to.Ptr("commitmentPlanName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts/commitmentPlans"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/commitmentPlans/commitmentPlanName"),
	// 	Properties: &armcognitiveservices.CommitmentPlanProperties{
	// 		AutoRenew: to.Ptr(true),
	// 		Current: &armcognitiveservices.CommitmentPeriod{
	// 			Tier: to.Ptr("T1"),
	// 		},
	// 		HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
	// 		PlanType: to.Ptr("Speech2Text"),
	// 	},
	// }
}
Output:

func (*CommitmentPlansClient) Get added in v0.3.0

func (client *CommitmentPlansClient) Get(ctx context.Context, resourceGroupName string, accountName string, commitmentPlanName string, options *CommitmentPlansClientGetOptions) (CommitmentPlansClientGetResponse, error)

Get - Gets the specified commitmentPlans associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • options - CommitmentPlansClientGetOptions contains the optional parameters for the CommitmentPlansClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetCommitmentPlan.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCommitmentPlansClient().Get(ctx, "resourceGroupName", "accountName", "commitmentPlanName", 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.CommitmentPlan = armcognitiveservices.CommitmentPlan{
	// 	Name: to.Ptr("commitmentPlanName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts/commitmentPlans"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/commitmentPlans/commitmentPlanName"),
	// 	Properties: &armcognitiveservices.CommitmentPlanProperties{
	// 		AutoRenew: to.Ptr(true),
	// 		Current: &armcognitiveservices.CommitmentPeriod{
	// 			Tier: to.Ptr("T1"),
	// 		},
	// 		HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
	// 		PlanType: to.Ptr("Speech2Text"),
	// 	},
	// }
}
Output:

func (*CommitmentPlansClient) GetAssociation added in v1.3.0

func (client *CommitmentPlansClient) GetAssociation(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentPlanAssociationName string, options *CommitmentPlansClientGetAssociationOptions) (CommitmentPlansClientGetAssociationResponse, error)

GetAssociation - Gets the association of the Cognitive Services commitment plan. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • commitmentPlanAssociationName - The name of the commitment plan association with the Cognitive Services Account
  • options - CommitmentPlansClientGetAssociationOptions contains the optional parameters for the CommitmentPlansClient.GetAssociation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlanAssociation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCommitmentPlansClient().GetAssociation(ctx, "resourceGroupName", "commitmentPlanName", "commitmentPlanAssociationName", 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.CommitmentPlanAccountAssociation = armcognitiveservices.CommitmentPlanAccountAssociation{
	// 	Name: to.Ptr("commitmentPlanAssociationName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans/accountAssociations"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName/accountAssociations/commitmentPlanAssociationName"),
	// 	Properties: &armcognitiveservices.CommitmentPlanAccountAssociationProperties{
	// 		AccountID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName"),
	// 	},
	// }
}
Output:

func (*CommitmentPlansClient) GetPlan added in v1.3.0

func (client *CommitmentPlansClient) GetPlan(ctx context.Context, resourceGroupName string, commitmentPlanName string, options *CommitmentPlansClientGetPlanOptions) (CommitmentPlansClientGetPlanResponse, error)

GetPlan - Returns a Cognitive Services commitment plan specified by the parameters. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • options - CommitmentPlansClientGetPlanOptions contains the optional parameters for the CommitmentPlansClient.GetPlan method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSharedCommitmentPlan.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCommitmentPlansClient().GetPlan(ctx, "resourceGroupName", "commitmentPlanName", 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.CommitmentPlan = armcognitiveservices.CommitmentPlan{
	// 	Name: to.Ptr("commitmentPlanName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName"),
	// 	Kind: to.Ptr("SpeechServices"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armcognitiveservices.CommitmentPlanProperties{
	// 		AutoRenew: to.Ptr(true),
	// 		Current: &armcognitiveservices.CommitmentPeriod{
	// 			Tier: to.Ptr("T1"),
	// 		},
	// 		HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
	// 		PlanType: to.Ptr("STT"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.CommitmentPlanProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("S0"),
	// 	},
	// }
}
Output:

func (*CommitmentPlansClient) NewListAssociationsPager added in v1.3.0

func (client *CommitmentPlansClient) NewListAssociationsPager(resourceGroupName string, commitmentPlanName string, options *CommitmentPlansClientListAssociationsOptions) *runtime.Pager[CommitmentPlansClientListAssociationsResponse]

NewListAssociationsPager - Gets the associations of the Cognitive Services commitment plan.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • commitmentPlanName - The name of the commitmentPlan associated with the Cognitive Services Account
  • options - CommitmentPlansClientListAssociationsOptions contains the optional parameters for the CommitmentPlansClient.NewListAssociationsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlanAssociations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCommitmentPlansClient().NewListAssociationsPager("resourceGroupName", "commitmentPlanName", 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.CommitmentPlanAccountAssociationListResult = armcognitiveservices.CommitmentPlanAccountAssociationListResult{
		// 	Value: []*armcognitiveservices.CommitmentPlanAccountAssociation{
		// 		{
		// 			Name: to.Ptr("accountAssociationName"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans/accountAssociations"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName/accountAssociations/accountAssociationName"),
		// 			Properties: &armcognitiveservices.CommitmentPlanAccountAssociationProperties{
		// 				AccountID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*CommitmentPlansClient) NewListPager added in v0.6.0

func (client *CommitmentPlansClient) NewListPager(resourceGroupName string, accountName string, options *CommitmentPlansClientListOptions) *runtime.Pager[CommitmentPlansClientListResponse]

NewListPager - Gets the commitmentPlans associated with the Cognitive Services account.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - CommitmentPlansClientListOptions contains the optional parameters for the CommitmentPlansClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentPlans.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCommitmentPlansClient().NewListPager("resourceGroupName", "accountName", 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.CommitmentPlanListResult = armcognitiveservices.CommitmentPlanListResult{
		// 	Value: []*armcognitiveservices.CommitmentPlan{
		// 		{
		// 			Name: to.Ptr("commitmentPlanName"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts/commitmentPlans"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/commitmentPlans/commitmentPlanName"),
		// 			Properties: &armcognitiveservices.CommitmentPlanProperties{
		// 				AutoRenew: to.Ptr(true),
		// 				Current: &armcognitiveservices.CommitmentPeriod{
		// 					Tier: to.Ptr("T1"),
		// 				},
		// 				HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
		// 				PlanType: to.Ptr("Speech2Text"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*CommitmentPlansClient) NewListPlansByResourceGroupPager added in v1.3.0

NewListPlansByResourceGroupPager - Returns all the resources of a particular type belonging to a resource group

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - CommitmentPlansClientListPlansByResourceGroupOptions contains the optional parameters for the CommitmentPlansClient.NewListPlansByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCommitmentPlansClient().NewListPlansByResourceGroupPager("resourceGroupName", 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.CommitmentPlanListResult = armcognitiveservices.CommitmentPlanListResult{
		// 	Value: []*armcognitiveservices.CommitmentPlan{
		// 		{
		// 			Name: to.Ptr("commitmentPlanName"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName"),
		// 			Kind: to.Ptr("SpeechServices"),
		// 			Location: to.Ptr("West US"),
		// 			Properties: &armcognitiveservices.CommitmentPlanProperties{
		// 				AutoRenew: to.Ptr(true),
		// 				Current: &armcognitiveservices.CommitmentPeriod{
		// 					Tier: to.Ptr("T1"),
		// 				},
		// 				HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
		// 				PlanType: to.Ptr("STT"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.CommitmentPlanProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*CommitmentPlansClient) NewListPlansBySubscriptionPager added in v1.3.0

NewListPlansBySubscriptionPager - Returns all the resources of a particular type belonging to a subscription.

Generated from API version 2023-05-01

  • options - CommitmentPlansClientListPlansBySubscriptionOptions contains the optional parameters for the CommitmentPlansClient.NewListPlansBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListSharedCommitmentPlansBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCommitmentPlansClient().NewListPlansBySubscriptionPager(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.CommitmentPlanListResult = armcognitiveservices.CommitmentPlanListResult{
		// 	Value: []*armcognitiveservices.CommitmentPlan{
		// 		{
		// 			Name: to.Ptr("commitmentPlanName"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/commitmentPlans"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/commitmentPlans/commitmentPlanName"),
		// 			Kind: to.Ptr("SpeechServices"),
		// 			Location: to.Ptr("West US"),
		// 			Properties: &armcognitiveservices.CommitmentPlanProperties{
		// 				AutoRenew: to.Ptr(true),
		// 				Current: &armcognitiveservices.CommitmentPeriod{
		// 					Tier: to.Ptr("T1"),
		// 				},
		// 				HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
		// 				PlanType: to.Ptr("STT"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.CommitmentPlanProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CommitmentPlansClientBeginCreateOrUpdateAssociationOptions added in v1.3.0

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

CommitmentPlansClientBeginCreateOrUpdateAssociationOptions contains the optional parameters for the CommitmentPlansClient.BeginCreateOrUpdateAssociation method.

type CommitmentPlansClientBeginCreateOrUpdatePlanOptions added in v1.3.0

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

CommitmentPlansClientBeginCreateOrUpdatePlanOptions contains the optional parameters for the CommitmentPlansClient.BeginCreateOrUpdatePlan method.

type CommitmentPlansClientBeginDeleteAssociationOptions added in v1.3.0

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

CommitmentPlansClientBeginDeleteAssociationOptions contains the optional parameters for the CommitmentPlansClient.BeginDeleteAssociation method.

type CommitmentPlansClientBeginDeleteOptions added in v0.3.0

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

CommitmentPlansClientBeginDeleteOptions contains the optional parameters for the CommitmentPlansClient.BeginDelete method.

type CommitmentPlansClientBeginDeletePlanOptions added in v1.3.0

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

CommitmentPlansClientBeginDeletePlanOptions contains the optional parameters for the CommitmentPlansClient.BeginDeletePlan method.

type CommitmentPlansClientBeginUpdatePlanOptions added in v1.3.0

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

CommitmentPlansClientBeginUpdatePlanOptions contains the optional parameters for the CommitmentPlansClient.BeginUpdatePlan method.

type CommitmentPlansClientCreateOrUpdateAssociationResponse added in v1.3.0

type CommitmentPlansClientCreateOrUpdateAssociationResponse struct {
	// The commitment plan association.
	CommitmentPlanAccountAssociation
}

CommitmentPlansClientCreateOrUpdateAssociationResponse contains the response from method CommitmentPlansClient.BeginCreateOrUpdateAssociation.

type CommitmentPlansClientCreateOrUpdateOptions added in v0.3.0

type CommitmentPlansClientCreateOrUpdateOptions struct {
}

CommitmentPlansClientCreateOrUpdateOptions contains the optional parameters for the CommitmentPlansClient.CreateOrUpdate method.

type CommitmentPlansClientCreateOrUpdatePlanResponse added in v1.3.0

type CommitmentPlansClientCreateOrUpdatePlanResponse struct {
	// Cognitive Services account commitment plan.
	CommitmentPlan
}

CommitmentPlansClientCreateOrUpdatePlanResponse contains the response from method CommitmentPlansClient.BeginCreateOrUpdatePlan.

type CommitmentPlansClientCreateOrUpdateResponse added in v0.3.0

type CommitmentPlansClientCreateOrUpdateResponse struct {
	// Cognitive Services account commitment plan.
	CommitmentPlan
}

CommitmentPlansClientCreateOrUpdateResponse contains the response from method CommitmentPlansClient.CreateOrUpdate.

type CommitmentPlansClientDeleteAssociationResponse added in v1.3.0

type CommitmentPlansClientDeleteAssociationResponse struct {
}

CommitmentPlansClientDeleteAssociationResponse contains the response from method CommitmentPlansClient.BeginDeleteAssociation.

type CommitmentPlansClientDeletePlanResponse added in v1.3.0

type CommitmentPlansClientDeletePlanResponse struct {
}

CommitmentPlansClientDeletePlanResponse contains the response from method CommitmentPlansClient.BeginDeletePlan.

type CommitmentPlansClientDeleteResponse added in v0.3.0

type CommitmentPlansClientDeleteResponse struct {
}

CommitmentPlansClientDeleteResponse contains the response from method CommitmentPlansClient.BeginDelete.

type CommitmentPlansClientGetAssociationOptions added in v1.3.0

type CommitmentPlansClientGetAssociationOptions struct {
}

CommitmentPlansClientGetAssociationOptions contains the optional parameters for the CommitmentPlansClient.GetAssociation method.

type CommitmentPlansClientGetAssociationResponse added in v1.3.0

type CommitmentPlansClientGetAssociationResponse struct {
	// The commitment plan association.
	CommitmentPlanAccountAssociation
}

CommitmentPlansClientGetAssociationResponse contains the response from method CommitmentPlansClient.GetAssociation.

type CommitmentPlansClientGetOptions added in v0.3.0

type CommitmentPlansClientGetOptions struct {
}

CommitmentPlansClientGetOptions contains the optional parameters for the CommitmentPlansClient.Get method.

type CommitmentPlansClientGetPlanOptions added in v1.3.0

type CommitmentPlansClientGetPlanOptions struct {
}

CommitmentPlansClientGetPlanOptions contains the optional parameters for the CommitmentPlansClient.GetPlan method.

type CommitmentPlansClientGetPlanResponse added in v1.3.0

type CommitmentPlansClientGetPlanResponse struct {
	// Cognitive Services account commitment plan.
	CommitmentPlan
}

CommitmentPlansClientGetPlanResponse contains the response from method CommitmentPlansClient.GetPlan.

type CommitmentPlansClientGetResponse added in v0.3.0

type CommitmentPlansClientGetResponse struct {
	// Cognitive Services account commitment plan.
	CommitmentPlan
}

CommitmentPlansClientGetResponse contains the response from method CommitmentPlansClient.Get.

type CommitmentPlansClientListAssociationsOptions added in v1.3.0

type CommitmentPlansClientListAssociationsOptions struct {
}

CommitmentPlansClientListAssociationsOptions contains the optional parameters for the CommitmentPlansClient.NewListAssociationsPager method.

type CommitmentPlansClientListAssociationsResponse added in v1.3.0

type CommitmentPlansClientListAssociationsResponse struct {
	// The list of cognitive services Commitment Plan Account Association operation response.
	CommitmentPlanAccountAssociationListResult
}

CommitmentPlansClientListAssociationsResponse contains the response from method CommitmentPlansClient.NewListAssociationsPager.

type CommitmentPlansClientListOptions added in v0.3.0

type CommitmentPlansClientListOptions struct {
}

CommitmentPlansClientListOptions contains the optional parameters for the CommitmentPlansClient.NewListPager method.

type CommitmentPlansClientListPlansByResourceGroupOptions added in v1.3.0

type CommitmentPlansClientListPlansByResourceGroupOptions struct {
}

CommitmentPlansClientListPlansByResourceGroupOptions contains the optional parameters for the CommitmentPlansClient.NewListPlansByResourceGroupPager method.

type CommitmentPlansClientListPlansByResourceGroupResponse added in v1.3.0

type CommitmentPlansClientListPlansByResourceGroupResponse struct {
	// The list of cognitive services accounts operation response.
	CommitmentPlanListResult
}

CommitmentPlansClientListPlansByResourceGroupResponse contains the response from method CommitmentPlansClient.NewListPlansByResourceGroupPager.

type CommitmentPlansClientListPlansBySubscriptionOptions added in v1.3.0

type CommitmentPlansClientListPlansBySubscriptionOptions struct {
}

CommitmentPlansClientListPlansBySubscriptionOptions contains the optional parameters for the CommitmentPlansClient.NewListPlansBySubscriptionPager method.

type CommitmentPlansClientListPlansBySubscriptionResponse added in v1.3.0

type CommitmentPlansClientListPlansBySubscriptionResponse struct {
	// The list of cognitive services accounts operation response.
	CommitmentPlanListResult
}

CommitmentPlansClientListPlansBySubscriptionResponse contains the response from method CommitmentPlansClient.NewListPlansBySubscriptionPager.

type CommitmentPlansClientListResponse added in v0.3.0

type CommitmentPlansClientListResponse struct {
	// The list of cognitive services accounts operation response.
	CommitmentPlanListResult
}

CommitmentPlansClientListResponse contains the response from method CommitmentPlansClient.NewListPager.

type CommitmentPlansClientUpdatePlanResponse added in v1.3.0

type CommitmentPlansClientUpdatePlanResponse struct {
	// Cognitive Services account commitment plan.
	CommitmentPlan
}

CommitmentPlansClientUpdatePlanResponse contains the response from method CommitmentPlansClient.BeginUpdatePlan.

type CommitmentQuota added in v0.3.0

type CommitmentQuota struct {
	// Commitment quota quantity.
	Quantity *int64

	// Commitment quota unit.
	Unit *string
}

CommitmentQuota - Cognitive Services account commitment quota.

func (CommitmentQuota) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentQuota.

func (*CommitmentQuota) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentQuota.

type CommitmentTier added in v0.3.0

type CommitmentTier struct {
	// Cognitive Services account commitment cost.
	Cost *CommitmentCost

	// Account hosting model.
	HostingModel *HostingModel

	// The Kind of the resource.
	Kind *string

	// Commitment period commitment max count.
	MaxCount *int32

	// Commitment plan type.
	PlanType *string

	// Cognitive Services account commitment quota.
	Quota *CommitmentQuota

	// The name of the SKU. Ex - P3. It is typically a letter+number code
	SKUName *string

	// Commitment period commitment tier.
	Tier *string
}

CommitmentTier - Cognitive Services account commitment tier.

func (CommitmentTier) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentTier.

func (*CommitmentTier) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentTier.

type CommitmentTierListResult added in v0.3.0

type CommitmentTierListResult struct {
	// The link used to get the next page of CommitmentTier.
	NextLink *string

	// READ-ONLY; Gets the list of Cognitive Services accounts CommitmentTier and their properties.
	Value []*CommitmentTier
}

CommitmentTierListResult - The list of cognitive services accounts operation response.

func (CommitmentTierListResult) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type CommitmentTierListResult.

func (*CommitmentTierListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommitmentTierListResult.

type CommitmentTiersClient added in v0.3.0

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

CommitmentTiersClient contains the methods for the CommitmentTiers group. Don't use this type directly, use NewCommitmentTiersClient() instead.

func NewCommitmentTiersClient added in v0.3.0

func NewCommitmentTiersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommitmentTiersClient, error)

NewCommitmentTiersClient creates a new instance of CommitmentTiersClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CommitmentTiersClient) NewListPager added in v0.6.0

NewListPager - List Commitment Tiers.

Generated from API version 2023-05-01

  • location - Resource location.
  • options - CommitmentTiersClientListOptions contains the optional parameters for the CommitmentTiersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListCommitmentTiers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCommitmentTiersClient().NewListPager("location", 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.CommitmentTierListResult = armcognitiveservices.CommitmentTierListResult{
		// 	Value: []*armcognitiveservices.CommitmentTier{
		// 		{
		// 			Cost: &armcognitiveservices.CommitmentCost{
		// 			},
		// 			HostingModel: to.Ptr(armcognitiveservices.HostingModelWeb),
		// 			Kind: to.Ptr("TextAnalytics"),
		// 			PlanType: to.Ptr("TA"),
		// 			Quota: &armcognitiveservices.CommitmentQuota{
		// 				Quantity: to.Ptr[int64](1000000),
		// 				Unit: to.Ptr("Transaction"),
		// 			},
		// 			SKUName: to.Ptr("S"),
		// 			Tier: to.Ptr("T1"),
		// 	}},
		// }
	}
}
Output:

type CommitmentTiersClientListOptions added in v0.3.0

type CommitmentTiersClientListOptions struct {
}

CommitmentTiersClientListOptions contains the optional parameters for the CommitmentTiersClient.NewListPager method.

type CommitmentTiersClientListResponse added in v0.3.0

type CommitmentTiersClientListResponse struct {
	// The list of cognitive services accounts operation response.
	CommitmentTierListResult
}

CommitmentTiersClientListResponse contains the response from method CommitmentTiersClient.NewListPager.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DeletedAccountsClient

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

DeletedAccountsClient contains the methods for the DeletedAccounts group. Don't use this type directly, use NewDeletedAccountsClient() instead.

func NewDeletedAccountsClient

func NewDeletedAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedAccountsClient, error)

NewDeletedAccountsClient creates a new instance of DeletedAccountsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DeletedAccountsClient) BeginPurge

func (client *DeletedAccountsClient) BeginPurge(ctx context.Context, location string, resourceGroupName string, accountName string, options *DeletedAccountsClientBeginPurgeOptions) (*runtime.Poller[DeletedAccountsClientPurgeResponse], error)

BeginPurge - Deletes a Cognitive Services account from the resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • location - Resource location.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - DeletedAccountsClientBeginPurgeOptions contains the optional parameters for the DeletedAccountsClient.BeginPurge method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PurgeDeletedAccount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeletedAccountsClient().BeginPurge(ctx, "westus", "myResourceGroup", "PropTest01", 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 (*DeletedAccountsClient) Get

func (client *DeletedAccountsClient) Get(ctx context.Context, location string, resourceGroupName string, accountName string, options *DeletedAccountsClientGetOptions) (DeletedAccountsClientGetResponse, error)

Get - Returns a Cognitive Services account specified by the parameters. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • location - Resource location.
  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeletedAccount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDeletedAccountsClient().Get(ctx, "westus", "myResourceGroup", "myAccount", 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.Account = armcognitiveservices.Account{
	// 	Name: to.Ptr("myAccount"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CognitiveServices/locations/westus/resourceGroups/myResourceGroup/deletedAccounts/myAccount"),
	// 	Etag: to.Ptr("W/\"datetime'2017-04-10T04%3A42%3A19.7067387Z'\""),
	// 	Kind: to.Ptr("Emotion"),
	// 	Location: to.Ptr("westus"),
	// 	Properties: &armcognitiveservices.AccountProperties{
	// 		Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/emotion/v1.0"),
	// 		ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("F0"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"ExpiredDate": to.Ptr("2017/09/01"),
	// 		"Owner": to.Ptr("felixwa"),
	// 	},
	// }
}
Output:

func (*DeletedAccountsClient) NewListPager added in v0.6.0

NewListPager - Returns all the resources of a particular type belonging to a subscription.

Generated from API version 2023-05-01

  • options - DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeletedAccountsBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDeletedAccountsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountListResult = armcognitiveservices.AccountListResult{
		// 	Value: []*armcognitiveservices.Account{
		// 		{
		// 			Name: to.Ptr("bingSearch"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/bingSearch"),
		// 			Etag: to.Ptr("W/\"datetime'2017-03-27T11%3A19%3A08.762494Z'\""),
		// 			Kind: to.Ptr("Bing.Search"),
		// 			Location: to.Ptr("global"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://api.cognitive.microsoft.com/bing/v5.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S1"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("CrisProd"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/CrisProd"),
		// 			Etag: to.Ptr("W/\"datetime'2017-03-31T08%3A57%3A07.4499566Z'\""),
		// 			Kind: to.Ptr("CRIS"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/sts/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 			Tags: map[string]*string{
		// 				"can't delete it successfully": to.Ptr("v-yunjin"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("rayrptest0308"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/rayrptest0308"),
		// 			Etag: to.Ptr("W/\"datetime'2017-03-27T11%3A15%3A23.5232645Z'\""),
		// 			Kind: to.Ptr("Face"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/face/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("raytest02"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/raytest02"),
		// 			Etag: to.Ptr("W/\"datetime'2017-04-04T02%3A07%3A07.3957572Z'\""),
		// 			Kind: to.Ptr("Emotion"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armcognitiveservices.AccountProperties{
		// 				Endpoint: to.Ptr("https://westus.api.cognitive.microsoft.com/emotion/v1.0"),
		// 				ProvisioningState: to.Ptr(armcognitiveservices.ProvisioningStateSucceeded),
		// 			},
		// 			SKU: &armcognitiveservices.SKU{
		// 				Name: to.Ptr("S0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type DeletedAccountsClientBeginPurgeOptions added in v0.3.0

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

DeletedAccountsClientBeginPurgeOptions contains the optional parameters for the DeletedAccountsClient.BeginPurge method.

type DeletedAccountsClientGetOptions added in v0.3.0

type DeletedAccountsClientGetOptions struct {
}

DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method.

type DeletedAccountsClientGetResponse added in v0.3.0

type DeletedAccountsClientGetResponse struct {
	// Cognitive Services account is an Azure resource representing the provisioned account, it's type, location and SKU.
	Account
}

DeletedAccountsClientGetResponse contains the response from method DeletedAccountsClient.Get.

type DeletedAccountsClientListOptions added in v0.3.0

type DeletedAccountsClientListOptions struct {
}

DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method.

type DeletedAccountsClientListResponse added in v0.3.0

type DeletedAccountsClientListResponse struct {
	// The list of cognitive services accounts operation response.
	AccountListResult
}

DeletedAccountsClientListResponse contains the response from method DeletedAccountsClient.NewListPager.

type DeletedAccountsClientPurgeResponse added in v0.3.0

type DeletedAccountsClientPurgeResponse struct {
}

DeletedAccountsClientPurgeResponse contains the response from method DeletedAccountsClient.BeginPurge.

type Deployment added in v0.3.0

type Deployment struct {
	// Properties of Cognitive Services account deployment.
	Properties *DeploymentProperties

	// The resource model definition representing SKU
	SKU *SKU

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Deployment - Cognitive Services account deployment.

func (Deployment) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type Deployment.

func (*Deployment) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Deployment.

type DeploymentListResult added in v0.3.0

type DeploymentListResult struct {
	// The link used to get the next page of Deployment.
	NextLink *string

	// READ-ONLY; Gets the list of Cognitive Services accounts Deployment and their properties.
	Value []*Deployment
}

DeploymentListResult - The list of cognitive services accounts operation response.

func (DeploymentListResult) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type DeploymentListResult.

func (*DeploymentListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentListResult.

type DeploymentModel added in v0.3.0

type DeploymentModel struct {
	// Deployment model format.
	Format *string

	// Deployment model name.
	Name *string

	// Optional. Deployment model source ARM resource ID.
	Source *string

	// Optional. Deployment model version. If version is not specified, a default version will be assigned. The default version
	// is different for different models and might change when there is new version
	// available for a model. Default version for a model could be found from list models API.
	Version *string

	// READ-ONLY; The call rate limit Cognitive Services account.
	CallRateLimit *CallRateLimit
}

DeploymentModel - Properties of Cognitive Services account deployment model.

func (DeploymentModel) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type DeploymentModel.

func (*DeploymentModel) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentModel.

type DeploymentModelVersionUpgradeOption added in v1.5.0

type DeploymentModelVersionUpgradeOption string

DeploymentModelVersionUpgradeOption - Deployment model version upgrade option.

const (
	DeploymentModelVersionUpgradeOptionNoAutoUpgrade                  DeploymentModelVersionUpgradeOption = "NoAutoUpgrade"
	DeploymentModelVersionUpgradeOptionOnceCurrentVersionExpired      DeploymentModelVersionUpgradeOption = "OnceCurrentVersionExpired"
	DeploymentModelVersionUpgradeOptionOnceNewDefaultVersionAvailable DeploymentModelVersionUpgradeOption = "OnceNewDefaultVersionAvailable"
)

func PossibleDeploymentModelVersionUpgradeOptionValues added in v1.5.0

func PossibleDeploymentModelVersionUpgradeOptionValues() []DeploymentModelVersionUpgradeOption

PossibleDeploymentModelVersionUpgradeOptionValues returns the possible values for the DeploymentModelVersionUpgradeOption const type.

type DeploymentProperties added in v0.3.0

type DeploymentProperties struct {
	// Properties of Cognitive Services account deployment model.
	Model *DeploymentModel

	// The name of RAI policy.
	RaiPolicyName *string

	// Properties of Cognitive Services account deployment model.
	ScaleSettings *DeploymentScaleSettings

	// Deployment model version upgrade option.
	VersionUpgradeOption *DeploymentModelVersionUpgradeOption

	// READ-ONLY; The call rate limit Cognitive Services account.
	CallRateLimit *CallRateLimit

	// READ-ONLY; The capabilities.
	Capabilities map[string]*string

	// READ-ONLY; Gets the status of the resource at the time the operation was called.
	ProvisioningState *DeploymentProvisioningState

	// READ-ONLY
	RateLimits []*ThrottlingRule
}

DeploymentProperties - Properties of Cognitive Services account deployment.

func (DeploymentProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type DeploymentProperties.

func (*DeploymentProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentProperties.

type DeploymentProvisioningState added in v0.3.0

type DeploymentProvisioningState string

DeploymentProvisioningState - Gets the status of the resource at the time the operation was called.

const (
	DeploymentProvisioningStateAccepted  DeploymentProvisioningState = "Accepted"
	DeploymentProvisioningStateCanceled  DeploymentProvisioningState = "Canceled"
	DeploymentProvisioningStateCreating  DeploymentProvisioningState = "Creating"
	DeploymentProvisioningStateDeleting  DeploymentProvisioningState = "Deleting"
	DeploymentProvisioningStateDisabled  DeploymentProvisioningState = "Disabled"
	DeploymentProvisioningStateFailed    DeploymentProvisioningState = "Failed"
	DeploymentProvisioningStateMoving    DeploymentProvisioningState = "Moving"
	DeploymentProvisioningStateSucceeded DeploymentProvisioningState = "Succeeded"
)

func PossibleDeploymentProvisioningStateValues added in v0.3.0

func PossibleDeploymentProvisioningStateValues() []DeploymentProvisioningState

PossibleDeploymentProvisioningStateValues returns the possible values for the DeploymentProvisioningState const type.

type DeploymentScaleSettings added in v0.3.0

type DeploymentScaleSettings struct {
	// Deployment capacity.
	Capacity *int32

	// Deployment scale type.
	ScaleType *DeploymentScaleType

	// READ-ONLY; Deployment active capacity. This value might be different from capacity if customer recently updated capacity.
	ActiveCapacity *int32
}

DeploymentScaleSettings - Properties of Cognitive Services account deployment model.

func (DeploymentScaleSettings) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type DeploymentScaleSettings.

func (*DeploymentScaleSettings) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentScaleSettings.

type DeploymentScaleType added in v0.3.0

type DeploymentScaleType string

DeploymentScaleType - Deployment scale type.

const (
	DeploymentScaleTypeManual   DeploymentScaleType = "Manual"
	DeploymentScaleTypeStandard DeploymentScaleType = "Standard"
)

func PossibleDeploymentScaleTypeValues added in v0.3.0

func PossibleDeploymentScaleTypeValues() []DeploymentScaleType

PossibleDeploymentScaleTypeValues returns the possible values for the DeploymentScaleType const type.

type DeploymentsClient added in v0.3.0

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

DeploymentsClient contains the methods for the Deployments group. Don't use this type directly, use NewDeploymentsClient() instead.

func NewDeploymentsClient added in v0.3.0

func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error)

NewDeploymentsClient creates a new instance of DeploymentsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DeploymentsClient) BeginCreateOrUpdate added in v0.3.0

func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, deployment Deployment, options *DeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Update the state of specified deployments associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • deploymentName - The name of the deployment associated with the Cognitive Services Account
  • deployment - The deployment properties.
  • options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutDeployment.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginCreateOrUpdate(ctx, "resourceGroupName", "accountName", "deploymentName", armcognitiveservices.Deployment{
		Properties: &armcognitiveservices.DeploymentProperties{
			Model: &armcognitiveservices.DeploymentModel{
				Name:    to.Ptr("ada"),
				Format:  to.Ptr("OpenAI"),
				Version: to.Ptr("1"),
			},
		},
		SKU: &armcognitiveservices.SKU{
			Name:     to.Ptr("Standard"),
			Capacity: to.Ptr[int32](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Deployment = armcognitiveservices.Deployment{
	// 	Name: to.Ptr("deploymentName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts/deployments"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/deployments/deploymentName"),
	// 	Properties: &armcognitiveservices.DeploymentProperties{
	// 		Model: &armcognitiveservices.DeploymentModel{
	// 			Name: to.Ptr("ada"),
	// 			Format: to.Ptr("OpenAI"),
	// 			Version: to.Ptr("1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armcognitiveservices.DeploymentProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armcognitiveservices.SKU{
	// 		Name: to.Ptr("Standard"),
	// 		Capacity: to.Ptr[int32](1),
	// 	},
	// }
}
Output:

func (*DeploymentsClient) BeginDelete added in v0.3.0

func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*runtime.Poller[DeploymentsClientDeleteResponse], error)

BeginDelete - Deletes the specified deployment associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • deploymentName - The name of the deployment associated with the Cognitive Services Account
  • options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeleteDeployment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginDelete(ctx, "resourceGroupName", "accountName", "deploymentName", 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 (*DeploymentsClient) Get added in v0.3.0

func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, accountName string, deploymentName string, options *DeploymentsClientGetOptions) (DeploymentsClientGetResponse, error)

Get - Gets the specified deployments associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • deploymentName - The name of the deployment associated with the Cognitive Services Account
  • options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetDeployment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDeploymentsClient().Get(ctx, "resourceGroupName", "accountName", "deploymentName", 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.Deployment = armcognitiveservices.Deployment{
	// 	Name: to.Ptr("deploymentName"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts/deployments"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/deployments/deploymentName"),
	// 	Properties: &armcognitiveservices.DeploymentProperties{
	// 		Model: &armcognitiveservices.DeploymentModel{
	// 			Name: to.Ptr("ada"),
	// 			Format: to.Ptr("OpenAI"),
	// 			Version: to.Ptr("1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armcognitiveservices.DeploymentProvisioningStateSucceeded),
	// 		ScaleSettings: &armcognitiveservices.DeploymentScaleSettings{
	// 			Capacity: to.Ptr[int32](1),
	// 			ScaleType: to.Ptr(armcognitiveservices.DeploymentScaleTypeManual),
	// 		},
	// 	},
	// }
}
Output:

func (*DeploymentsClient) NewListPager added in v0.6.0

func (client *DeploymentsClient) NewListPager(resourceGroupName string, accountName string, options *DeploymentsClientListOptions) *runtime.Pager[DeploymentsClientListResponse]

NewListPager - Gets the deployments associated with the Cognitive Services account.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListDeployments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDeploymentsClient().NewListPager("resourceGroupName", "accountName", 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.DeploymentListResult = armcognitiveservices.DeploymentListResult{
		// 	Value: []*armcognitiveservices.Deployment{
		// 		{
		// 			Name: to.Ptr("deploymentName"),
		// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts/deployments"),
		// 			ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/deployments/deploymentName"),
		// 			Properties: &armcognitiveservices.DeploymentProperties{
		// 				Model: &armcognitiveservices.DeploymentModel{
		// 					Name: to.Ptr("ada"),
		// 					Format: to.Ptr("OpenAI"),
		// 					Version: to.Ptr("1"),
		// 				},
		// 				ProvisioningState: to.Ptr(armcognitiveservices.DeploymentProvisioningStateSucceeded),
		// 				ScaleSettings: &armcognitiveservices.DeploymentScaleSettings{
		// 					Capacity: to.Ptr[int32](1),
		// 					ScaleType: to.Ptr(armcognitiveservices.DeploymentScaleTypeManual),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type DeploymentsClientBeginCreateOrUpdateOptions added in v0.3.0

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

DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate method.

type DeploymentsClientBeginDeleteOptions added in v0.3.0

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

DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method.

type DeploymentsClientCreateOrUpdateResponse added in v0.3.0

type DeploymentsClientCreateOrUpdateResponse struct {
	// Cognitive Services account deployment.
	Deployment
}

DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate.

type DeploymentsClientDeleteResponse added in v0.3.0

type DeploymentsClientDeleteResponse struct {
}

DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.BeginDelete.

type DeploymentsClientGetOptions added in v0.3.0

type DeploymentsClientGetOptions struct {
}

DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method.

type DeploymentsClientGetResponse added in v0.3.0

type DeploymentsClientGetResponse struct {
	// Cognitive Services account deployment.
	Deployment
}

DeploymentsClientGetResponse contains the response from method DeploymentsClient.Get.

type DeploymentsClientListOptions added in v0.3.0

type DeploymentsClientListOptions struct {
}

DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method.

type DeploymentsClientListResponse added in v0.3.0

type DeploymentsClientListResponse struct {
	// The list of cognitive services accounts operation response.
	DeploymentListResult
}

DeploymentsClientListResponse contains the response from method DeploymentsClient.NewListPager.

type DomainAvailability

type DomainAvailability struct {
	// Indicates the given SKU is available or not.
	IsSubdomainAvailable *bool

	// The Kind of the resource.
	Kind *string

	// Reason why the SKU is not available.
	Reason *string

	// The subdomain name to use.
	SubdomainName *string

	// The Type of the resource.
	Type *string
}

DomainAvailability - Domain availability.

func (DomainAvailability) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type DomainAvailability.

func (*DomainAvailability) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DomainAvailability.

type Encryption

type Encryption struct {
	// Enumerates the possible value of keySource for Encryption
	KeySource *KeySource

	// Properties of KeyVault
	KeyVaultProperties *KeyVaultProperties
}

Encryption - Properties to configure Encryption

func (Encryption) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type Encryption.

func (*Encryption) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Encryption.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

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

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

func (ErrorResponse) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type HostingModel added in v0.3.0

type HostingModel string

HostingModel - Account hosting model.

const (
	HostingModelConnectedContainer    HostingModel = "ConnectedContainer"
	HostingModelDisconnectedContainer HostingModel = "DisconnectedContainer"
	HostingModelProvisionedWeb        HostingModel = "ProvisionedWeb"
	HostingModelWeb                   HostingModel = "Web"
)

func PossibleHostingModelValues added in v0.3.0

func PossibleHostingModelValues() []HostingModel

PossibleHostingModelValues returns the possible values for the HostingModel const type.

type IPRule

type IPRule struct {
	// REQUIRED; An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses
	// that start with 124.56.78).
	Value *string
}

IPRule - A rule governing the accessibility from a specific ip address or ip range.

func (IPRule) MarshalJSON added in v1.2.0

func (i IPRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPRule.

func (*IPRule) UnmarshalJSON added in v1.2.0

func (i *IPRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IPRule.

type Identity

type Identity struct {
	// The identity type.
	Type *ResourceIdentityType

	// The list of user assigned identities associated with the resource. The user identity dictionary key references will be
	// ARM resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

Identity for the resource.

func (Identity) MarshalJSON

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v1.2.0

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type KeyName

type KeyName string

KeyName - key name to generate (Key1|Key2)

const (
	KeyNameKey1 KeyName = "Key1"
	KeyNameKey2 KeyName = "Key2"
)

func PossibleKeyNameValues

func PossibleKeyNameValues() []KeyName

PossibleKeyNameValues returns the possible values for the KeyName const type.

type KeySource

type KeySource string

KeySource - Enumerates the possible value of keySource for Encryption

const (
	KeySourceMicrosoftCognitiveServices KeySource = "Microsoft.CognitiveServices"
	KeySourceMicrosoftKeyVault          KeySource = "Microsoft.KeyVault"
)

func PossibleKeySourceValues

func PossibleKeySourceValues() []KeySource

PossibleKeySourceValues returns the possible values for the KeySource const type.

type KeyVaultProperties

type KeyVaultProperties struct {
	IdentityClientID *string

	// Name of the Key from KeyVault
	KeyName *string

	// Uri of KeyVault
	KeyVaultURI *string

	// Version of the Key from KeyVault
	KeyVersion *string
}

KeyVaultProperties - Properties to configure keyVault Properties

func (KeyVaultProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.

func (*KeyVaultProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.

type ManagementClient added in v0.3.0

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

ManagementClient contains the methods for the CognitiveServicesManagementClient group. Don't use this type directly, use NewManagementClient() instead.

func NewManagementClient added in v0.3.0

func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error)

NewManagementClient creates a new instance of ManagementClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ManagementClient) CheckDomainAvailability added in v0.3.0

CheckDomainAvailability - Check whether a domain is available. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • parameters - Check Domain Availability parameter.
  • options - ManagementClientCheckDomainAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDomainAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckDomainAvailability.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagementClient().CheckDomainAvailability(ctx, armcognitiveservices.CheckDomainAvailabilityParameter{
		Type:          to.Ptr("Microsoft.CognitiveServices/accounts"),
		SubdomainName: to.Ptr("contosodemoapp1"),
	}, 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.DomainAvailability = armcognitiveservices.DomainAvailability{
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 	IsSubdomainAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Sub domain name 'contosodemoapp1' is not valid"),
	// 	SubdomainName: to.Ptr("contosodemoapp1"),
	// }
}
Output:

func (*ManagementClient) CheckSKUAvailability added in v0.3.0

CheckSKUAvailability - Check available SKUs. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • location - Resource location.
  • parameters - Check SKU Availability POST body.
  • options - ManagementClientCheckSKUAvailabilityOptions contains the optional parameters for the ManagementClient.CheckSKUAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/CheckSkuAvailability.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagementClient().CheckSKUAvailability(ctx, "westus", armcognitiveservices.CheckSKUAvailabilityParameter{
		Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
		Kind: to.Ptr("Face"),
		SKUs: []*string{
			to.Ptr("S0")},
	}, 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.SKUAvailabilityListResult = armcognitiveservices.SKUAvailabilityListResult{
	// 	Value: []*armcognitiveservices.SKUAvailability{
	// 		{
	// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts"),
	// 			Kind: to.Ptr("Face"),
	// 			SKUAvailable: to.Ptr(true),
	// 			SKUName: to.Ptr("S0"),
	// 	}},
	// }
}
Output:

type ManagementClientCheckDomainAvailabilityOptions added in v0.3.0

type ManagementClientCheckDomainAvailabilityOptions struct {
}

ManagementClientCheckDomainAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDomainAvailability method.

type ManagementClientCheckDomainAvailabilityResponse added in v0.3.0

type ManagementClientCheckDomainAvailabilityResponse struct {
	// Domain availability.
	DomainAvailability
}

ManagementClientCheckDomainAvailabilityResponse contains the response from method ManagementClient.CheckDomainAvailability.

type ManagementClientCheckSKUAvailabilityOptions added in v0.3.0

type ManagementClientCheckSKUAvailabilityOptions struct {
}

ManagementClientCheckSKUAvailabilityOptions contains the optional parameters for the ManagementClient.CheckSKUAvailability method.

type ManagementClientCheckSKUAvailabilityResponse added in v0.3.0

type ManagementClientCheckSKUAvailabilityResponse struct {
	// Check SKU availability result list.
	SKUAvailabilityListResult
}

ManagementClientCheckSKUAvailabilityResponse contains the response from method ManagementClient.CheckSKUAvailability.

type MetricName

type MetricName struct {
	// The friendly name of the metric.
	LocalizedValue *string

	// The name of the metric.
	Value *string
}

MetricName - A metric name.

func (MetricName) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type MetricName.

func (*MetricName) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricName.

type Model added in v1.5.0

type Model struct {
	// The Kind of the Model.
	Kind *string

	// Model Metadata.
	Model *AccountModel

	// The SKU of the Model.
	SKUName *string
}

Model - Cognitive Services Model.

func (Model) MarshalJSON added in v1.5.0

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

MarshalJSON implements the json.Marshaller interface for type Model.

func (*Model) UnmarshalJSON added in v1.5.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Model.

type ModelDeprecationInfo added in v0.4.0

type ModelDeprecationInfo struct {
	// The datetime of deprecation of the fineTune Model.
	FineTune *string

	// The datetime of deprecation of the inference Model.
	Inference *string
}

ModelDeprecationInfo - Cognitive Services account ModelDeprecationInfo.

func (ModelDeprecationInfo) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ModelDeprecationInfo.

func (*ModelDeprecationInfo) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ModelDeprecationInfo.

type ModelLifecycleStatus added in v1.3.0

type ModelLifecycleStatus string

ModelLifecycleStatus - Model lifecycle status.

const (
	ModelLifecycleStatusGenerallyAvailable ModelLifecycleStatus = "GenerallyAvailable"
	ModelLifecycleStatusPreview            ModelLifecycleStatus = "Preview"
)

func PossibleModelLifecycleStatusValues added in v1.3.0

func PossibleModelLifecycleStatusValues() []ModelLifecycleStatus

PossibleModelLifecycleStatusValues returns the possible values for the ModelLifecycleStatus const type.

type ModelListResult added in v1.5.0

type ModelListResult struct {
	// The link used to get the next page of Model.
	NextLink *string

	// Gets the list of Cognitive Services accounts Model and their properties.
	Value []*Model
}

ModelListResult - The list of cognitive services models.

func (ModelListResult) MarshalJSON added in v1.5.0

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

MarshalJSON implements the json.Marshaller interface for type ModelListResult.

func (*ModelListResult) UnmarshalJSON added in v1.5.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ModelListResult.

type ModelSKU added in v1.5.0

type ModelSKU struct {
	// The capacity configuration.
	Capacity *CapacityConfig

	// The datetime of deprecation of the model SKU.
	DeprecationDate *time.Time

	// The name of the model SKU.
	Name *string

	// The list of rateLimit.
	RateLimits []*CallRateLimit

	// The usage name of the model SKU.
	UsageName *string
}

ModelSKU - Describes an available Cognitive Services Model SKU.

func (ModelSKU) MarshalJSON added in v1.5.0

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

MarshalJSON implements the json.Marshaller interface for type ModelSKU.

func (*ModelSKU) UnmarshalJSON added in v1.5.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ModelSKU.

type ModelsClient added in v1.5.0

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

ModelsClient contains the methods for the Models group. Don't use this type directly, use NewModelsClient() instead.

func NewModelsClient added in v1.5.0

func NewModelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ModelsClient, error)

NewModelsClient creates a new instance of ModelsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ModelsClient) NewListPager added in v1.5.0

func (client *ModelsClient) NewListPager(location string, options *ModelsClientListOptions) *runtime.Pager[ModelsClientListResponse]

NewListPager - List Models.

Generated from API version 2023-05-01

  • location - Resource location.
  • options - ModelsClientListOptions contains the optional parameters for the ModelsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListModels.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewModelsClient().NewListPager("WestUS", 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.ModelListResult = armcognitiveservices.ModelListResult{
		// 	Value: []*armcognitiveservices.Model{
		// 		{
		// 			Kind: to.Ptr("OpenAI"),
		// 			Model: &armcognitiveservices.AccountModel{
		// 				Name: to.Ptr("ada"),
		// 				Format: to.Ptr("OpenAI"),
		// 				Version: to.Ptr("1"),
		// 				Capabilities: map[string]*string{
		// 					"FineTuneTokensMaxValue": to.Ptr("37500000"),
		// 					"completion": to.Ptr("true"),
		// 					"fineTune": to.Ptr("true"),
		// 					"inference": to.Ptr("false"),
		// 					"scaleType": to.Ptr("Manual"),
		// 					"search": to.Ptr("true"),
		// 				},
		// 				Deprecation: &armcognitiveservices.ModelDeprecationInfo{
		// 					FineTune: to.Ptr("2024-01-01T00:00:00Z"),
		// 					Inference: to.Ptr("2024-01-01T00:00:00Z"),
		// 				},
		// 				FinetuneCapabilities: map[string]*string{
		// 					"FineTuneTokensMaxValue": to.Ptr("37500000"),
		// 					"completion": to.Ptr("true"),
		// 					"fineTune": to.Ptr("true"),
		// 					"inference": to.Ptr("false"),
		// 					"scaleType": to.Ptr("Manual,Standard"),
		// 					"search": to.Ptr("true"),
		// 				},
		// 				LifecycleStatus: to.Ptr(armcognitiveservices.ModelLifecycleStatusPreview),
		// 				MaxCapacity: to.Ptr[int32](3),
		// 				SKUs: []*armcognitiveservices.ModelSKU{
		// 					{
		// 						Name: to.Ptr("provisioned"),
		// 						Capacity: &armcognitiveservices.CapacityConfig{
		// 							Default: to.Ptr[int32](100),
		// 							Maximum: to.Ptr[int32](1000),
		// 							Minimum: to.Ptr[int32](100),
		// 							Step: to.Ptr[int32](100),
		// 						},
		// 						UsageName: to.Ptr("OpenAI.Provisioned.Class1"),
		// 				}},
		// 				SystemData: &armcognitiveservices.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-07T00:00:00.000Z"); return t}()),
		// 					CreatedBy: to.Ptr("Microsoft"),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-07T00:00:00.000Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("Microsoft"),
		// 				},
		// 			},
		// 			SKUName: to.Ptr("S0"),
		// 	}},
		// }
	}
}
Output:

type ModelsClientListOptions added in v1.5.0

type ModelsClientListOptions struct {
}

ModelsClientListOptions contains the optional parameters for the ModelsClient.NewListPager method.

type ModelsClientListResponse added in v1.5.0

type ModelsClientListResponse struct {
	// The list of cognitive services models.
	ModelListResult
}

ModelsClientListResponse contains the response from method ModelsClient.NewListPager.

type MultiRegionSettings added in v1.3.0

type MultiRegionSettings struct {
	Regions []*RegionSetting

	// Multiregion routing methods.
	RoutingMethod *RoutingMethods
}

MultiRegionSettings - The multiregion settings Cognitive Services account.

func (MultiRegionSettings) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type MultiRegionSettings.

func (*MultiRegionSettings) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MultiRegionSettings.

type NetworkRuleAction

type NetworkRuleAction string

NetworkRuleAction - The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.

const (
	NetworkRuleActionAllow NetworkRuleAction = "Allow"
	NetworkRuleActionDeny  NetworkRuleAction = "Deny"
)

func PossibleNetworkRuleActionValues

func PossibleNetworkRuleActionValues() []NetworkRuleAction

PossibleNetworkRuleActionValues returns the possible values for the NetworkRuleAction const type.

type NetworkRuleSet

type NetworkRuleSet struct {
	// The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property
	// has been evaluated.
	DefaultAction *NetworkRuleAction

	// The list of IP address rules.
	IPRules []*IPRule

	// The list of virtual network rules.
	VirtualNetworkRules []*VirtualNetworkRule
}

NetworkRuleSet - A set of rules governing the network accessibility.

func (NetworkRuleSet) MarshalJSON

func (n NetworkRuleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet.

func (*NetworkRuleSet) UnmarshalJSON added in v1.2.0

func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON added in v1.2.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.2.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON added in v1.2.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.2.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v1.2.0

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

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

func (*OperationsClient) NewListPager added in v0.6.0

NewListPager - Lists all the available Cognitive Services account operations.

Generated from API version 2023-05-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armcognitiveservices.OperationListResult{
		// 	Value: []*armcognitiveservices.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.CognitiveServices/accounts/read"),
		// 			Display: &armcognitiveservices.OperationDisplay{
		// 				Description: to.Ptr("Reads API accounts."),
		// 				Operation: to.Ptr("Read API Account"),
		// 				Provider: to.Ptr("Microsoft Cognitive Services"),
		// 				Resource: to.Ptr("Cognitive Services API Account"),
		// 			},
		// 			Origin: to.Ptr(armcognitiveservices.OriginUserSystem),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CognitiveServices/accounts/write"),
		// 			Display: &armcognitiveservices.OperationDisplay{
		// 				Description: to.Ptr("Writes API Accounts."),
		// 				Operation: to.Ptr("Write API Account"),
		// 				Provider: to.Ptr("Microsoft Cognitive Services"),
		// 				Resource: to.Ptr("Cognitive Services API Account"),
		// 			},
		// 			Origin: to.Ptr(armcognitiveservices.OriginUserSystem),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CognitiveServices/accounts/delete"),
		// 			Display: &armcognitiveservices.OperationDisplay{
		// 				Description: to.Ptr("Deletes API accounts"),
		// 				Operation: to.Ptr("Delete API Account"),
		// 				Provider: to.Ptr("Microsoft Cognitive Services"),
		// 				Resource: to.Ptr("Cognitive Services API Account"),
		// 			},
		// 			Origin: to.Ptr(armcognitiveservices.OriginUserSystem),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PatchResourceTags added in v1.3.0

type PatchResourceTags struct {
	// Resource tags.
	Tags map[string]*string
}

PatchResourceTags - The object being used to update tags of a resource, in general used for PATCH operations.

func (PatchResourceTags) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type PatchResourceTags.

func (*PatchResourceTags) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PatchResourceTags.

type PatchResourceTagsAndSKU added in v1.3.0

type PatchResourceTagsAndSKU struct {
	// The resource model definition representing SKU
	SKU *SKU

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

PatchResourceTagsAndSKU - The object being used to update tags and sku of a resource, in general used for PATCH operations.

func (PatchResourceTagsAndSKU) MarshalJSON added in v1.3.0

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

MarshalJSON implements the json.Marshaller interface for type PatchResourceTagsAndSKU.

func (*PatchResourceTagsAndSKU) UnmarshalJSON added in v1.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PatchResourceTagsAndSKU.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string
}

PrivateEndpoint - The Private Endpoint resource.

func (PrivateEndpoint) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// The location of the private endpoint connection
	Location *string

	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

func (PrivateEndpointConnection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - A list of private endpoint connections

func (PrivateEndpointConnectionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The private link resource group ids.
	GroupIDs []*string

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient

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

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Update the state of specified private endpoint connection associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Cognitive Services Account
  • properties - The private endpoint connection properties.
  • options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/PutPrivateEndpointConnection.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "res7687", "sto9699", "{privateEndpointConnectionName}", armcognitiveservices.PrivateEndpointConnection{
		Properties: &armcognitiveservices.PrivateEndpointConnectionProperties{
			PrivateLinkServiceConnectionState: &armcognitiveservices.PrivateLinkServiceConnectionState{
				Description: to.Ptr("Auto-Approved"),
				Status:      to.Ptr(armcognitiveservices.PrivateEndpointServiceConnectionStatusApproved),
			},
		},
	}, 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.PrivateEndpointConnection = armcognitiveservices.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.CognitiveServices/accounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	Properties: &armcognitiveservices.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armcognitiveservices.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armcognitiveservices.PrivateLinkServiceConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			ActionsRequired: to.Ptr("None"),
	// 			Status: to.Ptr(armcognitiveservices.PrivateEndpointServiceConnectionStatusApproved),
	// 		},
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Deletes the specified private endpoint connection associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Cognitive Services Account
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/DeletePrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "res6977", "sto2527", "{privateEndpointConnectionName}", 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 (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets the specified private endpoint connection associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Cognitive Services Account
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetPrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "res6977", "sto2527", "{privateEndpointConnectionName}", 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.PrivateEndpointConnection = armcognitiveservices.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.CognitiveServices/accounts/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.CognitiveServices/accounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	Properties: &armcognitiveservices.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armcognitiveservices.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armcognitiveservices.PrivateLinkServiceConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			ActionsRequired: to.Ptr("None"),
	// 			Status: to.Ptr(armcognitiveservices.PrivateEndpointServiceConnectionStatusApproved),
	// 		},
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) List

List - Gets the private endpoint connections associated with the Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateEndpointConnections.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().List(ctx, "res6977", "sto2527", 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.PrivateEndpointConnectionListResult = armcognitiveservices.PrivateEndpointConnectionListResult{
	// 	Value: []*armcognitiveservices.PrivateEndpointConnection{
	// 		{
	// 			Name: to.Ptr("{privateEndpointConnectionName}"),
	// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.CognitiveServices/accounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 			Properties: &armcognitiveservices.PrivateEndpointConnectionProperties{
	// 				PrivateEndpoint: &armcognitiveservices.PrivateEndpoint{
	// 					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"),
	// 				},
	// 				PrivateLinkServiceConnectionState: &armcognitiveservices.PrivateLinkServiceConnectionState{
	// 					Description: to.Ptr("Auto-Approved"),
	// 					ActionsRequired: to.Ptr("None"),
	// 					Status: to.Ptr(armcognitiveservices.PrivateEndpointServiceConnectionStatusApproved),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions added in v0.3.0

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

PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.3.0

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

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.3.0

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.3.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.3.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.3.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.3.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

type PrivateEndpointConnectionsClientListResponse added in v0.3.0

type PrivateEndpointConnectionsClientListResponse struct {
	// A list of private endpoint connections
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource display name.
	DisplayName *string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

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

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) List

List - Gets the private link resources that need to be created for a Cognitive Services account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • accountName - The name of Cognitive Services account.
  • options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListPrivateLinkResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().List(ctx, "res6977", "sto2527", 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.PrivateLinkResourceListResult = armcognitiveservices.PrivateLinkResourceListResult{
	// 	Value: []*armcognitiveservices.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("blob"),
	// 			Type: to.Ptr("Microsoft.CognitiveServices/accounts/privateLinkResources"),
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.CognitiveServices/accounts/sto2527/privateLinkResources/account"),
	// 			Properties: &armcognitiveservices.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("account"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("default")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.cognitiveservices.azure.com")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientListOptions added in v0.3.0

type PrivateLinkResourcesClientListOptions struct {
}

PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.

type PrivateLinkResourcesClientListResponse added in v0.3.0

type PrivateLinkResourcesClientListResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

func (PrivateLinkServiceConnectionState) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Gets the status of the cognitive services account at the time the operation was called.

const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateMoving       ProvisioningState = "Moving"
	ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource added in v0.3.0

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Whether or not public endpoint access is allowed for this account.

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type QuotaLimit

type QuotaLimit struct {
	Count         *float32
	RenewalPeriod *float32
	Rules         []*ThrottlingRule
}

func (QuotaLimit) MarshalJSON

func (q QuotaLimit) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaLimit.

func (*QuotaLimit) UnmarshalJSON added in v1.2.0

func (q *QuotaLimit) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaLimit.

type QuotaUsageStatus

type QuotaUsageStatus string

QuotaUsageStatus - Cognitive Services account quota usage status.

const (
	QuotaUsageStatusBlocked   QuotaUsageStatus = "Blocked"
	QuotaUsageStatusInOverage QuotaUsageStatus = "InOverage"
	QuotaUsageStatusIncluded  QuotaUsageStatus = "Included"
	QuotaUsageStatusUnknown   QuotaUsageStatus = "Unknown"
)

func PossibleQuotaUsageStatusValues

func PossibleQuotaUsageStatusValues() []QuotaUsageStatus

PossibleQuotaUsageStatusValues returns the possible values for the QuotaUsageStatus const type.

type RegenerateKeyParameters

type RegenerateKeyParameters struct {
	// REQUIRED; key name to generate (Key1|Key2)
	KeyName *KeyName
}

RegenerateKeyParameters - Regenerate key parameters.

func (RegenerateKeyParameters) MarshalJSON added in v1.2.0

func (r RegenerateKeyParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegenerateKeyParameters.

func (*RegenerateKeyParameters) UnmarshalJSON added in v1.2.0

func (r *RegenerateKeyParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateKeyParameters.

type RegionSetting added in v1.3.0

type RegionSetting struct {
	// Maps the region to the regional custom subdomain.
	Customsubdomain *string

	// Name of the region.
	Name *string

	// A value for priority or weighted routing methods.
	Value *float32
}

RegionSetting - The call rate limit Cognitive Services account.

func (RegionSetting) MarshalJSON added in v1.3.0

func (r RegionSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegionSetting.

func (*RegionSetting) UnmarshalJSON added in v1.3.0

func (r *RegionSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegionSetting.

type RequestMatchPattern

type RequestMatchPattern struct {
	Method *string
	Path   *string
}

func (RequestMatchPattern) MarshalJSON added in v1.2.0

func (r RequestMatchPattern) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestMatchPattern.

func (*RequestMatchPattern) UnmarshalJSON added in v1.2.0

func (r *RequestMatchPattern) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestMatchPattern.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.2.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceIdentityType

type ResourceIdentityType string

ResourceIdentityType - The identity type.

const (
	ResourceIdentityTypeNone                       ResourceIdentityType = "None"
	ResourceIdentityTypeSystemAssigned             ResourceIdentityType = "SystemAssigned"
	ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
	ResourceIdentityTypeUserAssigned               ResourceIdentityType = "UserAssigned"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

type ResourceSKU

type ResourceSKU struct {
	// The Kind of resources that are supported in this SKU.
	Kind *string

	// The set of locations that the SKU is available.
	Locations []*string

	// The name of SKU.
	Name *string

	// The type of resource the SKU applies to.
	ResourceType *string

	// The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
	Restrictions []*ResourceSKURestrictions

	// Specifies the tier of Cognitive Services account.
	Tier *string
}

ResourceSKU - Describes an available Cognitive Services SKU.

func (ResourceSKU) MarshalJSON

func (r ResourceSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON added in v1.2.0

func (r *ResourceSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type ResourceSKUListResult

type ResourceSKUListResult struct {
	// REQUIRED; The list of skus available for the subscription.
	Value []*ResourceSKU

	// The uri to fetch the next page of Skus.
	NextLink *string
}

ResourceSKUListResult - The Get Skus operation response.

func (ResourceSKUListResult) MarshalJSON

func (r ResourceSKUListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKUListResult.

func (*ResourceSKUListResult) UnmarshalJSON added in v1.2.0

func (r *ResourceSKUListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUListResult.

type ResourceSKURestrictionInfo

type ResourceSKURestrictionInfo struct {
	// Locations where the SKU is restricted
	Locations []*string

	// List of availability zones where the SKU is restricted.
	Zones []*string
}

func (ResourceSKURestrictionInfo) MarshalJSON

func (r ResourceSKURestrictionInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo.

func (*ResourceSKURestrictionInfo) UnmarshalJSON added in v1.2.0

func (r *ResourceSKURestrictionInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictionInfo.

type ResourceSKURestrictions

type ResourceSKURestrictions struct {
	// The reason for restriction.
	ReasonCode *ResourceSKURestrictionsReasonCode

	// The information about the restriction where the SKU cannot be used.
	RestrictionInfo *ResourceSKURestrictionInfo

	// The type of restrictions.
	Type *ResourceSKURestrictionsType

	// The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU
	// is restricted.
	Values []*string
}

ResourceSKURestrictions - Describes restrictions of a SKU.

func (ResourceSKURestrictions) MarshalJSON

func (r ResourceSKURestrictions) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions.

func (*ResourceSKURestrictions) UnmarshalJSON added in v1.2.0

func (r *ResourceSKURestrictions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictions.

type ResourceSKURestrictionsReasonCode

type ResourceSKURestrictionsReasonCode string

ResourceSKURestrictionsReasonCode - The reason for restriction.

const (
	ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription"
	ResourceSKURestrictionsReasonCodeQuotaID                     ResourceSKURestrictionsReasonCode = "QuotaId"
)

func PossibleResourceSKURestrictionsReasonCodeValues

func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode

PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type.

type ResourceSKURestrictionsType

type ResourceSKURestrictionsType string

ResourceSKURestrictionsType - The type of restrictions.

const (
	ResourceSKURestrictionsTypeLocation ResourceSKURestrictionsType = "Location"
	ResourceSKURestrictionsTypeZone     ResourceSKURestrictionsType = "Zone"
)

func PossibleResourceSKURestrictionsTypeValues

func PossibleResourceSKURestrictionsTypeValues() []ResourceSKURestrictionsType

PossibleResourceSKURestrictionsTypeValues returns the possible values for the ResourceSKURestrictionsType const type.

type ResourceSKUsClient

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

ResourceSKUsClient contains the methods for the ResourceSKUs group. Don't use this type directly, use NewResourceSKUsClient() instead.

func NewResourceSKUsClient

func NewResourceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceSKUsClient, error)

NewResourceSKUsClient creates a new instance of ResourceSKUsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ResourceSKUsClient) NewListPager added in v0.6.0

NewListPager - Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription.

Generated from API version 2023-05-01

  • options - ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/GetSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewResourceSKUsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ResourceSKUListResult = armcognitiveservices.ResourceSKUListResult{
		// 	Value: []*armcognitiveservices.ResourceSKU{
		// 		{
		// 			Name: to.Ptr("F0"),
		// 			Kind: to.Ptr("Bing.Speech"),
		// 			Locations: []*string{
		// 				to.Ptr("GLOBAL")},
		// 				ResourceType: to.Ptr("accounts"),
		// 				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 				},
		// 				Tier: to.Ptr("Free"),
		// 			},
		// 			{
		// 				Name: to.Ptr("S0"),
		// 				Kind: to.Ptr("Bing.Speech"),
		// 				Locations: []*string{
		// 					to.Ptr("GLOBAL")},
		// 					ResourceType: to.Ptr("accounts"),
		// 					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 					},
		// 					Tier: to.Ptr("Standard"),
		// 				},
		// 				{
		// 					Name: to.Ptr("F0"),
		// 					Kind: to.Ptr("SpeechTranslation"),
		// 					Locations: []*string{
		// 						to.Ptr("GLOBAL")},
		// 						ResourceType: to.Ptr("accounts"),
		// 						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 						},
		// 						Tier: to.Ptr("Free"),
		// 					},
		// 					{
		// 						Name: to.Ptr("S1"),
		// 						Kind: to.Ptr("SpeechTranslation"),
		// 						Locations: []*string{
		// 							to.Ptr("GLOBAL")},
		// 							ResourceType: to.Ptr("accounts"),
		// 							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 							},
		// 							Tier: to.Ptr("Standard"),
		// 						},
		// 						{
		// 							Name: to.Ptr("S2"),
		// 							Kind: to.Ptr("SpeechTranslation"),
		// 							Locations: []*string{
		// 								to.Ptr("GLOBAL")},
		// 								ResourceType: to.Ptr("accounts"),
		// 								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 								},
		// 								Tier: to.Ptr("Standard"),
		// 							},
		// 							{
		// 								Name: to.Ptr("S3"),
		// 								Kind: to.Ptr("SpeechTranslation"),
		// 								Locations: []*string{
		// 									to.Ptr("GLOBAL")},
		// 									ResourceType: to.Ptr("accounts"),
		// 									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 									},
		// 									Tier: to.Ptr("Standard"),
		// 								},
		// 								{
		// 									Name: to.Ptr("S4"),
		// 									Kind: to.Ptr("SpeechTranslation"),
		// 									Locations: []*string{
		// 										to.Ptr("GLOBAL")},
		// 										ResourceType: to.Ptr("accounts"),
		// 										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 										},
		// 										Tier: to.Ptr("Standard"),
		// 									},
		// 									{
		// 										Name: to.Ptr("F0"),
		// 										Kind: to.Ptr("TextTranslation"),
		// 										Locations: []*string{
		// 											to.Ptr("GLOBAL")},
		// 											ResourceType: to.Ptr("accounts"),
		// 											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 											},
		// 											Tier: to.Ptr("Free"),
		// 										},
		// 										{
		// 											Name: to.Ptr("S1"),
		// 											Kind: to.Ptr("TextTranslation"),
		// 											Locations: []*string{
		// 												to.Ptr("GLOBAL")},
		// 												ResourceType: to.Ptr("accounts"),
		// 												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 												},
		// 												Tier: to.Ptr("Standard"),
		// 											},
		// 											{
		// 												Name: to.Ptr("S2"),
		// 												Kind: to.Ptr("TextTranslation"),
		// 												Locations: []*string{
		// 													to.Ptr("GLOBAL")},
		// 													ResourceType: to.Ptr("accounts"),
		// 													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 													},
		// 													Tier: to.Ptr("Standard"),
		// 												},
		// 												{
		// 													Name: to.Ptr("S3"),
		// 													Kind: to.Ptr("TextTranslation"),
		// 													Locations: []*string{
		// 														to.Ptr("GLOBAL")},
		// 														ResourceType: to.Ptr("accounts"),
		// 														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 														},
		// 														Tier: to.Ptr("Standard"),
		// 													},
		// 													{
		// 														Name: to.Ptr("S4"),
		// 														Kind: to.Ptr("TextTranslation"),
		// 														Locations: []*string{
		// 															to.Ptr("GLOBAL")},
		// 															ResourceType: to.Ptr("accounts"),
		// 															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 															},
		// 															Tier: to.Ptr("Standard"),
		// 														},
		// 														{
		// 															Name: to.Ptr("S1"),
		// 															Kind: to.Ptr("Bing.Search.v7"),
		// 															Locations: []*string{
		// 																to.Ptr("GLOBAL")},
		// 																ResourceType: to.Ptr("accounts"),
		// 																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																},
		// 																Tier: to.Ptr("Standard"),
		// 															},
		// 															{
		// 																Name: to.Ptr("S2"),
		// 																Kind: to.Ptr("Bing.Search.v7"),
		// 																Locations: []*string{
		// 																	to.Ptr("GLOBAL")},
		// 																	ResourceType: to.Ptr("accounts"),
		// 																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																	},
		// 																	Tier: to.Ptr("Standard"),
		// 																},
		// 																{
		// 																	Name: to.Ptr("S3"),
		// 																	Kind: to.Ptr("Bing.Search.v7"),
		// 																	Locations: []*string{
		// 																		to.Ptr("GLOBAL")},
		// 																		ResourceType: to.Ptr("accounts"),
		// 																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																		},
		// 																		Tier: to.Ptr("Standard"),
		// 																	},
		// 																	{
		// 																		Name: to.Ptr("S4"),
		// 																		Kind: to.Ptr("Bing.Search.v7"),
		// 																		Locations: []*string{
		// 																			to.Ptr("GLOBAL")},
		// 																			ResourceType: to.Ptr("accounts"),
		// 																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																			},
		// 																			Tier: to.Ptr("Standard"),
		// 																		},
		// 																		{
		// 																			Name: to.Ptr("S5"),
		// 																			Kind: to.Ptr("Bing.Search.v7"),
		// 																			Locations: []*string{
		// 																				to.Ptr("GLOBAL")},
		// 																				ResourceType: to.Ptr("accounts"),
		// 																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																				},
		// 																				Tier: to.Ptr("Standard"),
		// 																			},
		// 																			{
		// 																				Name: to.Ptr("S6"),
		// 																				Kind: to.Ptr("Bing.Search.v7"),
		// 																				Locations: []*string{
		// 																					to.Ptr("GLOBAL")},
		// 																					ResourceType: to.Ptr("accounts"),
		// 																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																					},
		// 																					Tier: to.Ptr("Standard"),
		// 																				},
		// 																				{
		// 																					Name: to.Ptr("S7"),
		// 																					Kind: to.Ptr("Bing.Search.v7"),
		// 																					Locations: []*string{
		// 																						to.Ptr("GLOBAL")},
		// 																						ResourceType: to.Ptr("accounts"),
		// 																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																						},
		// 																						Tier: to.Ptr("Standard"),
		// 																					},
		// 																					{
		// 																						Name: to.Ptr("S8"),
		// 																						Kind: to.Ptr("Bing.Search.v7"),
		// 																						Locations: []*string{
		// 																							to.Ptr("GLOBAL")},
		// 																							ResourceType: to.Ptr("accounts"),
		// 																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																							},
		// 																							Tier: to.Ptr("Standard"),
		// 																						},
		// 																						{
		// 																							Name: to.Ptr("S1"),
		// 																							Kind: to.Ptr("Bing.Autosuggest.v7"),
		// 																							Locations: []*string{
		// 																								to.Ptr("GLOBAL")},
		// 																								ResourceType: to.Ptr("accounts"),
		// 																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																								},
		// 																								Tier: to.Ptr("Standard"),
		// 																							},
		// 																							{
		// 																								Name: to.Ptr("S1"),
		// 																								Kind: to.Ptr("Bing.CustomSearch"),
		// 																								Locations: []*string{
		// 																									to.Ptr("GLOBAL")},
		// 																									ResourceType: to.Ptr("accounts"),
		// 																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																									},
		// 																									Tier: to.Ptr("Standard"),
		// 																								},
		// 																								{
		// 																									Name: to.Ptr("S1"),
		// 																									Kind: to.Ptr("Bing.SpellCheck.v7"),
		// 																									Locations: []*string{
		// 																										to.Ptr("GLOBAL")},
		// 																										ResourceType: to.Ptr("accounts"),
		// 																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																										},
		// 																										Tier: to.Ptr("Standard"),
		// 																									},
		// 																									{
		// 																										Name: to.Ptr("F0"),
		// 																										Kind: to.Ptr("Bing.EntitySearch"),
		// 																										Locations: []*string{
		// 																											to.Ptr("GLOBAL")},
		// 																											ResourceType: to.Ptr("accounts"),
		// 																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																											},
		// 																											Tier: to.Ptr("Free"),
		// 																										},
		// 																										{
		// 																											Name: to.Ptr("S1"),
		// 																											Kind: to.Ptr("Bing.EntitySearch"),
		// 																											Locations: []*string{
		// 																												to.Ptr("GLOBAL")},
		// 																												ResourceType: to.Ptr("accounts"),
		// 																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																												},
		// 																												Tier: to.Ptr("Standard"),
		// 																											},
		// 																											{
		// 																												Name: to.Ptr("F0"),
		// 																												Kind: to.Ptr("Face"),
		// 																												Locations: []*string{
		// 																													to.Ptr("AUSTRALIAEAST")},
		// 																													ResourceType: to.Ptr("accounts"),
		// 																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																													},
		// 																													Tier: to.Ptr("Free"),
		// 																												},
		// 																												{
		// 																													Name: to.Ptr("S0"),
		// 																													Kind: to.Ptr("Face"),
		// 																													Locations: []*string{
		// 																														to.Ptr("AUSTRALIAEAST")},
		// 																														ResourceType: to.Ptr("accounts"),
		// 																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																														},
		// 																														Tier: to.Ptr("Standard"),
		// 																													},
		// 																													{
		// 																														Name: to.Ptr("F0"),
		// 																														Kind: to.Ptr("ComputerVision"),
		// 																														Locations: []*string{
		// 																															to.Ptr("AUSTRALIAEAST")},
		// 																															ResourceType: to.Ptr("accounts"),
		// 																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																															},
		// 																															Tier: to.Ptr("Free"),
		// 																														},
		// 																														{
		// 																															Name: to.Ptr("S1"),
		// 																															Kind: to.Ptr("ComputerVision"),
		// 																															Locations: []*string{
		// 																																to.Ptr("AUSTRALIAEAST")},
		// 																																ResourceType: to.Ptr("accounts"),
		// 																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																},
		// 																																Tier: to.Ptr("Standard"),
		// 																															},
		// 																															{
		// 																																Name: to.Ptr("F0"),
		// 																																Kind: to.Ptr("ContentModerator"),
		// 																																Locations: []*string{
		// 																																	to.Ptr("AUSTRALIAEAST")},
		// 																																	ResourceType: to.Ptr("accounts"),
		// 																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																	},
		// 																																	Tier: to.Ptr("Free"),
		// 																																},
		// 																																{
		// 																																	Name: to.Ptr("S0"),
		// 																																	Kind: to.Ptr("ContentModerator"),
		// 																																	Locations: []*string{
		// 																																		to.Ptr("AUSTRALIAEAST")},
		// 																																		ResourceType: to.Ptr("accounts"),
		// 																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																		},
		// 																																		Tier: to.Ptr("Standard"),
		// 																																	},
		// 																																	{
		// 																																		Name: to.Ptr("F0"),
		// 																																		Kind: to.Ptr("TextAnalytics"),
		// 																																		Locations: []*string{
		// 																																			to.Ptr("AUSTRALIAEAST")},
		// 																																			ResourceType: to.Ptr("accounts"),
		// 																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																			},
		// 																																			Tier: to.Ptr("Free"),
		// 																																		},
		// 																																		{
		// 																																			Name: to.Ptr("S0"),
		// 																																			Kind: to.Ptr("TextAnalytics"),
		// 																																			Locations: []*string{
		// 																																				to.Ptr("AUSTRALIAEAST")},
		// 																																				ResourceType: to.Ptr("accounts"),
		// 																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																				},
		// 																																				Tier: to.Ptr("Standard"),
		// 																																			},
		// 																																			{
		// 																																				Name: to.Ptr("S1"),
		// 																																				Kind: to.Ptr("TextAnalytics"),
		// 																																				Locations: []*string{
		// 																																					to.Ptr("AUSTRALIAEAST")},
		// 																																					ResourceType: to.Ptr("accounts"),
		// 																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																					},
		// 																																					Tier: to.Ptr("Standard"),
		// 																																				},
		// 																																				{
		// 																																					Name: to.Ptr("S2"),
		// 																																					Kind: to.Ptr("TextAnalytics"),
		// 																																					Locations: []*string{
		// 																																						to.Ptr("AUSTRALIAEAST")},
		// 																																						ResourceType: to.Ptr("accounts"),
		// 																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																						},
		// 																																						Tier: to.Ptr("Standard"),
		// 																																					},
		// 																																					{
		// 																																						Name: to.Ptr("S3"),
		// 																																						Kind: to.Ptr("TextAnalytics"),
		// 																																						Locations: []*string{
		// 																																							to.Ptr("AUSTRALIAEAST")},
		// 																																							ResourceType: to.Ptr("accounts"),
		// 																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																							},
		// 																																							Tier: to.Ptr("Standard"),
		// 																																						},
		// 																																						{
		// 																																							Name: to.Ptr("S4"),
		// 																																							Kind: to.Ptr("TextAnalytics"),
		// 																																							Locations: []*string{
		// 																																								to.Ptr("AUSTRALIAEAST")},
		// 																																								ResourceType: to.Ptr("accounts"),
		// 																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																								},
		// 																																								Tier: to.Ptr("Standard"),
		// 																																							},
		// 																																							{
		// 																																								Name: to.Ptr("F0"),
		// 																																								Kind: to.Ptr("LUIS"),
		// 																																								Locations: []*string{
		// 																																									to.Ptr("AUSTRALIAEAST")},
		// 																																									ResourceType: to.Ptr("accounts"),
		// 																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																									},
		// 																																									Tier: to.Ptr("Free"),
		// 																																								},
		// 																																								{
		// 																																									Name: to.Ptr("S0"),
		// 																																									Kind: to.Ptr("LUIS"),
		// 																																									Locations: []*string{
		// 																																										to.Ptr("AUSTRALIAEAST")},
		// 																																										ResourceType: to.Ptr("accounts"),
		// 																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																										},
		// 																																										Tier: to.Ptr("Standard"),
		// 																																									},
		// 																																									{
		// 																																										Name: to.Ptr("F0"),
		// 																																										Kind: to.Ptr("Face"),
		// 																																										Locations: []*string{
		// 																																											to.Ptr("BRAZILSOUTH")},
		// 																																											ResourceType: to.Ptr("accounts"),
		// 																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																											},
		// 																																											Tier: to.Ptr("Free"),
		// 																																										},
		// 																																										{
		// 																																											Name: to.Ptr("S0"),
		// 																																											Kind: to.Ptr("Face"),
		// 																																											Locations: []*string{
		// 																																												to.Ptr("BRAZILSOUTH")},
		// 																																												ResourceType: to.Ptr("accounts"),
		// 																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																												},
		// 																																												Tier: to.Ptr("Standard"),
		// 																																											},
		// 																																											{
		// 																																												Name: to.Ptr("F0"),
		// 																																												Kind: to.Ptr("ComputerVision"),
		// 																																												Locations: []*string{
		// 																																													to.Ptr("BRAZILSOUTH")},
		// 																																													ResourceType: to.Ptr("accounts"),
		// 																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																													},
		// 																																													Tier: to.Ptr("Free"),
		// 																																												},
		// 																																												{
		// 																																													Name: to.Ptr("S1"),
		// 																																													Kind: to.Ptr("ComputerVision"),
		// 																																													Locations: []*string{
		// 																																														to.Ptr("BRAZILSOUTH")},
		// 																																														ResourceType: to.Ptr("accounts"),
		// 																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																														},
		// 																																														Tier: to.Ptr("Standard"),
		// 																																													},
		// 																																													{
		// 																																														Name: to.Ptr("F0"),
		// 																																														Kind: to.Ptr("ContentModerator"),
		// 																																														Locations: []*string{
		// 																																															to.Ptr("BRAZILSOUTH")},
		// 																																															ResourceType: to.Ptr("accounts"),
		// 																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																															},
		// 																																															Tier: to.Ptr("Free"),
		// 																																														},
		// 																																														{
		// 																																															Name: to.Ptr("S0"),
		// 																																															Kind: to.Ptr("ContentModerator"),
		// 																																															Locations: []*string{
		// 																																																to.Ptr("BRAZILSOUTH")},
		// 																																																ResourceType: to.Ptr("accounts"),
		// 																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																},
		// 																																																Tier: to.Ptr("Standard"),
		// 																																															},
		// 																																															{
		// 																																																Name: to.Ptr("F0"),
		// 																																																Kind: to.Ptr("TextAnalytics"),
		// 																																																Locations: []*string{
		// 																																																	to.Ptr("BRAZILSOUTH")},
		// 																																																	ResourceType: to.Ptr("accounts"),
		// 																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																	},
		// 																																																	Tier: to.Ptr("Free"),
		// 																																																},
		// 																																																{
		// 																																																	Name: to.Ptr("S0"),
		// 																																																	Kind: to.Ptr("TextAnalytics"),
		// 																																																	Locations: []*string{
		// 																																																		to.Ptr("BRAZILSOUTH")},
		// 																																																		ResourceType: to.Ptr("accounts"),
		// 																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																		},
		// 																																																		Tier: to.Ptr("Standard"),
		// 																																																	},
		// 																																																	{
		// 																																																		Name: to.Ptr("S1"),
		// 																																																		Kind: to.Ptr("TextAnalytics"),
		// 																																																		Locations: []*string{
		// 																																																			to.Ptr("BRAZILSOUTH")},
		// 																																																			ResourceType: to.Ptr("accounts"),
		// 																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																			},
		// 																																																			Tier: to.Ptr("Standard"),
		// 																																																		},
		// 																																																		{
		// 																																																			Name: to.Ptr("S2"),
		// 																																																			Kind: to.Ptr("TextAnalytics"),
		// 																																																			Locations: []*string{
		// 																																																				to.Ptr("BRAZILSOUTH")},
		// 																																																				ResourceType: to.Ptr("accounts"),
		// 																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																				},
		// 																																																				Tier: to.Ptr("Standard"),
		// 																																																			},
		// 																																																			{
		// 																																																				Name: to.Ptr("S3"),
		// 																																																				Kind: to.Ptr("TextAnalytics"),
		// 																																																				Locations: []*string{
		// 																																																					to.Ptr("BRAZILSOUTH")},
		// 																																																					ResourceType: to.Ptr("accounts"),
		// 																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																					},
		// 																																																					Tier: to.Ptr("Standard"),
		// 																																																				},
		// 																																																				{
		// 																																																					Name: to.Ptr("S4"),
		// 																																																					Kind: to.Ptr("TextAnalytics"),
		// 																																																					Locations: []*string{
		// 																																																						to.Ptr("BRAZILSOUTH")},
		// 																																																						ResourceType: to.Ptr("accounts"),
		// 																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																						},
		// 																																																						Tier: to.Ptr("Standard"),
		// 																																																					},
		// 																																																					{
		// 																																																						Name: to.Ptr("F0"),
		// 																																																						Kind: to.Ptr("LUIS"),
		// 																																																						Locations: []*string{
		// 																																																							to.Ptr("BRAZILSOUTH")},
		// 																																																							ResourceType: to.Ptr("accounts"),
		// 																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																							},
		// 																																																							Tier: to.Ptr("Free"),
		// 																																																						},
		// 																																																						{
		// 																																																							Name: to.Ptr("S0"),
		// 																																																							Kind: to.Ptr("LUIS"),
		// 																																																							Locations: []*string{
		// 																																																								to.Ptr("BRAZILSOUTH")},
		// 																																																								ResourceType: to.Ptr("accounts"),
		// 																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																								},
		// 																																																								Tier: to.Ptr("Standard"),
		// 																																																							},
		// 																																																							{
		// 																																																								Name: to.Ptr("F0"),
		// 																																																								Kind: to.Ptr("Face"),
		// 																																																								Locations: []*string{
		// 																																																									to.Ptr("CENTRALUSEUAP")},
		// 																																																									ResourceType: to.Ptr("accounts"),
		// 																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																									},
		// 																																																									Tier: to.Ptr("Free"),
		// 																																																								},
		// 																																																								{
		// 																																																									Name: to.Ptr("S0"),
		// 																																																									Kind: to.Ptr("Face"),
		// 																																																									Locations: []*string{
		// 																																																										to.Ptr("CENTRALUSEUAP")},
		// 																																																										ResourceType: to.Ptr("accounts"),
		// 																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																										},
		// 																																																										Tier: to.Ptr("Standard"),
		// 																																																									},
		// 																																																									{
		// 																																																										Name: to.Ptr("F0"),
		// 																																																										Kind: to.Ptr("ComputerVision"),
		// 																																																										Locations: []*string{
		// 																																																											to.Ptr("CENTRALUSEUAP")},
		// 																																																											ResourceType: to.Ptr("accounts"),
		// 																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																											},
		// 																																																											Tier: to.Ptr("Free"),
		// 																																																										},
		// 																																																										{
		// 																																																											Name: to.Ptr("S1"),
		// 																																																											Kind: to.Ptr("ComputerVision"),
		// 																																																											Locations: []*string{
		// 																																																												to.Ptr("CENTRALUSEUAP")},
		// 																																																												ResourceType: to.Ptr("accounts"),
		// 																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																												},
		// 																																																												Tier: to.Ptr("Standard"),
		// 																																																											},
		// 																																																											{
		// 																																																												Name: to.Ptr("F0"),
		// 																																																												Kind: to.Ptr("TextAnalytics"),
		// 																																																												Locations: []*string{
		// 																																																													to.Ptr("CENTRALUSEUAP")},
		// 																																																													ResourceType: to.Ptr("accounts"),
		// 																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																													},
		// 																																																													Tier: to.Ptr("Free"),
		// 																																																												},
		// 																																																												{
		// 																																																													Name: to.Ptr("S0"),
		// 																																																													Kind: to.Ptr("TextAnalytics"),
		// 																																																													Locations: []*string{
		// 																																																														to.Ptr("CENTRALUSEUAP")},
		// 																																																														ResourceType: to.Ptr("accounts"),
		// 																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																														},
		// 																																																														Tier: to.Ptr("Standard"),
		// 																																																													},
		// 																																																													{
		// 																																																														Name: to.Ptr("S1"),
		// 																																																														Kind: to.Ptr("TextAnalytics"),
		// 																																																														Locations: []*string{
		// 																																																															to.Ptr("CENTRALUSEUAP")},
		// 																																																															ResourceType: to.Ptr("accounts"),
		// 																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																															},
		// 																																																															Tier: to.Ptr("Standard"),
		// 																																																														},
		// 																																																														{
		// 																																																															Name: to.Ptr("S2"),
		// 																																																															Kind: to.Ptr("TextAnalytics"),
		// 																																																															Locations: []*string{
		// 																																																																to.Ptr("CENTRALUSEUAP")},
		// 																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																},
		// 																																																																Tier: to.Ptr("Standard"),
		// 																																																															},
		// 																																																															{
		// 																																																																Name: to.Ptr("S3"),
		// 																																																																Kind: to.Ptr("TextAnalytics"),
		// 																																																																Locations: []*string{
		// 																																																																	to.Ptr("CENTRALUSEUAP")},
		// 																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																	},
		// 																																																																	Tier: to.Ptr("Standard"),
		// 																																																																},
		// 																																																																{
		// 																																																																	Name: to.Ptr("S4"),
		// 																																																																	Kind: to.Ptr("TextAnalytics"),
		// 																																																																	Locations: []*string{
		// 																																																																		to.Ptr("CENTRALUSEUAP")},
		// 																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																		},
		// 																																																																		Tier: to.Ptr("Standard"),
		// 																																																																	},
		// 																																																																	{
		// 																																																																		Name: to.Ptr("F0"),
		// 																																																																		Kind: to.Ptr("ContentModerator"),
		// 																																																																		Locations: []*string{
		// 																																																																			to.Ptr("CENTRALUSEUAP")},
		// 																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																			},
		// 																																																																			Tier: to.Ptr("Free"),
		// 																																																																		},
		// 																																																																		{
		// 																																																																			Name: to.Ptr("S0"),
		// 																																																																			Kind: to.Ptr("ContentModerator"),
		// 																																																																			Locations: []*string{
		// 																																																																				to.Ptr("CENTRALUSEUAP")},
		// 																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																				},
		// 																																																																				Tier: to.Ptr("Standard"),
		// 																																																																			},
		// 																																																																			{
		// 																																																																				Name: to.Ptr("F0"),
		// 																																																																				Kind: to.Ptr("LUIS"),
		// 																																																																				Locations: []*string{
		// 																																																																					to.Ptr("CENTRALUSEUAP")},
		// 																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																					},
		// 																																																																					Tier: to.Ptr("Free"),
		// 																																																																				},
		// 																																																																				{
		// 																																																																					Name: to.Ptr("S0"),
		// 																																																																					Kind: to.Ptr("LUIS"),
		// 																																																																					Locations: []*string{
		// 																																																																						to.Ptr("CENTRALUSEUAP")},
		// 																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																						},
		// 																																																																						Tier: to.Ptr("Standard"),
		// 																																																																					},
		// 																																																																					{
		// 																																																																						Name: to.Ptr("F0"),
		// 																																																																						Kind: to.Ptr("ContentModerator"),
		// 																																																																						Locations: []*string{
		// 																																																																							to.Ptr("WESTUS")},
		// 																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																							},
		// 																																																																							Tier: to.Ptr("Free"),
		// 																																																																						},
		// 																																																																						{
		// 																																																																							Name: to.Ptr("S0"),
		// 																																																																							Kind: to.Ptr("ContentModerator"),
		// 																																																																							Locations: []*string{
		// 																																																																								to.Ptr("WESTUS")},
		// 																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																								},
		// 																																																																								Tier: to.Ptr("Standard"),
		// 																																																																							},
		// 																																																																							{
		// 																																																																								Name: to.Ptr("F0"),
		// 																																																																								Kind: to.Ptr("LUIS"),
		// 																																																																								Locations: []*string{
		// 																																																																									to.Ptr("WESTUS")},
		// 																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																									},
		// 																																																																									Tier: to.Ptr("Free"),
		// 																																																																								},
		// 																																																																								{
		// 																																																																									Name: to.Ptr("S0"),
		// 																																																																									Kind: to.Ptr("LUIS"),
		// 																																																																									Locations: []*string{
		// 																																																																										to.Ptr("WESTUS")},
		// 																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																										},
		// 																																																																										Tier: to.Ptr("Standard"),
		// 																																																																									},
		// 																																																																									{
		// 																																																																										Name: to.Ptr("F0"),
		// 																																																																										Kind: to.Ptr("Face"),
		// 																																																																										Locations: []*string{
		// 																																																																											to.Ptr("WESTUS")},
		// 																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																											},
		// 																																																																											Tier: to.Ptr("Free"),
		// 																																																																										},
		// 																																																																										{
		// 																																																																											Name: to.Ptr("S0"),
		// 																																																																											Kind: to.Ptr("Face"),
		// 																																																																											Locations: []*string{
		// 																																																																												to.Ptr("WESTUS")},
		// 																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																												},
		// 																																																																												Tier: to.Ptr("Standard"),
		// 																																																																											},
		// 																																																																											{
		// 																																																																												Name: to.Ptr("F0"),
		// 																																																																												Kind: to.Ptr("TextAnalytics"),
		// 																																																																												Locations: []*string{
		// 																																																																													to.Ptr("WESTUS")},
		// 																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																													},
		// 																																																																													Tier: to.Ptr("Free"),
		// 																																																																												},
		// 																																																																												{
		// 																																																																													Name: to.Ptr("S0"),
		// 																																																																													Kind: to.Ptr("TextAnalytics"),
		// 																																																																													Locations: []*string{
		// 																																																																														to.Ptr("WESTUS")},
		// 																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																														},
		// 																																																																														Tier: to.Ptr("Standard"),
		// 																																																																													},
		// 																																																																													{
		// 																																																																														Name: to.Ptr("S1"),
		// 																																																																														Kind: to.Ptr("TextAnalytics"),
		// 																																																																														Locations: []*string{
		// 																																																																															to.Ptr("WESTUS")},
		// 																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																															},
		// 																																																																															Tier: to.Ptr("Standard"),
		// 																																																																														},
		// 																																																																														{
		// 																																																																															Name: to.Ptr("S2"),
		// 																																																																															Kind: to.Ptr("TextAnalytics"),
		// 																																																																															Locations: []*string{
		// 																																																																																to.Ptr("WESTUS")},
		// 																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																},
		// 																																																																																Tier: to.Ptr("Standard"),
		// 																																																																															},
		// 																																																																															{
		// 																																																																																Name: to.Ptr("S3"),
		// 																																																																																Kind: to.Ptr("TextAnalytics"),
		// 																																																																																Locations: []*string{
		// 																																																																																	to.Ptr("WESTUS")},
		// 																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																	},
		// 																																																																																	Tier: to.Ptr("Standard"),
		// 																																																																																},
		// 																																																																																{
		// 																																																																																	Name: to.Ptr("S4"),
		// 																																																																																	Kind: to.Ptr("TextAnalytics"),
		// 																																																																																	Locations: []*string{
		// 																																																																																		to.Ptr("WESTUS")},
		// 																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																		},
		// 																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																	},
		// 																																																																																	{
		// 																																																																																		Name: to.Ptr("F0"),
		// 																																																																																		Kind: to.Ptr("SpeakerRecognition"),
		// 																																																																																		Locations: []*string{
		// 																																																																																			to.Ptr("WESTUS")},
		// 																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																			},
		// 																																																																																			Tier: to.Ptr("Free"),
		// 																																																																																		},
		// 																																																																																		{
		// 																																																																																			Name: to.Ptr("S0"),
		// 																																																																																			Kind: to.Ptr("SpeakerRecognition"),
		// 																																																																																			Locations: []*string{
		// 																																																																																				to.Ptr("WESTUS")},
		// 																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																				},
		// 																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																			},
		// 																																																																																			{
		// 																																																																																				Name: to.Ptr("F0"),
		// 																																																																																				Kind: to.Ptr("CustomSpeech"),
		// 																																																																																				Locations: []*string{
		// 																																																																																					to.Ptr("WESTUS")},
		// 																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																					},
		// 																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																				},
		// 																																																																																				{
		// 																																																																																					Name: to.Ptr("S2"),
		// 																																																																																					Kind: to.Ptr("CustomSpeech"),
		// 																																																																																					Locations: []*string{
		// 																																																																																						to.Ptr("WESTUS")},
		// 																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																						},
		// 																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																					},
		// 																																																																																					{
		// 																																																																																						Name: to.Ptr("F0"),
		// 																																																																																						Kind: to.Ptr("ComputerVision"),
		// 																																																																																						Locations: []*string{
		// 																																																																																							to.Ptr("WESTUS")},
		// 																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																							},
		// 																																																																																							Tier: to.Ptr("Free"),
		// 																																																																																						},
		// 																																																																																						{
		// 																																																																																							Name: to.Ptr("S1"),
		// 																																																																																							Kind: to.Ptr("ComputerVision"),
		// 																																																																																							Locations: []*string{
		// 																																																																																								to.Ptr("WESTUS")},
		// 																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																								},
		// 																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																							},
		// 																																																																																							{
		// 																																																																																								Name: to.Ptr("F0"),
		// 																																																																																								Kind: to.Ptr("Face"),
		// 																																																																																								Locations: []*string{
		// 																																																																																									to.Ptr("WESTUS2")},
		// 																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																									},
		// 																																																																																									Tier: to.Ptr("Free"),
		// 																																																																																								},
		// 																																																																																								{
		// 																																																																																									Name: to.Ptr("S0"),
		// 																																																																																									Kind: to.Ptr("Face"),
		// 																																																																																									Locations: []*string{
		// 																																																																																										to.Ptr("WESTUS2")},
		// 																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																										},
		// 																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																									},
		// 																																																																																									{
		// 																																																																																										Name: to.Ptr("F0"),
		// 																																																																																										Kind: to.Ptr("ComputerVision"),
		// 																																																																																										Locations: []*string{
		// 																																																																																											to.Ptr("WESTUS2")},
		// 																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																											},
		// 																																																																																											Tier: to.Ptr("Free"),
		// 																																																																																										},
		// 																																																																																										{
		// 																																																																																											Name: to.Ptr("S1"),
		// 																																																																																											Kind: to.Ptr("ComputerVision"),
		// 																																																																																											Locations: []*string{
		// 																																																																																												to.Ptr("WESTUS2")},
		// 																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																												},
		// 																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																											},
		// 																																																																																											{
		// 																																																																																												Name: to.Ptr("F0"),
		// 																																																																																												Kind: to.Ptr("ContentModerator"),
		// 																																																																																												Locations: []*string{
		// 																																																																																													to.Ptr("WESTUS2")},
		// 																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																													},
		// 																																																																																													Tier: to.Ptr("Free"),
		// 																																																																																												},
		// 																																																																																												{
		// 																																																																																													Name: to.Ptr("S0"),
		// 																																																																																													Kind: to.Ptr("ContentModerator"),
		// 																																																																																													Locations: []*string{
		// 																																																																																														to.Ptr("WESTUS2")},
		// 																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																														},
		// 																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																													},
		// 																																																																																													{
		// 																																																																																														Name: to.Ptr("F0"),
		// 																																																																																														Kind: to.Ptr("TextAnalytics"),
		// 																																																																																														Locations: []*string{
		// 																																																																																															to.Ptr("WESTUS2")},
		// 																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																															},
		// 																																																																																															Tier: to.Ptr("Free"),
		// 																																																																																														},
		// 																																																																																														{
		// 																																																																																															Name: to.Ptr("S0"),
		// 																																																																																															Kind: to.Ptr("TextAnalytics"),
		// 																																																																																															Locations: []*string{
		// 																																																																																																to.Ptr("WESTUS2")},
		// 																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																},
		// 																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																															},
		// 																																																																																															{
		// 																																																																																																Name: to.Ptr("S1"),
		// 																																																																																																Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																Locations: []*string{
		// 																																																																																																	to.Ptr("WESTUS2")},
		// 																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																	},
		// 																																																																																																	Tier: to.Ptr("Standard"),
		// 																																																																																																},
		// 																																																																																																{
		// 																																																																																																	Name: to.Ptr("S2"),
		// 																																																																																																	Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																	Locations: []*string{
		// 																																																																																																		to.Ptr("WESTUS2")},
		// 																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																		},
		// 																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																	},
		// 																																																																																																	{
		// 																																																																																																		Name: to.Ptr("S3"),
		// 																																																																																																		Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																		Locations: []*string{
		// 																																																																																																			to.Ptr("WESTUS2")},
		// 																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																			},
		// 																																																																																																			Tier: to.Ptr("Standard"),
		// 																																																																																																		},
		// 																																																																																																		{
		// 																																																																																																			Name: to.Ptr("S4"),
		// 																																																																																																			Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																			Locations: []*string{
		// 																																																																																																				to.Ptr("WESTUS2")},
		// 																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																				},
		// 																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																			},
		// 																																																																																																			{
		// 																																																																																																				Name: to.Ptr("F0"),
		// 																																																																																																				Kind: to.Ptr("LUIS"),
		// 																																																																																																				Locations: []*string{
		// 																																																																																																					to.Ptr("WESTUS2")},
		// 																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																					},
		// 																																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																																				},
		// 																																																																																																				{
		// 																																																																																																					Name: to.Ptr("S0"),
		// 																																																																																																					Kind: to.Ptr("LUIS"),
		// 																																																																																																					Locations: []*string{
		// 																																																																																																						to.Ptr("WESTUS2")},
		// 																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																						},
		// 																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																					},
		// 																																																																																																					{
		// 																																																																																																						Name: to.Ptr("F0"),
		// 																																																																																																						Kind: to.Ptr("Face"),
		// 																																																																																																						Locations: []*string{
		// 																																																																																																							to.Ptr("WESTEUROPE")},
		// 																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																							},
		// 																																																																																																							Tier: to.Ptr("Free"),
		// 																																																																																																						},
		// 																																																																																																						{
		// 																																																																																																							Name: to.Ptr("S0"),
		// 																																																																																																							Kind: to.Ptr("Face"),
		// 																																																																																																							Locations: []*string{
		// 																																																																																																								to.Ptr("WESTEUROPE")},
		// 																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																								},
		// 																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																							},
		// 																																																																																																							{
		// 																																																																																																								Name: to.Ptr("F0"),
		// 																																																																																																								Kind: to.Ptr("LUIS"),
		// 																																																																																																								Locations: []*string{
		// 																																																																																																									to.Ptr("WESTEUROPE")},
		// 																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																									},
		// 																																																																																																									Tier: to.Ptr("Free"),
		// 																																																																																																								},
		// 																																																																																																								{
		// 																																																																																																									Name: to.Ptr("S0"),
		// 																																																																																																									Kind: to.Ptr("LUIS"),
		// 																																																																																																									Locations: []*string{
		// 																																																																																																										to.Ptr("WESTEUROPE")},
		// 																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																										},
		// 																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																									},
		// 																																																																																																									{
		// 																																																																																																										Name: to.Ptr("F0"),
		// 																																																																																																										Kind: to.Ptr("ContentModerator"),
		// 																																																																																																										Locations: []*string{
		// 																																																																																																											to.Ptr("WESTEUROPE")},
		// 																																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																											},
		// 																																																																																																											Tier: to.Ptr("Free"),
		// 																																																																																																										},
		// 																																																																																																										{
		// 																																																																																																											Name: to.Ptr("S0"),
		// 																																																																																																											Kind: to.Ptr("ContentModerator"),
		// 																																																																																																											Locations: []*string{
		// 																																																																																																												to.Ptr("WESTEUROPE")},
		// 																																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																												},
		// 																																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																																											},
		// 																																																																																																											{
		// 																																																																																																												Name: to.Ptr("F0"),
		// 																																																																																																												Kind: to.Ptr("ComputerVision"),
		// 																																																																																																												Locations: []*string{
		// 																																																																																																													to.Ptr("WESTEUROPE")},
		// 																																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																													},
		// 																																																																																																													Tier: to.Ptr("Free"),
		// 																																																																																																												},
		// 																																																																																																												{
		// 																																																																																																													Name: to.Ptr("S1"),
		// 																																																																																																													Kind: to.Ptr("ComputerVision"),
		// 																																																																																																													Locations: []*string{
		// 																																																																																																														to.Ptr("WESTEUROPE")},
		// 																																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																														},
		// 																																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																																													},
		// 																																																																																																													{
		// 																																																																																																														Name: to.Ptr("F0"),
		// 																																																																																																														Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																														Locations: []*string{
		// 																																																																																																															to.Ptr("WESTEUROPE")},
		// 																																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																															},
		// 																																																																																																															Tier: to.Ptr("Free"),
		// 																																																																																																														},
		// 																																																																																																														{
		// 																																																																																																															Name: to.Ptr("S0"),
		// 																																																																																																															Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																															Locations: []*string{
		// 																																																																																																																to.Ptr("WESTEUROPE")},
		// 																																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																},
		// 																																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																																															},
		// 																																																																																																															{
		// 																																																																																																																Name: to.Ptr("S1"),
		// 																																																																																																																Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																Locations: []*string{
		// 																																																																																																																	to.Ptr("WESTEUROPE")},
		// 																																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																	},
		// 																																																																																																																	Tier: to.Ptr("Standard"),
		// 																																																																																																																},
		// 																																																																																																																{
		// 																																																																																																																	Name: to.Ptr("S2"),
		// 																																																																																																																	Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																	Locations: []*string{
		// 																																																																																																																		to.Ptr("WESTEUROPE")},
		// 																																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																		},
		// 																																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																																	},
		// 																																																																																																																	{
		// 																																																																																																																		Name: to.Ptr("S3"),
		// 																																																																																																																		Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																		Locations: []*string{
		// 																																																																																																																			to.Ptr("WESTEUROPE")},
		// 																																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																			},
		// 																																																																																																																			Tier: to.Ptr("Standard"),
		// 																																																																																																																		},
		// 																																																																																																																		{
		// 																																																																																																																			Name: to.Ptr("S4"),
		// 																																																																																																																			Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																			Locations: []*string{
		// 																																																																																																																				to.Ptr("WESTEUROPE")},
		// 																																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																				},
		// 																																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																																			},
		// 																																																																																																																			{
		// 																																																																																																																				Name: to.Ptr("F0"),
		// 																																																																																																																				Kind: to.Ptr("Face"),
		// 																																																																																																																				Locations: []*string{
		// 																																																																																																																					to.Ptr("NORTHEUROPE")},
		// 																																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																					},
		// 																																																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																																																				},
		// 																																																																																																																				{
		// 																																																																																																																					Name: to.Ptr("S0"),
		// 																																																																																																																					Kind: to.Ptr("Face"),
		// 																																																																																																																					Locations: []*string{
		// 																																																																																																																						to.Ptr("NORTHEUROPE")},
		// 																																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																						},
		// 																																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																																					},
		// 																																																																																																																					{
		// 																																																																																																																						Name: to.Ptr("F0"),
		// 																																																																																																																						Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																						Locations: []*string{
		// 																																																																																																																							to.Ptr("NORTHEUROPE")},
		// 																																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																							},
		// 																																																																																																																							Tier: to.Ptr("Free"),
		// 																																																																																																																						},
		// 																																																																																																																						{
		// 																																																																																																																							Name: to.Ptr("S1"),
		// 																																																																																																																							Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																							Locations: []*string{
		// 																																																																																																																								to.Ptr("NORTHEUROPE")},
		// 																																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																								},
		// 																																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																																							},
		// 																																																																																																																							{
		// 																																																																																																																								Name: to.Ptr("F0"),
		// 																																																																																																																								Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																								Locations: []*string{
		// 																																																																																																																									to.Ptr("NORTHEUROPE")},
		// 																																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																									},
		// 																																																																																																																									Tier: to.Ptr("Free"),
		// 																																																																																																																								},
		// 																																																																																																																								{
		// 																																																																																																																									Name: to.Ptr("S0"),
		// 																																																																																																																									Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																									Locations: []*string{
		// 																																																																																																																										to.Ptr("NORTHEUROPE")},
		// 																																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																										},
		// 																																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																																									},
		// 																																																																																																																									{
		// 																																																																																																																										Name: to.Ptr("F0"),
		// 																																																																																																																										Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																										Locations: []*string{
		// 																																																																																																																											to.Ptr("NORTHEUROPE")},
		// 																																																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																											},
		// 																																																																																																																											Tier: to.Ptr("Free"),
		// 																																																																																																																										},
		// 																																																																																																																										{
		// 																																																																																																																											Name: to.Ptr("S0"),
		// 																																																																																																																											Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																											Locations: []*string{
		// 																																																																																																																												to.Ptr("NORTHEUROPE")},
		// 																																																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																												},
		// 																																																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																																																											},
		// 																																																																																																																											{
		// 																																																																																																																												Name: to.Ptr("S1"),
		// 																																																																																																																												Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																												Locations: []*string{
		// 																																																																																																																													to.Ptr("NORTHEUROPE")},
		// 																																																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																													},
		// 																																																																																																																													Tier: to.Ptr("Standard"),
		// 																																																																																																																												},
		// 																																																																																																																												{
		// 																																																																																																																													Name: to.Ptr("S2"),
		// 																																																																																																																													Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																													Locations: []*string{
		// 																																																																																																																														to.Ptr("NORTHEUROPE")},
		// 																																																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																														},
		// 																																																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																																																													},
		// 																																																																																																																													{
		// 																																																																																																																														Name: to.Ptr("S3"),
		// 																																																																																																																														Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																														Locations: []*string{
		// 																																																																																																																															to.Ptr("NORTHEUROPE")},
		// 																																																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																															},
		// 																																																																																																																															Tier: to.Ptr("Standard"),
		// 																																																																																																																														},
		// 																																																																																																																														{
		// 																																																																																																																															Name: to.Ptr("S4"),
		// 																																																																																																																															Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																															Locations: []*string{
		// 																																																																																																																																to.Ptr("NORTHEUROPE")},
		// 																																																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																},
		// 																																																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																																																															},
		// 																																																																																																																															{
		// 																																																																																																																																Name: to.Ptr("F0"),
		// 																																																																																																																																Kind: to.Ptr("LUIS"),
		// 																																																																																																																																Locations: []*string{
		// 																																																																																																																																	to.Ptr("NORTHEUROPE")},
		// 																																																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																	},
		// 																																																																																																																																	Tier: to.Ptr("Free"),
		// 																																																																																																																																},
		// 																																																																																																																																{
		// 																																																																																																																																	Name: to.Ptr("S0"),
		// 																																																																																																																																	Kind: to.Ptr("LUIS"),
		// 																																																																																																																																	Locations: []*string{
		// 																																																																																																																																		to.Ptr("NORTHEUROPE")},
		// 																																																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																		},
		// 																																																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																																																	},
		// 																																																																																																																																	{
		// 																																																																																																																																		Name: to.Ptr("F0"),
		// 																																																																																																																																		Kind: to.Ptr("Face"),
		// 																																																																																																																																		Locations: []*string{
		// 																																																																																																																																			to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																			},
		// 																																																																																																																																			Tier: to.Ptr("Free"),
		// 																																																																																																																																		},
		// 																																																																																																																																		{
		// 																																																																																																																																			Name: to.Ptr("S0"),
		// 																																																																																																																																			Kind: to.Ptr("Face"),
		// 																																																																																																																																			Locations: []*string{
		// 																																																																																																																																				to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																				},
		// 																																																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																																																			},
		// 																																																																																																																																			{
		// 																																																																																																																																				Name: to.Ptr("F0"),
		// 																																																																																																																																				Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																				Locations: []*string{
		// 																																																																																																																																					to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																					},
		// 																																																																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																																																																				},
		// 																																																																																																																																				{
		// 																																																																																																																																					Name: to.Ptr("S0"),
		// 																																																																																																																																					Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																					Locations: []*string{
		// 																																																																																																																																						to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																						},
		// 																																																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																																																					},
		// 																																																																																																																																					{
		// 																																																																																																																																						Name: to.Ptr("F0"),
		// 																																																																																																																																						Kind: to.Ptr("LUIS"),
		// 																																																																																																																																						Locations: []*string{
		// 																																																																																																																																							to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																							},
		// 																																																																																																																																							Tier: to.Ptr("Free"),
		// 																																																																																																																																						},
		// 																																																																																																																																						{
		// 																																																																																																																																							Name: to.Ptr("S0"),
		// 																																																																																																																																							Kind: to.Ptr("LUIS"),
		// 																																																																																																																																							Locations: []*string{
		// 																																																																																																																																								to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																								},
		// 																																																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																																																							},
		// 																																																																																																																																							{
		// 																																																																																																																																								Name: to.Ptr("F0"),
		// 																																																																																																																																								Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																								Locations: []*string{
		// 																																																																																																																																									to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																									},
		// 																																																																																																																																									Tier: to.Ptr("Free"),
		// 																																																																																																																																								},
		// 																																																																																																																																								{
		// 																																																																																																																																									Name: to.Ptr("S1"),
		// 																																																																																																																																									Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																									Locations: []*string{
		// 																																																																																																																																										to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																										},
		// 																																																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																																																									},
		// 																																																																																																																																									{
		// 																																																																																																																																										Name: to.Ptr("F0"),
		// 																																																																																																																																										Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																										Locations: []*string{
		// 																																																																																																																																											to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																											},
		// 																																																																																																																																											Tier: to.Ptr("Free"),
		// 																																																																																																																																										},
		// 																																																																																																																																										{
		// 																																																																																																																																											Name: to.Ptr("S0"),
		// 																																																																																																																																											Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																											Locations: []*string{
		// 																																																																																																																																												to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																												},
		// 																																																																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																																																																											},
		// 																																																																																																																																											{
		// 																																																																																																																																												Name: to.Ptr("S1"),
		// 																																																																																																																																												Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																												Locations: []*string{
		// 																																																																																																																																													to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																													},
		// 																																																																																																																																													Tier: to.Ptr("Standard"),
		// 																																																																																																																																												},
		// 																																																																																																																																												{
		// 																																																																																																																																													Name: to.Ptr("S2"),
		// 																																																																																																																																													Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																													Locations: []*string{
		// 																																																																																																																																														to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																														},
		// 																																																																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																																																																													},
		// 																																																																																																																																													{
		// 																																																																																																																																														Name: to.Ptr("S3"),
		// 																																																																																																																																														Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																														Locations: []*string{
		// 																																																																																																																																															to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																															},
		// 																																																																																																																																															Tier: to.Ptr("Standard"),
		// 																																																																																																																																														},
		// 																																																																																																																																														{
		// 																																																																																																																																															Name: to.Ptr("S4"),
		// 																																																																																																																																															Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																															Locations: []*string{
		// 																																																																																																																																																to.Ptr("SOUTHEASTASIA")},
		// 																																																																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																},
		// 																																																																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																																																																															},
		// 																																																																																																																																															{
		// 																																																																																																																																																Name: to.Ptr("F0"),
		// 																																																																																																																																																Kind: to.Ptr("Face"),
		// 																																																																																																																																																Locations: []*string{
		// 																																																																																																																																																	to.Ptr("EASTASIA")},
		// 																																																																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																	},
		// 																																																																																																																																																	Tier: to.Ptr("Free"),
		// 																																																																																																																																																},
		// 																																																																																																																																																{
		// 																																																																																																																																																	Name: to.Ptr("S0"),
		// 																																																																																																																																																	Kind: to.Ptr("Face"),
		// 																																																																																																																																																	Locations: []*string{
		// 																																																																																																																																																		to.Ptr("EASTASIA")},
		// 																																																																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																		},
		// 																																																																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																																																																	},
		// 																																																																																																																																																	{
		// 																																																																																																																																																		Name: to.Ptr("F0"),
		// 																																																																																																																																																		Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																		Locations: []*string{
		// 																																																																																																																																																			to.Ptr("EASTASIA")},
		// 																																																																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																			},
		// 																																																																																																																																																			Tier: to.Ptr("Free"),
		// 																																																																																																																																																		},
		// 																																																																																																																																																		{
		// 																																																																																																																																																			Name: to.Ptr("S1"),
		// 																																																																																																																																																			Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																			Locations: []*string{
		// 																																																																																																																																																				to.Ptr("EASTASIA")},
		// 																																																																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																				},
		// 																																																																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																																																																			},
		// 																																																																																																																																																			{
		// 																																																																																																																																																				Name: to.Ptr("F0"),
		// 																																																																																																																																																				Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																				Locations: []*string{
		// 																																																																																																																																																					to.Ptr("EASTASIA")},
		// 																																																																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																					},
		// 																																																																																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																																																																																				},
		// 																																																																																																																																																				{
		// 																																																																																																																																																					Name: to.Ptr("S0"),
		// 																																																																																																																																																					Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																					Locations: []*string{
		// 																																																																																																																																																						to.Ptr("EASTASIA")},
		// 																																																																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																						},
		// 																																																																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																																																																					},
		// 																																																																																																																																																					{
		// 																																																																																																																																																						Name: to.Ptr("F0"),
		// 																																																																																																																																																						Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																						Locations: []*string{
		// 																																																																																																																																																							to.Ptr("EASTASIA")},
		// 																																																																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																							},
		// 																																																																																																																																																							Tier: to.Ptr("Free"),
		// 																																																																																																																																																						},
		// 																																																																																																																																																						{
		// 																																																																																																																																																							Name: to.Ptr("S0"),
		// 																																																																																																																																																							Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																							Locations: []*string{
		// 																																																																																																																																																								to.Ptr("EASTASIA")},
		// 																																																																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																								},
		// 																																																																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																																																																							},
		// 																																																																																																																																																							{
		// 																																																																																																																																																								Name: to.Ptr("S1"),
		// 																																																																																																																																																								Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																								Locations: []*string{
		// 																																																																																																																																																									to.Ptr("EASTASIA")},
		// 																																																																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																									},
		// 																																																																																																																																																									Tier: to.Ptr("Standard"),
		// 																																																																																																																																																								},
		// 																																																																																																																																																								{
		// 																																																																																																																																																									Name: to.Ptr("S2"),
		// 																																																																																																																																																									Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																									Locations: []*string{
		// 																																																																																																																																																										to.Ptr("EASTASIA")},
		// 																																																																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																										},
		// 																																																																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																																																																									},
		// 																																																																																																																																																									{
		// 																																																																																																																																																										Name: to.Ptr("S3"),
		// 																																																																																																																																																										Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																										Locations: []*string{
		// 																																																																																																																																																											to.Ptr("EASTASIA")},
		// 																																																																																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																											},
		// 																																																																																																																																																											Tier: to.Ptr("Standard"),
		// 																																																																																																																																																										},
		// 																																																																																																																																																										{
		// 																																																																																																																																																											Name: to.Ptr("S4"),
		// 																																																																																																																																																											Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																											Locations: []*string{
		// 																																																																																																																																																												to.Ptr("EASTASIA")},
		// 																																																																																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																												},
		// 																																																																																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																																																																																											},
		// 																																																																																																																																																											{
		// 																																																																																																																																																												Name: to.Ptr("F0"),
		// 																																																																																																																																																												Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																												Locations: []*string{
		// 																																																																																																																																																													to.Ptr("EASTASIA")},
		// 																																																																																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																													},
		// 																																																																																																																																																													Tier: to.Ptr("Free"),
		// 																																																																																																																																																												},
		// 																																																																																																																																																												{
		// 																																																																																																																																																													Name: to.Ptr("S0"),
		// 																																																																																																																																																													Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																													Locations: []*string{
		// 																																																																																																																																																														to.Ptr("EASTASIA")},
		// 																																																																																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																														},
		// 																																																																																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																																																																																													},
		// 																																																																																																																																																													{
		// 																																																																																																																																																														Name: to.Ptr("F0"),
		// 																																																																																																																																																														Kind: to.Ptr("Face"),
		// 																																																																																																																																																														Locations: []*string{
		// 																																																																																																																																																															to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																															},
		// 																																																																																																																																																															Tier: to.Ptr("Free"),
		// 																																																																																																																																																														},
		// 																																																																																																																																																														{
		// 																																																																																																																																																															Name: to.Ptr("S0"),
		// 																																																																																																																																																															Kind: to.Ptr("Face"),
		// 																																																																																																																																																															Locations: []*string{
		// 																																																																																																																																																																to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																},
		// 																																																																																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																																																																																															},
		// 																																																																																																																																																															{
		// 																																																																																																																																																																Name: to.Ptr("F0"),
		// 																																																																																																																																																																Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																Locations: []*string{
		// 																																																																																																																																																																	to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																	},
		// 																																																																																																																																																																	Tier: to.Ptr("Free"),
		// 																																																																																																																																																																},
		// 																																																																																																																																																																{
		// 																																																																																																																																																																	Name: to.Ptr("S0"),
		// 																																																																																																																																																																	Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																	Locations: []*string{
		// 																																																																																																																																																																		to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																		},
		// 																																																																																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																	},
		// 																																																																																																																																																																	{
		// 																																																																																																																																																																		Name: to.Ptr("F0"),
		// 																																																																																																																																																																		Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																		Locations: []*string{
		// 																																																																																																																																																																			to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																			},
		// 																																																																																																																																																																			Tier: to.Ptr("Free"),
		// 																																																																																																																																																																		},
		// 																																																																																																																																																																		{
		// 																																																																																																																																																																			Name: to.Ptr("S0"),
		// 																																																																																																																																																																			Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																			Locations: []*string{
		// 																																																																																																																																																																				to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																				},
		// 																																																																																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																			},
		// 																																																																																																																																																																			{
		// 																																																																																																																																																																				Name: to.Ptr("F0"),
		// 																																																																																																																																																																				Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																				Locations: []*string{
		// 																																																																																																																																																																					to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																					},
		// 																																																																																																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																																																																																																				},
		// 																																																																																																																																																																				{
		// 																																																																																																																																																																					Name: to.Ptr("S1"),
		// 																																																																																																																																																																					Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																					Locations: []*string{
		// 																																																																																																																																																																						to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																						},
		// 																																																																																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																					},
		// 																																																																																																																																																																					{
		// 																																																																																																																																																																						Name: to.Ptr("F0"),
		// 																																																																																																																																																																						Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																						Locations: []*string{
		// 																																																																																																																																																																							to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																							},
		// 																																																																																																																																																																							Tier: to.Ptr("Free"),
		// 																																																																																																																																																																						},
		// 																																																																																																																																																																						{
		// 																																																																																																																																																																							Name: to.Ptr("S0"),
		// 																																																																																																																																																																							Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																							Locations: []*string{
		// 																																																																																																																																																																								to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																								},
		// 																																																																																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																							},
		// 																																																																																																																																																																							{
		// 																																																																																																																																																																								Name: to.Ptr("S1"),
		// 																																																																																																																																																																								Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																								Locations: []*string{
		// 																																																																																																																																																																									to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																									},
		// 																																																																																																																																																																									Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																								},
		// 																																																																																																																																																																								{
		// 																																																																																																																																																																									Name: to.Ptr("S2"),
		// 																																																																																																																																																																									Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																									Locations: []*string{
		// 																																																																																																																																																																										to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																										},
		// 																																																																																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																									},
		// 																																																																																																																																																																									{
		// 																																																																																																																																																																										Name: to.Ptr("S3"),
		// 																																																																																																																																																																										Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																										Locations: []*string{
		// 																																																																																																																																																																											to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																											},
		// 																																																																																																																																																																											Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																										},
		// 																																																																																																																																																																										{
		// 																																																																																																																																																																											Name: to.Ptr("S4"),
		// 																																																																																																																																																																											Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																											Locations: []*string{
		// 																																																																																																																																																																												to.Ptr("WESTCENTRALUS")},
		// 																																																																																																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																												},
		// 																																																																																																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																											},
		// 																																																																																																																																																																											{
		// 																																																																																																																																																																												Name: to.Ptr("F0"),
		// 																																																																																																																																																																												Kind: to.Ptr("Face"),
		// 																																																																																																																																																																												Locations: []*string{
		// 																																																																																																																																																																													to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																													},
		// 																																																																																																																																																																													Tier: to.Ptr("Free"),
		// 																																																																																																																																																																												},
		// 																																																																																																																																																																												{
		// 																																																																																																																																																																													Name: to.Ptr("S0"),
		// 																																																																																																																																																																													Kind: to.Ptr("Face"),
		// 																																																																																																																																																																													Locations: []*string{
		// 																																																																																																																																																																														to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																														},
		// 																																																																																																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																													},
		// 																																																																																																																																																																													{
		// 																																																																																																																																																																														Name: to.Ptr("F0"),
		// 																																																																																																																																																																														Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																														Locations: []*string{
		// 																																																																																																																																																																															to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																															},
		// 																																																																																																																																																																															Tier: to.Ptr("Free"),
		// 																																																																																																																																																																														},
		// 																																																																																																																																																																														{
		// 																																																																																																																																																																															Name: to.Ptr("S1"),
		// 																																																																																																																																																																															Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																															Locations: []*string{
		// 																																																																																																																																																																																to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																},
		// 																																																																																																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																															},
		// 																																																																																																																																																																															{
		// 																																																																																																																																																																																Name: to.Ptr("F0"),
		// 																																																																																																																																																																																Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																																Locations: []*string{
		// 																																																																																																																																																																																	to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																	},
		// 																																																																																																																																																																																	Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																},
		// 																																																																																																																																																																																{
		// 																																																																																																																																																																																	Name: to.Ptr("S0"),
		// 																																																																																																																																																																																	Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																																	Locations: []*string{
		// 																																																																																																																																																																																		to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																		},
		// 																																																																																																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																	},
		// 																																																																																																																																																																																	{
		// 																																																																																																																																																																																		Name: to.Ptr("F0"),
		// 																																																																																																																																																																																		Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																		Locations: []*string{
		// 																																																																																																																																																																																			to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																			},
		// 																																																																																																																																																																																			Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																		},
		// 																																																																																																																																																																																		{
		// 																																																																																																																																																																																			Name: to.Ptr("S0"),
		// 																																																																																																																																																																																			Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																			Locations: []*string{
		// 																																																																																																																																																																																				to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																				},
		// 																																																																																																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																			},
		// 																																																																																																																																																																																			{
		// 																																																																																																																																																																																				Name: to.Ptr("S1"),
		// 																																																																																																																																																																																				Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																				Locations: []*string{
		// 																																																																																																																																																																																					to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																					},
		// 																																																																																																																																																																																					Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																				},
		// 																																																																																																																																																																																				{
		// 																																																																																																																																																																																					Name: to.Ptr("S2"),
		// 																																																																																																																																																																																					Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																					Locations: []*string{
		// 																																																																																																																																																																																						to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																						},
		// 																																																																																																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																					},
		// 																																																																																																																																																																																					{
		// 																																																																																																																																																																																						Name: to.Ptr("S3"),
		// 																																																																																																																																																																																						Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																						Locations: []*string{
		// 																																																																																																																																																																																							to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																							},
		// 																																																																																																																																																																																							Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																						},
		// 																																																																																																																																																																																						{
		// 																																																																																																																																																																																							Name: to.Ptr("S4"),
		// 																																																																																																																																																																																							Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																							Locations: []*string{
		// 																																																																																																																																																																																								to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																								},
		// 																																																																																																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																							},
		// 																																																																																																																																																																																							{
		// 																																																																																																																																																																																								Name: to.Ptr("F0"),
		// 																																																																																																																																																																																								Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																																								Locations: []*string{
		// 																																																																																																																																																																																									to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																									},
		// 																																																																																																																																																																																									Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																								},
		// 																																																																																																																																																																																								{
		// 																																																																																																																																																																																									Name: to.Ptr("S0"),
		// 																																																																																																																																																																																									Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																																									Locations: []*string{
		// 																																																																																																																																																																																										to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																										},
		// 																																																																																																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																									},
		// 																																																																																																																																																																																									{
		// 																																																																																																																																																																																										Name: to.Ptr("F0"),
		// 																																																																																																																																																																																										Kind: to.Ptr("CustomVision.Training"),
		// 																																																																																																																																																																																										Locations: []*string{
		// 																																																																																																																																																																																											to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																											},
		// 																																																																																																																																																																																											Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																										},
		// 																																																																																																																																																																																										{
		// 																																																																																																																																																																																											Name: to.Ptr("S0"),
		// 																																																																																																																																																																																											Kind: to.Ptr("CustomVision.Training"),
		// 																																																																																																																																																																																											Locations: []*string{
		// 																																																																																																																																																																																												to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																												},
		// 																																																																																																																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																											},
		// 																																																																																																																																																																																											{
		// 																																																																																																																																																																																												Name: to.Ptr("F0"),
		// 																																																																																																																																																																																												Kind: to.Ptr("CustomVision.Prediction"),
		// 																																																																																																																																																																																												Locations: []*string{
		// 																																																																																																																																																																																													to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																													},
		// 																																																																																																																																																																																													Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																												},
		// 																																																																																																																																																																																												{
		// 																																																																																																																																																																																													Name: to.Ptr("S0"),
		// 																																																																																																																																																																																													Kind: to.Ptr("CustomVision.Prediction"),
		// 																																																																																																																																																																																													Locations: []*string{
		// 																																																																																																																																																																																														to.Ptr("SOUTHCENTRALUS")},
		// 																																																																																																																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																														},
		// 																																																																																																																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																													},
		// 																																																																																																																																																																																													{
		// 																																																																																																																																																																																														Name: to.Ptr("F0"),
		// 																																																																																																																																																																																														Kind: to.Ptr("Face"),
		// 																																																																																																																																																																																														Locations: []*string{
		// 																																																																																																																																																																																															to.Ptr("EASTUS")},
		// 																																																																																																																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																															},
		// 																																																																																																																																																																																															Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																														},
		// 																																																																																																																																																																																														{
		// 																																																																																																																																																																																															Name: to.Ptr("S0"),
		// 																																																																																																																																																																																															Kind: to.Ptr("Face"),
		// 																																																																																																																																																																																															Locations: []*string{
		// 																																																																																																																																																																																																to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																},
		// 																																																																																																																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																															},
		// 																																																																																																																																																																																															{
		// 																																																																																																																																																																																																Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																																																Locations: []*string{
		// 																																																																																																																																																																																																	to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																	},
		// 																																																																																																																																																																																																	Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																},
		// 																																																																																																																																																																																																{
		// 																																																																																																																																																																																																	Name: to.Ptr("S1"),
		// 																																																																																																																																																																																																	Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																																																	Locations: []*string{
		// 																																																																																																																																																																																																		to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																		},
		// 																																																																																																																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																	},
		// 																																																																																																																																																																																																	{
		// 																																																																																																																																																																																																		Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																		Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																																																		Locations: []*string{
		// 																																																																																																																																																																																																			to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																			},
		// 																																																																																																																																																																																																			Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																		},
		// 																																																																																																																																																																																																		{
		// 																																																																																																																																																																																																			Name: to.Ptr("S0"),
		// 																																																																																																																																																																																																			Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																																																			Locations: []*string{
		// 																																																																																																																																																																																																				to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																				},
		// 																																																																																																																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																			},
		// 																																																																																																																																																																																																			{
		// 																																																																																																																																																																																																				Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																				Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																				Locations: []*string{
		// 																																																																																																																																																																																																					to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																					},
		// 																																																																																																																																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																				},
		// 																																																																																																																																																																																																				{
		// 																																																																																																																																																																																																					Name: to.Ptr("S0"),
		// 																																																																																																																																																																																																					Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																					Locations: []*string{
		// 																																																																																																																																																																																																						to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																						},
		// 																																																																																																																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																					},
		// 																																																																																																																																																																																																					{
		// 																																																																																																																																																																																																						Name: to.Ptr("S1"),
		// 																																																																																																																																																																																																						Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																						Locations: []*string{
		// 																																																																																																																																																																																																							to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																							},
		// 																																																																																																																																																																																																							Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																						},
		// 																																																																																																																																																																																																						{
		// 																																																																																																																																																																																																							Name: to.Ptr("S2"),
		// 																																																																																																																																																																																																							Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																							Locations: []*string{
		// 																																																																																																																																																																																																								to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																								},
		// 																																																																																																																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																							},
		// 																																																																																																																																																																																																							{
		// 																																																																																																																																																																																																								Name: to.Ptr("S3"),
		// 																																																																																																																																																																																																								Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																								Locations: []*string{
		// 																																																																																																																																																																																																									to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																									},
		// 																																																																																																																																																																																																									Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																								},
		// 																																																																																																																																																																																																								{
		// 																																																																																																																																																																																																									Name: to.Ptr("S4"),
		// 																																																																																																																																																																																																									Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																									Locations: []*string{
		// 																																																																																																																																																																																																										to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																										},
		// 																																																																																																																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																									},
		// 																																																																																																																																																																																																									{
		// 																																																																																																																																																																																																										Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																										Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																																																										Locations: []*string{
		// 																																																																																																																																																																																																											to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																											ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																											Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																											},
		// 																																																																																																																																																																																																											Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																										},
		// 																																																																																																																																																																																																										{
		// 																																																																																																																																																																																																											Name: to.Ptr("S0"),
		// 																																																																																																																																																																																																											Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																																																											Locations: []*string{
		// 																																																																																																																																																																																																												to.Ptr("EASTUS")},
		// 																																																																																																																																																																																																												ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																												Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																												},
		// 																																																																																																																																																																																																												Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																											},
		// 																																																																																																																																																																																																											{
		// 																																																																																																																																																																																																												Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																												Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																																																												Locations: []*string{
		// 																																																																																																																																																																																																													to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																													ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																													Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																													},
		// 																																																																																																																																																																																																													Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																												},
		// 																																																																																																																																																																																																												{
		// 																																																																																																																																																																																																													Name: to.Ptr("S0"),
		// 																																																																																																																																																																																																													Kind: to.Ptr("ContentModerator"),
		// 																																																																																																																																																																																																													Locations: []*string{
		// 																																																																																																																																																																																																														to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																														ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																														Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																														},
		// 																																																																																																																																																																																																														Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																													},
		// 																																																																																																																																																																																																													{
		// 																																																																																																																																																																																																														Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																														Kind: to.Ptr("Face"),
		// 																																																																																																																																																																																																														Locations: []*string{
		// 																																																																																																																																																																																																															to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																															ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																															Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																															},
		// 																																																																																																																																																																																																															Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																														},
		// 																																																																																																																																																																																																														{
		// 																																																																																																																																																																																																															Name: to.Ptr("S0"),
		// 																																																																																																																																																																																																															Kind: to.Ptr("Face"),
		// 																																																																																																																																																																																																															Locations: []*string{
		// 																																																																																																																																																																																																																to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																},
		// 																																																																																																																																																																																																																Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																															},
		// 																																																																																																																																																																																																															{
		// 																																																																																																																																																																																																																Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																																Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																																																																Locations: []*string{
		// 																																																																																																																																																																																																																	to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																	ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																	Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																	},
		// 																																																																																																																																																																																																																	Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																																},
		// 																																																																																																																																																																																																																{
		// 																																																																																																																																																																																																																	Name: to.Ptr("S0"),
		// 																																																																																																																																																																																																																	Kind: to.Ptr("LUIS"),
		// 																																																																																																																																																																																																																	Locations: []*string{
		// 																																																																																																																																																																																																																		to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																		ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																		Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																		},
		// 																																																																																																																																																																																																																		Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																																	},
		// 																																																																																																																																																																																																																	{
		// 																																																																																																																																																																																																																		Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																																		Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																																																																		Locations: []*string{
		// 																																																																																																																																																																																																																			to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																			ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																			Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																			},
		// 																																																																																																																																																																																																																			Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																																		},
		// 																																																																																																																																																																																																																		{
		// 																																																																																																																																																																																																																			Name: to.Ptr("S1"),
		// 																																																																																																																																																																																																																			Kind: to.Ptr("ComputerVision"),
		// 																																																																																																																																																																																																																			Locations: []*string{
		// 																																																																																																																																																																																																																				to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																				ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																				Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																				},
		// 																																																																																																																																																																																																																				Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																																			},
		// 																																																																																																																																																																																																																			{
		// 																																																																																																																																																																																																																				Name: to.Ptr("F0"),
		// 																																																																																																																																																																																																																				Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																																				Locations: []*string{
		// 																																																																																																																																																																																																																					to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																					ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																					Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																					},
		// 																																																																																																																																																																																																																					Tier: to.Ptr("Free"),
		// 																																																																																																																																																																																																																				},
		// 																																																																																																																																																																																																																				{
		// 																																																																																																																																																																																																																					Name: to.Ptr("S0"),
		// 																																																																																																																																																																																																																					Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																																					Locations: []*string{
		// 																																																																																																																																																																																																																						to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																						ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																						Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																						},
		// 																																																																																																																																																																																																																						Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																																					},
		// 																																																																																																																																																																																																																					{
		// 																																																																																																																																																																																																																						Name: to.Ptr("S1"),
		// 																																																																																																																																																																																																																						Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																																						Locations: []*string{
		// 																																																																																																																																																																																																																							to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																							ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																							Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																							},
		// 																																																																																																																																																																																																																							Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																																						},
		// 																																																																																																																																																																																																																						{
		// 																																																																																																																																																																																																																							Name: to.Ptr("S2"),
		// 																																																																																																																																																																																																																							Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																																							Locations: []*string{
		// 																																																																																																																																																																																																																								to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																								ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																								Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																								},
		// 																																																																																																																																																																																																																								Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																																							},
		// 																																																																																																																																																																																																																							{
		// 																																																																																																																																																																																																																								Name: to.Ptr("S3"),
		// 																																																																																																																																																																																																																								Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																																								Locations: []*string{
		// 																																																																																																																																																																																																																									to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																									ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																									Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																									},
		// 																																																																																																																																																																																																																									Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																																								},
		// 																																																																																																																																																																																																																								{
		// 																																																																																																																																																																																																																									Name: to.Ptr("S4"),
		// 																																																																																																																																																																																																																									Kind: to.Ptr("TextAnalytics"),
		// 																																																																																																																																																																																																																									Locations: []*string{
		// 																																																																																																																																																																																																																										to.Ptr("EASTUS2")},
		// 																																																																																																																																																																																																																										ResourceType: to.Ptr("accounts"),
		// 																																																																																																																																																																																																																										Restrictions: []*armcognitiveservices.ResourceSKURestrictions{
		// 																																																																																																																																																																																																																										},
		// 																																																																																																																																																																																																																										Tier: to.Ptr("Standard"),
		// 																																																																																																																																																																																																																								}},
		// 																																																																																																																																																																																																																							}
	}
}
Output:

type ResourceSKUsClientListOptions added in v0.3.0

type ResourceSKUsClientListOptions struct {
}

ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.NewListPager method.

type ResourceSKUsClientListResponse added in v0.3.0

type ResourceSKUsClientListResponse struct {
	// The Get Skus operation response.
	ResourceSKUListResult
}

ResourceSKUsClientListResponse contains the response from method ResourceSKUsClient.NewListPager.

type RoutingMethods added in v1.3.0

type RoutingMethods string

RoutingMethods - Multiregion routing methods.

const (
	RoutingMethodsPerformance RoutingMethods = "Performance"
	RoutingMethodsPriority    RoutingMethods = "Priority"
	RoutingMethodsWeighted    RoutingMethods = "Weighted"
)

func PossibleRoutingMethodsValues added in v1.3.0

func PossibleRoutingMethodsValues() []RoutingMethods

PossibleRoutingMethodsValues returns the possible values for the RoutingMethods const type.

type SKU

type SKU struct {
	// REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code
	Name *string

	// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the
	// resource this may be omitted.
	Capacity *int32

	// If the service has different generations of hardware, for the same SKU, then that can be captured here.
	Family *string

	// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
	Size *string

	// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required
	// on a PUT.
	Tier *SKUTier
}

SKU - The resource model definition representing SKU

func (SKU) MarshalJSON added in v1.2.0

func (s SKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.2.0

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUAvailability

type SKUAvailability struct {
	// The Kind of the resource.
	Kind *string

	// Additional error message.
	Message *string

	// Reason why the SKU is not available.
	Reason *string

	// Indicates the given SKU is available or not.
	SKUAvailable *bool

	// The SKU of Cognitive Services account.
	SKUName *string

	// The Type of the resource.
	Type *string
}

SKUAvailability - SKU availability.

func (SKUAvailability) MarshalJSON added in v1.2.0

func (s SKUAvailability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUAvailability.

func (*SKUAvailability) UnmarshalJSON added in v1.2.0

func (s *SKUAvailability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUAvailability.

type SKUAvailabilityListResult

type SKUAvailabilityListResult struct {
	// Check SKU availability result list.
	Value []*SKUAvailability
}

SKUAvailabilityListResult - Check SKU availability result list.

func (SKUAvailabilityListResult) MarshalJSON

func (s SKUAvailabilityListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUAvailabilityListResult.

func (*SKUAvailabilityListResult) UnmarshalJSON added in v1.2.0

func (s *SKUAvailabilityListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUAvailabilityListResult.

type SKUCapability

type SKUCapability struct {
	// The name of the SkuCapability.
	Name *string

	// The value of the SkuCapability.
	Value *string
}

SKUCapability - SkuCapability indicates the capability of a certain feature.

func (SKUCapability) MarshalJSON added in v1.2.0

func (s SKUCapability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUCapability.

func (*SKUCapability) UnmarshalJSON added in v1.2.0

func (s *SKUCapability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability.

type SKUChangeInfo

type SKUChangeInfo struct {
	// Gets the count of downgrades.
	CountOfDowngrades *float32

	// Gets the count of upgrades after downgrades.
	CountOfUpgradesAfterDowngrades *float32

	// Gets the last change date.
	LastChangeDate *string
}

SKUChangeInfo - Sku change info of account.

func (SKUChangeInfo) MarshalJSON added in v1.2.0

func (s SKUChangeInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUChangeInfo.

func (*SKUChangeInfo) UnmarshalJSON added in v1.2.0

func (s *SKUChangeInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUChangeInfo.

type SKUTier

type SKUTier string

SKUTier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

const (
	SKUTierBasic      SKUTier = "Basic"
	SKUTierEnterprise SKUTier = "Enterprise"
	SKUTierFree       SKUTier = "Free"
	SKUTierPremium    SKUTier = "Premium"
	SKUTierStandard   SKUTier = "Standard"
)

func PossibleSKUTierValues

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type ThrottlingRule

type ThrottlingRule struct {
	Count                    *float32
	DynamicThrottlingEnabled *bool
	Key                      *string
	MatchPatterns            []*RequestMatchPattern
	MinCount                 *float32
	RenewalPeriod            *float32
}

func (ThrottlingRule) MarshalJSON

func (t ThrottlingRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ThrottlingRule.

func (*ThrottlingRule) UnmarshalJSON added in v1.2.0

func (t *ThrottlingRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ThrottlingRule.

type UnitType

type UnitType string

UnitType - The unit of the metric.

const (
	UnitTypeBytes          UnitType = "Bytes"
	UnitTypeBytesPerSecond UnitType = "BytesPerSecond"
	UnitTypeCount          UnitType = "Count"
	UnitTypeCountPerSecond UnitType = "CountPerSecond"
	UnitTypeMilliseconds   UnitType = "Milliseconds"
	UnitTypePercent        UnitType = "Percent"
	UnitTypeSeconds        UnitType = "Seconds"
)

func PossibleUnitTypeValues

func PossibleUnitTypeValues() []UnitType

PossibleUnitTypeValues returns the possible values for the UnitType const type.

type Usage

type Usage struct {
	// Current value for this metric.
	CurrentValue *float64

	// Maximum value for this metric.
	Limit *float64

	// The name information for the metric.
	Name *MetricName

	// Next reset time for current quota.
	NextResetTime *string

	// The quota period used to summarize the usage values.
	QuotaPeriod *string

	// Cognitive Services account quota usage status.
	Status *QuotaUsageStatus

	// The unit of the metric.
	Unit *UnitType
}

Usage - The usage data for a usage request.

func (Usage) MarshalJSON added in v1.2.0

func (u Usage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Usage.

func (*Usage) UnmarshalJSON added in v1.2.0

func (u *Usage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Usage.

type UsageListResult

type UsageListResult struct {
	// The link used to get the next page of Usages.
	NextLink *string

	// The list of usages for Cognitive Service account.
	Value []*Usage
}

UsageListResult - The response to a list usage request.

func (UsageListResult) MarshalJSON

func (u UsageListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsageListResult.

func (*UsageListResult) UnmarshalJSON added in v1.2.0

func (u *UsageListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageListResult.

type UsagesClient added in v1.5.0

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

UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.

func NewUsagesClient added in v1.5.0

func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)

NewUsagesClient creates a new instance of UsagesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*UsagesClient) NewListPager added in v1.5.0

func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse]

NewListPager - Get usages for the requested subscription

Generated from API version 2023-05-01

  • location - Resource location.
  • options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2023-05-01/examples/ListUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcognitiveservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewUsagesClient().NewListPager("WestUS", &armcognitiveservices.UsagesClientListOptions{Filter: 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.UsageListResult = armcognitiveservices.UsageListResult{
		// 	Value: []*armcognitiveservices.Usage{
		// 		{
		// 			Name: &armcognitiveservices.MetricName{
		// 				LocalizedValue: to.Ptr("Cognitive Services total account limit"),
		// 				Value: to.Ptr("AccountCount"),
		// 			},
		// 			CurrentValue: to.Ptr[float64](3),
		// 			Limit: to.Ptr[float64](200),
		// 			Unit: to.Ptr(armcognitiveservices.UnitTypeCount),
		// 	}},
		// }
	}
}
Output:

type UsagesClientListOptions added in v1.5.0

type UsagesClientListOptions struct {
	// An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of
	// the metric, can have an or of multiple names).
	Filter *string
}

UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.

type UsagesClientListResponse added in v1.5.0

type UsagesClientListResponse struct {
	// The response to a list usage request.
	UsageListResult
}

UsagesClientListResponse contains the response from method UsagesClient.NewListPager.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; Client App Id associated with this identity.
	ClientID *string

	// READ-ONLY; Azure Active Directory principal ID associated with this Identity.
	PrincipalID *string
}

UserAssignedIdentity - User-assigned managed identity.

func (UserAssignedIdentity) MarshalJSON added in v1.2.0

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v1.2.0

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type UserOwnedStorage

type UserOwnedStorage struct {
	IdentityClientID *string

	// Full resource id of a Microsoft.Storage resource.
	ResourceID *string
}

UserOwnedStorage - The user owned storage for Cognitive Services account.

func (UserOwnedStorage) MarshalJSON added in v1.2.0

func (u UserOwnedStorage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserOwnedStorage.

func (*UserOwnedStorage) UnmarshalJSON added in v1.2.0

func (u *UserOwnedStorage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserOwnedStorage.

type VirtualNetworkRule

type VirtualNetworkRule struct {
	// REQUIRED; Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
	ID *string

	// Ignore missing vnet service endpoint or not.
	IgnoreMissingVnetServiceEndpoint *bool

	// Gets the state of virtual network rule.
	State *string
}

VirtualNetworkRule - A rule governing the accessibility from a specific virtual network.

func (VirtualNetworkRule) MarshalJSON added in v1.2.0

func (v VirtualNetworkRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule.

func (*VirtualNetworkRule) UnmarshalJSON added in v1.2.0

func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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