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(resourceGroupName string, accountName string, ...) (result Account, err error)
- func (client AccountsClient) CreatePreparer(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(resourceGroupName string, accountName string) (result autorest.Response, err error)
- func (client AccountsClient) DeletePreparer(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(resourceGroupName string, accountName string) (result Account, err error)
- func (client AccountsClient) GetPropertiesPreparer(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() (result AccountListResult, err error)
- func (client AccountsClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error)
- func (client AccountsClient) ListByResourceGroupPreparer(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(resourceGroupName string, accountName string) (result AccountKeys, err error)
- func (client AccountsClient) ListKeysPreparer(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() (*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(resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error)
- func (client AccountsClient) ListSkusPreparer(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(resourceGroupName string, accountName string, body RegenerateKeyParameters) (result AccountKeys, err error)
- func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, accountName string, body RegenerateKeyParameters) (*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(resourceGroupName string, accountName string, body AccountUpdateParameters) (result Account, err error)
- func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountName string, body AccountUpdateParameters) (*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 Error
- type ErrorBody
- type KeyName
- type Kind
- type ManagementClient
- type ProvisioningState
- type RegenerateKeyParameters
- type ResourceAndSku
- type Sku
- type SkuName
- type SkuTier
Constants ¶
const ( // APIVersion is the version of the Cognitiveservices APIVersion = "2016-02-01-preview" // 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 *string `json:"etag,omitempty"` ID *string `json:"id,omitempty"` Kind *string `json:"kind,omitempty"` Location *string `json:"location,omitempty"` Name *string `json:"name,omitempty"` Properties *AccountProperties `json:"properties,omitempty"` Sku *Sku `json:"sku,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
Account is cognitive Services Account is an Azure resource representing the provisioned account, its type, location and SKU.
type AccountCreateParameters ¶
type AccountCreateParameters struct { Sku *Sku `json:"sku,omitempty"` Kind Kind `json:"kind,omitempty"` Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` Properties *map[string]interface{} `json:"properties,omitempty"` }
AccountCreateParameters is the parameters to provide for the account.
type AccountEnumerateSkusResult ¶
type AccountEnumerateSkusResult struct { autorest.Response `json:"-"` Value *[]ResourceAndSku `json:"value,omitempty"` }
AccountEnumerateSkusResult is the list of cognitive services accounts operation response.
type AccountKeys ¶
type AccountKeys struct { autorest.Response `json:"-"` Key1 *string `json:"key1,omitempty"` Key2 *string `json:"key2,omitempty"` }
AccountKeys is the access keys for the cognitive services account.
type AccountListResult ¶
type AccountListResult struct { autorest.Response `json:"-"` Value *[]Account `json:"value,omitempty"` }
AccountListResult is the list of cognitive services accounts operation response.
type AccountProperties ¶
type AccountProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` Endpoint *string `json:"endpoint,omitempty"` }
AccountProperties is
type AccountUpdateParameters ¶
type AccountUpdateParameters struct { Sku *Sku `json:"sku,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` }
AccountUpdateParameters is the parameters to provide for the account.
type AccountsClient ¶
type AccountsClient struct {
ManagementClient
}
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(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.
resourceGroupName is the name of the resource group within the user's subscription. accountName is 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 is the parameters to provide for the created account.
func (AccountsClient) CreatePreparer ¶
func (client AccountsClient) CreatePreparer(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(resourceGroupName string, accountName string) (result autorest.Response, err error)
Delete deletes a Cognitive Services account from the resource group.
resourceGroupName is the name of the resource group within the user's subscription. accountName is 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(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(resourceGroupName string, accountName string) (result Account, err error)
GetProperties returns a Cognitive Services account specified by the parameters.
resourceGroupName is the name of the resource group within the user's subscription. accountName is 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(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() (result AccountListResult, err error)
List returns all the resources of a particular type belonging to a subscription.
func (AccountsClient) ListByResourceGroup ¶
func (client AccountsClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error)
ListByResourceGroup returns all the resources of a particular type belonging to a resource group
resourceGroupName is the name of the resource group within the user's subscription.
func (AccountsClient) ListByResourceGroupPreparer ¶
func (client AccountsClient) ListByResourceGroupPreparer(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(resourceGroupName string, accountName string) (result AccountKeys, err error)
ListKeys lists the account keys for the specified Cognitive Services account.
resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of the cognitive services account within the specified resource group. Congitive 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(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 ¶
func (client AccountsClient) ListPreparer() (*http.Request, error)
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(resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error)
ListSkus list available SKUs for the requested Cognitive Services account
resourceGroupName is the name of the resource group within the user's subscription. accountName is 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(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(resourceGroupName string, accountName string, body RegenerateKeyParameters) (result AccountKeys, err error)
RegenerateKey regenerates the specified account key for the specified Cognitive Services account.
resourceGroupName is the name of the resource group within the user's subscription. accountName is 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 is regenerate key parameters.
func (AccountsClient) RegenerateKeyPreparer ¶
func (client AccountsClient) RegenerateKeyPreparer(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(resourceGroupName string, accountName string, body AccountUpdateParameters) (result Account, err error)
Update updates a Cognitive Services account
resourceGroupName is the name of the resource group within the user's subscription. accountName is 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 is the parameters to provide for the created account.
func (AccountsClient) UpdatePreparer ¶
func (client AccountsClient) UpdatePreparer(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 ErrorBody ¶
type ErrorBody struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` }
ErrorBody is
type Kind ¶
type Kind string
Kind enumerates the values for kind.
const ( // ComputerVision specifies the computer vision state for kind. ComputerVision Kind = "ComputerVision" // Emotion specifies the emotion state for kind. Emotion Kind = "Emotion" // Face specifies the face state for kind. Face Kind = "Face" // LUIS specifies the luis state for kind. LUIS Kind = "LUIS" // Recommendations specifies the recommendations state for kind. Recommendations Kind = "Recommendations" // Speech specifies the speech state for kind. Speech Kind = "Speech" // TextAnalytics specifies the text analytics state for kind. TextAnalytics Kind = "TextAnalytics" // WebLM specifies the web lm state for kind. WebLM Kind = "WebLM" )
type ManagementClient ¶
type ManagementClient struct { autorest.Client BaseURI string APIVersion string SubscriptionID string }
ManagementClient is the base client for Cognitiveservices.
func New ¶
func New(subscriptionID string) ManagementClient
New creates an instance of the ManagementClient client.
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient
NewWithBaseURI creates an instance of the ManagementClient client.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState enumerates the values for provisioning state.
const ( // Creating specifies the creating state for provisioning state. Creating ProvisioningState = "Creating" // Failed specifies the failed state for provisioning state. Failed ProvisioningState = "Failed" // ResolvingDNS specifies the resolving dns state for provisioning state. ResolvingDNS ProvisioningState = "ResolvingDNS" // Succeeded specifies the succeeded state for provisioning state. Succeeded ProvisioningState = "Succeeded" )
type RegenerateKeyParameters ¶
type RegenerateKeyParameters struct {
KeyName KeyName `json:"keyName,omitempty"`
}
RegenerateKeyParameters is regenerate key parameters.
type ResourceAndSku ¶
type ResourceAndSku struct { ResourceType *string `json:"resourceType,omitempty"` Sku *Sku `json:"sku,omitempty"` }
ResourceAndSku is
type SkuName ¶
type SkuName string
SkuName enumerates the values for sku name.
const ( // F0 specifies the f0 state for sku name. F0 SkuName = "F0" // S0 specifies the s0 state for sku name. S0 SkuName = "S0" // S1 specifies the s1 state for sku name. S1 SkuName = "S1" // S2 specifies the s2 state for sku name. S2 SkuName = "S2" // S3 specifies the s3 state for sku name. S3 SkuName = "S3" // S4 specifies the s4 state for sku name. S4 SkuName = "S4" )