New-AzureRmMlWebService

Creates a web service resource.

Syntax

New-AzureRmMlWebService
   -ResourceGroupName <String>
   -Location <String>
   -Name <String>
   -DefinitionFile <String>
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzureRmMlWebService
   -ResourceGroupName <String>
   -Location <String>
   -Name <String>
   -NewWebServiceDefinition <WebService>
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzureRmMlWebService cmdlet creates an Azure Machine Learning web service resource in a new or existing resource group. If a resource with the same name exists in the resource group, the cmdlet acts as an update operation and overwrites the existing web service resource.

To determine the resource group name of an existing web service, run the Get-AzureRmMlWebService cmdlet to display the web services in your subscription. Locate the web service, and then look at its web service ID. The name of the resource group is the fourth element in the ID, just after the resourceGroups element. In the following example the resource group name is Default-MachineLearning-SouthCentralUS.

Properties : Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebServicePropertiesForGraph Id : /subscriptions/\<subscription ID\>/resourceGroups/Default-MachineLearning-SouthCentralUS/providers/Microsoft.MachineLearning/webServices/Sample5TrainTest.2016.7.22.15.46.31.322 Name : Sample5TrainTest.2016.7.22.15.46.31.322 Location : South Central US Type : Microsoft.MachineLearning/webServices Tags : {}

Alternatively, to determine the resource group name of an existing web service, log on to the Microsoft Azure Machine Learning Web Services portal. Select the web service. The resource group name is the fifth element of the URL of the web service, just after the resourceGroups element. In the following example the resource group name is Default-MachineLearning-SouthCentralUS.

https://services.azureml.net/subscriptions/\<subcription ID\>/resourceGroups/Default-MachineLearning-SouthCentralUS/providers/Microsoft.MachineLearning/webServices/Sample5TrainTest.2016.7.22.15.46.31.322

Examples

Example 1: Create a new service from a Json file based definition

PS C:\>New-AzureRmMlWebService -ResourceGroupName "RG001" -Name "WebService002" -Location "South Central US" -DefinitionFile "C:\mlservice.json"

This command creates an Azure Machine Learning web service resource named WebService002 that belongs to the resource group named RG001. This command also sets the location to South Central US, based on the definition present in the referenced json file.

Example 2: Create a new service from an object instance

PS C:\>New-AzureRmMlWebService -ResourceGroupName "RG004" -Name "WebService005" -Location "South Central US" -NewWebServiceDefinition $ServiceDefinitionObject

This command creates an Azure Machine Learning web service resource named WebService005 that belongs to the resource group named RG004. This command also sets the location to South Central US. The new web service uses the information stored in the $ServiceDefinitionObject to create the definition. You can obtain a web service object instance to customize before publishing as a resource by using the Import-AzureRmMlWebService cmdlet.

Required Parameters

-DefinitionFile

Specifies the path to a file on disk containing the definition of the web service resource, in JSON format. You can find the latest specification for the web service definition in the swagger specification file under https://github.com/Azure/azure-rest-api-specs/tree/master/arm-machinelearning.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefinitionFile

Specifies the path to a file on disk containing the definition of the web service resource, in JSON format. You can find the latest specification for the web service definition in the swagger specification file under https://github.com/Azure/azure-rest-api-specs/tree/master/arm-machinelearning.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Location

Specifies the location of the web service resource. Enter an Azure data center location, such as West US or Southeast Asia. You can place a resource in any location that supports resources of that type. The resource does not have to be in the same location your Azure subscription or the same location as its resource group. Resource groups can contain resources from different locations. To determine which locations support each resource type, use the Get-AzureRmResourceProvider cmdlet with the ProviderNamespace parameter cmdlet.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name for the web service resource. The value for the Name parameter must be unique in the resource group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewWebServiceDefinition

Specifies the definition of the web service resource, that contains all the properties that make up the service. This parameter is required and represents an instance of the Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService class. You can find the latest specification for the web service definition in the swagger specification under

.

This parameter can come from a pipeline.

Type:WebService
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ResourceGroupName

Specifies the resource group that this web service belongs to. Enter the name an existing resource group that was provisioned ahead of this web service resource.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewWebServiceDefinition

Specifies the definition of the web service resource, that contains all the properties that make up the service. This parameter is required and represents an instance of the Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService class. You can find the latest specification for the web service definition in the swagger specification under

Position:Named
Accept pipeline input:false
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

The summary description of the created Azure Machine Learning web service resource is similar to the result obtained when calling the Get-AzureRmMlWebService cmdlet for an existing web service. This description does not contain sensitive properties.

Notes