Edit

Share via


New-AzMlWebService

Creates a new web service.

Syntax

CreateFromFile

New-AzMlWebService
    -ResourceGroupName <String>
    -Location <String>
    -Name <String>
    -DefinitionFile <String>
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateFromInstance

New-AzMlWebService
    -ResourceGroupName <String>
    -Location <String>
    -Name <String>
    -NewWebServiceDefinition <WebService>
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Creates an Azure Machine Learning web service in an existing resource group. If a web service with the same name exists in the resource group, the call acts as an update operation and the existing web service is overwritten.

Examples

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

New-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename" -Location "South Central US" -DefinitionFile "C:\mlservice.json"

Creates a new Azure Machine Learning web service named "mywebservicename" in the "myresourcegroup" group and South Central US region, based on the definition present in the referenced json file.

Example 2: Create a new service from an object instance

New-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename" -Location "South Central US" -NewWebServiceDefinition $serviceDefinitionObject

You can obtain a web service object instance to customize before publishing as a resource by using the Import-AzMlWebService cmdlet.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefinitionFile

Specifies the path to the file containing the JSON format definition of the web service. You can find the latest specification for the web service definition in the swagger spec under https://github.com/Azure/azure-rest-api-specs/blob/master/specification/machinelearning/resource-manager/Microsoft.MachineLearning/.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateFromFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Do not ask for confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Location

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name for the web service. The name must be unique in the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NewWebServiceDefinition

The definition for the new web service, containing 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 spec under https://github.com/Azure/azure-rest-api-specs/blob/master/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json.

Parameter properties

Type:Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateFromInstance
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

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

Outputs

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

Notes

Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml