共用方式為


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
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

standbyVirtualMachinePoolName
path True

string

Name of the standby virtual machine pool

Regex pattern: ^[a-zA-Z0-9-]{3,24}$

subscriptionId
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

VirtualMachineState

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

StandbyVirtualMachinePoolElasticityProfile

Specifies the elasticity profile of the standby virtual machine pools.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

StandbyVirtualMachinePoolResource

Resource 'StandbyVirtualMachinePoolResource' update operation succeeded

201 Created

StandbyVirtualMachinePoolResource

Resource 'StandbyVirtualMachinePoolResource' create operation succeeded

Headers

Retry-After: integer

Other Status Codes

ErrorResponse

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
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ProvisioningState

Provisioning state

StandbyVirtualMachinePoolElasticityProfile

Details of the elasticity profile.

StandbyVirtualMachinePoolResource

A StandbyVirtualMachinePoolResource.

systemData

Metadata pertaining to creation and last modification of the resource.

VirtualMachineState

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

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.

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

StandbyVirtualMachinePoolElasticityProfile

Specifies the elasticity profile of the standby virtual machine pools.

properties.provisioningState

ProvisioningState

The status of the last operation.

properties.virtualMachineState

VirtualMachineState

Specifies the desired state of virtual machines in the pool.

systemData

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

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.

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.