Aktualizuje istniejącą usługę wyszukiwania w danej grupie zasobów.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}?api-version=2025-05-01
Parametry identyfikatora URI
| Nazwa |
W |
Wymagane |
Typ |
Opis |
|
resourceGroupName
|
path |
True
|
string
|
Nazwa grupy zasobów w ramach bieżącej subskrypcji. Tę wartość można uzyskać z interfejsu API usługi Azure Resource Manager lub portalu.
|
|
searchServiceName
|
path |
True
|
string
|
Nazwa usługi Azure AI Search do zaktualizowania.
|
|
subscriptionId
|
path |
True
|
string
|
Unikatowy identyfikator subskrypcji platformy Microsoft Azure. Tę wartość można uzyskać z interfejsu API usługi Azure Resource Manager lub portalu.
|
|
api-version
|
query |
True
|
string
|
Wersja interfejsu API do użycia dla każdego żądania.
|
| Nazwa |
Wymagane |
Typ |
Opis |
|
x-ms-client-request-id
|
|
string
(uuid)
|
Wartość identyfikatora GUID wygenerowana przez klienta, która identyfikuje to żądanie. Jeśli zostanie określony, zostanie to uwzględnione w informacjach o odpowiedzi jako sposób śledzenia żądania.
|
Treść żądania
| Nazwa |
Typ |
Opis |
|
identity
|
Identity
|
Szczegółowe informacje o tożsamości usługi wyszukiwania. Wartość null wskazuje, że usługa wyszukiwania nie ma przypisanej tożsamości.
|
|
location
|
string
|
Lokalizacja geograficzna zasobu. Musi to być jeden z obsługiwanych i zarejestrowanych regionów geograficznych platformy Azure (na przykład Zachodnie stany USA, Wschodnie stany USA, Azja Południowo-Wschodnia itd.). Ta właściwość jest wymagana podczas tworzenia nowego zasobu.
|
|
properties.authOptions
|
DataPlaneAuthOptions
|
Definiuje opcje sposobu uwierzytelniania żądań przez interfejs API płaszczyzny danych usługi wyszukiwania. Nie można ustawić tego ustawienia, jeśli parametr "disableLocalAuth" ma wartość true.
|
|
properties.computeType
|
ComputeType
|
Skonfiguruj tę właściwość tak, aby obsługiwała usługę wyszukiwania przy użyciu domyślnego obliczeniowego lub poufnego obliczenia platformy Azure.
|
|
properties.dataExfiltrationProtections
|
SearchDataExfiltrationProtection[]
|
Lista scenariuszy eksfiltracji danych, które są jawnie niedozwolone dla usługi wyszukiwania. Obecnie jedyną obsługiwaną wartością jest "Wszystkie", aby wyłączyć wszystkie możliwe scenariusze eksportu danych z bardziej precyzyjnymi kontrolkami zaplanowanymi na przyszłość.
|
|
properties.disableLocalAuth
|
boolean
|
Po ustawieniu wartości true wywołania usługi wyszukiwania nie będą mogły korzystać z kluczy interfejsu API do uwierzytelniania. Nie można ustawić wartości true, jeśli zdefiniowano wartość "dataPlaneAuthOptions".
|
|
properties.encryptionWithCmk
|
EncryptionWithCmk
|
Określa wszelkie zasady dotyczące szyfrowania zasobów (takich jak indeksy) przy użyciu kluczy menedżera klienta w usłudze wyszukiwania.
|
|
properties.endpoint
|
string
(uri)
|
Punkt końcowy usługi Azure AI Search.
|
|
properties.hostingMode
|
HostingMode
|
Dotyczy tylko jednostki SKU w warstwie Standardowa3. Tę właściwość można ustawić tak, aby umożliwić maksymalnie 3 partycje o wysokiej gęstości, które zezwalają na maksymalnie 1000 indeksów, co jest znacznie wyższe niż maksymalne indeksy dozwolone dla dowolnej innej jednostki SKU. W przypadku jednostki SKU w warstwie Standardowa3 wartość to "default" lub "highDensity". W przypadku wszystkich innych jednostek SKU ta wartość musi być wartością domyślną.
|
|
properties.networkRuleSet
|
NetworkRuleSet
|
Reguły specyficzne dla sieci, które określają, jak można uzyskać dostęp do usługi Azure AI Search.
|
|
properties.partitionCount
|
integer
(int32)
minimum: 1 maximum: 12
|
Liczba partycji w usłudze wyszukiwania; jeśli zostanie określony, może to być 1, 2, 3, 4, 6 lub 12. Wartości większe niż 1 są prawidłowe tylko dla standardowych jednostek SKU. W przypadku usług "standard3" z hostMode ustawionym na wartość "highDensity" dozwolone wartości to od 1 do 3.
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
Tę wartość można ustawić na wartość "włączone", aby uniknąć zmian powodujących niezgodność istniejących zasobów i szablonów klientów. W przypadku ustawienia wartości "disabled" ruch za pośrednictwem interfejsu publicznego jest niedozwolony, a połączenia prywatnych punktów końcowych będą wyłączną metodą dostępu.
|
|
properties.replicaCount
|
integer
(int32)
minimum: 1 maximum: 12
|
Liczba replik w usłudze wyszukiwania. W przypadku określenia musi to być wartość z zakresu od 1 do 12 włącznie dla standardowych jednostek SKU lub od 1 do 3 włącznie dla podstawowej jednostki SKU.
|
|
properties.semanticSearch
|
SearchSemanticSearch
|
Ustawia opcje kontrolujące dostępność wyszukiwania semantycznego. Ta konfiguracja jest możliwa tylko w przypadku niektórych jednostek SKU usługi Azure AI Search w określonych lokalizacjach.
|
|
properties.upgradeAvailable
|
UpgradeAvailable
|
Wskazuje, czy usługa wyszukiwania ma dostępne uaktualnienie.
|
|
sku
|
Sku
|
Jednostka SKU usługi wyszukiwania, która określa warstwę cenową i limity pojemności. Ta właściwość jest wymagana podczas tworzenia nowej usługi wyszukiwania.
|
|
tags
|
object
|
Tagi ułatwiające kategoryzowanie zasobu w witrynie Azure Portal.
|
Odpowiedzi
| Nazwa |
Typ |
Opis |
|
200 OK
|
SearchService
|
Istniejąca definicja usługi została pomyślnie zaktualizowana. Jeśli zmienisz liczbę replik lub partycji, operacja skalowania będzie wykonywana asynchronicznie. Stan operacji skalowania można sprawdzić za pomocą właściwości provisioningState zwróconej w odpowiedzi na żądanie get service.
|
|
Other Status Codes
|
CloudError
|
HTTP 400 (Nieprawidłowe żądanie): podana definicja usługi jest nieprawidłowa lub podjęto próbę zmiany właściwości, która jest niezmienna. Aby uzyskać szczegółowe informacje, zobacz kod błędu i komunikat w odpowiedzi. HTTP 404 (Nie znaleziono): nie można odnaleźć subskrypcji lub grupy zasobów. HTTP 409 (konflikt): określona subskrypcja jest wyłączona.
|
Zabezpieczenia
azure_auth
Określa niejawny przepływ udzielania, obsługiwany na platformie Microsoft Identity.
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
| Nazwa |
Opis |
|
user_impersonation
|
personifikacja konta użytkownika
|
Przykłady
SearchUpdateService
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"properties": {
"replicaCount": 2
}
}
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateService.json
*/
/**
* Sample code: SearchUpdateService.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateService(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices()
.update("rg1", "mysearchservice", new SearchServiceUpdate()
.withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag")).withReplicaCount(2),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {"replicaCount": 2},
"tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"},
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateService.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateService.json
func ExampleServicesClient_Update_searchUpdateService() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
ReplicaCount: to.Ptr[int32](2),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
"new-tag": to.Ptr("Adding a new tag"),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](2),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateService.json
*/
async function searchUpdateService() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
replicaCount: 2,
tags: { appName: "My e-commerce app", newTag: "Adding a new tag" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateService.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 2,
Tags =
{
["app-name"] = "My e-commerce app",
["new-tag"] = "Adding a new tag"
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 2,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "provisioning",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceAuthOptions
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"properties": {
"replicaCount": 2,
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
}
}
}
import com.azure.resourcemanager.search.models.AadAuthFailureMode;
import com.azure.resourcemanager.search.models.DataPlaneAadOrApiKeyAuthOption;
import com.azure.resourcemanager.search.models.DataPlaneAuthOptions;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceAuthOptions.
* json
*/
/**
* Sample code: SearchUpdateServiceAuthOptions.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceAuthOptions(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag"))
.withReplicaCount(2)
.withAuthOptions(new DataPlaneAuthOptions().withAadOrApiKey(new DataPlaneAadOrApiKeyAuthOption()
.withAadAuthFailureMode(AadAuthFailureMode.HTTP401WITH_BEARER_CHALLENGE))),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_auth_options.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {
"authOptions": {"aadOrApiKey": {"aadAuthFailureMode": "http401WithBearerChallenge"}},
"replicaCount": 2,
},
"tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"},
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceAuthOptions.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceAuthOptions.json
func ExampleServicesClient_Update_searchUpdateServiceAuthOptions() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
AuthOptions: &armsearch.DataPlaneAuthOptions{
AADOrAPIKey: &armsearch.DataPlaneAADOrAPIKeyAuthOption{
AADAuthFailureMode: to.Ptr(armsearch.AADAuthFailureModeHttp401WithBearerChallenge),
},
},
ReplicaCount: to.Ptr[int32](2),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
"new-tag": to.Ptr("Adding a new tag"),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// AADOrAPIKey: &armsearch.DataPlaneAADOrAPIKeyAuthOption{
// AADAuthFailureMode: to.Ptr(armsearch.AADAuthFailureModeHttp401WithBearerChallenge),
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](2),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceAuthOptions.json
*/
async function searchUpdateServiceAuthOptions() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
authOptions: {
aadOrApiKey: { aadAuthFailureMode: "http401WithBearerChallenge" },
},
replicaCount: 2,
tags: { appName: "My e-commerce app", newTag: "Adding a new tag" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceAuthOptions.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 2,
AuthOptions = new SearchAadAuthDataPlaneAuthOptions
{
AadAuthFailureMode = SearchAadAuthFailureMode.Http401WithBearerChallenge,
},
Tags =
{
["app-name"] = "My e-commerce app",
["new-tag"] = "Adding a new tag"
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 2,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "provisioning",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceDisableLocalAuth
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"properties": {
"replicaCount": 2,
"disableLocalAuth": true
}
}
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceDisableLocalAuth.json
*/
/**
* Sample code: SearchUpdateServiceDisableLocalAuth.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceDisableLocalAuth(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag"))
.withReplicaCount(2).withDisableLocalAuth(true),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_disable_local_auth.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {"disableLocalAuth": True, "replicaCount": 2},
"tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"},
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceDisableLocalAuth.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceDisableLocalAuth.json
func ExampleServicesClient_Update_searchUpdateServiceDisableLocalAuth() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
DisableLocalAuth: to.Ptr(true),
ReplicaCount: to.Ptr[int32](2),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
"new-tag": to.Ptr("Adding a new tag"),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(true),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](2),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceDisableLocalAuth.json
*/
async function searchUpdateServiceDisableLocalAuth() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
disableLocalAuth: true,
replicaCount: 2,
tags: { appName: "My e-commerce app", newTag: "Adding a new tag" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceDisableLocalAuth.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 2,
IsLocalAuthDisabled = true,
Tags =
{
["app-name"] = "My e-commerce app",
["new-tag"] = "Adding a new tag"
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 2,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "provisioning",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": true,
"authOptions": null,
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceToAllowAccessFromPrivateEndpoints
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"properties": {
"replicaCount": 1,
"partitionCount": 1,
"publicNetworkAccess": "disabled"
}
}
import com.azure.resourcemanager.search.models.PublicNetworkAccess;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json
*/
/**
* Sample code: SearchUpdateServiceToAllowAccessFromPrivateEndpoints.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void
searchUpdateServiceToAllowAccessFromPrivateEndpoints(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withReplicaCount(1).withPartitionCount(1)
.withPublicNetworkAccess(PublicNetworkAccess.DISABLED),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_to_allow_access_from_private_endpoints.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={"properties": {"partitionCount": 1, "publicNetworkAccess": "disabled", "replicaCount": 1}},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json
func ExampleServicesClient_Update_searchUpdateServiceToAllowAccessFromPrivateEndpoints() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
PartitionCount: to.Ptr[int32](1),
PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessDisabled),
ReplicaCount: to.Ptr[int32](1),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessDisabled),
// ReplicaCount: to.Ptr[int32](1),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusRunning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameBasic),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json
*/
async function searchUpdateServiceToAllowAccessFromPrivateEndpoints() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
partitionCount: 1,
publicNetworkAccess: "disabled",
replicaCount: 1,
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 1,
PartitionCount = 1,
PublicInternetAccess = SearchServicePublicInternetAccess.Disabled,
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "basic"
},
"properties": {
"replicaCount": 1,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "succeeded",
"publicNetworkAccess": "disabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceToAllowAccessFromPublicCustomIPs
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
}
}
}
import com.azure.resourcemanager.search.models.IpRule;
import com.azure.resourcemanager.search.models.NetworkRuleSet;
import com.azure.resourcemanager.search.models.PublicNetworkAccess;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json
*/
/**
* Sample code: SearchUpdateServiceToAllowAccessFromPublicCustomIPs.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void
searchUpdateServiceToAllowAccessFromPublicCustomIPs(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withReplicaCount(3).withPartitionCount(1)
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withNetworkRuleSet(new NetworkRuleSet().withIpRules(
Arrays.asList(new IpRule().withValue("123.4.5.6"), new IpRule().withValue("123.4.6.0/18")))),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_to_allow_access_from_public_custom_ips.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {
"networkRuleSet": {"ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}]},
"partitionCount": 1,
"publicNetworkAccess": "enabled",
"replicaCount": 3,
}
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json
func ExampleServicesClient_Update_searchUpdateServiceToAllowAccessFromPublicCustomIPs() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
NetworkRuleSet: &armsearch.NetworkRuleSet{
IPRules: []*armsearch.IPRule{
{
Value: to.Ptr("123.4.5.6"),
},
{
Value: to.Ptr("123.4.6.0/18"),
}},
},
PartitionCount: to.Ptr[int32](1),
PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
ReplicaCount: to.Ptr[int32](3),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// IPRules: []*armsearch.IPRule{
// {
// Value: to.Ptr("10.2.3.4"),
// }},
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusRunning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json
*/
async function searchUpdateServiceToAllowAccessFromPublicCustomIPs() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
networkRuleSet: {
ipRules: [{ value: "123.4.5.6" }, { value: "123.4.6.0/18" }],
},
partitionCount: 1,
publicNetworkAccess: "enabled",
replicaCount: 3,
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 3,
PartitionCount = 1,
PublicInternetAccess = SearchServicePublicInternetAccess.Enabled,
NetworkRuleSet = new SearchServiceNetworkRuleSet
{
IPRules = {new SearchServiceIPRule
{
Value = "123.4.5.6",
}, new SearchServiceIPRule
{
Value = "123.4.6.0/18",
}},
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "succeeded",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [
{
"value": "10.2.3.4"
}
]
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
],
"bypass": "AzureServices"
}
}
}
import com.azure.resourcemanager.search.models.IpRule;
import com.azure.resourcemanager.search.models.NetworkRuleSet;
import com.azure.resourcemanager.search.models.PublicNetworkAccess;
import com.azure.resourcemanager.search.models.SearchBypass;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json
*/
/**
* Sample code: SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass(
com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withReplicaCount(3).withPartitionCount(1)
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withNetworkRuleSet(new NetworkRuleSet()
.withIpRules(
Arrays.asList(new IpRule().withValue("123.4.5.6"), new IpRule().withValue("123.4.6.0/18")))
.withBypass(SearchBypass.AZURE_SERVICES)),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_to_allow_access_from_public_custom_ips_and_bypass.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {
"networkRuleSet": {
"bypass": "AzureServices",
"ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}],
},
"partitionCount": 1,
"publicNetworkAccess": "enabled",
"replicaCount": 3,
}
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json
func ExampleServicesClient_Update_searchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
NetworkRuleSet: &armsearch.NetworkRuleSet{
Bypass: to.Ptr(armsearch.SearchBypassAzureServices),
IPRules: []*armsearch.IPRule{
{
Value: to.Ptr("123.4.5.6"),
},
{
Value: to.Ptr("123.4.6.0/18"),
}},
},
PartitionCount: to.Ptr[int32](1),
PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
ReplicaCount: to.Ptr[int32](3),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassAzureServices),
// IPRules: []*armsearch.IPRule{
// {
// Value: to.Ptr("10.2.3.4"),
// }},
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusRunning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json
*/
async function searchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
networkRuleSet: {
bypass: "AzureServices",
ipRules: [{ value: "123.4.5.6" }, { value: "123.4.6.0/18" }],
},
partitionCount: 1,
publicNetworkAccess: "enabled",
replicaCount: 3,
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 3,
PartitionCount = 1,
PublicInternetAccess = SearchServicePublicInternetAccess.Enabled,
NetworkRuleSet = new SearchServiceNetworkRuleSet
{
IPRules = {new SearchServiceIPRule
{
Value = "123.4.5.6",
}, new SearchServiceIPRule
{
Value = "123.4.6.0/18",
}},
Bypass = SearchBypass.AzureServices,
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "succeeded",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [
{
"value": "10.2.3.4"
}
],
"bypass": "AzureServices"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceToRemoveIdentity
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"sku": {
"name": "standard"
},
"identity": {
"type": "None"
}
}
import com.azure.resourcemanager.search.models.Identity;
import com.azure.resourcemanager.search.models.IdentityType;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import com.azure.resourcemanager.search.models.Sku;
import com.azure.resourcemanager.search.models.SkuName;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceToRemoveIdentity.json
*/
/**
* Sample code: SearchUpdateServiceToRemoveIdentity.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceToRemoveIdentity(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withSku(new Sku().withName(SkuName.STANDARD))
.withIdentity(new Identity().withType(IdentityType.NONE)),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_to_remove_identity.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={"identity": {"type": "None"}, "sku": {"name": "standard"}},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToRemoveIdentity.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToRemoveIdentity.json
func ExampleServicesClient_Update_searchUpdateServiceToRemoveIdentity() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Identity: &armsearch.Identity{
Type: to.Ptr(armsearch.IdentityTypeNone),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusRunning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToRemoveIdentity.json
*/
async function searchUpdateServiceToRemoveIdentity() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
identity: { type: "None" },
sku: { name: "standard" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToRemoveIdentity.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
SearchSkuName = SearchServiceSkuName.Standard,
Identity = new ManagedServiceIdentity("None"),
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "succeeded",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceWithCmkEnforcement
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"properties": {
"replicaCount": 2,
"encryptionWithCmk": {
"enforcement": "Enabled"
}
}
}
import com.azure.resourcemanager.search.models.EncryptionWithCmk;
import com.azure.resourcemanager.search.models.SearchEncryptionWithCmk;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceWithCmkEnforcement.json
*/
/**
* Sample code: SearchUpdateServiceWithCmkEnforcement.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceWithCmkEnforcement(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag"))
.withReplicaCount(2)
.withEncryptionWithCmk(new EncryptionWithCmk().withEnforcement(SearchEncryptionWithCmk.ENABLED)),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_with_cmk_enforcement.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {"encryptionWithCmk": {"enforcement": "Enabled"}, "replicaCount": 2},
"tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"},
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithCmkEnforcement.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithCmkEnforcement.json
func ExampleServicesClient_Update_searchUpdateServiceWithCmkEnforcement() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
EncryptionWithCmk: &armsearch.EncryptionWithCmk{
Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkEnabled),
},
ReplicaCount: to.Ptr[int32](2),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
"new-tag": to.Ptr("Adding a new tag"),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkEnabled),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](2),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithCmkEnforcement.json
*/
async function searchUpdateServiceWithCmkEnforcement() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
encryptionWithCmk: { enforcement: "Enabled" },
replicaCount: 2,
tags: { appName: "My e-commerce app", newTag: "Adding a new tag" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithCmkEnforcement.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 2,
EncryptionWithCmk = new SearchEncryptionWithCmk
{
Enforcement = SearchEncryptionWithCmkEnforcement.Enabled,
},
Tags =
{
["app-name"] = "My e-commerce app",
["new-tag"] = "Adding a new tag"
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 2,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "provisioning",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Enabled",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceWithDataExfiltration
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"properties": {
"replicaCount": 2,
"dataExfiltrationProtections": [
"BlockAll"
]
}
}
import com.azure.resourcemanager.search.models.SearchDataExfiltrationProtection;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceWithDataExfiltration.json
*/
/**
* Sample code: SearchUpdateServiceWithDataExfiltration.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceWithDataExfiltration(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag"))
.withReplicaCount(2).withDataExfiltrationProtections(
Arrays.asList(SearchDataExfiltrationProtection.BLOCK_ALL)),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_with_data_exfiltration.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {"dataExfiltrationProtections": ["BlockAll"], "replicaCount": 2},
"tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"},
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithDataExfiltration.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithDataExfiltration.json
func ExampleServicesClient_Update_searchUpdateServiceWithDataExfiltration() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
to.Ptr(armsearch.SearchDataExfiltrationProtectionBlockAll)},
ReplicaCount: to.Ptr[int32](2),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
"new-tag": to.Ptr("Adding a new tag"),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// to.Ptr(armsearch.SearchDataExfiltrationProtectionBlockAll)},
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](2),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithDataExfiltration.json
*/
async function searchUpdateServiceWithDataExfiltration() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
dataExfiltrationProtections: ["BlockAll"],
replicaCount: 2,
tags: { appName: "My e-commerce app", newTag: "Adding a new tag" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithDataExfiltration.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 2,
DataExfiltrationProtections = { SearchDataExfiltrationProtection.BlockAll },
Tags =
{
["app-name"] = "My e-commerce app",
["new-tag"] = "Adding a new tag"
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 2,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "provisioning",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [
"BlockAll"
],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceWithSemanticSearch
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"properties": {
"replicaCount": 2,
"semanticSearch": "standard"
}
}
import com.azure.resourcemanager.search.models.SearchSemanticSearch;
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/
* SearchUpdateServiceWithSemanticSearch.json
*/
/**
* Sample code: SearchUpdateServiceWithSemanticSearch.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceWithSemanticSearch(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag"))
.withReplicaCount(2).withSemanticSearch(SearchSemanticSearch.STANDARD),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_with_semantic_search.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"properties": {"replicaCount": 2, "semanticSearch": "standard"},
"tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"},
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSemanticSearch.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSemanticSearch.json
func ExampleServicesClient_Update_searchUpdateServiceWithSemanticSearch() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
Properties: &armsearch.ServiceProperties{
ReplicaCount: to.Ptr[int32](2),
SemanticSearch: to.Ptr(armsearch.SearchSemanticSearchStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
"new-tag": to.Ptr("Adding a new tag"),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](2),
// SemanticSearch: to.Ptr(armsearch.SearchSemanticSearchStandard),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSemanticSearch.json
*/
async function searchUpdateServiceWithSemanticSearch() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
replicaCount: 2,
semanticSearch: "standard",
tags: { appName: "My e-commerce app", newTag: "Adding a new tag" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSemanticSearch.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
ReplicaCount = 2,
SemanticSearch = SearchSemanticSearch.Standard,
Tags =
{
["app-name"] = "My e-commerce app",
["new-tag"] = "Adding a new tag"
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 2,
"partitionCount": 1,
"endpoint": "https://mysearchservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "provisioning",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"semanticSearch": "standard",
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchUpdateServiceWithSku
Przykładowe żądanie
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2025-05-01
{
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard2"
}
}
import com.azure.resourcemanager.search.models.SearchServiceUpdate;
import com.azure.resourcemanager.search.models.Sku;
import com.azure.resourcemanager.search.models.SkuName;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSku.json
*/
/**
* Sample code: SearchUpdateServiceWithSku.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void searchUpdateServiceWithSku(com.azure.resourcemanager.AzureResourceManager azure) {
azure.searchServices().manager().serviceClient().getServices().update("rg1", "mysearchservice",
new SearchServiceUpdate().withSku(new Sku().withName(SkuName.STANDARD2))
.withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag")),
null, com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
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 search_update_service_with_sku.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.services.update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"sku": {"name": "standard2"},
"tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"},
},
)
print(response)
# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSku.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/azcore/to"
"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/fb3217991ff57b5760525aeba1a0670bfe0880fa/specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSku.json
func ExampleServicesClient_Update_searchUpdateServiceWithSku() {
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.NewServicesClient().Update(ctx, "rg1", "mysearchservice", armsearch.ServiceUpdate{
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard2),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
"new-tag": to.Ptr("Adding a new tag"),
},
}, &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.Service = armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("fakeuser@contoso.com"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// "new-tag": to.Ptr("Adding a new tag"),
// },
// Properties: &armsearch.ServiceProperties{
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// APIKeyOnly: map[string]any{
// },
// },
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// DisableLocalAuth: to.Ptr(false),
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// },
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// IPRules: []*armsearch.IPRule{
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](1),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard2),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Updates an existing search service in the given resource group.
*
* @summary Updates an existing search service in the given resource group.
* x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSku.json
*/
async function searchUpdateServiceWithSku() {
const subscriptionId = process.env["SEARCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["SEARCH_RESOURCE_GROUP"] || "rg1";
const searchServiceName = "mysearchservice";
const service = {
sku: { name: "standard2" },
tags: { appName: "My e-commerce app", newTag: "Adding a new tag" },
};
const credential = new DefaultAzureCredential();
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.update(resourceGroupName, searchServiceName, service);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Search.Models;
using Azure.ResourceManager.Search;
// Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSku.json
// this example is just showing the usage of "Services_Update" 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);
// invoke the operation
SearchServicePatch patch = new SearchServicePatch(default)
{
SearchSkuName = SearchServiceSkuName.Standard2,
Tags =
{
["app-name"] = "My e-commerce app",
["new-tag"] = "Adding a new tag"
},
};
SearchServiceResource result = await searchService.UpdateAsync(patch);
// 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
SearchServiceData 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
Przykładowa odpowiedź
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"sku": {
"name": "standard2"
},
"properties": {
"replicaCount": 1,
"partitionCount": 1,
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"computeType": "default",
"provisioningState": "provisioning",
"publicNetworkAccess": "enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"apiKeyOnly": {}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "fakeuser@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
Definicje
| Nazwa |
Opis |
|
AadAuthFailureMode
|
Opisuje odpowiedź interfejsu API płaszczyzny danych usługi wyszukiwania wysyłanej dla żądań, które zakończyły się niepowodzeniem uwierzytelniania.
|
|
ApiKeyOnly
|
Wskazuje, że tylko klucz interfejsu API może być używany do uwierzytelniania.
|
|
CloudError
|
Zawiera informacje o błędzie interfejsu API.
|
|
CloudErrorBody
|
Opisuje określony błąd interfejsu API z kodem błędu i komunikatem.
|
|
ComputeType
|
Skonfiguruj tę właściwość tak, aby obsługiwała usługę wyszukiwania przy użyciu domyślnego obliczeniowego lub poufnego obliczenia platformy Azure.
|
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
DataPlaneAadOrApiKeyAuthOption
|
Wskazuje, że do uwierzytelniania można użyć klucza interfejsu API lub tokenu dostępu z dzierżawy identyfikatora Entra firmy Microsoft.
|
|
DataPlaneAuthOptions
|
Definiuje opcje uwierzytelniania żądania płaszczyzny danych przez usługę wyszukiwania. Nie można ustawić tego ustawienia, jeśli parametr "disableLocalAuth" ma wartość true.
|
|
EncryptionWithCmk
|
Opisuje zasady określające sposób szyfrowania zasobów w usłudze wyszukiwania za pomocą kluczy zarządzanych przez klienta.
|
|
HostingMode
|
Dotyczy tylko jednostki SKU w warstwie Standardowa3. Tę właściwość można ustawić tak, aby umożliwić maksymalnie 3 partycje o wysokiej gęstości, które zezwalają na maksymalnie 1000 indeksów, co jest znacznie wyższe niż maksymalne indeksy dozwolone dla dowolnej innej jednostki SKU. W przypadku jednostki SKU w warstwie Standardowa3 wartość to "default" lub "highDensity". W przypadku wszystkich innych jednostek SKU ta wartość musi być wartością domyślną.
|
|
Identity
|
Szczegółowe informacje o tożsamości usługi wyszukiwania. Wartość null wskazuje, że usługa wyszukiwania nie ma przypisanej tożsamości.
|
|
IdentityType
|
Typ tożsamości używany dla zasobu. Typ "SystemAssigned, UserAssigned" zawiera zarówno tożsamość utworzoną przez system, jak i zestaw tożsamości przypisanych przez użytkownika. Typ "None" spowoduje usunięcie wszystkich tożsamości z usługi.
|
|
IpRule
|
Reguła ograniczeń adresów IP usługi Azure AI Search.
|
|
NetworkRuleSet
|
Reguły specyficzne dla sieci, które określają, jak można uzyskać dostęp do usługi Azure AI Search.
|
|
PrivateEndpoint
|
Zasób prywatnego punktu końcowego od dostawcy Microsoft.Network.
|
|
PrivateEndpointConnection
|
Opisuje istniejące połączenie prywatnego punktu końcowego z usługą Azure AI Search.
|
|
PrivateEndpointConnectionProperties
|
Opisuje właściwości istniejącego połączenia prywatnego punktu końcowego z usługą wyszukiwania.
|
|
PrivateLinkServiceConnectionProvisioningState
|
Stan aprowizacji połączenia usługi private link. Prawidłowe wartości to Aktualizowanie, Usuwanie, Niepowodzenie, Powodzenie, Niekompletne lub Anulowane.
|
|
PrivateLinkServiceConnectionState
|
Opisuje bieżący stan istniejącego połączenia usługi Azure Private Link z prywatnym punktem końcowym.
|
|
PrivateLinkServiceConnectionStatus
|
Stan połączenia usługi private link. Prawidłowe wartości to Oczekujące, Zatwierdzone, Odrzucone lub Rozłączone.
|
|
ProvisioningState
|
Stan ostatniej operacji aprowizacji wykonanej w usłudze wyszukiwania. Aprowizowanie jest stanem pośrednim, który występuje podczas ustanawiania pojemności usługi. Po skonfigurowaniu pojemności provisioningState zmieni się na "Powodzenie" lub "Niepowodzenie". Aplikacje klienckie mogą sondować stan aprowizacji (zalecany interwał sondowania wynosi od 30 sekund do jednej minuty) przy użyciu operacji Pobierz usługę wyszukiwania, aby sprawdzić, kiedy operacja zostanie ukończona. Jeśli używasz bezpłatnej usługi, ta wartość ma tendencję do powrotu jako "Powodzenie" bezpośrednio w wywołaniu do tworzenia usługi wyszukiwania. Dzieje się tak, ponieważ bezpłatna usługa używa już skonfigurowanej pojemności.
|
|
PublicNetworkAccess
|
Tę wartość można ustawić na wartość "włączone", aby uniknąć zmian powodujących niezgodność istniejących zasobów i szablonów klientów. W przypadku ustawienia wartości "disabled" ruch za pośrednictwem interfejsu publicznego jest niedozwolony, a połączenia prywatnych punktów końcowych będą wyłączną metodą dostępu.
|
|
SearchBypass
|
Możliwe źródła ruchu przychodzącego, które mogą pominąć reguły zdefiniowane w sekcji "ipRules".
|
|
SearchDataExfiltrationProtection
|
Lista scenariuszy eksfiltracji danych, które są jawnie niedozwolone dla usługi wyszukiwania. Obecnie jedyną obsługiwaną wartością jest "Wszystkie", aby wyłączyć wszystkie możliwe scenariusze eksportu danych z bardziej precyzyjnymi kontrolkami zaplanowanymi na przyszłość.
|
|
SearchEncryptionComplianceStatus
|
Zwraca stan zgodności usługi wyszukiwania w odniesieniu do obiektów niezaszyfrowanych przez protokół CMK. Jeśli usługa ma więcej niż jeden niezaszyfrowany obiekt, a wymuszanie jest włączone, usługa jest oznaczona jako niezgodna.
|
|
SearchEncryptionWithCmk
|
Opisuje sposób wymuszania zgodności przez usługę wyszukiwania w przypadku znalezienia obiektów, które nie są szyfrowane przy użyciu klucza zarządzanego przez klienta.
|
|
SearchSemanticSearch
|
Ustawia opcje kontrolujące dostępność wyszukiwania semantycznego. Ta konfiguracja jest możliwa tylko w przypadku niektórych jednostek SKU usługi Azure AI Search w określonych lokalizacjach.
|
|
SearchService
|
Opisuje usługę Azure AI Search i jej bieżący stan.
|
|
SearchServiceStatus
|
Stan usługi wyszukiwania. Możliwe wartości obejmują: "uruchomiono": usługa wyszukiwania jest uruchomiona i nie są w toku żadne operacje aprowizacji. "provisioning": usługa wyszukiwania jest aprowizowana lub skalowana w górę lub w dół. "usuwanie": usługa wyszukiwania jest usuwana. "obniżona wydajność": obniżona wydajność usługi wyszukiwania. Taka sytuacja może wystąpić, gdy bazowe jednostki wyszukiwania nie są w dobrej kondycji. Usługa wyszukiwania najprawdopodobniej działa, ale wydajność może być niska, a niektóre żądania mogą zostać usunięte. "disabled": usługa wyszukiwania jest wyłączona. W tym stanie usługa odrzuci wszystkie żądania interfejsu API. "błąd": usługa wyszukiwania jest w stanie błędu. "Zatrzymano": usługa wyszukiwania znajduje się w subskrypcji, która jest wyłączona. Jeśli Twoja usługa znajduje się w stanach obniżonej wydajności, wyłączonej lub błędu, oznacza to, że zespół usługi Azure AI Search aktywnie bada podstawowy problem. Usługi dedykowane w tych stanach są nadal naliczane opłaty na podstawie liczby aprowizowanych jednostek wyszukiwania.
|
|
SearchServiceUpdate
|
Parametry używane do aktualizowania usługi Azure AI Search.
|
|
SharedPrivateLinkResource
|
Opisuje udostępniony zasób łącza prywatnego zarządzany przez usługę Azure AI Search.
|
|
SharedPrivateLinkResourceProperties
|
Opisuje właściwości istniejącego udostępnionego zasobu łącza prywatnego zarządzanego przez usługę Azure AI Search.
|
|
SharedPrivateLinkResourceProvisioningState
|
Stan aprowizacji zasobu udostępnionego łącza prywatnego. Prawidłowe wartości to Aktualizowanie, Usuwanie, Niepowodzenie, Powodzenie lub Niekompletne.
|
|
SharedPrivateLinkResourceStatus
|
Stan udostępnionego zasobu łącza prywatnego. Prawidłowe wartości to Oczekujące, Zatwierdzone, Odrzucone lub Rozłączone.
|
|
Sku
|
Definiuje jednostkę SKU usługi wyszukiwania, która określa stawkę rozliczeń i limity pojemności.
|
|
SkuName
|
Jednostka SKU usługi wyszukiwania. Prawidłowe wartości to: "bezpłatna": usługa udostępniona. "basic": Dedykowana usługa z maksymalnie 3 replikami. "Standardowa": Dedykowana usługa z maksymalnie 12 partycjami i 12 replikami. "standard2": podobny do standardowego, ale z większą pojemnością na jednostkę wyszukiwania. "standard3": największa oferta w warstwie Standardowa z maksymalnie 12 partycjami i 12 replikami (lub maksymalnie 3 partycje z większą większa większa liczba indeksów, jeśli ustawisz również właściwość hostingMode na wartość "highDensity"). "storage_optimized_l1": obsługuje 1 TB na partycję, maksymalnie 12 partycji. "storage_optimized_l2": obsługuje 2 TB na partycję, maksymalnie 12 partycji.
|
|
systemData
|
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
|
|
UpgradeAvailable
|
Wskazuje, czy usługa wyszukiwania ma dostępne uaktualnienie.
|
|
UserAssignedIdentity
|
Właściwości tożsamości przypisanej przez użytkownika
|
AadAuthFailureMode
Wyliczanie
Opisuje odpowiedź interfejsu API płaszczyzny danych usługi wyszukiwania wysyłanej dla żądań, które zakończyły się niepowodzeniem uwierzytelniania.
| Wartość |
Opis |
|
http403
|
Wskazuje, że żądania, które zakończyły się niepowodzeniem uwierzytelniania, powinny być wyświetlane z kodem stanu HTTP 403 (Zabronione).
|
|
http401WithBearerChallenge
|
Wskazuje, że żądania, które zakończyły się niepowodzeniem uwierzytelniania, powinny zostać wyświetlone z kodem stanu HTTP 401 (Brak autoryzacji) i przedstawić zadanie elementu nośnego.
|
ApiKeyOnly
Objekt
Wskazuje, że tylko klucz interfejsu API może być używany do uwierzytelniania.
CloudError
Objekt
Zawiera informacje o błędzie interfejsu API.
| Nazwa |
Typ |
Opis |
|
error
|
CloudErrorBody
|
Opisuje określony błąd interfejsu API z kodem błędu i komunikatem.
|
|
message
|
string
|
Krótki opis błędu, który wskazuje, co poszło nie tak (aby uzyskać szczegółowe informacje/debugowanie, zapoznaj się z właściwością "error.message").
|
CloudErrorBody
Objekt
Opisuje określony błąd interfejsu API z kodem błędu i komunikatem.
| Nazwa |
Typ |
Opis |
|
code
|
string
|
Kod błędu opisujący warunek błędu dokładniej niż kod stanu HTTP. Może służyć do programowego obsługi określonych przypadków błędów.
|
|
details
|
CloudErrorBody[]
|
Zawiera zagnieżdżone błędy związane z tym błędem.
|
|
message
|
string
|
Komunikat opisujący szczegółowo błąd i zawierający informacje o debugowaniu.
|
|
target
|
string
|
Element docelowy określonego błędu (na przykład nazwa właściwości w błędzie).
|
ComputeType
Wyliczanie
Skonfiguruj tę właściwość tak, aby obsługiwała usługę wyszukiwania przy użyciu domyślnego obliczeniowego lub poufnego obliczenia platformy Azure.
| Wartość |
Opis |
|
default
|
Utwórz usługę przy użyciu domyślnego środowiska obliczeniowego.
|
|
confidential
|
Utwórz usługę za pomocą poufnego środowiska obliczeniowego platformy Azure.
|
createdByType
Wyliczanie
Typ tożsamości, która utworzyła zasób.
| Wartość |
Opis |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
DataPlaneAadOrApiKeyAuthOption
Objekt
Wskazuje, że do uwierzytelniania można użyć klucza interfejsu API lub tokenu dostępu z dzierżawy identyfikatora Entra firmy Microsoft.
| Nazwa |
Typ |
Opis |
|
aadAuthFailureMode
|
AadAuthFailureMode
|
Opisuje odpowiedź interfejsu API płaszczyzny danych usługi wyszukiwania wysyłanej dla żądań, które zakończyły się niepowodzeniem uwierzytelniania.
|
DataPlaneAuthOptions
Objekt
Definiuje opcje uwierzytelniania żądania płaszczyzny danych przez usługę wyszukiwania. Nie można ustawić tego ustawienia, jeśli parametr "disableLocalAuth" ma wartość true.
| Nazwa |
Typ |
Opis |
|
aadOrApiKey
|
DataPlaneAadOrApiKeyAuthOption
|
Wskazuje, że do uwierzytelniania można użyć klucza interfejsu API lub tokenu dostępu z dzierżawy identyfikatora Entra firmy Microsoft.
|
|
apiKeyOnly
|
ApiKeyOnly
|
Wskazuje, że tylko klucz interfejsu API może być używany do uwierzytelniania.
|
EncryptionWithCmk
Objekt
Opisuje zasady określające sposób szyfrowania zasobów w usłudze wyszukiwania za pomocą kluczy zarządzanych przez klienta.
| Nazwa |
Typ |
Opis |
|
encryptionComplianceStatus
|
SearchEncryptionComplianceStatus
|
Zwraca stan zgodności usługi wyszukiwania w odniesieniu do obiektów niezaszyfrowanych przez protokół CMK. Jeśli usługa ma więcej niż jeden niezaszyfrowany obiekt, a wymuszanie jest włączone, usługa jest oznaczona jako niezgodna.
|
|
enforcement
|
SearchEncryptionWithCmk
|
Opisuje sposób wymuszania zgodności przez usługę wyszukiwania w przypadku znalezienia obiektów, które nie są szyfrowane przy użyciu klucza zarządzanego przez klienta.
|
HostingMode
Wyliczanie
Dotyczy tylko jednostki SKU w warstwie Standardowa3. Tę właściwość można ustawić tak, aby umożliwić maksymalnie 3 partycje o wysokiej gęstości, które zezwalają na maksymalnie 1000 indeksów, co jest znacznie wyższe niż maksymalne indeksy dozwolone dla dowolnej innej jednostki SKU. W przypadku jednostki SKU w warstwie Standardowa3 wartość to "default" lub "highDensity". W przypadku wszystkich innych jednostek SKU ta wartość musi być wartością domyślną.
| Wartość |
Opis |
|
default
|
Limit liczby indeksów jest określany przez domyślne limity dla jednostki SKU.
|
|
highDensity
|
Tylko aplikacja dla jednostki SKU w warstwie Standardowa3, w której usługa wyszukiwania może mieć maksymalnie 1000 indeksów.
|
Identity
Objekt
Szczegółowe informacje o tożsamości usługi wyszukiwania. Wartość null wskazuje, że usługa wyszukiwania nie ma przypisanej tożsamości.
| Nazwa |
Typ |
Opis |
|
principalId
|
string
|
Identyfikator podmiotu zabezpieczeń tożsamości przypisanej przez system usługi wyszukiwania.
|
|
tenantId
|
string
|
Identyfikator dzierżawy przypisanej przez system tożsamości usługi wyszukiwania.
|
|
type
|
IdentityType
|
Typ tożsamości używany dla zasobu. Typ "SystemAssigned, UserAssigned" zawiera zarówno tożsamość utworzoną przez system, jak i zestaw tożsamości przypisanych przez użytkownika. Typ "None" spowoduje usunięcie wszystkich tożsamości z usługi.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
Lista tożsamości użytkowników skojarzonych z zasobem. Odwołania do klucza słownika tożsamości użytkownika będą identyfikatorami zasobów usługi ARM w postaci: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}".
|
IdentityType
Wyliczanie
Typ tożsamości używany dla zasobu. Typ "SystemAssigned, UserAssigned" zawiera zarówno tożsamość utworzoną przez system, jak i zestaw tożsamości przypisanych przez użytkownika. Typ "None" spowoduje usunięcie wszystkich tożsamości z usługi.
| Wartość |
Opis |
|
None
|
Wskazuje, że każda tożsamość skojarzona z usługą wyszukiwania musi zostać usunięta.
|
|
SystemAssigned
|
Wskazuje, że tożsamość przypisana przez system dla usługi wyszukiwania zostanie włączona.
|
|
UserAssigned
|
Wskazuje, że co najmniej jedna tożsamość przypisana przez użytkownika zostanie przypisana do usługi wyszukiwania.
|
|
SystemAssigned, UserAssigned
|
Wskazuje, że tożsamość przypisana przez system dla usługi wyszukiwania zostanie włączona wraz z przypisaniem co najmniej jednej tożsamości przypisanej przez użytkownika.
|
IpRule
Objekt
Reguła ograniczeń adresów IP usługi Azure AI Search.
| Nazwa |
Typ |
Opis |
|
value
|
string
|
Wartość odpowiadająca pojedynczemu adresowi IPv4 (np. 123.1.2.3) lub zakresowi adresów IP w formacie CIDR (np. 123.1.2.3/24) może być dozwolona.
|
NetworkRuleSet
Objekt
Reguły specyficzne dla sieci, które określają, jak można uzyskać dostęp do usługi Azure AI Search.
| Nazwa |
Typ |
Opis |
|
bypass
|
SearchBypass
|
Możliwe źródła ruchu przychodzącego, które mogą pominąć reguły zdefiniowane w sekcji "ipRules".
|
|
ipRules
|
IpRule[]
|
Lista reguł ograniczeń adresów IP, które definiują sieci przychodzące z zezwoleniem na dostęp do punktu końcowego usługi wyszukiwania. W międzyczasie wszystkie inne publiczne sieci IP są blokowane przez zaporę. Te reguły ograniczeń są stosowane tylko wtedy, gdy "publicNetworkAccess" usługi wyszukiwania jest włączona; w przeciwnym razie ruch za pośrednictwem interfejsu publicznego nie jest dozwolony nawet w przypadku żadnych reguł publicznych adresów IP, a połączenia prywatnego punktu końcowego będą wyłączną metodą dostępu.
|
PrivateEndpoint
Objekt
Zasób prywatnego punktu końcowego od dostawcy Microsoft.Network.
| Nazwa |
Typ |
Opis |
|
id
|
string
|
Identyfikator zasobu prywatnego punktu końcowego od dostawcy Microsoft.Network.
|
PrivateEndpointConnection
Objekt
Opisuje istniejące połączenie prywatnego punktu końcowego z usługą Azure AI Search.
| Nazwa |
Typ |
Opis |
|
id
|
string
(arm-id)
|
W pełni kwalifikowany identyfikator zasobu dla zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Nazwa zasobu
|
|
properties
|
PrivateEndpointConnectionProperties
|
Opisuje właściwości istniejącego połączenia prywatnego punktu końcowego z usługą Azure AI Search.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProperties
Objekt
Opisuje właściwości istniejącego połączenia prywatnego punktu końcowego z usługą wyszukiwania.
| Nazwa |
Typ |
Opis |
|
groupId
|
string
|
Identyfikator grupy zasobu platformy Azure, dla którego jest usługa łącza prywatnego.
|
|
privateEndpoint
|
PrivateEndpoint
|
Zasób prywatnego punktu końcowego od dostawcy Microsoft.Network.
|
|
privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
Opisuje bieżący stan istniejącego połączenia usługi Azure Private Link z prywatnym punktem końcowym.
|
|
provisioningState
|
PrivateLinkServiceConnectionProvisioningState
|
Stan aprowizacji połączenia usługi private link. Prawidłowe wartości to Aktualizowanie, Usuwanie, Niepowodzenie, Powodzenie, Niekompletne lub Anulowane.
|
PrivateLinkServiceConnectionProvisioningState
Wyliczanie
Stan aprowizacji połączenia usługi private link. Prawidłowe wartości to Aktualizowanie, Usuwanie, Niepowodzenie, Powodzenie, Niekompletne lub Anulowane.
| Wartość |
Opis |
|
Updating
|
Połączenie usługi łącza prywatnego jest w trakcie tworzenia wraz z innymi zasobami, które mają być w pełni funkcjonalne.
|
|
Deleting
|
Połączenie usługi łącza prywatnego jest w trakcie usuwania.
|
|
Failed
|
Nie można zainicjować obsługi administracyjnej lub usunąć połączenia usługi łącza prywatnego.
|
|
Succeeded
|
Połączenie usługi private link zakończyło aprowizację i jest gotowe do zatwierdzenia.
|
|
Incomplete
|
Żądanie aprowizacji zasobu połączenia usługi private link zostało zaakceptowane, ale proces tworzenia nie został jeszcze rozpoczęty.
|
|
Canceled
|
Żądanie aprowizacji zasobu połączenia usługi private link zostało anulowane.
|
PrivateLinkServiceConnectionState
Objekt
Opisuje bieżący stan istniejącego połączenia usługi Azure Private Link z prywatnym punktem końcowym.
| Nazwa |
Typ |
Domyślna wartość |
Opis |
|
actionsRequired
|
string
|
None
|
Opis wszelkich dodatkowych akcji, które mogą być wymagane.
|
|
description
|
string
|
|
Opis stanu połączenia usługi łącza prywatnego.
|
|
status
|
PrivateLinkServiceConnectionStatus
|
|
Stan połączenia usługi private link. Prawidłowe wartości to Oczekujące, Zatwierdzone, Odrzucone lub Rozłączone.
|
PrivateLinkServiceConnectionStatus
Wyliczanie
Stan połączenia usługi private link. Prawidłowe wartości to Oczekujące, Zatwierdzone, Odrzucone lub Rozłączone.
| Wartość |
Opis |
|
Pending
|
Połączenie prywatnego punktu końcowego zostało utworzone i oczekuje na zatwierdzenie.
|
|
Approved
|
Połączenie prywatnego punktu końcowego jest zatwierdzone i jest gotowe do użycia.
|
|
Rejected
|
Połączenie prywatnego punktu końcowego zostało odrzucone i nie można go użyć.
|
|
Disconnected
|
Połączenie prywatnego punktu końcowego zostało usunięte z usługi.
|
ProvisioningState
Wyliczanie
Stan ostatniej operacji aprowizacji wykonanej w usłudze wyszukiwania. Aprowizowanie jest stanem pośrednim, który występuje podczas ustanawiania pojemności usługi. Po skonfigurowaniu pojemności provisioningState zmieni się na "Powodzenie" lub "Niepowodzenie". Aplikacje klienckie mogą sondować stan aprowizacji (zalecany interwał sondowania wynosi od 30 sekund do jednej minuty) przy użyciu operacji Pobierz usługę wyszukiwania, aby sprawdzić, kiedy operacja zostanie ukończona. Jeśli używasz bezpłatnej usługi, ta wartość ma tendencję do powrotu jako "Powodzenie" bezpośrednio w wywołaniu do tworzenia usługi wyszukiwania. Dzieje się tak, ponieważ bezpłatna usługa używa już skonfigurowanej pojemności.
| Wartość |
Opis |
|
succeeded
|
Ostatnia operacja aprowizacji została ukończona pomyślnie.
|
|
provisioning
|
Usługa wyszukiwania jest aprowizowana lub skalowana w górę lub w dół.
|
|
failed
|
Ostatnia operacja aprowizacji nie powiodła się.
|
PublicNetworkAccess
Wyliczanie
Tę wartość można ustawić na wartość "włączone", aby uniknąć zmian powodujących niezgodność istniejących zasobów i szablonów klientów. W przypadku ustawienia wartości "disabled" ruch za pośrednictwem interfejsu publicznego jest niedozwolony, a połączenia prywatnych punktów końcowych będą wyłączną metodą dostępu.
| Wartość |
Opis |
|
enabled
|
Usługa wyszukiwania jest dostępna z ruchu pochodzącego z publicznego Internetu.
|
|
disabled
|
Usługa wyszukiwania nie jest dostępna z ruchu pochodzącego z publicznego Internetu. Dostęp jest dozwolony tylko za pośrednictwem zatwierdzonych połączeń prywatnych punktów końcowych.
|
SearchBypass
Wyliczanie
Możliwe źródła ruchu przychodzącego, które mogą pominąć reguły zdefiniowane w sekcji "ipRules".
| Wartość |
Opis |
|
None
|
Wskazuje, że żadne źródło nie może pominąć reguł zdefiniowanych w sekcji "ipRules". Jest to wartość domyślna.
|
|
AzureServices
|
Wskazuje, że żądania pochodzące z zaufanych usług platformy Azure mogą pominąć reguły zdefiniowane w sekcji "ipRules".
|
SearchDataExfiltrationProtection
Wyliczanie
Lista scenariuszy eksfiltracji danych, które są jawnie niedozwolone dla usługi wyszukiwania. Obecnie jedyną obsługiwaną wartością jest "Wszystkie", aby wyłączyć wszystkie możliwe scenariusze eksportu danych z bardziej precyzyjnymi kontrolkami zaplanowanymi na przyszłość.
| Wartość |
Opis |
|
BlockAll
|
Wskazuje, że wszystkie scenariusze eksfiltracji danych są wyłączone.
|
SearchEncryptionComplianceStatus
Wyliczanie
Zwraca stan zgodności usługi wyszukiwania w odniesieniu do obiektów niezaszyfrowanych przez protokół CMK. Jeśli usługa ma więcej niż jeden niezaszyfrowany obiekt, a wymuszanie jest włączone, usługa jest oznaczona jako niezgodna.
| Wartość |
Opis |
|
Compliant
|
Wskazuje, że usługa wyszukiwania jest zgodna, ponieważ liczba obiektów niezaszyfrowanych przez protokół CMK jest równa zero lub wymuszanie jest wyłączone.
|
|
NonCompliant
|
Wskazuje, że usługa wyszukiwania ma więcej niż jeden obiekt nieszyfrowany kluczem CMK.
|
SearchEncryptionWithCmk
Wyliczanie
Opisuje sposób wymuszania zgodności przez usługę wyszukiwania w przypadku znalezienia obiektów, które nie są szyfrowane przy użyciu klucza zarządzanego przez klienta.
| Wartość |
Opis |
|
Disabled
|
Nie zostanie wykonane wymuszanie szyfrowania kluczy zarządzanych przez klienta. Używane jest tylko wbudowane szyfrowanie zarządzane przez usługę.
|
|
Enabled
|
Usługa wyszukiwania zostanie oznaczona jako niezgodna, jeśli co najmniej jeden obiekt nie jest zaszyfrowany przy użyciu klucza zarządzanego przez klienta.
|
|
Unspecified
|
Zasady wymuszania nie są jawnie określone, a zachowanie jest takie samo, jak w przypadku ustawienia opcji "Wyłączone".
|
SearchSemanticSearch
Wyliczanie
Ustawia opcje kontrolujące dostępność wyszukiwania semantycznego. Ta konfiguracja jest możliwa tylko w przypadku niektórych jednostek SKU usługi Azure AI Search w określonych lokalizacjach.
| Wartość |
Opis |
|
disabled
|
Wskazuje, że semantyczny reranker jest wyłączony dla usługi wyszukiwania. Jest to wartość domyślna.
|
|
free
|
Włącza semantyczną reranker w usłudze wyszukiwania i wskazuje, że ma być używany w granicach planu bezpłatnego. Plan bezpłatny ograniczy liczbę żądań klasyfikacji semantycznej i nie jest oferowany za dodatkową opłatą. Jest to ustawienie domyślne dla nowo aprowizowania usług wyszukiwania.
|
|
standard
|
Umożliwia semantyczną reranker w usłudze wyszukiwania jako funkcję rozliczaną z wyższą przepływnością i ilością semantycznie ponownie sklasyfikowanych zapytań.
|
SearchService
Objekt
Opisuje usługę Azure AI Search i jej bieżący stan.
| Nazwa |
Typ |
Domyślna wartość |
Opis |
|
id
|
string
(arm-id)
|
|
W pełni kwalifikowany identyfikator zasobu dla zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
Identity
|
|
Tożsamość zasobu.
|
|
location
|
string
|
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
name
|
string
|
|
Nazwa zasobu
|
|
properties.authOptions
|
DataPlaneAuthOptions
|
|
Definiuje opcje sposobu uwierzytelniania żądań przez interfejs API płaszczyzny danych usługi wyszukiwania. Nie można ustawić tego ustawienia, jeśli parametr "disableLocalAuth" ma wartość true.
|
|
properties.computeType
|
ComputeType
|
|
Skonfiguruj tę właściwość tak, aby obsługiwała usługę wyszukiwania przy użyciu domyślnego obliczeniowego lub poufnego obliczenia platformy Azure.
|
|
properties.dataExfiltrationProtections
|
SearchDataExfiltrationProtection[]
|
|
Lista scenariuszy eksfiltracji danych, które są jawnie niedozwolone dla usługi wyszukiwania. Obecnie jedyną obsługiwaną wartością jest "Wszystkie", aby wyłączyć wszystkie możliwe scenariusze eksportu danych z bardziej precyzyjnymi kontrolkami zaplanowanymi na przyszłość.
|
|
properties.disableLocalAuth
|
boolean
|
|
Po ustawieniu wartości true wywołania usługi wyszukiwania nie będą mogły korzystać z kluczy interfejsu API do uwierzytelniania. Nie można ustawić wartości true, jeśli zdefiniowano wartość "dataPlaneAuthOptions".
|
|
properties.eTag
|
string
|
|
Właściwość wygenerowana przez system reprezentująca element etag usługi, który może być przeznaczony do optymistycznej kontroli współbieżności podczas aktualizacji.
|
|
properties.encryptionWithCmk
|
EncryptionWithCmk
|
|
Określa wszelkie zasady dotyczące szyfrowania zasobów (takich jak indeksy) przy użyciu kluczy menedżera klienta w usłudze wyszukiwania.
|
|
properties.endpoint
|
string
(uri)
|
|
Punkt końcowy usługi Azure AI Search.
|
|
properties.hostingMode
|
HostingMode
|
default
|
Dotyczy tylko jednostki SKU w warstwie Standardowa3. Tę właściwość można ustawić tak, aby umożliwić maksymalnie 3 partycje o wysokiej gęstości, które zezwalają na maksymalnie 1000 indeksów, co jest znacznie wyższe niż maksymalne indeksy dozwolone dla dowolnej innej jednostki SKU. W przypadku jednostki SKU w warstwie Standardowa3 wartość to "default" lub "highDensity". W przypadku wszystkich innych jednostek SKU ta wartość musi być wartością domyślną.
|
|
properties.networkRuleSet
|
NetworkRuleSet
|
|
Reguły specyficzne dla sieci, które określają, jak można uzyskać dostęp do usługi Azure AI Search.
|
|
properties.partitionCount
|
integer
(int32)
minimum: 1 maximum: 12
|
1
|
Liczba partycji w usłudze wyszukiwania; jeśli zostanie określony, może to być 1, 2, 3, 4, 6 lub 12. Wartości większe niż 1 są prawidłowe tylko dla standardowych jednostek SKU. W przypadku usług "standard3" z hostMode ustawionym na wartość "highDensity" dozwolone wartości to od 1 do 3.
|
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
|
Lista połączeń prywatnych punktów końcowych z usługą Azure AI Search.
|
|
properties.provisioningState
|
ProvisioningState
|
|
Stan ostatniej operacji aprowizacji wykonanej w usłudze wyszukiwania. Aprowizowanie jest stanem pośrednim, który występuje podczas ustanawiania pojemności usługi. Po skonfigurowaniu pojemności provisioningState zmieni się na "Powodzenie" lub "Niepowodzenie". Aplikacje klienckie mogą sondować stan aprowizacji (zalecany interwał sondowania wynosi od 30 sekund do jednej minuty) przy użyciu operacji Pobierz usługę wyszukiwania, aby sprawdzić, kiedy operacja zostanie ukończona. Jeśli używasz bezpłatnej usługi, ta wartość ma tendencję do powrotu jako "Powodzenie" bezpośrednio w wywołaniu do tworzenia usługi wyszukiwania. Dzieje się tak, ponieważ bezpłatna usługa używa już skonfigurowanej pojemności.
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
enabled
|
Tę wartość można ustawić na wartość "włączone", aby uniknąć zmian powodujących niezgodność istniejących zasobów i szablonów klientów. W przypadku ustawienia wartości "disabled" ruch za pośrednictwem interfejsu publicznego jest niedozwolony, a połączenia prywatnych punktów końcowych będą wyłączną metodą dostępu.
|
|
properties.replicaCount
|
integer
(int32)
minimum: 1 maximum: 12
|
1
|
Liczba replik w usłudze wyszukiwania. W przypadku określenia musi to być wartość z zakresu od 1 do 12 włącznie dla standardowych jednostek SKU lub od 1 do 3 włącznie dla podstawowej jednostki SKU.
|
|
properties.semanticSearch
|
SearchSemanticSearch
|
|
Ustawia opcje kontrolujące dostępność wyszukiwania semantycznego. Ta konfiguracja jest możliwa tylko w przypadku niektórych jednostek SKU usługi Azure AI Search w określonych lokalizacjach.
|
|
properties.serviceUpgradedAt
|
string
(date-time)
|
|
Data i godzina ostatniego uaktualnienia usługi wyszukiwania. To pole będzie mieć wartość null, dopóki usługa nie zostanie uaktualniona po raz pierwszy.
|
|
properties.sharedPrivateLinkResources
|
SharedPrivateLinkResource[]
|
|
Lista udostępnionych zasobów łącza prywatnego zarządzanych przez usługę Azure AI Search.
|
|
properties.status
|
SearchServiceStatus
|
|
Stan usługi wyszukiwania. Możliwe wartości obejmują: "uruchomiono": usługa wyszukiwania jest uruchomiona i nie są w toku żadne operacje aprowizacji. "provisioning": usługa wyszukiwania jest aprowizowana lub skalowana w górę lub w dół. "usuwanie": usługa wyszukiwania jest usuwana. "obniżona wydajność": obniżona wydajność usługi wyszukiwania. Taka sytuacja może wystąpić, gdy bazowe jednostki wyszukiwania nie są w dobrej kondycji. Usługa wyszukiwania najprawdopodobniej działa, ale wydajność może być niska, a niektóre żądania mogą zostać usunięte. "disabled": usługa wyszukiwania jest wyłączona. W tym stanie usługa odrzuci wszystkie żądania interfejsu API. "błąd": usługa wyszukiwania jest w stanie błędu. "Zatrzymano": usługa wyszukiwania znajduje się w subskrypcji, która jest wyłączona. Jeśli Twoja usługa znajduje się w stanach obniżonej wydajności, wyłączonej lub błędu, oznacza to, że zespół usługi Azure AI Search aktywnie bada podstawowy problem. Usługi dedykowane w tych stanach są nadal naliczane opłaty na podstawie liczby aprowizowanych jednostek wyszukiwania.
|
|
properties.statusDetails
|
string
|
|
Szczegóły stanu usługi wyszukiwania.
|
|
properties.upgradeAvailable
|
UpgradeAvailable
|
|
Wskazuje, czy usługa wyszukiwania ma dostępne uaktualnienie.
|
|
sku
|
Sku
|
|
Jednostka SKU usługi wyszukiwania, która określa warstwę cenową i limity pojemności. Ta właściwość jest wymagana podczas tworzenia nowej usługi wyszukiwania.
|
|
systemData
|
systemData
|
|
Metadane usługi Azure Resource Manager usługi wyszukiwania zawierającej informacje createdBy i modifiedBy.
|
|
tags
|
object
|
|
Tagi zasobów.
|
|
type
|
string
|
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
SearchServiceStatus
Wyliczanie
Stan usługi wyszukiwania. Możliwe wartości obejmują: "uruchomiono": usługa wyszukiwania jest uruchomiona i nie są w toku żadne operacje aprowizacji. "provisioning": usługa wyszukiwania jest aprowizowana lub skalowana w górę lub w dół. "usuwanie": usługa wyszukiwania jest usuwana. "obniżona wydajność": obniżona wydajność usługi wyszukiwania. Taka sytuacja może wystąpić, gdy bazowe jednostki wyszukiwania nie są w dobrej kondycji. Usługa wyszukiwania najprawdopodobniej działa, ale wydajność może być niska, a niektóre żądania mogą zostać usunięte. "disabled": usługa wyszukiwania jest wyłączona. W tym stanie usługa odrzuci wszystkie żądania interfejsu API. "błąd": usługa wyszukiwania jest w stanie błędu. "Zatrzymano": usługa wyszukiwania znajduje się w subskrypcji, która jest wyłączona. Jeśli Twoja usługa znajduje się w stanach obniżonej wydajności, wyłączonej lub błędu, oznacza to, że zespół usługi Azure AI Search aktywnie bada podstawowy problem. Usługi dedykowane w tych stanach są nadal naliczane opłaty na podstawie liczby aprowizowanych jednostek wyszukiwania.
| Wartość |
Opis |
|
running
|
Usługa wyszukiwania jest uruchomiona i nie są w toku żadne operacje aprowizacji.
|
|
provisioning
|
Usługa wyszukiwania jest aprowizowana lub skalowana w górę lub w dół.
|
|
deleting
|
Usługa wyszukiwania jest usuwana.
|
|
degraded
|
Usługa wyszukiwania jest obniżona, ponieważ bazowe jednostki wyszukiwania nie są w dobrej kondycji.
|
|
disabled
|
Usługa wyszukiwania jest wyłączona i wszystkie żądania interfejsu API zostaną odrzucone.
|
|
error
|
Usługa wyszukiwania jest w stanie błędu wskazująca błąd aprowizacji lub usunięcia.
|
|
stopped
|
Usługa wyszukiwania znajduje się w subskrypcji, która jest wyłączona.
|
SearchServiceUpdate
Objekt
Parametry używane do aktualizowania usługi Azure AI Search.
| Nazwa |
Typ |
Domyślna wartość |
Opis |
|
id
|
string
(arm-id)
|
|
W pełni kwalifikowany identyfikator zasobu dla zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
Identity
|
|
Szczegółowe informacje o tożsamości usługi wyszukiwania. Wartość null wskazuje, że usługa wyszukiwania nie ma przypisanej tożsamości.
|
|
location
|
string
|
|
Lokalizacja geograficzna zasobu. Musi to być jeden z obsługiwanych i zarejestrowanych regionów geograficznych platformy Azure (na przykład Zachodnie stany USA, Wschodnie stany USA, Azja Południowo-Wschodnia itd.). Ta właściwość jest wymagana podczas tworzenia nowego zasobu.
|
|
name
|
string
|
|
Nazwa zasobu
|
|
properties.authOptions
|
DataPlaneAuthOptions
|
|
Definiuje opcje sposobu uwierzytelniania żądań przez interfejs API płaszczyzny danych usługi wyszukiwania. Nie można ustawić tego ustawienia, jeśli parametr "disableLocalAuth" ma wartość true.
|
|
properties.computeType
|
ComputeType
|
|
Skonfiguruj tę właściwość tak, aby obsługiwała usługę wyszukiwania przy użyciu domyślnego obliczeniowego lub poufnego obliczenia platformy Azure.
|
|
properties.dataExfiltrationProtections
|
SearchDataExfiltrationProtection[]
|
|
Lista scenariuszy eksfiltracji danych, które są jawnie niedozwolone dla usługi wyszukiwania. Obecnie jedyną obsługiwaną wartością jest "Wszystkie", aby wyłączyć wszystkie możliwe scenariusze eksportu danych z bardziej precyzyjnymi kontrolkami zaplanowanymi na przyszłość.
|
|
properties.disableLocalAuth
|
boolean
|
|
Po ustawieniu wartości true wywołania usługi wyszukiwania nie będą mogły korzystać z kluczy interfejsu API do uwierzytelniania. Nie można ustawić wartości true, jeśli zdefiniowano wartość "dataPlaneAuthOptions".
|
|
properties.eTag
|
string
|
|
Właściwość wygenerowana przez system reprezentująca element etag usługi, który może być przeznaczony do optymistycznej kontroli współbieżności podczas aktualizacji.
|
|
properties.encryptionWithCmk
|
EncryptionWithCmk
|
|
Określa wszelkie zasady dotyczące szyfrowania zasobów (takich jak indeksy) przy użyciu kluczy menedżera klienta w usłudze wyszukiwania.
|
|
properties.endpoint
|
string
(uri)
|
|
Punkt końcowy usługi Azure AI Search.
|
|
properties.hostingMode
|
HostingMode
|
default
|
Dotyczy tylko jednostki SKU w warstwie Standardowa3. Tę właściwość można ustawić tak, aby umożliwić maksymalnie 3 partycje o wysokiej gęstości, które zezwalają na maksymalnie 1000 indeksów, co jest znacznie wyższe niż maksymalne indeksy dozwolone dla dowolnej innej jednostki SKU. W przypadku jednostki SKU w warstwie Standardowa3 wartość to "default" lub "highDensity". W przypadku wszystkich innych jednostek SKU ta wartość musi być wartością domyślną.
|
|
properties.networkRuleSet
|
NetworkRuleSet
|
|
Reguły specyficzne dla sieci, które określają, jak można uzyskać dostęp do usługi Azure AI Search.
|
|
properties.partitionCount
|
integer
(int32)
minimum: 1 maximum: 12
|
1
|
Liczba partycji w usłudze wyszukiwania; jeśli zostanie określony, może to być 1, 2, 3, 4, 6 lub 12. Wartości większe niż 1 są prawidłowe tylko dla standardowych jednostek SKU. W przypadku usług "standard3" z hostMode ustawionym na wartość "highDensity" dozwolone wartości to od 1 do 3.
|
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
|
Lista połączeń prywatnych punktów końcowych z usługą Azure AI Search.
|
|
properties.provisioningState
|
ProvisioningState
|
|
Stan ostatniej operacji aprowizacji wykonanej w usłudze wyszukiwania. Aprowizowanie jest stanem pośrednim, który występuje podczas ustanawiania pojemności usługi. Po skonfigurowaniu pojemności provisioningState zmieni się na "Powodzenie" lub "Niepowodzenie". Aplikacje klienckie mogą sondować stan aprowizacji (zalecany interwał sondowania wynosi od 30 sekund do jednej minuty) przy użyciu operacji Pobierz usługę wyszukiwania, aby sprawdzić, kiedy operacja zostanie ukończona. Jeśli używasz bezpłatnej usługi, ta wartość ma tendencję do powrotu jako "Powodzenie" bezpośrednio w wywołaniu do tworzenia usługi wyszukiwania. Dzieje się tak, ponieważ bezpłatna usługa używa już skonfigurowanej pojemności.
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
enabled
|
Tę wartość można ustawić na wartość "włączone", aby uniknąć zmian powodujących niezgodność istniejących zasobów i szablonów klientów. W przypadku ustawienia wartości "disabled" ruch za pośrednictwem interfejsu publicznego jest niedozwolony, a połączenia prywatnych punktów końcowych będą wyłączną metodą dostępu.
|
|
properties.replicaCount
|
integer
(int32)
minimum: 1 maximum: 12
|
1
|
Liczba replik w usłudze wyszukiwania. W przypadku określenia musi to być wartość z zakresu od 1 do 12 włącznie dla standardowych jednostek SKU lub od 1 do 3 włącznie dla podstawowej jednostki SKU.
|
|
properties.semanticSearch
|
SearchSemanticSearch
|
|
Ustawia opcje kontrolujące dostępność wyszukiwania semantycznego. Ta konfiguracja jest możliwa tylko w przypadku niektórych jednostek SKU usługi Azure AI Search w określonych lokalizacjach.
|
|
properties.serviceUpgradedAt
|
string
(date-time)
|
|
Data i godzina ostatniego uaktualnienia usługi wyszukiwania. To pole będzie mieć wartość null, dopóki usługa nie zostanie uaktualniona po raz pierwszy.
|
|
properties.sharedPrivateLinkResources
|
SharedPrivateLinkResource[]
|
|
Lista udostępnionych zasobów łącza prywatnego zarządzanych przez usługę Azure AI Search.
|
|
properties.status
|
SearchServiceStatus
|
|
Stan usługi wyszukiwania. Możliwe wartości obejmują: "uruchomiono": usługa wyszukiwania jest uruchomiona i nie są w toku żadne operacje aprowizacji. "provisioning": usługa wyszukiwania jest aprowizowana lub skalowana w górę lub w dół. "usuwanie": usługa wyszukiwania jest usuwana. "obniżona wydajność": obniżona wydajność usługi wyszukiwania. Taka sytuacja może wystąpić, gdy bazowe jednostki wyszukiwania nie są w dobrej kondycji. Usługa wyszukiwania najprawdopodobniej działa, ale wydajność może być niska, a niektóre żądania mogą zostać usunięte. "disabled": usługa wyszukiwania jest wyłączona. W tym stanie usługa odrzuci wszystkie żądania interfejsu API. "błąd": usługa wyszukiwania jest w stanie błędu. "Zatrzymano": usługa wyszukiwania znajduje się w subskrypcji, która jest wyłączona. Jeśli Twoja usługa znajduje się w stanach obniżonej wydajności, wyłączonej lub błędu, oznacza to, że zespół usługi Azure AI Search aktywnie bada podstawowy problem. Usługi dedykowane w tych stanach są nadal naliczane opłaty na podstawie liczby aprowizowanych jednostek wyszukiwania.
|
|
properties.statusDetails
|
string
|
|
Szczegóły stanu usługi wyszukiwania.
|
|
properties.upgradeAvailable
|
UpgradeAvailable
|
|
Wskazuje, czy usługa wyszukiwania ma dostępne uaktualnienie.
|
|
sku
|
Sku
|
|
Jednostka SKU usługi wyszukiwania, która określa warstwę cenową i limity pojemności. Ta właściwość jest wymagana podczas tworzenia nowej usługi wyszukiwania.
|
|
systemData
|
systemData
|
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
tags
|
object
|
|
Tagi ułatwiające kategoryzowanie zasobu w witrynie Azure Portal.
|
|
type
|
string
|
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
SharedPrivateLinkResource
Objekt
Opisuje udostępniony zasób łącza prywatnego zarządzany przez usługę Azure AI Search.
| Nazwa |
Typ |
Opis |
|
id
|
string
(arm-id)
|
W pełni kwalifikowany identyfikator zasobu dla zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Nazwa zasobu
|
|
properties
|
SharedPrivateLinkResourceProperties
|
Opisuje właściwości udostępnionego zasobu łącza prywatnego zarządzanego przez usługę Azure AI Search.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
SharedPrivateLinkResourceProperties
Objekt
Opisuje właściwości istniejącego udostępnionego zasobu łącza prywatnego zarządzanego przez usługę Azure AI Search.
| Nazwa |
Typ |
Opis |
|
groupId
|
string
|
Identyfikator grupy od dostawcy zasobu jest przeznaczony dla współużytkowanego zasobu łącza prywatnego.
|
|
privateLinkResourceId
|
string
|
Identyfikator zasobu zasobu, dla których znajduje się udostępniony zasób łącza prywatnego.
|
|
provisioningState
|
SharedPrivateLinkResourceProvisioningState
|
Stan aprowizacji zasobu udostępnionego łącza prywatnego. Prawidłowe wartości to Aktualizowanie, Usuwanie, Niepowodzenie, Powodzenie lub Niekompletne.
|
|
requestMessage
|
string
|
Komunikat żądania zatwierdzenia udostępnionego zasobu łącza prywatnego.
|
|
resourceRegion
|
string
|
Opcjonalny. Można użyć do określenia lokalizacji usługi Azure Resource Manager zasobu, dla którego jest tworzony udostępniony link prywatny. Jest to wymagane tylko dla tych zasobów, których konfiguracja DNS jest regionalna (na przykład Usługa Azure Kubernetes Service).
|
|
status
|
SharedPrivateLinkResourceStatus
|
Stan udostępnionego zasobu łącza prywatnego. Prawidłowe wartości to Oczekujące, Zatwierdzone, Odrzucone lub Rozłączone.
|
SharedPrivateLinkResourceProvisioningState
Wyliczanie
Stan aprowizacji zasobu udostępnionego łącza prywatnego. Prawidłowe wartości to Aktualizowanie, Usuwanie, Niepowodzenie, Powodzenie lub Niekompletne.
| Wartość |
Opis |
|
Updating
|
Współużytkowany zasób łącza prywatnego jest w trakcie tworzenia wraz z innymi zasobami, aby był w pełni funkcjonalny.
|
|
Deleting
|
Współużytkowany zasób łącza prywatnego jest w trakcie usuwania.
|
|
Failed
|
Nie można aprowizować ani usunąć udostępnionego zasobu łącza prywatnego.
|
|
Succeeded
|
Zasób udostępnionego łącza prywatnego zakończył aprowizację i jest gotowy do zatwierdzenia.
|
|
Incomplete
|
Żądanie aprowizacji zasobu udostępnionego łącza prywatnego zostało zaakceptowane, ale proces tworzenia nie został jeszcze rozpoczęty.
|
SharedPrivateLinkResourceStatus
Wyliczanie
Stan udostępnionego zasobu łącza prywatnego. Prawidłowe wartości to Oczekujące, Zatwierdzone, Odrzucone lub Rozłączone.
| Wartość |
Opis |
|
Pending
|
Udostępniony zasób łącza prywatnego został utworzony i oczekuje na zatwierdzenie.
|
|
Approved
|
Zasób udostępnionego łącza prywatnego jest zatwierdzony i jest gotowy do użycia.
|
|
Rejected
|
Udostępniony zasób łącza prywatnego został odrzucony i nie można go użyć.
|
|
Disconnected
|
Udostępniony zasób łącza prywatnego został usunięty z usługi.
|
Sku
Objekt
Definiuje jednostkę SKU usługi wyszukiwania, która określa stawkę rozliczeń i limity pojemności.
| Nazwa |
Typ |
Opis |
|
name
|
SkuName
|
Jednostka SKU usługi wyszukiwania. Prawidłowe wartości to: "bezpłatna": usługa udostępniona. "basic": Dedykowana usługa z maksymalnie 3 replikami. "Standardowa": Dedykowana usługa z maksymalnie 12 partycjami i 12 replikami. "standard2": podobny do standardowego, ale z większą pojemnością na jednostkę wyszukiwania. "standard3": największa oferta w warstwie Standardowa z maksymalnie 12 partycjami i 12 replikami (lub maksymalnie 3 partycje z większą większa większa liczba indeksów, jeśli ustawisz również właściwość hostingMode na wartość "highDensity"). "storage_optimized_l1": obsługuje 1 TB na partycję, maksymalnie 12 partycji. "storage_optimized_l2": obsługuje 2 TB na partycję, maksymalnie 12 partycji.
|
SkuName
Wyliczanie
Jednostka SKU usługi wyszukiwania. Prawidłowe wartości to: "bezpłatna": usługa udostępniona. "basic": Dedykowana usługa z maksymalnie 3 replikami. "Standardowa": Dedykowana usługa z maksymalnie 12 partycjami i 12 replikami. "standard2": podobny do standardowego, ale z większą pojemnością na jednostkę wyszukiwania. "standard3": największa oferta w warstwie Standardowa z maksymalnie 12 partycjami i 12 replikami (lub maksymalnie 3 partycje z większą większa większa liczba indeksów, jeśli ustawisz również właściwość hostingMode na wartość "highDensity"). "storage_optimized_l1": obsługuje 1 TB na partycję, maksymalnie 12 partycji. "storage_optimized_l2": obsługuje 2 TB na partycję, maksymalnie 12 partycji.
| Wartość |
Opis |
|
free
|
Warstwa Bezpłatna bez gwarancji SLA i podzbiór funkcji oferowanych w warstwach rozliczanych.
|
|
basic
|
Rozliczana warstwa dla dedykowanej usługi z maksymalnie 3 replikami.
|
|
standard
|
Warstwa rozliczana dla dedykowanej usługi z maksymalnie 12 partycjami i 12 replikami.
|
|
standard2
|
Podobnie jak w przypadku warstwy "Standardowa", ale z większą pojemnością na jednostkę wyszukiwania.
|
|
standard3
|
Największa oferta w warstwie Standardowa z maksymalnie 12 partycjami i 12 replikami (lub maksymalnie 3 partycjami z większą większa większa liczba indeksów, jeśli ustawisz również właściwość hostingMode na wartość "highDensity").
|
|
storage_optimized_l1
|
Warstwa rozliczana dla dedykowanej usługi, która obsługuje 1 TB na partycję, do 12 partycji.
|
|
storage_optimized_l2
|
Warstwa rozliczana dla dedykowanej usługi, która obsługuje 2 TB na partycję, do 12 partycji.
|
systemData
Objekt
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
| Nazwa |
Typ |
Opis |
|
createdAt
|
string
(date-time)
|
Sygnatura czasowa tworzenia zasobu (UTC).
|
|
createdBy
|
string
|
Tożsamość, która utworzyła zasób.
|
|
createdByType
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
lastModifiedAt
|
string
(date-time)
|
Znacznik czasu ostatniej modyfikacji zasobu (UTC)
|
|
lastModifiedBy
|
string
|
Tożsamość, która ostatnio zmodyfikowała zasób.
|
|
lastModifiedByType
|
createdByType
|
Typ tożsamości, która ostatnio zmodyfikowała zasób.
|
UpgradeAvailable
Wyliczanie
Wskazuje, czy usługa wyszukiwania ma dostępne uaktualnienie.
| Wartość |
Opis |
|
notAvailable
|
Uaktualnienie nie jest obecnie dostępne dla usługi.
|
|
available
|
Dostępna jest aktualizacja usługi.
|
UserAssignedIdentity
Objekt
Właściwości tożsamości przypisanej przez użytkownika
| Nazwa |
Typ |
Opis |
|
clientId
|
string
(uuid)
|
Identyfikator klienta przypisanej tożsamości.
|
|
principalId
|
string
(uuid)
|
Identyfikator podmiotu zabezpieczeń przypisanej tożsamości.
|