OnlineDeploymentOperations Class  
OnlineDeploymentOperations.
You should not instantiate this class directly. Instead, you should create an MLClient instance that instantiates it for you and attaches it as an attribute.
Constructor
OnlineDeploymentOperations(operation_scope: OperationScope, operation_config: OperationConfig, service_client_04_2023_preview: AzureMachineLearningWorkspaces, all_operations: OperationsContainer, local_deployment_helper: _LocalDeploymentHelper, credentials: TokenCredential | None = None, **kwargs: Dict)Parameters
| Name | Description | 
|---|---|
| operation_scope 
				Required
			 |  | 
| operation_config 
				Required
			 |  | 
| service_client_04_2023_preview 
				Required
			 |  | 
| all_operations 
				Required
			 |  | 
| local_deployment_helper 
				Required
			 |  | 
| credentials | Default value: None | 
Methods
| begin_create_or_update | Create or update a deployment. | 
| begin_delete | Delete a deployment. | 
| get | Get a deployment resource. | 
| get_logs | Retrive the logs from online deployment. | 
| list | List a deployment resource. | 
begin_create_or_update
Create or update a deployment.
begin_create_or_update(deployment: OnlineDeployment, *, local: bool = False, vscode_debug: bool = False, skip_script_validation: bool = False, local_enable_gpu: bool = False, **kwargs: Any) -> LROPoller[OnlineDeployment]Parameters
| Name | Description | 
|---|---|
| deployment 
				Required
			 | the deployment entity | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | Whether deployment should be created locally, defaults to False Default value: False | 
| vscode_debug | Whether to open VSCode instance to debug local deployment, defaults to False Default value: False | 
| skip_script_validation | Whether or not to skip validation of the deployment script. Defaults to False. Default value: False | 
| local_enable_gpu | enable local container to access gpu Default value: False | 
Returns
| Type | Description | 
|---|---|
| A poller to track the operation status | 
Exceptions
| Type | Description | 
|---|---|
| Raised if OnlineDeployment cannot be successfully validated. Details will be provided in the error message. | |
| Raised if OnlineDeployment assets (e.g. Data, Code, Model, Environment) cannot be successfully validated. Details will be provided in the error message. | |
| Raised if OnlineDeployment model cannot be successfully validated. Details will be provided in the error message. | |
| Raised if OnlineDeployment type is unsupported. Details will be provided in the error message. | |
| Raised if local endpoint resource does not exist. | |
| Raised if local endpoint is in a failed state. | |
| Raised if Docker image cannot be found for local deployment. | |
| Raised if Docker image cannot be successfully built for local deployment. | |
| Raised if local artifacts cannot be found for local deployment. | |
| Raised if VS Debug is invoked with a remote endpoint. VSCode debug is only supported for local endpoints. | |
| Raised if Nvidia GPU is not available in the system and local_enable_gpu is set while local deployment | |
| Raised if VSCode instance cannot be instantiated. | 
begin_delete
Delete a deployment.
begin_delete(name: str, endpoint_name: str, *, local: bool | None = False) -> LROPoller[None]Parameters
| Name | Description | 
|---|---|
| name 
				Required
			 | The name of the deployment | 
| endpoint_name 
				Required
			 | The name of the endpoint | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | Whether deployment should be retrieved from local docker environment, defaults to False Default value: False | 
Returns
| Type | Description | 
|---|---|
| A poller to track the operation status | 
Exceptions
| Type | Description | 
|---|---|
| Raised if local endpoint resource does not exist. | 
get
Get a deployment resource.
get(name: str, endpoint_name: str, *, local: bool | None = False) -> OnlineDeploymentParameters
| Name | Description | 
|---|---|
| name 
				Required
			 | The name of the deployment | 
| endpoint_name 
				Required
			 | The name of the endpoint | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | Whether deployment should be retrieved from local docker environment, defaults to False Default value: False | 
Returns
| Type | Description | 
|---|---|
| a deployment entity | 
Exceptions
| Type | Description | 
|---|---|
| Raised if local endpoint resource does not exist. | 
get_logs
Retrive the logs from online deployment.
get_logs(name: str, endpoint_name: str, lines: int, *, container_type: str | None = None, local: bool = False) -> strParameters
| Name | Description | 
|---|---|
| name 
				Required
			 | The name of the deployment | 
| endpoint_name 
				Required
			 | The name of the endpoint | 
| lines 
				Required
			 | The maximum number of lines to tail | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| container_type | The type of container to retrieve logs from. Possible values include: "StorageInitializer", "InferenceServer", defaults to None Default value: None | 
| local | [description], defaults to False Default value: False | 
Returns
| Type | Description | 
|---|---|
| the logs | 
list
List a deployment resource.
list(endpoint_name: str, *, local: bool = False) -> ItemPaged[OnlineDeployment]Parameters
| Name | Description | 
|---|---|
| endpoint_name 
				Required
			 | The name of the endpoint | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| local | Whether deployment should be retrieved from local docker environment, defaults to False Default value: False | 
Returns
| Type | Description | 
|---|---|
| an iterator of deployment entities |