Ottiene un file desktop remoto per un'istanza del ruolo in un servizio cloud.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile?api-version=2022-09-04
Parametri dell'URI
Nome |
In |
Necessario |
Tipo |
Descrizione |
cloudServiceName
|
path |
True
|
string
|
Nome del servizio cloud.
|
resourceGroupName
|
path |
True
|
string
|
Nome del gruppo di risorse.
|
roleInstanceName
|
path |
True
|
string
|
Nome dell'istanza del ruolo.
|
subscriptionId
|
path |
True
|
string
|
Credenziali di sottoscrizione che identificano in modo univoco la sottoscrizione di Microsoft Azure. L'ID sottoscrizione fa parte dell'URI per ogni chiamata di servizio.
|
api-version
|
query |
True
|
string
|
Versione dell'API client.
|
Risposte
Nome |
Tipo |
Descrizione |
200 OK
|
file
|
OK
Media Types: "application/x-rdp"
|
Other Status Codes
|
CloudError
|
Errore
Media Types: "application/x-rdp"
|
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nome |
Descrizione |
user_impersonation
|
rappresentare l'account utente
|
Esempio
Get Cloud Service Role
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcloudService/providers/Microsoft.Compute/cloudServices/aaaa/roleInstances/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/remoteDesktopFile?api-version=2022-09-04
/**
* Samples for CloudServiceRoleInstances GetRemoteDesktopFile.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/
* CloudServiceRoleInstance_Get_RemoteDesktopFile.json
*/
/**
* Sample code: Get Cloud Service Role.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void getCloudServiceRole(com.azure.resourcemanager.AzureResourceManager azure) {
azure.virtualMachines().manager().serviceClient().getCloudServiceRoleInstances()
.getRemoteDesktopFileWithResponse("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "rgcloudService", "aaaa",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e4009d2f8d3bf0271757e522c7d1c1997e193d44/specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_RemoteDesktopFile.json
func ExampleCloudServiceRoleInstancesClient_GetRemoteDesktopFile() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewCloudServiceRoleInstancesClient().GetRemoteDesktopFile(ctx, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "rgcloudService", "aaaa", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets a remote desktop file for a role instance in a cloud service.
*
* @summary Gets a remote desktop file for a role instance in a cloud service.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_RemoteDesktopFile.json
*/
async function getCloudServiceRole() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const roleInstanceName = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "rgcloudService";
const cloudServiceName = "aaaa";
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.cloudServiceRoleInstances.getRemoteDesktopFile(
roleInstanceName,
resourceGroupName,
cloudServiceName,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.IO;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Compute;
using Azure.ResourceManager.Compute.Models;
// Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/examples/CloudServiceRoleInstance_Get_RemoteDesktopFile.json
// this example is just showing the usage of "CloudServiceRoleInstances_GetRemoteDesktopFile" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CloudServiceRoleInstanceResource created on azure
// for more information of creating CloudServiceRoleInstanceResource, please refer to the document of CloudServiceRoleInstanceResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "rgcloudService";
string cloudServiceName = "aaaa";
string roleInstanceName = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
ResourceIdentifier cloudServiceRoleInstanceResourceId = CloudServiceRoleInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, cloudServiceName, roleInstanceName);
CloudServiceRoleInstanceResource cloudServiceRoleInstance = client.GetCloudServiceRoleInstanceResource(cloudServiceRoleInstanceResourceId);
// invoke the operation
Stream result = await cloudServiceRoleInstance.GetRemoteDesktopFileAsync();
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Definizioni
ApiError
Errore dell'API.
Nome |
Tipo |
Descrizione |
code
|
string
|
Codice di errore.
|
details
|
ApiErrorBase[]
|
Dettagli dell'errore dell'API
|
innererror
|
InnerError
|
Errore interno dell'API
|
message
|
string
|
Messaggio di errore.
|
target
|
string
|
Destinazione dell'errore specifico.
|
ApiErrorBase
Base di errori dell'API.
Nome |
Tipo |
Descrizione |
code
|
string
|
Codice di errore.
|
message
|
string
|
Messaggio di errore.
|
target
|
string
|
Destinazione dell'errore specifico.
|
CloudError
Risposta di errore dal servizio di calcolo.
Nome |
Tipo |
Descrizione |
error
|
ApiError
|
Errore dell'API.
|
InnerError
Dettagli dell'errore interno.
Nome |
Tipo |
Descrizione |
errordetail
|
string
|
Messaggio di errore interno o dump di eccezioni.
|
exceptiontype
|
string
|
Tipo di eccezione.
|