Agents - Create Or Update
Creates or updates an Agent resource, which references a hybrid compute machine that can run jobs.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}?api-version=2023-10-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
agent
|
path | True |
string |
The name of the Agent resource. |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
storage
|
path | True |
string |
The name of the Storage Mover resource. |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.arcResourceId | True |
string |
The fully qualified resource ID of the Hybrid Compute resource for the Agent. |
properties.arcVmUuid | True |
string |
The VM UUID of the Hybrid Compute resource for the Agent. |
properties.description |
string |
A description for the Agent. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully PUT Agent resource. |
|
Other Status Codes |
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
Agents_CreateOrUpdate
Sample Request
PUT https://management.azure.com/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName?api-version=2023-10-01
{
"properties": {
"arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName",
"description": "Example Agent Description",
"arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"
}
}
Sample Response
{
"id": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName",
"name": "examples-agentName",
"type": "Microsoft.StorageMover/storageMovers/agents",
"properties": {
"arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName",
"description": "Example Agent Description",
"agentVersion": "1.0.0",
"agentStatus": "Registering",
"arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9",
"lastStatusUpdate": null,
"localIPAddress": null,
"memoryInMB": null,
"numberOfCores": null,
"uptimeInSeconds": null,
"errorDetails": null
}
}
Definitions
Name | Description |
---|---|
Agent |
The Agent resource. |
Agent |
The Agent status. |
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
|
Error |
Error response |
Provisioning |
The provisioning state of this resource. |
system |
Metadata pertaining to creation and last modification of the resource. |
Agent
The Agent resource.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.agentStatus |
The Agent status. |
|
properties.agentVersion |
string |
The Agent version. |
properties.arcResourceId |
string |
The fully qualified resource ID of the Hybrid Compute resource for the Agent. |
properties.arcVmUuid |
string |
The VM UUID of the Hybrid Compute resource for the Agent. |
properties.description |
string |
A description for the Agent. |
properties.errorDetails | ||
properties.lastStatusUpdate |
string |
The last updated time of the Agent status. |
properties.localIPAddress |
string |
Local IP address reported by the Agent. |
properties.memoryInMB |
integer |
Available memory reported by the Agent, in MB. |
properties.numberOfCores |
integer |
Available compute cores reported by the Agent. |
properties.provisioningState |
The provisioning state of this resource. |
|
properties.uptimeInSeconds |
integer |
Uptime of the Agent in seconds. |
systemData |
Resource system metadata. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
AgentStatus
The Agent status.
Name | Type | Description |
---|---|---|
Executing |
string |
|
Offline |
string |
|
Online |
string |
|
Registering |
string |
|
RequiresAttention |
string |
|
Unregistering |
string |
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 |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorDetails
Name | Type | Description |
---|---|---|
code |
string |
Error code reported by Agent |
message |
string |
Expanded description of reported error code |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ProvisioningState
The provisioning state of this resource.
Name | Type | Description |
---|---|---|
Succeeded |
string |
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 |
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 |
The type of identity that last modified the resource. |