指定したリソース グループ内の検索サービスへのプライベート エンドポイント接続の詳細を取得します。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2023-11-01
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
privateEndpointConnectionName
|
path |
True
|
string
|
指定したリソース グループを持つ検索サービスへのプライベート エンドポイント接続の名前。
|
resourceGroupName
|
path |
True
|
string
|
現在のサブスクリプション内のリソース グループの名前。 この値は、Azure リソース マネージャー API またはポータルから取得できます。
|
searchServiceName
|
path |
True
|
string
|
指定したリソース グループに関連付けられている検索サービスの名前。
|
subscriptionId
|
path |
True
|
string
|
Microsoft Azure サブスクリプションの一意識別子。 この値は、Azure Resource Manager API、コマンド ライン ツール、またはポータルから取得できます。
|
api-version
|
query |
True
|
string
|
各要求に使用する API バージョン。
|
名前 |
必須 |
型 |
説明 |
x-ms-client-request-id
|
|
string
uuid
|
クライアントが生成した、この要求を識別する GUID 値。 指定した場合、これは要求を追跡する方法として応答情報に含まれます。
|
応答
名前 |
型 |
説明 |
200 OK
|
PrivateEndpointConnection
|
プライベート エンドポイント接続の定義が正常に取得され、応答内にあります。
|
Other Status Codes
|
CloudError
|
HTTP 404 (見つかりません): サブスクリプション、リソース グループ、検索サービス、またはプライベート エンドポイント接続が見つかりませんでした。
|
セキュリティ
azure_auth
OAuth2 承認フローをMicrosoft Entra IDします。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
PrivateEndpointConnectionGet
要求のサンプル
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice/privateEndpointConnections/testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546?api-version=2023-11-01
/**
* Samples for PrivateEndpointConnections Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetPrivateEndpointConnection.
* json
*/
/**
* Sample code: PrivateEndpointConnectionGet.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void privateEndpointConnectionGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getPrivateEndpointConnections().getWithResponse("rg1",
"mysearchservice", "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546", null,
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.search import SearchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-search
# 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 = SearchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.private_endpoint_connections.get(
resource_group_name="rg1",
search_service_name="mysearchservice",
private_endpoint_connection_name="testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546",
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/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 armsearch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e29dd59eef13ef347d09e41a63f2585be77b3ca/specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetPrivateEndpointConnection.json
func ExamplePrivateEndpointConnectionsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "rg1", "mysearchservice", "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546", &armsearch.SearchManagementRequestOptions{ClientRequestID: nil}, 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.PrivateEndpointConnection = armsearch.PrivateEndpointConnection{
// Name: to.Ptr("testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546"),
// Type: to.Ptr("Microsoft.Search/searchServices/privateEndpointConnections"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice/privateEndpointConnections/testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546"),
// Properties: &armsearch.PrivateEndpointConnectionProperties{
// PrivateEndpoint: &armsearch.PrivateEndpointConnectionPropertiesPrivateEndpoint{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testEndpoint"),
// },
// PrivateLinkServiceConnectionState: &armsearch.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState{
// Description: to.Ptr(""),
// ActionsRequired: to.Ptr("None"),
// Status: to.Ptr(armsearch.PrivateLinkServiceConnectionStatusApproved),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the details of the private endpoint connection to the search service in the given resource group.
*
* @summary Gets the details of the private endpoint connection to the search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetPrivateEndpointConnection.json
*/
async function privateEndpointConnectionGet() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const privateEndpointConnectionName = "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546";
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.privateEndpointConnections.get(
resourceGroupName,
searchServiceName,
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.Search;
using Azure.ResourceManager.Search.Models;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetPrivateEndpointConnection.json
// this example is just showing the usage of "PrivateEndpointConnections_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 SearchServiceResource created on azure
// for more information of creating SearchServiceResource, please refer to the document of SearchServiceResource
string subscriptionId = "subid";
string resourceGroupName = "rg1";
string searchServiceName = "mysearchservice";
ResourceIdentifier searchServiceResourceId = SearchServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, searchServiceName);
SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId);
// get the collection of this SearchPrivateEndpointConnectionResource
SearchPrivateEndpointConnectionCollection collection = searchService.GetSearchPrivateEndpointConnections();
// invoke the operation
string privateEndpointConnectionName = "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546";
NullableResponse<SearchPrivateEndpointConnectionResource> response = await collection.GetIfExistsAsync(privateEndpointConnectionName);
SearchPrivateEndpointConnectionResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
SearchPrivateEndpointConnectionData 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
応答のサンプル
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice/privateEndpointConnections/testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546",
"name": "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546",
"type": "Microsoft.Search/searchServices/privateEndpointConnections",
"properties": {
"privateEndpoint": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testEndpoint"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "",
"actionsRequired": "None"
}
}
}
定義
CloudError
API エラーに関する情報が含まれます。
CloudErrorBody
エラー コードとメッセージを含む特定の API エラーについて説明します。
名前 |
型 |
説明 |
code
|
string
|
エラー状態を HTTP 状態コードよりも正確に記述するエラー コード。 特定のエラー ケースをプログラムで処理するために使用できます。
|
details
|
CloudErrorBody[]
|
このエラーに関連する入れ子になったエラーが含まれています。
|
message
|
string
|
エラーを詳細に説明し、デバッグ情報を提供するメッセージ。
|
target
|
string
|
特定のエラーのターゲット (たとえば、エラーのプロパティの名前)。
|
PrivateEndpoint
Microsoft.Network プロバイダーからのプライベート エンドポイント リソース。
名前 |
型 |
説明 |
id
|
string
|
Microsoft.Network プロバイダーからのプライベート エンドポイント リソースのリソース ID。
|
PrivateEndpointConnection
検索サービスへの既存のプライベート エンドポイント接続について説明します。
名前 |
型 |
説明 |
id
|
string
|
リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
リソースの名前
|
properties
|
PrivateEndpointConnectionProperties
|
検索サービスへの既存のプライベート エンドポイント接続のプロパティについて説明します。
|
type
|
string
|
リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProperties
検索サービスへの既存のプライベート エンドポイント接続のプロパティについて説明します。
PrivateLinkServiceConnectionProvisioningState
プライベート リンク サービス接続のプロビジョニング状態。 有効な値は、更新、削除、失敗、成功、または不完全です
名前 |
型 |
説明 |
Canceled
|
string
|
プライベート リンク サービス接続リソースのプロビジョニング要求が取り消されました
|
Deleting
|
string
|
プライベート リンク サービス接続は、削除中です。
|
Failed
|
string
|
プライベート リンク サービス接続のプロビジョニングまたは削除に失敗しました。
|
Incomplete
|
string
|
プライベート リンク サービス接続リソースのプロビジョニング要求は受け入れ済みですが、作成プロセスはまだ開始されていません。
|
Succeeded
|
string
|
プライベート リンク サービス接続のプロビジョニングが完了し、承認の準備が整いました。
|
Updating
|
string
|
プライベート リンク サービス接続は、他のリソースと共に作成され、完全に機能するように処理中です。
|
PrivateLinkServiceConnectionState
Azure プライベート エンドポイントへの既存のPrivate Link サービス接続の現在の状態について説明します。
名前 |
型 |
規定値 |
説明 |
actionsRequired
|
string
|
None
|
必要になる可能性がある追加のアクションの説明。
|
description
|
string
|
|
プライベート リンク サービスの接続状態の説明。
|
status
|
PrivateLinkServiceConnectionStatus
|
|
プライベート リンク サービス接続の状態。 有効な値は、[保留中]、[承認済み]、[拒否済み]、または [切断] です。
|
PrivateLinkServiceConnectionStatus
プライベート リンク サービス接続の状態。 有効な値は、[保留中]、[承認済み]、[拒否済み]、または [切断] です。
名前 |
型 |
説明 |
Approved
|
string
|
プライベート エンドポイント接続が承認され、使用できる状態になります。
|
Disconnected
|
string
|
プライベート エンドポイント接続がサービスから削除されました。
|
Pending
|
string
|
プライベート エンドポイント接続が作成され、承認が保留中です。
|
Rejected
|
string
|
プライベート エンドポイント接続が拒否され、使用できません。
|