Share via


Cloud Service Roles - Get

Gets a role from a cloud service.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles/{roleName}?api-version=2024-11-04

URI Parameters

Name In Required Type Description
cloudServiceName
path True

string

Name of the cloud service.

resourceGroupName
path True

string

Name of the resource group.

roleName
path True

string

Name of the role.

subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

CloudServiceRole

OK

Other Status Codes

CloudError

Error

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

Get Cloud Service Role

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/{role-name}?api-version=2024-11-04

Sample response

{
  "name": "{role-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/{role-name}",
  "type": "Microsoft.Compute/cloudServices/roles",
  "location": "eastus2euap",
  "sku": {
    "name": "Standard_D1_v2",
    "tier": "Standard",
    "capacity": 2
  },
  "properties": {
    "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:{role-name}"
  }
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

CloudServiceRole

Describes a role of the cloud service.

CloudServiceRoleProperties

The cloud service role properties.

CloudServiceRoleSku

Describes the cloud service role sku.

InnerError

Inner error details.

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

InnerError

The Api inner error

message

string

The error message.

target

string

The target of the particular error.

ApiErrorBase

Api error base.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

CloudServiceRole

Describes a role of the cloud service.

Name Type Description
id

string

Resource id

location

string

Resource location

name

string

Resource name

properties

CloudServiceRoleProperties

The cloud service role properties.

sku

CloudServiceRoleSku

Describes the cloud service role sku.

type

string

Resource type

CloudServiceRoleProperties

The cloud service role properties.

Name Type Description
uniqueId

string

Specifies the ID which uniquely identifies a cloud service role.

CloudServiceRoleSku

Describes the cloud service role sku.

Name Type Description
capacity

integer (int64)

Specifies the number of role instances in the cloud service.

name

string

The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.

tier

string

Specifies the tier of the cloud service. Possible Values are

Standard

Basic

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.