Pobierz połączenie prywatnego punktu końcowego. To wywołanie jest wykonywane przez usługę Backup Administracja.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2023-02-01
Parametry identyfikatora URI
Nazwa |
W |
Wymagane |
Typ |
Opis |
privateEndpointConnectionName
|
path |
True
|
string
|
Nazwa połączenia prywatnego punktu końcowego.
|
resourceGroupName
|
path |
True
|
string
|
Nazwa grupy zasobów, w której znajduje się magazyn usługi Recovery Services.
|
subscriptionId
|
path |
True
|
string
|
Identyfikator subskrypcji.
|
vaultName
|
path |
True
|
string
|
Nazwa magazynu usługi Recovery Services.
|
api-version
|
query |
True
|
string
|
Wersja interfejsu API klienta.
|
Odpowiedzi
Zabezpieczenia
azure_auth
Przepływ OAuth2 usługi Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nazwa |
Opis |
user_impersonation
|
personifikuj konto użytkownika.
|
Przykłady
Get PrivateEndpointConnection
Sample Request
GET https://management.azure.com/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.RecoveryServices/vaults/gaallavaultbvtd2msi/privateEndpointConnections/gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b?api-version=2023-02-01
/** Samples for PrivateEndpointConnection Get. */
public final class Main {
/*
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
*/
/**
* Sample code: Get PrivateEndpointConnection.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void getPrivateEndpointConnection(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager
.privateEndpointConnections()
.getWithResponse(
"gaallavaultbvtd2msi",
"gaallaRG",
"gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b",
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
from azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python get_private_endpoint_connection.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = RecoveryServicesBackupClient(
credential=DefaultAzureCredential(),
subscription_id="04cf684a-d41f-4550-9f70-7708a3a2283b",
)
response = client.private_endpoint_connection.get(
vault_name="gaallavaultbvtd2msi",
resource_group_name="gaallaRG",
private_endpoint_connection_name="gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b",
)
print(response)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armrecoveryservicesbackup_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
func ExamplePrivateEndpointConnectionClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionClient().Get(ctx, "gaallavaultbvtd2msi", "gaallaRG", "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnectionResource = armrecoveryservicesbackup.PrivateEndpointConnectionResource{
// Name: to.Ptr("gaallatestpe1.3592346090307038890.backup.5704c932-249a-490b-a142-1396838cd3b"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/privateEndpointConnections"),
// ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.RecoveryServicesBVTD2/vaults/gaallavaultbvtd2msi/privateEndpointConnections/gaallatestpe3.3592346090307038890.backup.5704c932-249a-490b-a142-1396838cd3b"),
// Properties: &armrecoveryservicesbackup.PrivateEndpointConnection{
// PrivateEndpoint: &armrecoveryservicesbackup.PrivateEndpoint{
// ID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"),
// },
// PrivateLinkServiceConnectionState: &armrecoveryservicesbackup.PrivateLinkServiceConnectionState{
// Description: to.Ptr("Approved by johndoe@company.com"),
// Status: to.Ptr(armrecoveryservicesbackup.PrivateEndpointConnectionStatusApproved),
// },
// ProvisioningState: to.Ptr(armrecoveryservicesbackup.ProvisioningStateSucceeded),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get Private Endpoint Connection. This call is made by Backup Admin.
*
* @summary Get Private Endpoint Connection. This call is made by Backup Admin.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
*/
async function getPrivateEndpointConnection() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "04cf684a-d41f-4550-9f70-7708a3a2283b";
const vaultName = "gaallavaultbvtd2msi";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "gaallaRG";
const privateEndpointConnectionName = "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.privateEndpointConnectionOperations.get(
vaultName,
resourceGroupName,
privateEndpointConnectionName
);
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.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.RecoveryServicesBackup;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
// this example is just showing the usage of "PrivateEndpointConnection_Get" 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 BackupPrivateEndpointConnectionResource created on azure
// for more information of creating BackupPrivateEndpointConnectionResource, please refer to the document of BackupPrivateEndpointConnectionResource
string subscriptionId = "04cf684a-d41f-4550-9f70-7708a3a2283b";
string resourceGroupName = "gaallaRG";
string vaultName = "gaallavaultbvtd2msi";
string privateEndpointConnectionName = "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b";
ResourceIdentifier backupPrivateEndpointConnectionResourceId = BackupPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName);
BackupPrivateEndpointConnectionResource backupPrivateEndpointConnection = client.GetBackupPrivateEndpointConnectionResource(backupPrivateEndpointConnectionResourceId);
// invoke the operation
BackupPrivateEndpointConnectionResource result = await backupPrivateEndpointConnection.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BackupPrivateEndpointConnectionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.RecoveryServicesBVTD2/vaults/gaallavaultbvtd2msi/privateEndpointConnections/gaallatestpe3.3592346090307038890.backup.5704c932-249a-490b-a142-1396838cd3b",
"name": "gaallatestpe1.3592346090307038890.backup.5704c932-249a-490b-a142-1396838cd3b",
"type": "Microsoft.RecoveryServices/vaults/privateEndpointConnections",
"properties": {
"provisioningState": "Pending",
"privateEndpoint": {
"id": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Approved by johndoe@company.com"
},
"groupIds": [
"AzureBackup_secondary"
]
}
}
Definicje
Error
Obiekt błędu.
Nazwa |
Typ |
Opis |
additionalInfo
|
ErrorAdditionalInfo[]
|
Dodatkowe informacje o błędzie.
|
code
|
string
|
Kod błędu.
|
details
|
NewErrorResponse[]
|
Szczegóły błędu.
|
message
|
string
|
Komunikat o błędzie.
|
target
|
string
|
Element docelowy błędu.
|
ErrorAdditionalInfo
Dodatkowe informacje o błędzie zarządzania zasobami.
Nazwa |
Typ |
Opis |
info
|
object
|
Dodatkowe informacje.
|
type
|
string
|
Dodatkowy typ informacji.
|
NewErrorResponse
Odpowiedź na błąd zarządzania zasobami.
Nazwa |
Typ |
Opis |
error
|
Error
|
Obiekt błędu.
|
PrivateEndpoint
Zasób sieciowy prywatnego punktu końcowego połączony z połączeniem prywatnego punktu końcowego
Nazwa |
Typ |
Opis |
id
|
string
|
Pobiera lub ustawia identyfikator
|
PrivateEndpointConnection
Właściwości odpowiedzi połączenia prywatnego punktu końcowego
Nazwa |
Typ |
Opis |
groupIds
|
VaultSubResourceType[]
|
Identyfikatory grup dla prywatnego punktu końcowego
|
privateEndpoint
|
PrivateEndpoint
|
Pobiera lub ustawia prywatny punkt końcowy skojarzony z połączeniem prywatnego punktu końcowego
|
privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
Pobiera lub ustawia stan połączenia usługi private link
|
provisioningState
|
ProvisioningState
|
Pobiera lub ustawia stan aprowizacji połączenia prywatnego punktu końcowego
|
PrivateEndpointConnectionResource
Właściwości odpowiedzi połączenia prywatnego punktu końcowego
Nazwa |
Typ |
Opis |
eTag
|
string
|
Opcjonalny element ETag.
|
id
|
string
|
Identyfikator zasobu reprezentuje pełną ścieżkę do zasobu.
|
location
|
string
|
Lokalizacja zasobu.
|
name
|
string
|
Nazwa zasobu skojarzona z zasobem.
|
properties
|
PrivateEndpointConnection
|
Właściwości PrivateEndpointConnectionResource
|
tags
|
object
|
Tagi zasobów.
|
type
|
string
|
Typ zasobu reprezentuje pełną ścieżkę formularza Namespace/ResourceType/ResourceType/...
|
PrivateEndpointConnectionStatus
Pobiera lub ustawia stan
Nazwa |
Typ |
Opis |
Approved
|
string
|
|
Disconnected
|
string
|
|
Pending
|
string
|
|
Rejected
|
string
|
|
PrivateLinkServiceConnectionState
stan połączenia usługi Private Link
Nazwa |
Typ |
Opis |
actionsRequired
|
string
|
Pobiera lub ustawia wymagane akcje
|
description
|
string
|
Pobiera lub ustawia opis
|
status
|
PrivateEndpointConnectionStatus
|
Pobiera lub ustawia stan
|
ProvisioningState
Pobiera lub ustawia stan aprowizacji połączenia prywatnego punktu końcowego
Nazwa |
Typ |
Opis |
Deleting
|
string
|
|
Failed
|
string
|
|
Pending
|
string
|
|
Succeeded
|
string
|
|
VaultSubResourceType
Identyfikatory grup dla prywatnego punktu końcowego
Nazwa |
Typ |
Opis |
AzureBackup
|
string
|
|
AzureBackup_secondary
|
string
|
|
AzureSiteRecovery
|
string
|
|