Získá soubor vzdálené plochy pro instanci role v cloudové službě.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile?api-version=2022-09-04
Parametry identifikátoru URI
Name |
V |
Vyžadováno |
Typ |
Description |
cloudServiceName
|
path |
True
|
string
|
Název cloudové služby
|
resourceGroupName
|
path |
True
|
string
|
Název skupiny prostředků.
|
roleInstanceName
|
path |
True
|
string
|
Název instance role
|
subscriptionId
|
path |
True
|
string
|
Přihlašovací údaje předplatného, které jednoznačně identifikují předplatné Microsoft Azure. ID předplatného je součástí identifikátoru URI pro každé volání služby.
|
api-version
|
query |
True
|
string
|
Verze rozhraní API klienta.
|
Odpovědi
Name |
Typ |
Description |
200 OK
|
file
|
OK
Media Types: "application/x-rdp"
|
Other Status Codes
|
CloudError
|
Chyba
Media Types: "application/x-rdp"
|
Zabezpečení
azure_auth
Tok Azure Active Directory OAuth2
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
zosobnění uživatelského účtu
|
Příklady
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/92de53a5f1e0e03c94b40475d2135d97148ed014/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
Definice
ApiError
Chyba rozhraní API
Name |
Typ |
Description |
code
|
string
|
Kód chyby
|
details
|
ApiErrorBase[]
|
Podrobnosti o chybě rozhraní API
|
innererror
|
InnerError
|
Vnitřní chyba rozhraní API
|
message
|
string
|
Chybová zpráva
|
target
|
string
|
Cíl konkrétní chyby.
|
ApiErrorBase
Základ chyb rozhraní API.
Name |
Typ |
Description |
code
|
string
|
Kód chyby
|
message
|
string
|
Chybová zpráva
|
target
|
string
|
Cíl konkrétní chyby.
|
CloudError
Chybová odpověď ze služby Compute.
Name |
Typ |
Description |
error
|
ApiError
|
Chyba rozhraní API
|
InnerError
Podrobnosti o vnitřní chybě.
Name |
Typ |
Description |
errordetail
|
string
|
Vnitřní chybová zpráva nebo výpis výjimky.
|
exceptiontype
|
string
|
Typ výjimky.
|