EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.
0 sur 5 ont trouvé cela utile - Évaluez ce sujet

Get Role

The Get Role operation retrieves information about the specified virtual machine.

Request

The Get Role request is specified as follows. Replace <subscription-id> with your subscription ID, <cloudservice-name> with the name of your service, <deployment-name> with the name of the deployment, and <role-name> with the name of the virtual machine to retrieve.

 

Method Request URI HTTP Version

GET

https://management.core.windows.net/<subscription-id>/services/hostedservices/<cloudservice-name>/deployments/<deployment-name>/roles/<role-name>

HTTP/1.1

URI Parameters

None.

Request Headers

The following table describes the request headers.

 

Request Header Description

x-ms-version

Required. Specifies the version of the operation to use for this request. Currently this header should be set to 2012-03-01.

Request Body

None.

Response

The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

A successful operation returns status code 200 (OK).

For information about status codes, see Service Management Status and Error Codes.

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies a request made against the Management service. For an asynchronous operation, you can call get operation status with the value of the header to determine whether the operation is complete, has failed, or is still in progress. See Tracking Asynchronous Service Management Requests for more information.

Response Body

The format of the response body is as follows:


<PersistentVMRole xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <RoleName>name-of-the-vm</RoleName>
  <OsVersion>operating-system-version</OsVersion>
  <RoleType>PersistentVMRole</RoleType>      
  <ConfigurationSets>
    <ConfigurationSet>
      <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>          
      <InputEndpoints>
        <InputEndpoint>                
          <LoadBalancedEndpointSetName>name-of-load-balanced-endpoint-set</LoadBalancedEndpointSetName>
          <LocalPort>internal-facing-port-of-input-endpoint</LocalPort>
          <Name>name-of-input-endpoint</Name>
          <Port>external-facing-port-of-input-endpoint</Port>
          <LoadBalancerProbe>
            <Path>path-of-probe</Path>
            <Port>port-assigned-to-probe</Port>
            <Protocol>protocol-of-input-endpoint</Protocol>                    
          </LoadBalancerProbe>
          <Protocol>TCP|UDP</Protocol>                    
          <Vip>virtual-ip-address-of-input-endpoint</Vip>
        </InputEndpoint>
      </InputEndpoints>
      <SubnetNames>
        <SubnetName>name-of-subnet</SubnetName>
      </SubnetNames>
    </ConfigurationSet>
  </ConfigurationSets>
  <AvailabilitySetName>name-of-availability-set</AvailabilitySetName>
  <DataVirtualHardDisks>
    <DataVirtualHardDisk>
      <HostCaching>host-caching-mode-of-data-disk</HostCaching> 
      <DiskName>new-or-existing-disk-name</DiskName>
      <Lun>logical-unit-number-of-data-disk</Lun>
      <LogicalDiskSizeInGB>size-of-data-disk</LogicalDiskSizeInGB>            
      <MediaLink>path-to-vhd</MediaLink>
    </DataVirtualHardDisk>
  </DataVirtualHardDisks>
  <OSVirtualHardDisk>
    <HostCaching>host-caching-mode-of-os-disk</HostCaching>    
    <DiskName>name-of-os-disk</DiskName>                    
    <MediaLink>path-to-vhd</MediaLink>
    <SourceImageName>image-used-to-create-os-disk</SourceImageName>
    <OS>operating-system-on-os-disk</OS>
  </OSVirtualHardDisk>      
  <RoleSize>size-of-instance</RoleSize>
  <DefaultWinRmCertificateThumbprint>winrm-cert-thumbprint</DefaultWinRmCertificateThumbprint>      
</PersistentVMRole>

The following table describes the key elements in the response body:

 

Element name Description

RoleName

The name for the virtual machine. The name is unique within Windows Azure.

OsVersion

The version of the operating system on which the role instances are running.

RoleType

The type of the role for the virtual machine. The only supported value is PersistentVMRole.

ConfigurationSets

Contains the collection of configuration sets that contain system and application configuration settings.

AvailabilitySetName

The name of the availability set the virtual machine belongs to. This value controls the virtual machine allocation in the Windows Azure environment. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability.

DataVirtualHardDisks

Contains the parameters Windows Azure used to create the data disk for the virtual machine.

OSVirtualHardDisk

Contains the parameters Windows Azure used to create the operating system disk for the virtual machine.

RoleSize

The size of the virtual machine.

DefaultWinRmCertificateThumbprint

The read-only thumbprint of the certificate that is used with the HTTPS listener for WinRM.

ConfigurationSets

Contains a collection of configuration sets that contain system and application configuration settings.

 

Element name Description

ConfigurationSetType

Specifies the configuration type for the configuration set. This is currently always set to NetworkConfigurationSet.

InputEndpoints

Contains the collection of external endpoints for the virtual machine.

SubnetNames

Contains a list of subnets that the virtual machine is belongs to.

InputEndpoints

Contains a collection of external endpoints for the virtual machine.

 

Element name Description

LoadBalancedEndpointSetName

The name of the set of load balanced endpoints.

LocalPort

Te internal port on which the virtual machine is listening to serve the endpoint.

Name

The name of the external endpoint.

Port

The external port used for the endpoint.

LoadBalancerProbe

Contains properties that specify the endpoint settings which the Windows Azure load balancer uses to monitor the availability of this virtual machine before forwarding traffic to the endpoint.

Protocol

The transport protocol for the endpoint.

Possible Values are:

  • TCP

  • UDP

noteNote
When the endpoint group name is specified the protocol and port are inferred; otherwise, they must be specified during virtual machine creation. If both a load balancer group and an endpoint protocol are specified they must specify compatible protocols.

Vip

Indicates the VIP of the role.

LoadBalancerProbe

Contains properties that specify the endpoint settings which the Windows Azure load balancer uses to monitor the availability of this virtual machine before forwarding traffic to the endpoint.

 

Element name Description

Path

Specifies the relative path name to inspect to determine the virtual machine availability status. If Protocol is set to TCP, this value must be NULL.

Example:

path

The probe will use https://example.com/path to perform the probe.

Port

Specifies the port to use to inspect the virtual machine availability status.

Protocol

Specifies the protocol to use to inspect the virtual machine availability status.

Possible values are:

  • HTTP

  • TCP

SubnetNames

Contains the list of subnets that the virtual machine is belongs to.

 

Element name Description

SubnetName

The name of a subnet to which the virtual machine belongs.

DataVirtualHardDisks

Contains the parameters Windows Azure used to create a data disk for the virtual machine. Data disks contain a reference to a disk in the image repository.

 

Element name Description

DataVirtualHardDisk

The properties used to create the data disk.

HostCaching

The platform caching behavior of the data disk blob for read/write efficiency. The default vault is ReadOnly.

Possible values are:

  • None

  • ReadOnly

  • ReadWrite

WarningWarning
Setting this property impacts the consistency of the disk.

DiskName

The image in the image repository used to create the data disk for the virtual machine.

Lun

The Logical Unit Number (LUN) for the data disk. The LUN specifies the slot in which the data drive appears when mounted for usage by the virtual machine.

Valid LUN values are 0 through 15.

LogicalDiskSizeInGB

The size, in GB, of the VHD attached to the virtual machine.

MediaLink

The location of physical blob that contains the data disk. This link refers to a blob in your Windows Azure storage account.

OSVirtualHardDisk

Contains the parameters used to create the operating system disk for the virtual machine.

 

Element name Description

HostCaching

Indicates whether the OS disk can be cached for greater efficiency during writes. This setting impacts the consistency and performance of the OS disk. The default value is ReadWrite.

Possible values are:

  • ReadOnly

  • ReadWrite

DiskName

The name an operating system image in the image repository.

MediaLink

The URI of the location of a blob in the customer storage account that contains the OS image to used to create the disk.

SourceImageName

The name of the disk image used to create the virtual machine.

OS

The operating system running in the virtual machine.

Authorization

Only the account owner may call this operation.

Remarks

Cela vous a-t-il été utile ?
(1500 caractères restants)
© 2013 Microsoft. Tous droits réservés.
facebook page visit twitter rss feed newsletter