Ottenere la connessione all'endpoint privato. Questa chiamata viene effettuata da Backup Amministrazione.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2023-02-01
Parametri dell'URI
Nome |
In |
Necessario |
Tipo |
Descrizione |
privateEndpointConnectionName
|
path |
True
|
string
|
Nome della connessione dell'endpoint privato.
|
resourceGroupName
|
path |
True
|
string
|
Nome del gruppo di risorse in cui è presente l'insieme di credenziali dei servizi di ripristino.
|
subscriptionId
|
path |
True
|
string
|
ID sottoscrizione.
|
vaultName
|
path |
True
|
string
|
Nome dell'insieme di credenziali dei servizi di ripristino.
|
api-version
|
query |
True
|
string
|
Versione api client.
|
Risposte
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 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"
]
}
}
Definizioni
Error
Oggetto error.
Nome |
Tipo |
Descrizione |
additionalInfo
|
ErrorAdditionalInfo[]
|
Informazioni aggiuntive sull'errore.
|
code
|
string
|
Codice di errore.
|
details
|
NewErrorResponse[]
|
Dettagli dell'errore.
|
message
|
string
|
Messaggio di errore.
|
target
|
string
|
Destinazione dell'errore.
|
ErrorAdditionalInfo
Informazioni aggiuntive sull'errore di gestione delle risorse.
Nome |
Tipo |
Descrizione |
info
|
object
|
Informazioni aggiuntive.
|
type
|
string
|
Tipo di informazioni aggiuntive.
|
NewErrorResponse
Risposta all'errore di gestione delle risorse.
Nome |
Tipo |
Descrizione |
error
|
Error
|
Oggetto error.
|
PrivateEndpoint
Risorsa di rete dell'endpoint privato collegata alla connessione all'endpoint privato
Nome |
Tipo |
Descrizione |
id
|
string
|
Ottiene o imposta l'ID
|
PrivateEndpointConnection
Proprietà della risposta di connessione dell'endpoint privato
Nome |
Tipo |
Descrizione |
groupIds
|
VaultSubResourceType[]
|
ID gruppo per l'endpoint privato
|
privateEndpoint
|
PrivateEndpoint
|
Ottiene o imposta l'endpoint privato associato alla connessione dell'endpoint privato
|
privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
Ottiene o imposta lo stato di connessione del servizio collegamento privato
|
provisioningState
|
ProvisioningState
|
Ottiene o imposta lo stato di provisioning della connessione all'endpoint privato
|
PrivateEndpointConnectionResource
Proprietà della risposta di connessione dell'endpoint privato
Nome |
Tipo |
Descrizione |
eTag
|
string
|
ETag facoltativo.
|
id
|
string
|
ID risorsa rappresenta il percorso completo della risorsa.
|
location
|
string
|
Percorso della risorsa.
|
name
|
string
|
Nome della risorsa associato alla risorsa.
|
properties
|
PrivateEndpointConnection
|
Proprietà PrivateEndpointConnectionResource
|
tags
|
object
|
Tag delle risorse.
|
type
|
string
|
Tipo di risorsa rappresenta il percorso completo del modulo Spazio dei nomi/ResourceType/ResourceType/...
|
PrivateEndpointConnectionStatus
Ottiene o imposta lo stato
Nome |
Tipo |
Descrizione |
Approved
|
string
|
|
Disconnected
|
string
|
|
Pending
|
string
|
|
Rejected
|
string
|
|
PrivateLinkServiceConnectionState
collegamento privato stato di connessione del servizio
Nome |
Tipo |
Descrizione |
actionsRequired
|
string
|
Ottiene o imposta le azioni necessarie
|
description
|
string
|
Ottiene o imposta la descrizione
|
status
|
PrivateEndpointConnectionStatus
|
Ottiene o imposta lo stato
|
ProvisioningState
Ottiene o imposta lo stato di provisioning della connessione all'endpoint privato
Nome |
Tipo |
Descrizione |
Deleting
|
string
|
|
Failed
|
string
|
|
Pending
|
string
|
|
Succeeded
|
string
|
|
VaultSubResourceType
ID gruppo per l'endpoint privato
Nome |
Tipo |
Descrizione |
AzureBackup
|
string
|
|
AzureBackup_secondary
|
string
|
|
AzureSiteRecovery
|
string
|
|