Documentation ¶
Overview ¶
Package cognitiveservices implements the Azure ARM Cognitiveservices service API version 2016-02-01-preview.
Cognitive Services Management Client
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type Account
- type AccountCreateParameters
- type AccountEnumerateSkusResult
- type AccountKeys
- type AccountListResult
- type AccountProperties
- type AccountUpdateParameters
- type AccountsClient
- func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, ...) (result Account, err error)
- func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, ...) (*http.Request, error)
- func (client AccountsClient) CreateResponder(resp *http.Response) (result Account, err error)
- func (client AccountsClient) CreateSender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error)
- func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
- func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
- func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error)
- func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
- func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result Account, err error)
- func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) List(ctx context.Context) (result AccountListResult, err error)
- func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResult, err error)
- func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)
- func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountListResult, err error)
- func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result AccountKeys, err error)
- func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
- func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountKeys, err error)
- func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client AccountsClient) ListResponder(resp *http.Response) (result AccountListResult, err error)
- func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) ListSkus(ctx context.Context, resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error)
- func (client AccountsClient) ListSkusPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
- func (client AccountsClient) ListSkusResponder(resp *http.Response) (result AccountEnumerateSkusResult, err error)
- func (client AccountsClient) ListSkusSender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, ...) (result AccountKeys, err error)
- func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, accountName string, ...) (*http.Request, error)
- func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result AccountKeys, err error)
- func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error)
- func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, ...) (result Account, err error)
- func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, ...) (*http.Request, error)
- func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error)
- func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error)
- type BaseClient
- type Error
- type ErrorBody
- type KeyName
- type Kind
- type ProvisioningState
- type RegenerateKeyParameters
- type ResourceAndSku
- type Sku
- type SkuName
- type SkuTier
Constants ¶
const (
// DefaultBaseURI is the default URI used for the service Cognitiveservices
DefaultBaseURI = "https://management.azure.com"
)
Variables ¶
This section is empty.
Functions ¶
func UserAgent ¶
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version ¶
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
Types ¶
type Account ¶
type Account struct { autorest.Response `json:"-"` // Etag - Entity Tag Etag *string `json:"etag,omitempty"` // ID - The id of the created account ID *string `json:"id,omitempty"` // Kind - Type of cognitive service account. Kind *string `json:"kind,omitempty"` // Location - The location of the resource Location *string `json:"location,omitempty"` // Name - The name of the created account Name *string `json:"name,omitempty"` *AccountProperties `json:"properties,omitempty"` Sku *Sku `json:"sku,omitempty"` // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. Tags map[string]*string `json:"tags"` // Type - Resource type Type *string `json:"type,omitempty"` }
Account cognitive Services Account is an Azure resource representing the provisioned account, its type, location and SKU.
func (Account) MarshalJSON ¶
MarshalJSON is the custom marshaler for Account.
func (*Account) UnmarshalJSON ¶
UnmarshalJSON is the custom unmarshaler for Account struct.
type AccountCreateParameters ¶
type AccountCreateParameters struct { Sku *Sku `json:"sku,omitempty"` // Kind - Required. Indicates the type of cognitive service account. Possible values include: 'Academic', 'BingAutosuggest', 'BingSearch', 'BingSpeech', 'BingSpellCheck', 'ComputerVision', 'ContentModerator', 'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' Kind Kind `json:"kind,omitempty"` // Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update the request will succeed. Location *string `json:"location,omitempty"` // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. Tags map[string]*string `json:"tags"` // Properties - Must exist in the request. Must not be null. Properties interface{} `json:"properties,omitempty"` }
AccountCreateParameters the parameters to provide for the account.
func (AccountCreateParameters) MarshalJSON ¶
func (acp AccountCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AccountCreateParameters.
type AccountEnumerateSkusResult ¶
type AccountEnumerateSkusResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; Gets the list of Cognitive Services accounts and their properties. Value *[]ResourceAndSku `json:"value,omitempty"` }
AccountEnumerateSkusResult the list of cognitive services accounts operation response.
type AccountKeys ¶
type AccountKeys struct { autorest.Response `json:"-"` // Key1 - Gets the value of key 1. Key1 *string `json:"key1,omitempty"` // Key2 - Gets the value of key 2. Key2 *string `json:"key2,omitempty"` }
AccountKeys the access keys for the cognitive services account.
type AccountListResult ¶
type AccountListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; Gets the list of Cognitive Services accounts and their properties. Value *[]Account `json:"value,omitempty"` }
AccountListResult the list of cognitive services accounts operation response.
type AccountProperties ¶
type AccountProperties struct { // ProvisioningState - READ-ONLY; Gets the status of the cognitive services account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Endpoint - Endpoint of the created account Endpoint *string `json:"endpoint,omitempty"` }
AccountProperties ...
type AccountUpdateParameters ¶
type AccountUpdateParameters struct { Sku *Sku `json:"sku,omitempty"` // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. Tags map[string]*string `json:"tags"` }
AccountUpdateParameters the parameters to provide for the account.
func (AccountUpdateParameters) MarshalJSON ¶
func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AccountUpdateParameters.
type AccountsClient ¶
type AccountsClient struct {
BaseClient
}
AccountsClient is the cognitive Services Management Client
func NewAccountsClient ¶
func NewAccountsClient(subscriptionID string) AccountsClient
NewAccountsClient creates an instance of the AccountsClient client.
func NewAccountsClientWithBaseURI ¶
func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient
NewAccountsClientWithBaseURI creates an instance of the AccountsClient client.
func (AccountsClient) Create ¶
func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (result Account, err error)
Create 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. Parameters: resourceGroupName - the name of the resource group within the user's subscription. accountName - the name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. parameters - the parameters to provide for the created account.
func (AccountsClient) CreatePreparer ¶
func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (*http.Request, error)
CreatePreparer prepares the Create request.
func (AccountsClient) CreateResponder ¶
func (client AccountsClient) CreateResponder(resp *http.Response) (result Account, err error)
CreateResponder handles the response to the Create request. The method always closes the http.Response Body.
func (AccountsClient) CreateSender ¶
CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) Delete ¶
func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error)
Delete deletes a Cognitive Services account from the resource group. Parameters: resourceGroupName - the name of the resource group within the user's subscription. accountName - the name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
func (AccountsClient) DeletePreparer ¶
func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (AccountsClient) DeleteResponder ¶
func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (AccountsClient) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) GetProperties ¶
func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error)
GetProperties returns a Cognitive Services account specified by the parameters. Parameters: resourceGroupName - the name of the resource group within the user's subscription. accountName - the name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
func (AccountsClient) GetPropertiesPreparer ¶
func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
GetPropertiesPreparer prepares the GetProperties request.
func (AccountsClient) GetPropertiesResponder ¶
func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result Account, err error)
GetPropertiesResponder handles the response to the GetProperties request. The method always closes the http.Response Body.
func (AccountsClient) GetPropertiesSender ¶
GetPropertiesSender sends the GetProperties request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) List ¶
func (client AccountsClient) List(ctx context.Context) (result AccountListResult, err error)
List returns all the resources of a particular type belonging to a subscription.
func (AccountsClient) ListByResourceGroup ¶
func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResult, err error)
ListByResourceGroup returns all the resources of a particular type belonging to a resource group Parameters: resourceGroupName - the name of the resource group within the user's subscription.
func (AccountsClient) ListByResourceGroupPreparer ¶
func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)
ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (AccountsClient) ListByResourceGroupResponder ¶
func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountListResult, err error)
ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.
func (AccountsClient) ListByResourceGroupSender ¶
ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) ListKeys ¶
func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result AccountKeys, err error)
ListKeys lists the account keys for the specified Cognitive Services account. Parameters: resourceGroupName - the name of the resource group within the user's subscription. accountName - the name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
func (AccountsClient) ListKeysPreparer ¶
func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
ListKeysPreparer prepares the ListKeys request.
func (AccountsClient) ListKeysResponder ¶
func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountKeys, err error)
ListKeysResponder handles the response to the ListKeys request. The method always closes the http.Response Body.
func (AccountsClient) ListKeysSender ¶
ListKeysSender sends the ListKeys request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) ListPreparer ¶
ListPreparer prepares the List request.
func (AccountsClient) ListResponder ¶
func (client AccountsClient) ListResponder(resp *http.Response) (result AccountListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (AccountsClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) ListSkus ¶
func (client AccountsClient) ListSkus(ctx context.Context, resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error)
ListSkus list available SKUs for the requested Cognitive Services account Parameters: resourceGroupName - the name of the resource group within the user's subscription. accountName - the name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
func (AccountsClient) ListSkusPreparer ¶
func (client AccountsClient) ListSkusPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)
ListSkusPreparer prepares the ListSkus request.
func (AccountsClient) ListSkusResponder ¶
func (client AccountsClient) ListSkusResponder(resp *http.Response) (result AccountEnumerateSkusResult, err error)
ListSkusResponder handles the response to the ListSkus request. The method always closes the http.Response Body.
func (AccountsClient) ListSkusSender ¶
ListSkusSender sends the ListSkus request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) RegenerateKey ¶
func (client AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, body RegenerateKeyParameters) (result AccountKeys, err error)
RegenerateKey regenerates the specified account key for the specified Cognitive Services account. Parameters: resourceGroupName - the name of the resource group within the user's subscription. accountName - the name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. body - regenerate key parameters.
func (AccountsClient) RegenerateKeyPreparer ¶
func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, accountName string, body RegenerateKeyParameters) (*http.Request, error)
RegenerateKeyPreparer prepares the RegenerateKey request.
func (AccountsClient) RegenerateKeyResponder ¶
func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result AccountKeys, err error)
RegenerateKeyResponder handles the response to the RegenerateKey request. The method always closes the http.Response Body.
func (AccountsClient) RegenerateKeySender ¶
RegenerateKeySender sends the RegenerateKey request. The method will close the http.Response Body if it receives an error.
func (AccountsClient) Update ¶
func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, body AccountUpdateParameters) (result Account, err error)
Update updates a Cognitive Services account Parameters: resourceGroupName - the name of the resource group within the user's subscription. accountName - the name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. body - the parameters to provide for the created account.
func (AccountsClient) UpdatePreparer ¶
func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, body AccountUpdateParameters) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (AccountsClient) UpdateResponder ¶
func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error)
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (AccountsClient) UpdateSender ¶
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
type BaseClient ¶
BaseClient is the base client for Cognitiveservices.
func New ¶
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient
NewWithBaseURI creates an instance of the BaseClient client.
type ErrorBody ¶
type ErrorBody struct { // Code - error code Code *string `json:"code,omitempty"` // Message - error message Message *string `json:"message,omitempty"` }
ErrorBody ...
type KeyName ¶
type KeyName string
KeyName enumerates the values for key name.
func PossibleKeyNameValues ¶
func PossibleKeyNameValues() []KeyName
PossibleKeyNameValues returns an array of possible values for the KeyName const type.
type Kind ¶
type Kind string
Kind enumerates the values for kind.
const ( // Academic ... Academic Kind = "Academic" // BingAutosuggest ... BingAutosuggest Kind = "Bing.Autosuggest" // BingSearch ... BingSearch Kind = "Bing.Search" // BingSpeech ... BingSpeech Kind = "Bing.Speech" // BingSpellCheck ... BingSpellCheck Kind = "Bing.SpellCheck" // ComputerVision ... ComputerVision Kind = "ComputerVision" // ContentModerator ... ContentModerator Kind = "ContentModerator" // Emotion ... Emotion Kind = "Emotion" // Face ... Face Kind = "Face" // LUIS ... LUIS Kind = "LUIS" // Recommendations ... Recommendations Kind = "Recommendations" // SpeakerRecognition ... SpeakerRecognition Kind = "SpeakerRecognition" // Speech ... Speech Kind = "Speech" // SpeechTranslation ... SpeechTranslation Kind = "SpeechTranslation" // TextAnalytics ... TextAnalytics Kind = "TextAnalytics" // TextTranslation ... TextTranslation Kind = "TextTranslation" // WebLM ... WebLM Kind = "WebLM" )
func PossibleKindValues ¶
func PossibleKindValues() []Kind
PossibleKindValues returns an array of possible values for the Kind const type.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState enumerates the values for provisioning state.
const ( // Creating ... Creating ProvisioningState = "Creating" // Failed ... Failed ProvisioningState = "Failed" // ResolvingDNS ... ResolvingDNS ProvisioningState = "ResolvingDNS" // Succeeded ... Succeeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
type RegenerateKeyParameters ¶
type RegenerateKeyParameters struct { // KeyName - key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' KeyName KeyName `json:"keyName,omitempty"` }
RegenerateKeyParameters regenerate key parameters.
type ResourceAndSku ¶
type ResourceAndSku struct { // ResourceType - Resource Namespace and Type ResourceType *string `json:"resourceType,omitempty"` Sku *Sku `json:"sku,omitempty"` }
ResourceAndSku ...
type Sku ¶
type Sku struct { // Name - Gets or sets the sku name. Required for account creation, optional for update. Possible values include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' Name SkuName `json:"name,omitempty"` // Tier - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard', 'Premium' Tier SkuTier `json:"tier,omitempty"` }
Sku the SKU of the cognitive services account.
type SkuName ¶
type SkuName string
SkuName enumerates the values for sku name.
const ( // F0 ... F0 SkuName = "F0" // P0 ... P0 SkuName = "P0" // P1 ... P1 SkuName = "P1" // P2 ... P2 SkuName = "P2" // S0 ... S0 SkuName = "S0" // S1 ... S1 SkuName = "S1" // S2 ... S2 SkuName = "S2" // S3 ... S3 SkuName = "S3" // S4 ... S4 SkuName = "S4" // S5 ... S5 SkuName = "S5" // S6 ... S6 SkuName = "S6" )
func PossibleSkuNameValues ¶
func PossibleSkuNameValues() []SkuName
PossibleSkuNameValues returns an array of possible values for the SkuName const type.