Learn R Programming

SAR (version 1.0.3)

create_rec_service: Create Azure recommender service

Description

Method for the AzureRMR::az_resource_group and AzureRMR::az_subscription classes.

Value

An object of class az_rec_service representing the deployed recommender service.

Usage

## R6 method for class 'az_subscription'
create_rec_service(name, location, hosting_plan, storage_type = c("Standard_LRS", "Standard_GRS"),
                   insights_location = c("East US", "North Europe", "West Europe", "South Central US"),
                   data_container = "inputdata", ..., wait = TRUE

## R6 method for class 'az_resource_group' create_rec_service(name, hosting_plan, storage_type = c("Standard_LRS", "Standard_GRS"), insights_location = c("East US", "North Europe", "West Europe", "South Central US"), data_container = "inputdata", ..., wait = TRUE

Arguments

  • name: The name of the recommender service.

  • location: For the subscription method, the location/region for the service. For the resource group method, this is taken from the location of the resource group.

  • storage_type: The replication strategy for the storage account for the service.

  • insights_location: Location for the application insights service giving you details on the webapp usage.

  • data_container: The name of the blob container within the storage account to use for storing datasets.

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

  • ... : Other named arguments to pass to the az_template initialization function.

Details

This method deploys a new recommender service. The individual resources created are an Azure webapp, a storage account, and an application insights service for monitoring. Within the storage account, a blob container is created with name given by the data_container argument for storing input datasets.

For the az_subscription method, a resource group is also created to hold the resources. The name of the resource group will be the same as the name of the service.

See Also

get_rec_service, delete_rec_service.

The architecture for the web service is documented here, and the specific template deployed by this method is here.

Examples

Run this code
# NOT RUN {
rg <- AzureRMR::az_rm$
    new(tenant="myaadtenant.onmicrosoft.com", app="app_id", password="password")$
    get_subscription("subscription_id")$
    get_resource_group("rgname")

# create a new recommender service
rg$create_rec_service("myrec", hosting_plan="S2")

# }

Run the code above in your browser using DataLab