Azure Virtual Machines Cloud Service Role Instances API

The CloudServiceRoleInstances API from Azure Virtual Machines — 7 operation(s) for cloudserviceroleinstances.

GitHub OpenAPI

Operations 8

DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName} Cloud service role instances delete #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName} Cloud service role instances get #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView Cloud service role instances get instance view #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances Cloud service role instances list #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart Cloud service role instances restart #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage Cloud service role instances reimage #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild Cloud service role instances rebuild #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile Cloud service role instances get remote desktop file #

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-virtual-machines:microsoft-azure-virtual-machines-cloudserviceroleinstances-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-virtual-machines-cloudserviceroleinstances-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CloudServiceManagementClient Cloud Service Role Instances…
  description: The Cloud Service Management Client.
  version: '2024-11-04'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: CloudServiceRoleInstances
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}
  : delete:
      tags:
      - CloudServiceRoleInstances
      description: Deletes a role instance from a cloud service.
      operationId: CloudServiceRoleInstances_Delete
      parameters:
      - in: path
        name: roleInstanceName
        description: Name of the role instance.
        required: true
        schema:
          type: string
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
        '202':
          description: Accepted
        '204':
          description: No Content
      x-ms-long-running-operation: true
      summary: Cloud service role instances delete
      x-summary-source: derived
    get:
      tags:
      - CloudServiceRoleInstances
      description: Gets a role instance from a cloud service.
      operationId: CloudServiceRoleInstances_Get
      parameters:
      - in: path
        name: roleInstanceName
        description: Name of the role instance.
        required: true
        schema:
          type: string
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - in: query
        name: $expand
        description: The expand expression to apply to the operation. 'UserData' is not supported for cloud services.
        x-ms-enum:
          name: InstanceViewTypes
          modelAsString: false
        schema:
          type: string
          enum:
          - instanceView
          - userData
      responses:
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleInstance'
      summary: Cloud service role instances get
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView
  : get:
      tags:
      - CloudServiceRoleInstances
      description: Retrieves information about the run-time state of a role instance in a cloud service.
      operationId: CloudServiceRoleInstances_GetInstanceView
      parameters:
      - in: path
        name: roleInstanceName
        description: Name of the role instance.
        required: true
        schema:
          type: string
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleInstanceInstanceView'
      summary: Cloud service role instances get instance view
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances
  : get:
      tags:
      - CloudServiceRoleInstances
      description: Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.
      operationId: CloudServiceRoleInstances_List
      parameters:
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - in: query
        name: $expand
        description: The expand expression to apply to the operation. 'UserData' is not supported for cloud services.
        x-ms-enum:
          name: InstanceViewTypes
          modelAsString: false
        schema:
          type: string
          enum:
          - instanceView
          - userData
      responses:
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleInstanceListResult'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Cloud service role instances list
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart
  : post:
      tags:
      - CloudServiceRoleInstances
      description: The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
      operationId: CloudServiceRoleInstances_Restart
      parameters:
      - in: path
        name: roleInstanceName
        description: Name of the role instance.
        required: true
        schema:
          type: string
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
        '202':
          description: Accepted
      x-ms-long-running-operation: true
      summary: Cloud service role instances restart
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage
  : post:
      tags:
      - CloudServiceRoleInstances
      description: The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
      operationId: CloudServiceRoleInstances_Reimage
      parameters:
      - in: path
        name: roleInstanceName
        description: Name of the role instance.
        required: true
        schema:
          type: string
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
        '202':
          description: Accepted
      x-ms-long-running-operation: true
      summary: Cloud service role instances reimage
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild
  : post:
      tags:
      - CloudServiceRoleInstances
      description: The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.
      operationId: CloudServiceRoleInstances_Rebuild
      parameters:
      - in: path
        name: roleInstanceName
        description: Name of the role instance.
        required: true
        schema:
          type: string
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
        '202':
          description: Accepted
      x-ms-long-running-operation: true
      summary: Cloud service role instances rebuild
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile
  : get:
      tags:
      - CloudServiceRoleInstances
      description: Gets a remote desktop file for a role instance in a cloud service.
      operationId: CloudServiceRoleInstances_GetRemoteDesktopFile
      parameters:
      - in: path
        name: roleInstanceName
        description: Name of the role instance.
        required: true
        schema:
          type: string
      - in: path
        name: resourceGroupName
        description: Name of the resource group.
        required: true
        schema:
          type: string
      - in: path
        name: cloudServiceName
        description: Name of the cloud service.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        default:
          description: Error
          content:
            application/x-rdp:
              schema:
                $ref: '#/components/schemas/CloudError'
        '200':
          description: OK
          content:
            application/x-rdp:
              schema:
                format: binary
                type: string
      summary: Cloud service role instances get remote desktop file
      x-summary-source: derived
components:
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
      schema:
        type: string
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Client Api Version.
      schema:
        type: string
  schemas:
    RoleInstanceNetworkProfile:
      description: Describes the network profile for the role instance.
      type: object
      properties:
        networkInterfaces:
          description: Specifies the list of resource Ids for the network interfaces associated with the role instance.
          type: array
          items:
            $ref: '#/components/schemas/SubResource'
          readOnly: true
    InstanceSku:
      description: The role instance SKU.
      type: object
      properties:
        name:
          description: The sku name.
          type: string
          readOnly: true
        tier:
          description: The tier of the cloud service role instance.
          type: string
          readOnly: true
    CloudError:
      type: object
      x-ms-external: true
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      description: An error response from the Compute service.
    SubResource:
      type: object
      properties:
        id:
          type: string
          description: Resource Id
    RoleInstanceInstanceView:
      description: The instance view of the role instance.
      type: object
      properties:
        platformUpdateDomain:
          format: int32
          description: The Update Domain.
          type: integer
          readOnly: true
        platformFaultDomain:
          format: int32
          description: The Fault Domain.
          type: integer
          readOnly: true
        privateId:
          description: 'Specifies a unique identifier generated internally for the cloud service associated with this role instance. <br /><br /> NOTE: If you are using Azure Diagnostics extension, this property can be used as ''DeploymentId'' for querying details.'
          type: string
          readOnly: true
        statuses:
          type: array
          items:
            $ref: '#/components/schemas/ResourceInstanceViewStatus'
          x-ms-identifiers: []
          readOnly: true
    RoleInstanceListResult:
      description: The list operation result.
      type: object
      properties:
        value:
          description: The list of resources.
          type: array
          items:
            $ref: '#/components/schemas/RoleInstance'
        nextLink:
          description: The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null to fetch all the resources.
          type: string
      required:
      - value
    ResourceInstanceViewStatus:
      description: Instance view status.
      type: object
      properties:
        code:
          description: The status code.
          type: string
          readOnly: true
        displayStatus:
          description: The short localizable label for the status.
          type: string
          readOnly: true
        message:
          description: The detailed status message, including for alerts and error messages.
          type: string
          readOnly: true
        time:
          format: date-time
          description: The time of the status.
          type: string
          readOnly: true
        level:
          description: The level code.
          enum:
          - Info
          - Warning
          - Error
          type: string
          x-ms-enum:
            name: StatusLevelTypes
            modelAsString: false
    RoleInstanceProperties:
      description: Role instance properties.
      type: object
      properties:
        networkProfile:
          $ref: '#/components/schemas/RoleInstanceNetworkProfile'
        instanceView:
          $ref: '#/components/schemas/RoleInstanceInstanceView'
    RoleInstance:
      description: Describes the cloud service role instance.
      type: object
      properties:
        id:
          description: Resource Id
          type: string
          readOnly: true
        name:
          description: Resource Name.
          type: string
          readOnly: true
        type:
          description: Resource Type.
          type: string
          readOnly: true
        location:
          description: Resource Location.
          type: string
          readOnly: true
        tags:
          description: Resource tags.
          type: object
          additionalProperties:
            type: string
          readOnly: true
        sku:
          $ref: '#/components/schemas/InstanceSku'
        properties:
          $ref: '#/components/schemas/RoleInstanceProperties'
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.