Learn R Programming

SAR (version 1.0.3)

az_rec_service: Azure product recommendations service class

Description

Class representing an Azure product recommendations service.

Arguments

Format

An R6 object of class az_rec_service, inheriting from AzureRMR::az_template.

Methods

  • new(token, subscription, resource_group, name, ...): Initialize a recommendations service object. See 'Initialization' for more details.

  • start(): Start the service.

  • stop(): Stop the service.

  • get_rec_endpoint(): Return an object representing the client endpoint for the service.

  • set_data_container(data_container="inputdata"): sets the name of the blob container to use for storing datasets.

  • delete(confirm=TRUE): Delete the service, after checking for confirmation.

Initialization

Generally, the easiest way to initialize a new recommendations service object is via the create_rec_service or get_rec_service methods of the az_subscription or az_resource_group classes.

To create a new recommendations service, supply the following additional arguments to new():

  • hosting_plan: The name of the hosting plan (essentially the size of the virtual machine on which to run the service). See below for the plans that are available.

  • storage_type: The type of storage account to use. Can be "Standard_LRS" or "Standard_GRS".

  • insights_location: The location for the application insights service. Defaults to "East US".

  • data_container: The default blob storage container to use for saving input datasets. Defaults to "inputdata".

  • wait: Whether to wait until the service has finished provisioning. Defaults to TRUE.

See Also

rec_endpoint, for the client interface to the recommendations service

List of Azure hosting plans

Deployment instructions at the Product Recommendations API repo on GitHub

Examples

Run this code
# NOT RUN {
# recommended way of retrieving a resource: via a resource group object
svc <- resgroup$get_rec_service("myrec")

# start the service backend
svc$start()

# get the service endpoint
rec_endp <- svc$get_rec_endpoint()

# }

Run the code above in your browser using DataLab