你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Standby Virtual Machine Pools - Create Or Update
Create a StandbyVirtualMachinePoolResource
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}?api-version=2024-03-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
standby
|
path | True |
string |
Name of the standby virtual machine pool Regex pattern: |
subscription
|
path | True |
string uuid |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
The geo-location where the resource lives |
properties.virtualMachineState | True |
Specifies the desired state of virtual machines in the pool. |
|
properties.attachedVirtualMachineScaleSetId |
string |
Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to. |
|
properties.elasticityProfile |
Specifies the elasticity profile of the standby virtual machine pools. |
||
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Resource 'StandbyVirtualMachinePoolResource' update operation succeeded |
|
201 Created |
Resource 'StandbyVirtualMachinePoolResource' create operation succeeded Headers Retry-After: integer |
|
Other Status Codes |
An unexpected error response. |
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
StandbyVirtualMachinePools_CreateOrUpdate
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool?api-version=2024-03-01
{
"properties": {
"elasticityProfile": {
"maxReadyCapacity": 304,
"minReadyCapacity": 300
},
"virtualMachineState": "Running",
"attachedVirtualMachineScaleSetId": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"
},
"tags": {},
"location": "West US"
}
Sample response
{
"properties": {
"elasticityProfile": {
"maxReadyCapacity": 304,
"minReadyCapacity": 300
},
"virtualMachineState": "Running",
"attachedVirtualMachineScaleSetId": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss",
"provisioningState": "Succeeded"
},
"tags": {},
"location": "West US",
"id": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool",
"name": "pool",
"type": "Microsoft.StandbyPool/standbyVirtualMachinePools",
"systemData": {
"createdBy": "pooluser@microsoft.com",
"createdByType": "User",
"createdAt": "2023-09-07T16:33:22.210Z",
"lastModifiedBy": "pooluser@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-09-07T16:33:22.210Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"elasticityProfile": {
"maxReadyCapacity": 304,
"minReadyCapacity": 300
},
"virtualMachineState": "Running",
"attachedVirtualMachineScaleSetId": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss",
"provisioningState": "Succeeded"
},
"tags": {},
"location": "West US",
"id": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool",
"name": "pool",
"type": "Microsoft.StandbyPool/standbyVirtualMachinePools",
"systemData": {
"createdBy": "pooluser@microsoft.com",
"createdByType": "User",
"createdAt": "2023-09-07T16:33:22.210Z",
"lastModifiedBy": "pooluser@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-09-07T16:33:22.210Z"
}
}
Definitions
Name | Description |
---|---|
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Provisioning |
Provisioning state |
Standby |
Details of the elasticity profile. |
Standby |
A StandbyVirtualMachinePoolResource. |
system |
Metadata pertaining to creation and last modification of the resource. |
Virtual |
State of standby virtual machines |
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. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ProvisioningState
Provisioning state
Name | Type | Description |
---|---|---|
Canceled |
string |
Resource creation was canceled. |
Deleting |
string |
Resource is being deleted. |
Failed |
string |
Resource creation failed. |
Succeeded |
string |
Resource has been created. |
StandbyVirtualMachinePoolElasticityProfile
Details of the elasticity profile.
Name | Type | Description |
---|---|---|
maxReadyCapacity |
integer |
Specifies the maximum number of virtual machines in the standby virtual machine pool. |
minReadyCapacity |
integer |
Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity. |
StandbyVirtualMachinePoolResource
A StandbyVirtualMachinePoolResource.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.attachedVirtualMachineScaleSetId |
string |
Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to. |
properties.elasticityProfile |
Specifies the elasticity profile of the standby virtual machine pools. |
|
properties.provisioningState |
The status of the last operation. |
|
properties.virtualMachineState |
Specifies the desired state of virtual machines in the pool. |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
tags |
object |
Resource tags. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
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. |
VirtualMachineState
State of standby virtual machines
Name | Type | Description |
---|---|---|
Deallocated |
string |
The virtual machine has released the lease on the underlying hardware and is powered off. |
Running |
string |
The virtual machine is up and running. |