VM Instance Guest Agents - Create

Implements GuestAgent PUT method.
Create Or Update GuestAgent.

PUT https://management.azure.com/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default?api-version=2023-12-01

URI Parameters

Name In Required Type Description
resourceUri
path True

string

The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.

api-version
query True

string

Client Api Version.

Request Body

Name Type Description
properties.credentials

GuestCredential

Username / Password Credentials to provision guest agent.

properties.httpProxyConfig

HttpProxyConfiguration

HTTP Proxy configuration for the VM.

properties.privateLinkScopeResourceId

string

The resource id of the private link scope this machine is assigned to, if any.

properties.provisioningAction

ProvisioningAction

Gets or sets the guest agent provisioning action.

Responses

Name Type Description
200 OK

GuestAgent

Arm resource update successful.

201 Created

GuestAgent

Created

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

CreateGuestAgent

Sample request

PUT https://management.azure.com/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default?api-version=2023-12-01

{
  "properties": {
    "provisioningAction": "install",
    "credentials": {
      "username": "tempuser",
      "password": "<password>"
    },
    "httpProxyConfig": {
      "httpsProxy": "http://192.1.2.3:8080"
    },
    "privateLinkScopeResourceId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"
  }
}

Sample response

{
  "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default",
  "name": "default",
  "type": "Microsoft.ConnectedVMwarevSphere/VirtualMachineInstances/guestAgents",
  "properties": {
    "provisioningAction": "install",
    "status": "connected",
    "provisioningState": "Succeeded"
  }
}
{
  "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default",
  "name": "default",
  "type": "Microsoft.ConnectedVMwarevSphere/VirtualMachineInstances/guestAgents",
  "properties": {
    "provisioningAction": "install",
    "status": "connected",
    "provisioningState": "Created"
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

GuestAgent

Defines the GuestAgent.

GuestCredential

Username / Password Credentials to connect to guest.

HttpProxyConfiguration

HTTP Proxy configuration for the VM.

ProvisioningAction

Defines the different types of operations for guest agent.

ProvisioningState

Gets the provisioning state.

ResourceStatus

The resource status information.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

GuestAgent

Defines the GuestAgent.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.credentials

GuestCredential

Username / Password Credentials to provision guest agent.

properties.customResourceName

string

Gets the name of the corresponding resource in Kubernetes.

properties.httpProxyConfig

HttpProxyConfiguration

HTTP Proxy configuration for the VM.

properties.privateLinkScopeResourceId

string

The resource id of the private link scope this machine is assigned to, if any.

properties.provisioningAction

ProvisioningAction

Gets or sets the guest agent provisioning action.

properties.provisioningState

ProvisioningState

Gets the provisioning state.

properties.status

string

Gets or sets the guest agent status.

properties.statuses

ResourceStatus[]

The resource status information.

properties.uuid

string

Gets or sets a unique identifier for this resource.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

GuestCredential

Username / Password Credentials to connect to guest.

Name Type Description
password

string

Gets or sets the password to connect with the guest.

privateKey

string

Private key used to authenticate to a virtual machine through ssh.

username

string

Gets or sets username to connect with the guest.

HttpProxyConfiguration

HTTP Proxy configuration for the VM.

Name Type Description
httpsProxy

string

Gets or sets httpsProxy url.

ProvisioningAction

Defines the different types of operations for guest agent.

Name Type Description
install

string

repair

string

uninstall

string

ProvisioningState

Gets the provisioning state.

Name Type Description
Accepted

string

Canceled

string

Created

string

Deleting

string

Failed

string

Provisioning

string

Succeeded

string

Updating

string

ResourceStatus

The resource status information.

Name Type Description
lastUpdatedAt

string

The last update time for this condition.

message

string

A human readable message indicating details about the status.

reason

string

The reason for the condition's status.

severity

string

Severity with which to treat failures of this type of condition.

status

string

Status of the condition.

type

string

The type of the condition.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.