이 지역의 이 구독에서 자동 승인된 프라이빗 엔드포인트에 연결할 수 있는 모든 프라이빗 링크 서비스 ID를 반환합니다.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices?api-version=2023-11-01
URI 매개 변수
Name |
In(다음 안에) |
필수 |
형식 |
Description |
location
|
path |
True
|
string
|
도메인 이름의 위치입니다.
|
subscriptionId
|
path |
True
|
string
|
Microsoft Azure 구독을 고유하게 식별하는 구독 자격 증명입니다. 구독 ID는 모든 서비스 호출에 대한 URI의 일부를 형성합니다.
|
api-version
|
query |
True
|
string
|
클라이언트 API 버전입니다.
|
응답
보안
azure_auth
Azure Active Directory OAuth2 Flow.
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
Name |
Description |
user_impersonation
|
사용자 계정 가장
|
예제
Get list of private link service id that can be linked to a private end point with auto approved
샘플 요청
GET https://management.azure.com/subscriptions/subId/providers/Microsoft.Network/locations/regionName/autoApprovedPrivateLinkServices?api-version=2023-11-01
/**
* Samples for PrivateLinkServices ListAutoApprovedPrivateLinkServices.
*/
public final class Main {
/*
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/
* AutoApprovedPrivateLinkServicesGet.json
*/
/**
* Sample code: Get list of private link service id that can be linked to a private end point with auto approved.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved(
com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getPrivateLinkServices()
.listAutoApprovedPrivateLinkServices("regionName", 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.network import NetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-network
# USAGE
python auto_approved_private_link_services_get.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 = NetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subId",
)
response = client.private_link_services.list_auto_approved_private_link_services(
location="regionName",
)
for item in response:
print(item)
# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AutoApprovedPrivateLinkServicesGet.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 armnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f4c6c8697c59f966db0d1e36b62df3af3bca9065/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AutoApprovedPrivateLinkServicesGet.json
func ExamplePrivateLinkServicesClient_NewListAutoApprovedPrivateLinkServicesPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateLinkServicesClient().NewListAutoApprovedPrivateLinkServicesPager("regionName", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AutoApprovedPrivateLinkServicesResult = armnetwork.AutoApprovedPrivateLinkServicesResult{
// Value: []*armnetwork.AutoApprovedPrivateLinkService{
// {
// PrivateLinkService: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls1"),
// },
// {
// PrivateLinkService: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls2"),
// },
// {
// PrivateLinkService: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls3"),
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { NetworkManagementClient } = require("@azure/arm-network");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.
*
* @summary Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AutoApprovedPrivateLinkServicesGet.json
*/
async function getListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() {
const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subId";
const location = "regionName";
const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.privateLinkServices.listAutoApprovedPrivateLinkServices(location)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
샘플 응답
{
"value": [
{
"privateLinkService": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls1"
},
{
"privateLinkService": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls2"
},
{
"privateLinkService": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls3"
}
]
}
정의
AutoApprovedPrivateLinkService
AutoApprovedPrivateLinkService의 정보입니다.
Name |
형식 |
Description |
privateLinkService
|
string
|
프라이빗 링크 서비스 리소스의 ID입니다.
|
AutoApprovedPrivateLinkServicesResult
자동 승인된 프라이빗 엔드포인트에 연결할 수 있는 프라이빗 링크 서비스 ID의 배열입니다.
CloudError
서비스의 오류 응답입니다.
CloudErrorBody
서비스의 오류 응답입니다.
Name |
형식 |
Description |
code
|
string
|
오류의 식별자입니다. 코드는 고정적이며 프로그래밍 방식으로 사용할 수 있습니다.
|
details
|
CloudErrorBody[]
|
오류에 대한 추가 세부 정보 목록입니다.
|
message
|
string
|
사용자 인터페이스에 표시하기에 적합한 오류를 설명하는 메시지입니다.
|
target
|
string
|
특정 오류의 대상입니다. 예를 들어 오류가 발생한 속성의 이름입니다.
|