Azure AI Search kaynak sağlayıcısı için ağ güvenliği çevre yapılandırmasını uzlaştırın. Bu, arama hizmetinin en son yapılandırmayı taşıdığından emin olarak ağ güvenliği çevre yapılandırmalarıyla el ile yeniden eşitlemeyi tetikler.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile?api-version=2024-03-01-preview
URI Parametreleri
Name |
İçinde |
Gerekli |
Tür |
Description |
nspConfigName
|
path |
True
|
string
|
Ağ güvenliği yapılandırma adı.
Normal ifade deseni: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\.[a-z][a-z0-9]*$
|
resourceGroupName
|
path |
True
|
string
|
Geçerli abonelik içindeki kaynak grubunun adı. Bu değeri Azure Resource Manager API'sinden veya portaldan alabilirsiniz.
|
searchServiceName
|
path |
True
|
string
|
Belirtilen kaynak grubuyla ilişkili Azure AI Arama hizmeti adı.
Normal ifade deseni: ^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$
|
subscriptionId
|
path |
True
|
string
|
Microsoft Azure aboneliğinin benzersiz tanımlayıcısı. Bu değeri Azure Resource Manager API'sinden veya portaldan alabilirsiniz.
|
api-version
|
query |
True
|
string
|
Her istek için kullanılacak API sürümü.
|
Yanıtlar
Name |
Tür |
Description |
202 Accepted
|
|
Ağ güvenliği çevre yapılandırma işleminin kabul edildiği uzlaştırma.
Üst Bilgiler
Location: string
|
Other Status Codes
|
CloudError
|
İşlem sırasında beklenmeyen bir hata oluştu.
|
Güvenlik
azure_auth
Microsoft Identity platformunda desteklendiği gibi örtük bir izin akışı belirtir.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
Name |
Description |
user_impersonation
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
Reconcile NSP Config
Örnek isteği
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1/reconcile?api-version=2024-03-01-preview
from azure.identity import DefaultAzureCredential
from azure.mgmt.search import SearchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-search
# USAGE
python network_security_perimeter_configurations_reconcile.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",
)
client.network_security_perimeter_configurations.begin_reconcile(
resource_group_name="rg1",
search_service_name="mysearchservice",
nsp_config_name="00000001-2222-3333-4444-111144444444.assoc1",
).result()
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json
func ExampleNetworkSecurityPerimeterConfigurationsClient_BeginReconcile() {
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)
}
poller, err := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().BeginReconcile(ctx, "rg1", "mysearchservice", "00000001-2222-3333-4444-111144444444.assoc1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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 { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Reconcile network security perimeter configuration for the Azure AI Search resource provider. This triggers a manual resync with network security perimeter configurations by ensuring the search service carries the latest configuration.
*
* @summary Reconcile network security perimeter configuration for the Azure AI Search resource provider. This triggers a manual resync with network security perimeter configurations by ensuring the search service carries the latest configuration.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json
*/
async function reconcileNspConfig() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const nspConfigName = "00000001-2222-3333-4444-111144444444.assoc1";
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait(
resourceGroupName,
searchServiceName,
nspConfigName,
);
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
Örnek yanıt
Location: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/locations/westus/AsyncOperationResults/11111111-1111-1111-1111-111111111111
Tanımlar
Name |
Description |
CloudError
|
API hatası hakkında bilgi içerir.
|
CloudErrorBody
|
Hata kodu ve ileti içeren belirli bir API hatası açıklanır.
|
CloudError
API hatası hakkında bilgi içerir.
Name |
Tür |
Description |
error
|
CloudErrorBody
|
Hata kodu ve ileti içeren belirli bir API hatası açıklanır.
|
message
|
string
|
Neyin yanlış gittiğini gösteren hatanın kısa bir açıklaması (ayrıntılar/hata ayıklama bilgileri için 'error.message' özelliğine bakın).
|
CloudErrorBody
Hata kodu ve ileti içeren belirli bir API hatası açıklanır.
Name |
Tür |
Description |
code
|
string
|
Http durum kodundan daha kesin bir şekilde hata koşulunu açıklayan bir hata kodu. Belirli hata durumlarını program aracılığıyla işlemek için kullanılabilir.
|
details
|
CloudErrorBody[]
|
Bu hatayla ilgili iç içe hatalar içerir.
|
message
|
string
|
Hatayı ayrıntılı olarak açıklayan ve hata ayıklama bilgileri sağlayan bir ileti.
|
target
|
string
|
Belirli bir hatanın hedefi (örneğin, hatadaki özelliğin adı).
|