AzureCognitive (version 1.0.1)

create_cognitive_service: Create, retrieve or delete an Azure Cognitive Service

Description

Methods for the AzureRMR::az_resource_group class.

Value

For create_cognitive_service and get_cognitive_service, an object of class az_cognitive_service.

Usage

create_cognitive_service(name, service_type, service_tier, location = self$location,
                         subdomain = name, properties = list(), ...)
get_cognitive_service(name)
delete_cognitive_service(name, confirm = TRUE, wait = FALSE)

Arguments

  • name: The name for the cognitive service resource.

  • service_type: The type of service (or "kind") to create. See 'Details' below.

  • service_tier: The pricing tier (SKU) for the service.

  • location: The Azure location in which to create the service. Defaults to the resource group's location.

  • subdomain: The subdomain name to assign to the service; defaults to the resource name. Set this to NULL if you don't want to assign the service a subdomain of its own.

  • properties: For create_cognitive_service, an optional named list of other properties for the service.

  • confirm: For delete_cognitive_service, whether to prompt for confirmation before deleting the resource.

  • wait: For delete_cognitive_service, whether to wait until the deletion is complete before returning.

Details

These are methods to create, get or delete a cognitive service resource within a resource group.

For create_cognitive_service, the type of service created can be one of the following:

  • CognitiveServices: multiple service types

  • ComputerVision: generic computer vision service

  • Face: face recognition

  • LUIS: language understanding

  • CustomVision.Training: Training endpoint for a custom vision service

  • CustomVision.Prediction: Prediction endpoint for a custom vision service

  • ContentModerator: Content moderation (text and images)

  • Text: text analytics

  • TextTranslate: text translation

The possible tiers depend on the type of service created. Consult the Azure Cognitive Service documentation for more information. Usually there will be at least one free tier available.

See Also

cognitive_endpoint, call_cognitive_endpoint

Azure Cognitive Services documentation, REST API reference

Examples

Run this code
# NOT RUN {
rg <- AzureRMR::get_azure_login()$
    get_subscription("sub_id")$
    get_resource_group("rgname")

rg$create_cognitive_service("myvisionservice",
    service_type="ComputerVision", service_tier="F0")

rg$create_cognitive_service("mylangservice",
    service_type="LUIS", service_tier="F0")

rg$get_cognitive_service("myvisionservice")

rg$delete_cognitive_service("myvisionservice")

# }

Run the code above in your browser using DataLab