VirtualMachineCompute Class

Virtual Machine Compute resource.

Inheritance
azure.ai.ml.entities._compute.compute.Compute
VirtualMachineCompute

Constructor

VirtualMachineCompute(*, name: str, description: str | None = None, resource_id: str, tags: dict | None = None, ssh_settings: VirtualMachineSshSettings | None = None, **kwargs: Any)

Parameters

Name Description
name
Required
str

Name of the compute resource.

description
Required

Description of the resource. Defaults to None.

resource_id
Required
str

ARM resource ID of the underlying compute resource.

tags
Required

A set of tags. Contains resource tags defined as key/value pairs.

ssh_settings
Required

SSH settings. Defaults to None.

Keyword-Only Parameters

Name Description
name
Required
description
Required
resource_id
Required
tags
Required
ssh_settings
Required

Examples

Configuring a VirtualMachineCompute object.


   from azure.ai.ml.entities import VirtualMachineCompute

   vm_compute = VirtualMachineCompute(
       name="vm-compute",
       resource_id="/subscriptions/123456-1234-1234-1234-123456789/resourceGroups/my-rg/providers/Microsoft.Compute/virtualMachines/my-vm",
       ssh_settings=ssh_settings,
   )

Methods

dump

Dump the compute content into a file in yaml format.

dump

Dump the compute content into a file in yaml format.

dump(dest: str | PathLike | IO, **kwargs: Any) -> None

Parameters

Name Description
dest
Required
Union[<xref:PathLike>, str, IO[AnyStr]]

The destination to receive this compute's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable.'.

Attributes

base_path

The base path of the resource.

Returns

Type Description
str

The base path of the resource.

created_on

The compute resource creation timestamp.

Returns

Type Description

The compute resource creation timestamp.

creation_context

The creation context of the resource.

Returns

Type Description

The creation metadata for the resource.

id

The resource ID.

Returns

Type Description

The global ID of the resource, an Azure Resource Manager (ARM) ID.

provisioning_errors

The compute resource provisioning errors.

Returns

Type Description

The compute resource provisioning errors.

provisioning_state

The compute resource's provisioning state.

Returns

Type Description

The compute resource's provisioning state.

public_key_data

Public key data.

Returns

Type Description
str

Public key data.

type

The compute type.

Returns

Type Description

The compute type.