Description Methods Initialization Endpoints See Also Examples
Class representing a cognitive service resource, exposing methods for working with it.
The following methods are available, in addition to those provided by the AzureRMR::az_resource class:
list_keys()
: Return the access keys for this service.
get_endpoint()
: Return the service endpoint, along with an access key. See 'Endpoints' below.
regen_key(key)
: Regenerates (creates a new value for) an access key. The argument key
can be 1 or 2.
list_service_tiers()
: List the service pricing tiers (SKUs) available for this service.
Initializing a new object of this class can either retrieve an existing service, or create a new service on the host. Generally, the best way to initialize an object is via the get_cognitive_service
and create_cognitive_service
methods of the az_resource_group class, which handle the details automatically.
The client-side interaction with a cognitive service is via an endpoint. Endpoint interaction in AzureCognitive is implemented using S3 classes. You can create a new endpoint object via the get_endpoint()
method, or with the standalone cognitive_endpoint()
function. If you use the latter, you will also have to supply any necessary authentication credentials, eg a subscription key or token.
cognitive_endpoint, create_cognitive_service, get_cognitive_service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# recommended way of creating a new resource: via resource group method
rg <- AzureRMR::get_azure_login()$
get_subscription("sub_id")$
get_resource_group("rgname")
cogsvc <- rg$create_cognitive_service("myvisionservice",
service_type="ComputerVision", service_tier="F0")
cogsvc$list_service_tiers()
cogsvc$list_keys()
cogsvc$regen_key()
cogsvc$get_endpoint()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.