Создает или обновляет службу поиска в заданной группе ресурсов. Если служба поиска уже существует, все свойства будут обновлены с заданными значениями.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}?api-version=2026-11-01
Параметры URI
| Имя. |
В |
Обязательно |
Тип |
Описание |
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Имя группы ресурсов. Имя нечувствительно к регистру.
|
|
searchServiceName
|
path |
True
|
string
pattern: ^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$
|
Имя службы Поиск с использованием ИИ Azure, связанной с указанной группой ресурсов.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Идентификатор целевой подписки. Значение должно быть Универсальным Уникальным Идентификатором (UUID).
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Версия API, используемая для данной операции.
|
| Имя. |
Обязательно |
Тип |
Описание |
|
x-ms-client-request-id
|
|
string
(uuid)
|
Значение GUID, созданное клиентом, идентифицирующее этот запрос. Если этот параметр указан, он будет включен в сведения о ответе в качестве способа отслеживания запроса.
|
Текст запроса
| Имя. |
Обязательно |
Тип |
Описание |
|
location
|
True
|
string
|
Географическое расположение, в котором находится ресурс
|
|
identity
|
|
Identity
|
Удостоверение ресурса.
|
|
properties.authOptions
|
|
DataPlaneAuthOptions
|
Определяет параметры того, как API плоскости данных службы поиска выполняет проверку подлинности запросов. Это невозможно задать, если параметр disableLocalAuth имеет значение true.
|
|
properties.computeType
|
|
ComputeType
|
Настройте это свойство для поддержки службы поиска с помощью вычислений по умолчанию или конфиденциальных вычислений Azure.
|
|
properties.dataExfiltrationProtections
|
|
SearchDataExfiltrationProtection[]
|
Список сценариев кражи данных, которые явно запрещены для службы поиска. В настоящее время единственным поддерживаемым значением является "Все", чтобы отключить все возможные сценарии экспорта данных с более точными элементами управления, запланированными в будущем.
|
|
properties.disableLocalAuth
|
|
boolean
|
Если задано значение true, вызовы службы поиска не будут разрешены использовать ключи API для проверки подлинности. Это не может быть задано значение true, если определен параметр dataPlaneAuthOptions.
|
|
properties.encryptionWithCmk
|
|
EncryptionWithCmk
|
Указывает любую политику шифрования ресурсов (таких как индексы) с помощью ключей диспетчера клиентов в службе поиска.
|
|
properties.endpoint
|
|
string
(uri)
|
Конечная точка службы поиска ИИ Azure.
|
|
properties.hostingMode
|
|
HostingMode
|
Применимо только для номера SKU standard3. Это свойство можно настроить для включения до 3 секций высокой плотности, которые позволяют до 1000 индексов, что гораздо выше, чем максимальные индексы, разрешенные для любого другого номера SKU. Для номера SKU standard3 используется значение "Default" или "HighDensity". Для всех остальных номеров SKU это значение должно быть "Default".
|
|
properties.knowledgeRetrieval
|
|
KnowledgeRetrieval
|
Указывает план выставления счетов для агентного поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
|
|
properties.networkRuleSet
|
|
NetworkRuleSet
|
Правила конкретной сети, определяющие, как может быть достигнута служба поиска ИИ Azure.
|
|
properties.partitionCount
|
|
integer
(int32)
minimum: 1 maximum: 12
|
Количество разделов в выделенном поисковом сервисе; если указано, это может быть 1, 2, 3, 4, 6 или 12. Значения, превышающие 1, допустимы только для стандартных номеров SKU. Для служб "standard3" с параметром hostingMode задано значение highDensity, допустимые значения имеют значение от 1 до 3.
|
|
properties.publicNetworkAccess
|
|
PublicNetworkAccess
|
Для этого значения можно установить значение "Включено", чтобы избежать критических изменений на существующих клиентских ресурсах и шаблонах. Если установлено значение «Отключено», трафик через публичный интерфейс не разрешен, а подключения к частным конечным точкам будут эксклюзивным методом доступа.
|
|
properties.replicaCount
|
|
integer
(int32)
minimum: 1 maximum: 12
|
Количество реплик в специализированном поисковом сервисе. Если задано, оно должно быть значением от 1 до 12 включительно для стандартных номеров SKU или от 1 до 3 включительно для базового номера SKU.
|
|
properties.semanticSearch
|
|
SearchSemanticSearch
|
Указывает доступность и план оплаты для семантического поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
|
|
properties.upgradeAvailable
|
|
UpgradeAvailable
|
Указывает, доступна ли служба поиска обновление.
|
|
sku
|
|
Sku
|
SKU службы поиска, которая определяет ценовую категорию и ограничения емкости. Это свойство необходимо при создании новой службы поиска.
|
|
tags
|
|
object
|
Теги ресурсов.
|
Ответы
| Имя. |
Тип |
Описание |
|
200 OK
|
SearchService
|
Операция обновления ресурса 'SearchService' была успешна
|
|
201 Created
|
SearchService
|
Операция создания ресурса 'SearchService' успешно выполнена
Заголовки
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
CloudError
|
Непредвиденное сообщение об ошибке.
|
Безопасность
azure_auth
Поток OAuth2 в Azure Active Directory.
Тип:
oauth2
Flow:
implicit
URL-адрес авторизации:
https://login.microsoftonline.com/common/oauth2/authorize
Области
| Имя. |
Описание |
|
user_impersonation
|
выдать себя за учетную запись пользователя
|
Примеры
SearchCreateOrUpdateService
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateService.json
*/
/**
* Sample code: SearchCreateOrUpdateService.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void searchCreateOrUpdateService(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {"computeType": "Default", "hostingMode": "Default", "partitionCount": 1, "replicaCount": 3},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateService.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateService.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateService() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
ReplicaCount: to.Ptr[int32](3),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateService.json
*/
async function searchCreateOrUpdateService() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
hostingMode: "Default",
partitionCount: 1,
replicaCount: 3,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceAuthOptions
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.AadAuthFailureMode;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.DataPlaneAadOrApiKeyAuthOption;
import com.azure.resourcemanager.search.models.DataPlaneAuthOptions;
import com.azure.resourcemanager.search.models.HostingMode;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceAuthOptions.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceAuthOptions.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateServiceAuthOptions(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.withAuthOptions(new DataPlaneAuthOptions().withAadOrApiKey(new DataPlaneAadOrApiKeyAuthOption()
.withAadAuthFailureMode(AadAuthFailureMode.HTTP401WITH_BEARER_CHALLENGE))),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"authOptions": {"aadOrApiKey": {"aadAuthFailureMode": "http401WithBearerChallenge"}},
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceAuthOptions.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceAuthOptions.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceAuthOptions() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
AuthOptions: &armsearch.DataPlaneAuthOptions{
AADOrAPIKey: &armsearch.DataPlaneAADOrAPIKeyAuthOption{
AADAuthFailureMode: to.Ptr(armsearch.AADAuthFailureModeHttp401WithBearerChallenge),
},
},
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
ReplicaCount: to.Ptr[int32](3),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceAuthOptions.json
*/
async function searchCreateOrUpdateServiceAuthOptions() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
authOptions: { aadOrApiKey: { aadAuthFailureMode: "http401WithBearerChallenge" } },
computeType: "Default",
hostingMode: "Default",
partitionCount: 1,
replicaCount: 3,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceDisableLocalAuth
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"disableLocalAuth": true,
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceDisableLocalAuth.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceDisableLocalAuth.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateServiceDisableLocalAuth(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT).withDisableLocalAuth(true),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"disableLocalAuth": True,
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceDisableLocalAuth.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceDisableLocalAuth.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceDisableLocalAuth() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
DisableLocalAuth: to.Ptr(true),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
ReplicaCount: to.Ptr[int32](3),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceDisableLocalAuth.json
*/
async function searchCreateOrUpdateServiceDisableLocalAuth() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
disableLocalAuth: true,
hostingMode: "Default",
partitionCount: 1,
replicaCount: 3,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": null,
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": true,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": null,
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": true,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"publicNetworkAccess": "Disabled",
"replicaCount": 3
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.PublicNetworkAccess;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void searchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints(
com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.withPublicNetworkAccess(PublicNetworkAccess.DISABLED),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"publicNetworkAccess": "Disabled",
"replicaCount": 3,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessDisabled),
ReplicaCount: to.Ptr[int32](3),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessDisabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json
*/
async function searchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
hostingMode: "Default",
partitionCount: 1,
publicNetworkAccess: "Disabled",
replicaCount: 3,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Disabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Disabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"networkRuleSet": {
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
},
"partitionCount": 1,
"replicaCount": 1
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.IpRule;
import com.azure.resourcemanager.search.models.NetworkRuleSet;
import com.azure.resourcemanager.search.models.Sku;
import com.azure.resourcemanager.search.models.SkuName;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void searchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs(
com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(1).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.withNetworkRuleSet(new NetworkRuleSet().withIpRules(
Arrays.asList(new IpRule().withValue("123.4.5.6"), new IpRule().withValue("123.4.6.0/18")))),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"networkRuleSet": {"ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}]},
"partitionCount": 1,
"replicaCount": 1,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
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),
ReplicaCount: to.Ptr[int32](1),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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("123.4.5.6"),
// },
// {
// Value: to.Ptr("123.4.6.0/18"),
// },
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateProvisioning),
// 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.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json
*/
async function searchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
hostingMode: "Default",
networkRuleSet: { ipRules: [{ value: "123.4.5.6" }, { value: "123.4.6.0/18" }] },
partitionCount: 1,
replicaCount: 1,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 1,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 1,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "AzureServices",
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
},
"partitionCount": 1,
"replicaCount": 1
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.IpRule;
import com.azure.resourcemanager.search.models.NetworkRuleSet;
import com.azure.resourcemanager.search.models.SearchBypass;
import com.azure.resourcemanager.search.models.Sku;
import com.azure.resourcemanager.search.models.SkuName;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void searchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass(
com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(1).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.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)),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "AzureServices",
"ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}],
},
"partitionCount": 1,
"replicaCount": 1,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
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),
ReplicaCount: to.Ptr[int32](1),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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("123.4.5.6"),
// },
// {
// Value: to.Ptr("123.4.6.0/18"),
// },
// },
// },
// PartitionCount: to.Ptr[int32](1),
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateProvisioning),
// 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.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json
*/
async function searchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
hostingMode: "Default",
networkRuleSet: {
bypass: "AzureServices",
ipRules: [{ value: "123.4.5.6" }, { value: "123.4.6.0/18" }],
},
partitionCount: 1,
replicaCount: 1,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "AzureServices",
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 1,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "AzureServices",
"ipRules": [
{
"value": "123.4.5.6"
},
{
"value": "123.4.6.0/18"
}
]
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 1,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceWithCmkEnforcement
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"encryptionWithCmk": {
"enforcement": "Enabled"
},
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.EncryptionWithCmk;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.SearchEncryptionWithCmk;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithCmkEnforcement.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceWithCmkEnforcement.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateServiceWithCmkEnforcement(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.withEncryptionWithCmk(new EncryptionWithCmk().withEnforcement(SearchEncryptionWithCmk.ENABLED)),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"encryptionWithCmk": {"enforcement": "Enabled"},
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithCmkEnforcement.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceWithCmkEnforcement.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceWithCmkEnforcement() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
EncryptionWithCmk: &armsearch.EncryptionWithCmk{
Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkEnabled),
},
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
ReplicaCount: to.Ptr[int32](3),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithCmkEnforcement.json
*/
async function searchCreateOrUpdateServiceWithCmkEnforcement() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
encryptionWithCmk: { enforcement: "Enabled" },
hostingMode: "Default",
partitionCount: 1,
replicaCount: 3,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Enabled"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Enabled"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceWithDataExfiltration
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"dataExfiltrationProtections": [
"BlockAll"
],
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.SearchDataExfiltrationProtection;
import com.azure.resourcemanager.search.models.Sku;
import com.azure.resourcemanager.search.models.SkuName;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithDataExfiltration.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceWithDataExfiltration.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateServiceWithDataExfiltration(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.withDataExfiltrationProtections(Arrays.asList(SearchDataExfiltrationProtection.BLOCK_ALL)),
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_create_or_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"dataExfiltrationProtections": ["BlockAll"],
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithDataExfiltration.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceWithDataExfiltration.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceWithDataExfiltration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
to.Ptr(armsearch.SearchDataExfiltrationProtectionBlockAll),
},
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
ReplicaCount: to.Ptr[int32](3),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithDataExfiltration.json
*/
async function searchCreateOrUpdateServiceWithDataExfiltration() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
dataExfiltrationProtections: ["BlockAll"],
hostingMode: "Default",
partitionCount: 1,
replicaCount: 3,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [
"BlockAll"
],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [
"BlockAll"
],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceWithIdentity
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi": {}
}
},
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.Identity;
import com.azure.resourcemanager.search.models.IdentityType;
import com.azure.resourcemanager.search.models.Sku;
import com.azure.resourcemanager.search.models.SkuName;
import com.azure.resourcemanager.search.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Services CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithIdentity.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceWithIdentity.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateServiceWithIdentity(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice", new SearchServiceInner()
.withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD))
.withIdentity(new Identity().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi",
new UserAssignedIdentity())))
.withReplicaCount(3).withPartitionCount(1).withHostingMode(HostingMode.DEFAULT)
.withComputeType(ComputeType.DEFAULT), 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_create_or_update_service_with_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi": {}
},
},
"location": "westus",
"properties": {"computeType": "Default", "hostingMode": "Default", "partitionCount": 1, "replicaCount": 3},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithIdentity.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceWithIdentity.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceWithIdentity() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Identity: &armsearch.Identity{
Type: to.Ptr(armsearch.IdentityTypeSystemAssignedUserAssigned),
UserAssignedIdentities: map[string]*armsearch.UserAssignedIdentity{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi": {},
},
},
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
ReplicaCount: to.Ptr[int32](3),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Identity: &armsearch.Identity{
// Type: to.Ptr(armsearch.IdentityTypeSystemAssignedUserAssigned),
// PrincipalID: to.Ptr("9d1e1f18-2122-4988-a11c-878782e40a5c"),
// TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
// UserAssignedIdentities: map[string]*armsearch.UserAssignedIdentity{
// "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi": &armsearch.UserAssignedIdentity{
// ClientID: to.Ptr("cd1dcac8-82dd-45b5-9aed-76795d529f6b"),
// PrincipalID: to.Ptr("24e07a75-1286-41e5-a15d-ded85ec3acd7"),
// },
// },
// },
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithIdentity.json
*/
async function searchCreateOrUpdateServiceWithIdentity() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
identity: {
type: "SystemAssigned, UserAssigned",
userAssignedIdentities: {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi":
{},
},
},
location: "westus",
computeType: "Default",
hostingMode: "Default",
partitionCount: 1,
replicaCount: 3,
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "9d1e1f18-2122-4988-a11c-878782e40a5c",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi": {
"clientId": "cd1dcac8-82dd-45b5-9aed-76795d529f6b",
"principalId": "24e07a75-1286-41e5-a15d-ded85ec3acd7"
}
}
},
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "9d1e1f18-2122-4988-a11c-878782e40a5c",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi": {
"clientId": "cd1dcac8-82dd-45b5-9aed-76795d529f6b",
"principalId": "24e07a75-1286-41e5-a15d-ded85ec3acd7"
}
}
},
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
SearchCreateOrUpdateServiceWithServerless
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/myserverlessservice?api-version=2026-11-01
{
"location": "westus",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "serverless"
},
"properties": {
"hostingMode": "Default"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.HostingMode;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithServerless.json
*/
/**
* Sample code: SearchCreateOrUpdateServiceWithServerless.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateServiceWithServerless(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "myserverlessservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.SERVERLESS)).withHostingMode(HostingMode.DEFAULT),
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_create_or_update_service_with_serverless.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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="myserverlessservice",
service={
"location": "westus",
"properties": {"hostingMode": "Default"},
"sku": {"name": "serverless"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithServerless.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateServiceWithServerless.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateServiceWithServerless() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "myserverlessservice", armsearch.Service{
Location: to.Ptr("westus"),
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameServerless),
},
Properties: &armsearch.ServiceProperties{
HostingMode: to.Ptr(armsearch.HostingModeDefault),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/myserverlessservice"),
// Name: to.Ptr("myserverlessservice"),
// Location: to.Ptr("westus"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameServerless),
// },
// Properties: &armsearch.ServiceProperties{
// Endpoint: to.Ptr("https://myserverlessservice.search.windows.net/"),
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// IPRules: []*armsearch.IPRule{
// },
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// },
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// },
// DisableLocalAuth: to.Ptr(false),
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// AADOrAPIKey: &armsearch.DataPlaneAADOrAPIKeyAuthOption{
// AADAuthFailureMode: to.Ptr(armsearch.AADAuthFailureModeHttp401WithBearerChallenge),
// },
// },
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SystemData: &armsearch.SystemData{
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateServiceWithServerless.json
*/
async function searchCreateOrUpdateServiceWithServerless() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "myserverlessservice", {
location: "westus",
tags: { "app-name": "My e-commerce app" },
sku: { name: "serverless" },
hostingMode: "Default",
});
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
Пример ответа
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/myserverlessservice",
"name": "myserverlessservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "serverless"
},
"properties": {
"endpoint": "https://myserverlessservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "Default",
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/myserverlessservice",
"name": "myserverlessservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "serverless"
},
"properties": {
"endpoint": "https://myserverlessservice.search.windows.net/",
"status": "provisioning",
"statusDetails": "",
"hostingMode": "Default",
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"networkRuleSet": {
"ipRules": [],
"bypass": "None"
},
"privateEndpointConnections": [],
"sharedPrivateLinkResources": [],
"encryptionWithCmk": {
"enforcement": "Unspecified",
"encryptionComplianceStatus": "Compliant"
},
"disableLocalAuth": false,
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"dataExfiltrationProtections": [],
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchCreateOrUpdateWithKnowledgeRetrieval
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"hostingMode": "Default",
"computeType": "Default",
"knowledgeRetrieval": "free"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.KnowledgeRetrieval;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateWithKnowledgeRetrieval.json
*/
/**
* Sample code: SearchCreateOrUpdateWithKnowledgeRetrieval.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateWithKnowledgeRetrieval(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.withKnowledgeRetrieval(KnowledgeRetrieval.FREE),
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_create_or_update_with_knowledge_retrieval.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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"knowledgeRetrieval": "free",
"partitionCount": 1,
"replicaCount": 3,
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateWithKnowledgeRetrieval.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateWithKnowledgeRetrieval.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateWithKnowledgeRetrieval() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Properties: &armsearch.ServiceProperties{
ReplicaCount: to.Ptr[int32](3),
PartitionCount: to.Ptr[int32](1),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
KnowledgeRetrieval: to.Ptr(armsearch.KnowledgeRetrievalFree),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Name: to.Ptr("mysearchservice"),
// Location: to.Ptr("westus"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// Properties: &armsearch.ServiceProperties{
// ReplicaCount: to.Ptr[int32](3),
// PartitionCount: to.Ptr[int32](1),
// Endpoint: to.Ptr("https://mysearchservice.search.windows.net/"),
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// HostingMode: to.Ptr(armsearch.HostingModeDefault),
// ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
// ProvisioningState: to.Ptr(armsearch.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// NetworkRuleSet: &armsearch.NetworkRuleSet{
// IPRules: []*armsearch.IPRule{
// },
// Bypass: to.Ptr(armsearch.SearchBypassNone),
// },
// PrivateEndpointConnections: []*armsearch.PrivateEndpointConnection{
// },
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// EncryptionWithCmk: &armsearch.EncryptionWithCmk{
// Enforcement: to.Ptr(armsearch.SearchEncryptionWithCmkUnspecified),
// EncryptionComplianceStatus: to.Ptr(armsearch.SearchEncryptionComplianceStatusCompliant),
// },
// DisableLocalAuth: to.Ptr(false),
// AuthOptions: &armsearch.DataPlaneAuthOptions{
// AADOrAPIKey: &armsearch.DataPlaneAADOrAPIKeyAuthOption{
// AADAuthFailureMode: to.Ptr(armsearch.AADAuthFailureModeHttp401WithBearerChallenge),
// },
// },
// DataExfiltrationProtections: []*armsearch.SearchDataExfiltrationProtection{
// },
// KnowledgeRetrieval: to.Ptr(armsearch.KnowledgeRetrievalFree),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SystemData: &armsearch.SystemData{
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateWithKnowledgeRetrieval.json
*/
async function searchCreateOrUpdateWithKnowledgeRetrieval() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
tags: { "app-name": "My e-commerce app" },
sku: { name: "standard" },
replicaCount: 3,
partitionCount: 1,
hostingMode: "Default",
computeType: "Default",
knowledgeRetrieval: "free",
});
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
Пример ответа
{
"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"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"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": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"dataExfiltrationProtections": [],
"knowledgeRetrieval": "free",
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
{
"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"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"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": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
},
"dataExfiltrationProtections": [],
"knowledgeRetrieval": "free",
"upgradeAvailable": "notAvailable",
"serviceUpgradedAt": null
},
"systemData": {
"createdBy": "My e-commerce app",
"createdByType": "Application",
"createdAt": "2024-01-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-11-01T00:00:00Z"
}
}
SearchCreateOrUpdateWithSemanticSearch
Образец запроса
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice?api-version=2026-11-01
{
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3,
"semanticSearch": "free"
},
"sku": {
"name": "standard"
},
"tags": {
"app-name": "My e-commerce app"
}
}
import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
import com.azure.resourcemanager.search.models.ComputeType;
import com.azure.resourcemanager.search.models.HostingMode;
import com.azure.resourcemanager.search.models.SearchSemanticSearch;
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 CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateWithSemanticSearch.json
*/
/**
* Sample code: SearchCreateOrUpdateWithSemanticSearch.
*
* @param manager Entry point to SearchServiceManager.
*/
public static void
searchCreateOrUpdateWithSemanticSearch(com.azure.resourcemanager.search.SearchServiceManager manager) {
manager.serviceClient().getServices().createOrUpdate("rg1", "mysearchservice",
new SearchServiceInner().withLocation("westus").withTags(mapOf("app-name", "My e-commerce app"))
.withSku(new Sku().withName(SkuName.STANDARD)).withReplicaCount(3).withPartitionCount(1)
.withHostingMode(HostingMode.DEFAULT).withComputeType(ComputeType.DEFAULT)
.withSemanticSearch(SearchSemanticSearch.FREE),
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_create_or_update_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="SUBSCRIPTION_ID",
)
response = client.services.begin_create_or_update(
resource_group_name="rg1",
search_service_name="mysearchservice",
service={
"location": "westus",
"properties": {
"computeType": "Default",
"hostingMode": "Default",
"partitionCount": 1,
"replicaCount": 3,
"semanticSearch": "free",
},
"sku": {"name": "standard"},
"tags": {"app-name": "My e-commerce app"},
},
).result()
print(response)
# x-ms-original-file: 2026-11-01/SearchCreateOrUpdateWithSemanticSearch.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/v2"
)
// Generated from example definition: 2026-11-01/SearchCreateOrUpdateWithSemanticSearch.json
func ExampleServicesClient_BeginCreateOrUpdate_searchCreateOrUpdateWithSemanticSearch() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsearch.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "rg1", "mysearchservice", armsearch.Service{
Location: to.Ptr("westus"),
Properties: &armsearch.ServiceProperties{
ComputeType: to.Ptr(armsearch.ComputeTypeDefault),
HostingMode: to.Ptr(armsearch.HostingModeDefault),
PartitionCount: to.Ptr[int32](1),
ReplicaCount: to.Ptr[int32](3),
SemanticSearch: to.Ptr(armsearch.SearchSemanticSearchFree),
},
SKU: &armsearch.SKU{
Name: to.Ptr(armsearch.SKUNameStandard),
},
Tags: map[string]*string{
"app-name": to.Ptr("My e-commerce app"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armsearch.ServicesClientCreateOrUpdateResponse{
// Service: armsearch.Service{
// Name: to.Ptr("mysearchservice"),
// Type: to.Ptr("Microsoft.Search/searchServices"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice"),
// Location: to.Ptr("westus"),
// 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.ProvisioningStateProvisioning),
// PublicNetworkAccess: to.Ptr(armsearch.PublicNetworkAccessEnabled),
// ReplicaCount: to.Ptr[int32](3),
// SemanticSearch: to.Ptr(armsearch.SearchSemanticSearchFree),
// SharedPrivateLinkResources: []*armsearch.SharedPrivateLinkResource{
// },
// Status: to.Ptr(armsearch.SearchServiceStatusProvisioning),
// StatusDetails: to.Ptr(""),
// UpgradeAvailable: to.Ptr(armsearch.UpgradeAvailableNotAvailable),
// },
// SKU: &armsearch.SKU{
// Name: to.Ptr(armsearch.SKUNameStandard),
// },
// SystemData: &armsearch.SystemData{
// CreatedAt: to.Ptr(time.Date(2024, time.January, 1, 0, 0, 0, 0, time.UTC)),
// CreatedBy: to.Ptr("My e-commerce app"),
// CreatedByType: to.Ptr(armsearch.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(time.Date(2024, time.November, 1, 0, 0, 0, 0, time.UTC)),
// LastModifiedBy: to.Ptr("[email protected]"),
// LastModifiedByType: to.Ptr(armsearch.CreatedByTypeUser),
// },
// Tags: map[string]*string{
// "app-name": to.Ptr("My e-commerce app"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SearchManagementClient } = require("@azure/arm-search");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
*
* @summary creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values.
* x-ms-original-file: 2026-11-01/SearchCreateOrUpdateWithSemanticSearch.json
*/
async function searchCreateOrUpdateWithSemanticSearch() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new SearchManagementClient(credential, subscriptionId);
const result = await client.services.createOrUpdate("rg1", "mysearchservice", {
location: "westus",
computeType: "Default",
hostingMode: "Default",
partitionCount: 1,
replicaCount: 3,
semanticSearch: "free",
sku: { name: "standard" },
tags: { "app-name": "My e-commerce app" },
});
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
Пример ответа
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"semanticSearch": "free",
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
{
"name": "mysearchservice",
"type": "Microsoft.Search/searchServices",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"location": "westus",
"properties": {
"authOptions": {
"apiKeyOnly": {}
},
"computeType": "Default",
"dataExfiltrationProtections": [],
"disableLocalAuth": false,
"encryptionWithCmk": {
"encryptionComplianceStatus": "Compliant",
"enforcement": "Unspecified"
},
"endpoint": "https://mysearchservice.search.windows.net/",
"hostingMode": "Default",
"networkRuleSet": {
"bypass": "None",
"ipRules": []
},
"partitionCount": 1,
"privateEndpointConnections": [],
"provisioningState": "provisioning",
"publicNetworkAccess": "Enabled",
"replicaCount": 3,
"semanticSearch": "free",
"serviceUpgradedAt": null,
"sharedPrivateLinkResources": [],
"status": "provisioning",
"statusDetails": "",
"upgradeAvailable": "notAvailable"
},
"sku": {
"name": "standard"
},
"systemData": {
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "My e-commerce app",
"createdByType": "Application",
"lastModifiedAt": "2024-11-01T00:00:00Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User"
},
"tags": {
"app-name": "My e-commerce app"
}
}
Определения
| Имя. |
Описание |
|
AadAuthFailureMode
|
Описывает, какой ответ БУДЕТ отправлять API плоскости данных службы поиска для запросов, которые не удалось выполнить проверку подлинности.
|
|
CloudError
|
Содержит сведения об ошибке API.
|
|
CloudErrorBody
|
Описывает определенную ошибку API с кодом ошибки и сообщением.
|
|
ComputeType
|
Настройте это свойство для поддержки службы поиска с помощью вычислений по умолчанию или конфиденциальных вычислений Azure.
|
|
createdByType
|
Тип учётной записи, создавшей ресурс.
|
|
DataPlaneAadOrApiKeyAuthOption
|
Указывает, что для проверки подлинности можно использовать ключ API или маркер доступа из клиента идентификатора Microsoft Entra ID.
|
|
DataPlaneAuthOptions
|
Определяет параметры проверки подлинности запроса плоскости данных службы поиска. Это невозможно задать, если параметр disableLocalAuth имеет значение true.
|
|
EncryptionWithCmk
|
Описывает политику, которая определяет, как ресурсы в службе поиска должны быть зашифрованы с помощью ключей, управляемых клиентом.
|
|
HostingMode
|
Применимо только для номера SKU standard3. Это свойство можно настроить для включения до 3 секций высокой плотности, которые позволяют до 1000 индексов, что гораздо выше, чем максимальные индексы, разрешенные для любого другого номера SKU. Для номера SKU standard3 используется значение "Default" или "HighDensity". Для всех остальных номеров SKU это значение должно быть "Default".
|
|
Identity
|
Сведения об удостоверении службы поиска. Значение NULL указывает, что служба поиска не назначена удостоверению.
|
|
IdentityType
|
Тип идентификатора, используемого ресурсом. Тип SystemAssigned, UserAssigned включает как удостоверение, созданное системой, так и набор удостоверений, назначаемых пользователем. Тип "Нет" приведет к удалению всех удостоверений из службы.
|
|
IpRule
|
Правило ограничения IP в сервисе Поиск с использованием ИИ Azure.
|
|
KnowledgeRetrieval
|
Указывает план выставления счетов для агентного поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
|
|
NetworkRuleSet
|
Правила конкретной сети, определяющие, как может быть достигнута служба поиска ИИ Azure.
|
|
PrivateEndpointConnection
|
Описывает существующее приватное подключение конечной точки к сервису Поиск с использованием ИИ Azure.
|
|
PrivateEndpointConnectionProperties
|
Описывает свойства существующего подключения частной конечной точки к службе поиска.
|
|
PrivateEndpointConnectionPropertiesPrivateEndpoint
|
Ресурс частной конечной точки от поставщика Microsoft.Network.
|
|
PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState
|
Описывает текущее состояние существующего подключения службы Приватного канала Azure к частной конечной точке.
|
|
PrivateLinkServiceConnectionProvisioningState
|
Состояние подготовки подключения службы приватного канала. Допустимые значения: "Обновление", "Удаление", "Сбой", "Успешно", "Неполный" или "Отменено".
|
|
PrivateLinkServiceConnectionStatus
|
Состояние подключения службы приватного канала. Допустимые значения: ожидающие, утвержденные, отклоненные или отключенные.
|
|
ProvisioningState
|
Состояние последней операции подготовки, выполняемой в службе поиска. Подготовка — это промежуточное состояние, которое происходит во время установки емкости службы. После настройки емкости подготовкаstate изменится на "Успешно" или "Сбой". Клиентские приложения могут опрашивать состояние подготовки (рекомендуемый интервал опроса составляет от 30 секунд до одной минуты) с помощью операции Get Search Service, чтобы узнать, когда операция завершена. Если вы используете бесплатную службу, это значение, как правило, возвращается как "Успешно" непосредственно в вызове службы создания поиска. Это связано с тем, что бесплатная служба использует емкость, которая уже настроена.
|
|
PublicNetworkAccess
|
Для этого значения можно установить значение "Включено", чтобы избежать критических изменений на существующих клиентских ресурсах и шаблонах. Если установлено значение «Отключено», трафик через публичный интерфейс не разрешен, а подключения к частным конечным точкам будут эксклюзивным методом доступа.
|
|
SearchBypass
|
Возможные источники входящего трафика, которые могут обойти правила, определенные в разделе ipRules.
|
|
SearchDataExfiltrationProtection
|
Конкретный сценарий извлечения данных, который отключён для сервиса.
|
|
SearchEncryptionComplianceStatus
|
Возвращает состояние соответствия службы поиска требованиям к объектам без шифрования CMK. Если служба имеет несколько незашифрованных объектов и включена принудительное применение, служба помечается как несоответствующая.
|
|
SearchEncryptionWithCmk
|
Описывает, как служба поиска должна обеспечить соответствие требованиям, если он находит объекты, которые не шифруются с помощью ключа, управляемого клиентом.
|
|
SearchSemanticSearch
|
Указывает доступность и план оплаты для семантического поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
|
|
SearchService
|
Описывает сервис Поиск с использованием ИИ Azure и его текущее состояние.
|
|
SearchServiceStatus
|
Состояние службы поиска. Возможные значения включают: "выполняется": служба поиска выполняется и не выполняется никаких операций подготовки. "подготовка": служба поиска подготавливается или масштабируется вверх или вниз. "удаление": служба поиска удаляется. "понижено": служба поиска снижается. Это может произойти, если базовые единицы поиска не работоспособны. Служба поиска, скорее всего, работает, но производительность может быть медленной, и некоторые запросы могут быть удалены. "отключено": служба поиска отключена. В этом состоянии служба отклонит все запросы API. "error": служба поиска находится в состоянии ошибки. "остановлено": служба поиска находится в подписке, которая отключена. Если ваш сервис находится в состоянии деградации, отключения или ошибки, это значит, что команда Поиск с использованием ИИ Azure активно исследует основную проблему. Выделенные службы в этих состояниях по-прежнему оплачиваются на основе количества подготовленных единиц поиска.
|
|
SharedPrivateLinkResource
|
Описывает общий приватный ресурс связи, управляемый сервисом Поиск с использованием ИИ Azure.
|
|
SharedPrivateLinkResourceProperties
|
Описывает свойства существующего общего приватного ресурса связи, управляемого сервисом Поиск с использованием ИИ Azure.
|
|
SharedPrivateLinkResourceProvisioningState
|
Состояние подготовки общего ресурса приватного канала. Допустимые значения: обновление, удаление, сбой, успешное или неполное.
|
|
SharedPrivateLinkResourceStatus
|
Состояние ресурса общего приватного канала. Допустимые значения: ожидающие, утвержденные, отклоненные или отключенные.
|
|
Sku
|
Определяет номер SKU службы поиска, который определяет частоту выставления счетов и ограничения емкости.
|
|
SkuName
|
Номер SKU службы поиска. Допустимые значения: "бесплатный": общая служба. "базовый": выделенная служба с 3 репликами. "Стандартный": выделенная служба с 12 секциями и 12 репликами. "standard2": аналогично стандарту, но с большей емкостью на единицу поиска. "Standard3": наибольшее стандартное предложение с до 12 секций и 12 реплик (или до 3 секций с большим количеством индексов, если свойство hostingMode также имеет значение highDensity). "storage_optimized_l1": поддерживает 1TB на секцию до 12 секций. 'storage_optimized_l2': поддерживает 2 ТБ на раздел, до 12 разделов. 'serverless': уровень без сервера с возможностью автомасштабирования.
|
|
systemData
|
Метаданные, относящиеся к созданию и последнему изменении ресурса.
|
|
UpgradeAvailable
|
Указывает, есть ли у специализированного поиска доступно обновление.
|
|
UserAssignedIdentity
|
Свойства назначаемого пользователем удостоверения
|
AadAuthFailureMode
Перечисление
Описывает, какой ответ БУДЕТ отправлять API плоскости данных службы поиска для запросов, которые не удалось выполнить проверку подлинности.
| Значение |
Описание |
|
http403
|
Указывает, что запросы, которые не удалось выполнить проверку подлинности, должны быть представлены с кодом состояния HTTP 403 (запрещено).
|
|
http401WithBearerChallenge
|
Указывает, что запросы, которые не удалось выполнить проверку подлинности, должны быть представлены с кодом состояния HTTP 401 (несанкционированный) и представлять вызов носителя.
|
CloudError
Объект
Содержит сведения об ошибке API.
| Имя. |
Тип |
Описание |
|
error
|
CloudErrorBody
|
Описывает определенную ошибку API с кодом ошибки и сообщением.
|
|
message
|
string
|
Краткое описание ошибки, которая указывает на то, что пошло не так (для получения сведений или отладки см. свойство error.message).
|
CloudErrorBody
Объект
Описывает определенную ошибку API с кодом ошибки и сообщением.
| Имя. |
Тип |
Описание |
|
code
|
string
|
Код ошибки, описывающий условие ошибки точнее, чем код состояния HTTP. Можно использовать для программной обработки конкретных случаев ошибок.
|
|
details
|
CloudErrorBody[]
|
Содержит вложенные ошибки, связанные с этой ошибкой.
|
|
message
|
string
|
Сообщение, описывающее ошибку подробно и предоставляющее сведения об отладке.
|
|
target
|
string
|
Цель конкретной ошибки (например, имя ошибочного свойства).
|
ComputeType
Перечисление
Настройте это свойство для поддержки службы поиска с помощью вычислений по умолчанию или конфиденциальных вычислений Azure.
| Значение |
Описание |
|
Default
|
Создайте службу с помощью вычислений по умолчанию.
|
|
Confidential
|
Создайте выделенный сервис с помощью Azure Confidential Compute.
|
createdByType
Перечисление
Тип учётной записи, создавшей ресурс.
| Значение |
Описание |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
DataPlaneAadOrApiKeyAuthOption
Объект
Указывает, что для проверки подлинности можно использовать ключ API или маркер доступа из клиента идентификатора Microsoft Entra ID.
| Имя. |
Тип |
Описание |
|
aadAuthFailureMode
|
AadAuthFailureMode
|
Описывает, какой ответ БУДЕТ отправлять API плоскости данных службы поиска для запросов, которые не удалось выполнить проверку подлинности.
|
DataPlaneAuthOptions
Объект
Определяет параметры проверки подлинности запроса плоскости данных службы поиска. Это невозможно задать, если параметр disableLocalAuth имеет значение true.
| Имя. |
Тип |
Описание |
|
aadOrApiKey
|
DataPlaneAadOrApiKeyAuthOption
|
Указывает, что для проверки подлинности можно использовать ключ API или маркер доступа из клиента идентификатора Microsoft Entra ID.
|
|
apiKeyOnly
|
|
Указывает, что для проверки подлинности можно использовать только ключ API.
|
EncryptionWithCmk
Объект
Описывает политику, которая определяет, как ресурсы в службе поиска должны быть зашифрованы с помощью ключей, управляемых клиентом.
| Имя. |
Тип |
Описание |
|
encryptionComplianceStatus
|
SearchEncryptionComplianceStatus
|
Возвращает состояние соответствия службы поиска требованиям к объектам без шифрования CMK. Если служба имеет несколько незашифрованных объектов и включена принудительное применение, служба помечается как несоответствующая.
|
|
enforcement
|
SearchEncryptionWithCmk
|
Описывает, как служба поиска должна обеспечить соответствие требованиям, если он находит объекты, которые не шифруются с помощью ключа, управляемого клиентом.
|
HostingMode
Перечисление
Применимо только для номера SKU standard3. Это свойство можно настроить для включения до 3 секций высокой плотности, которые позволяют до 1000 индексов, что гораздо выше, чем максимальные индексы, разрешенные для любого другого номера SKU. Для номера SKU standard3 используется значение "Default" или "HighDensity". Для всех остальных номеров SKU это значение должно быть "Default".
| Значение |
Описание |
|
Default
|
Максимальный лимит индексов определяется SKU или ценовым уровнем.
|
|
HighDensity
|
Применяется только к SKU Standard3 (S3), где поисковые сервисы могут иметь до 1000 индексов.
|
Identity
Объект
Сведения об удостоверении службы поиска. Значение NULL указывает, что служба поиска не назначена удостоверению.
| Имя. |
Тип |
Описание |
|
principalId
|
string
|
Основной идентификатор назначаемого системой удостоверения службы поиска.
|
|
tenantId
|
string
|
Идентификатор клиента назначаемого системой удостоверения службы поиска.
|
|
type
|
IdentityType
|
Тип идентификатора, используемого ресурсом. Тип SystemAssigned, UserAssigned включает как удостоверение, созданное системой, так и набор удостоверений, назначаемых пользователем. Тип "Нет" приведет к удалению всех удостоверений из службы.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
Список удостоверений пользователей, связанных с ресурсом. Ключевые ссылки на словарь удостоверений пользователей будут идентификаторами ресурсов ARM в форме: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}".
|
IdentityType
Перечисление
Тип идентификатора, используемого ресурсом. Тип SystemAssigned, UserAssigned включает как удостоверение, созданное системой, так и набор удостоверений, назначаемых пользователем. Тип "Нет" приведет к удалению всех удостоверений из службы.
| Значение |
Описание |
|
None
|
Указывает, что необходимо удалить любое удостоверение, связанное со службой поиска.
|
|
SystemAssigned
|
Указывает, что назначаемое системой удостоверение для службы поиска будет включено.
|
|
UserAssigned
|
Указывает, что одно или несколько назначенных пользователем удостоверений будут назначены службе поиска.
|
|
SystemAssigned, UserAssigned
|
Указывает, что назначаемое системой удостоверение для службы поиска будет включено вместе с назначением одного или нескольких назначенных пользователем удостоверений.
|
IpRule
Объект
Правило ограничения IP в сервисе Поиск с использованием ИИ Azure.
| Имя. |
Тип |
Описание |
|
value
|
string
|
Значение, соответствующее одному IPv4-адресу (например, 123.1.2.3) или диапазону IP-адресов в формате CIDR (например, 123.1.2.3/24).
|
KnowledgeRetrieval
Перечисление
Указывает план выставления счетов для агентного поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
| Значение |
Описание |
|
free
|
Обеспечивает поиск знаний в поисковом сервисе и указывает, что он должен использоваться в пределах свободного плана. Бесплатный план ограничивает объём запросов на получение знаний и предлагается бесплатно.
|
|
standard
|
Позволяет получать знания в поисковой службе как оплачиваемую функцию после исчерпания свободной квоты, с большей пропускной способностью и объёмом запросов на получение знаний.
|
NetworkRuleSet
Объект
Правила конкретной сети, определяющие, как может быть достигнута служба поиска ИИ Azure.
| Имя. |
Тип |
Описание |
|
bypass
|
SearchBypass
|
Возможные источники входящего трафика, которые могут обойти правила, определенные в разделе ipRules.
|
|
ipRules
|
IpRule[]
|
Список правил ограничения IP-адресов, определяющих входящие сети с разрешением доступа к конечной точке службы поиска. В то же время все остальные общедоступные IP-сети блокируются брандмауэром. Эти правила ограничения применяются только в том случае, если функция publicNetworkAccess службы поиска включена; в противном случае трафик через общедоступный интерфейс не допускается даже с любыми правилами общедоступного IP-адреса, а подключения к частной конечной точке — монопольным методом доступа.
|
PrivateEndpointConnection
Объект
Описывает существующее приватное подключение конечной точки к сервису Поиск с использованием ИИ Azure.
| Имя. |
Тип |
Описание |
|
id
|
string
(arm-id)
|
Полный идентификатор ресурса. Например, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Имя ресурса.
|
|
properties
|
PrivateEndpointConnectionProperties
|
Описывает свойства существующего подключения частной конечной точки к службе поиска ИИ Azure.
|
|
systemData
|
systemData
|
Метаданные Azure Resource Manager, содержащие данные createdBy и modifiedBy.
|
|
type
|
string
|
Тип ресурса. Например, "Microsoft.Compute/virtualMachines" или "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProperties
Объект
Описывает свойства существующего подключения частной конечной точки к службе поиска.
PrivateEndpointConnectionPropertiesPrivateEndpoint
Объект
Ресурс частной конечной точки от поставщика Microsoft.Network.
| Имя. |
Тип |
Описание |
|
id
|
string
|
Идентификатор ресурса частной конечной точки от поставщика Microsoft.Network.
|
PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState
Объект
Описывает текущее состояние существующего подключения службы Приватного канала Azure к частной конечной точке.
| Имя. |
Тип |
Значение по умолчанию |
Описание |
|
actionsRequired
|
string
|
None
|
Описание дополнительных действий, которые могут потребоваться.
|
|
description
|
string
|
|
Описание состояния подключения службы приватного канала.
|
|
status
|
PrivateLinkServiceConnectionStatus
|
|
Состояние подключения службы приватного канала. Допустимые значения: ожидающие, утвержденные, отклоненные или отключенные.
|
PrivateLinkServiceConnectionProvisioningState
Перечисление
Состояние подготовки подключения службы приватного канала. Допустимые значения: "Обновление", "Удаление", "Сбой", "Успешно", "Неполный" или "Отменено".
| Значение |
Описание |
|
Updating
|
Подключение службы приватного канала находится в процессе создания вместе с другими ресурсами, чтобы он был полностью функциональным.
|
|
Deleting
|
Подключение службы приватного канала находится в процессе удаления.
|
|
Failed
|
Не удалось подготовить или удалить подключение службы приватного канала.
|
|
Succeeded
|
Подключение службы приватного канала завершило подготовку и готово к утверждению.
|
|
Incomplete
|
Запрос на подготовку ресурса подключения службы приватного канала был принят, но процесс создания еще не начался.
|
|
Canceled
|
Запрос на подготовку ресурса подключения службы приватного канала был отменен.
|
PrivateLinkServiceConnectionStatus
Перечисление
Состояние подключения службы приватного канала. Допустимые значения: ожидающие, утвержденные, отклоненные или отключенные.
| Значение |
Описание |
|
Pending
|
Подключение к частной конечной точке создано и ожидает утверждения.
|
|
Approved
|
Подключение к частной конечной точке утверждено и готово к использованию.
|
|
Rejected
|
Подключение к частной конечной точке было отклонено и не может использоваться.
|
|
Disconnected
|
Подключение к частной конечной точке было удалено из службы.
|
ProvisioningState
Перечисление
Состояние последней операции подготовки, выполняемой в службе поиска. Подготовка — это промежуточное состояние, которое происходит во время установки емкости службы. После настройки емкости подготовкаstate изменится на "Успешно" или "Сбой". Клиентские приложения могут опрашивать состояние подготовки (рекомендуемый интервал опроса составляет от 30 секунд до одной минуты) с помощью операции Get Search Service, чтобы узнать, когда операция завершена. Если вы используете бесплатную службу, это значение, как правило, возвращается как "Успешно" непосредственно в вызове службы создания поиска. Это связано с тем, что бесплатная служба использует емкость, которая уже настроена.
| Значение |
Описание |
|
succeeded
|
Последняя операция подготовки успешно завершена.
|
|
provisioning
|
Служба поиска подготавливается или масштабируется вверх или вниз. Только для специализированных поисковых сервисов.
|
|
failed
|
Последняя операция подготовки завершилась ошибкой.
|
PublicNetworkAccess
Перечисление
Для этого значения можно установить значение "Включено", чтобы избежать критических изменений на существующих клиентских ресурсах и шаблонах. Если установлено значение «Отключено», трафик через публичный интерфейс не разрешен, а подключения к частным конечным точкам будут эксклюзивным методом доступа.
| Значение |
Описание |
|
Enabled
|
Служба поиска доступна из трафика, исходящем из общедоступного Интернета.
|
|
Disabled
|
Служба поиска недоступна из трафика, исходя из общедоступного Интернета. Доступ разрешен только через утвержденные подключения частной конечной точки.
|
|
SecuredByPerimeter
|
Правила конфигурации сетевого периметра разрешают или запрещают доступ общественной сети к ресурсу. Требуется соответствующий сетевой периметр безопасности.
|
SearchBypass
Перечисление
Возможные источники входящего трафика, которые могут обойти правила, определенные в разделе ipRules.
| Значение |
Описание |
|
None
|
Указывает, что источник не может обойти правила, определенные в разделе ipRules. Это значение по умолчанию.
|
|
AzureServices
|
Указывает, что запросы, исходящие от доверенных сервисов Azure, могут обходить правила, определённые в разделе 'ipRules'.
|
SearchDataExfiltrationProtection
Перечисление
Конкретный сценарий извлечения данных, который отключён для сервиса.
| Значение |
Описание |
|
BlockAll
|
Указывает, что все сценарии кражи данных отключены.
|
SearchEncryptionComplianceStatus
Перечисление
Возвращает состояние соответствия службы поиска требованиям к объектам без шифрования CMK. Если служба имеет несколько незашифрованных объектов и включена принудительное применение, служба помечается как несоответствующая.
| Значение |
Описание |
|
Compliant
|
Указывает, что служба поиска соответствует требованиям, так как число не зашифрованных объектов CMK равно нулю или отключается принудительное применение.
|
|
NonCompliant
|
Указывает, что служба поиска имеет несколько нешифрованных объектов.
|
SearchEncryptionWithCmk
Перечисление
Описывает, как служба поиска должна обеспечить соответствие требованиям, если он находит объекты, которые не шифруются с помощью ключа, управляемого клиентом.
| Значение |
Описание |
|
Disabled
|
Шифрование ключей, управляемых клиентом, не будет выполнено. Используется только встроенное шифрование, управляемое службой.
|
|
Enabled
|
Служба поиска будет помечена как несоответствующее, если один или несколько объектов не шифруются с помощью ключа, управляемого клиентом.
|
|
Unspecified
|
Политика принудительного применения не указана явно, при этом поведение совпадает с значением "Отключено".
|
SearchSemanticSearch
Перечисление
Указывает доступность и план оплаты для семантического поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
| Значение |
Описание |
|
disabled
|
Указывает, что семантический рерангитель отключен для службы поиска.
|
|
free
|
Включает семантический повторник в службе поиска и указывает, что он должен использоваться в пределах свободного плана. Бесплатный план будет ограничение объема семантических запросов ранжирования и предлагается без дополнительной платы. Это по умолчанию для недавно подготовленных служб поиска. Это значение по умолчанию.
|
|
standard
|
Включает семантический реранжинг в поисковой службе как оплачиваемую функцию после исчерпания свободной квоты, с большей пропускной способностью и объёмом семантически переранжированных запросов.
|
SearchService
Объект
Описывает сервис Поиск с использованием ИИ Azure и его текущее состояние.
| Имя. |
Тип |
Значение по умолчанию |
Описание |
|
id
|
string
(arm-id)
|
|
Полный идентификатор ресурса. Например, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
Identity
|
|
Удостоверение ресурса.
|
|
location
|
string
|
|
Географическое расположение, в котором находится ресурс
|
|
name
|
string
|
|
Имя ресурса.
|
|
properties.authOptions
|
DataPlaneAuthOptions
|
|
Определяет параметры того, как API плоскости данных службы поиска выполняет проверку подлинности запросов. Это невозможно задать, если параметр disableLocalAuth имеет значение true.
|
|
properties.computeType
|
ComputeType
|
|
Настройте это свойство для поддержки службы поиска с помощью вычислений по умолчанию или конфиденциальных вычислений Azure.
|
|
properties.dataExfiltrationProtections
|
SearchDataExfiltrationProtection[]
|
|
Список сценариев кражи данных, которые явно запрещены для службы поиска. В настоящее время единственным поддерживаемым значением является "Все", чтобы отключить все возможные сценарии экспорта данных с более точными элементами управления, запланированными в будущем.
|
|
properties.disableLocalAuth
|
boolean
|
|
Если задано значение true, вызовы службы поиска не будут разрешены использовать ключи API для проверки подлинности. Это не может быть задано значение true, если определен параметр dataPlaneAuthOptions.
|
|
properties.eTag
|
string
|
|
Системное созданное свойство, представляющее etag службы, которое может быть для управления оптимистическим параллелизмом во время обновлений.
|
|
properties.encryptionWithCmk
|
EncryptionWithCmk
|
|
Указывает любую политику шифрования ресурсов (таких как индексы) с помощью ключей диспетчера клиентов в службе поиска.
|
|
properties.endpoint
|
string
(uri)
|
|
Конечная точка службы поиска ИИ Azure.
|
|
properties.hostingMode
|
HostingMode
|
Default
|
Применимо только для номера SKU standard3. Это свойство можно настроить для включения до 3 секций высокой плотности, которые позволяют до 1000 индексов, что гораздо выше, чем максимальные индексы, разрешенные для любого другого номера SKU. Для номера SKU standard3 используется значение "Default" или "HighDensity". Для всех остальных номеров SKU это значение должно быть "Default".
|
|
properties.knowledgeRetrieval
|
KnowledgeRetrieval
|
|
Указывает план выставления счетов для агентного поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
|
|
properties.networkRuleSet
|
NetworkRuleSet
|
|
Правила конкретной сети, определяющие, как может быть достигнута служба поиска ИИ Azure.
|
|
properties.partitionCount
|
integer
(int32)
minimum: 1 maximum: 12
|
1
|
Количество разделов в выделенном поисковом сервисе; если указано, это может быть 1, 2, 3, 4, 6 или 12. Значения, превышающие 1, допустимы только для стандартных номеров SKU. Для служб "standard3" с параметром hostingMode задано значение highDensity, допустимые значения имеют значение от 1 до 3.
|
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
|
Список частных подключений конечных точек к сервису Поиск с использованием ИИ Azure.
|
|
properties.provisioningState
|
ProvisioningState
|
|
Состояние последней операции подготовки, выполняемой в службе поиска. Подготовка — это промежуточное состояние, которое происходит во время установки емкости службы. После настройки емкости подготовкаstate изменится на "Успешно" или "Сбой". Клиентские приложения могут опрашивать состояние подготовки (рекомендуемый интервал опроса составляет от 30 секунд до одной минуты) с помощью операции Get Search Service, чтобы узнать, когда операция завершена. Если вы используете бесплатную службу, это значение, как правило, возвращается как "Успешно" непосредственно в вызове службы создания поиска. Это связано с тем, что бесплатная служба использует емкость, которая уже настроена.
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
Enabled
|
Для этого значения можно установить значение "Включено", чтобы избежать критических изменений на существующих клиентских ресурсах и шаблонах. Если установлено значение «Отключено», трафик через публичный интерфейс не разрешен, а подключения к частным конечным точкам будут эксклюзивным методом доступа.
|
|
properties.replicaCount
|
integer
(int32)
minimum: 1 maximum: 12
|
1
|
Количество реплик в специализированном поисковом сервисе. Если задано, оно должно быть значением от 1 до 12 включительно для стандартных номеров SKU или от 1 до 3 включительно для базового номера SKU.
|
|
properties.semanticSearch
|
SearchSemanticSearch
|
|
Указывает доступность и план оплаты для семантического поиска в сервисе Поиск с использованием ИИ Azure. Эта конфигурация доступна только для определённых уровней ценообразования в определённых регионах.
|
|
properties.serviceUpgradedAt
|
string
(date-time)
|
|
Дата и время последнего обновления службы поиска. Это поле будет иметь значение NULL, пока служба не будет обновлена в первый раз.
|
|
properties.sharedPrivateLinkResources
|
SharedPrivateLinkResource[]
|
|
Список общих ресурсов приватных ссылок, управляемых сервисом Поиск с использованием ИИ Azure.
|
|
properties.status
|
SearchServiceStatus
|
|
Состояние службы поиска. Возможные значения включают: "выполняется": служба поиска выполняется и не выполняется никаких операций подготовки. "подготовка": служба поиска подготавливается или масштабируется вверх или вниз. "удаление": служба поиска удаляется. "понижено": служба поиска снижается. Это может произойти, если базовые единицы поиска не работоспособны. Служба поиска, скорее всего, работает, но производительность может быть медленной, и некоторые запросы могут быть удалены. "отключено": служба поиска отключена. В этом состоянии служба отклонит все запросы API. "error": служба поиска находится в состоянии ошибки. "остановлено": служба поиска находится в подписке, которая отключена. Если ваш сервис находится в состоянии деградации, отключения или ошибки, это значит, что команда Поиск с использованием ИИ Azure активно исследует основную проблему. Выделенные службы в этих состояниях по-прежнему оплачиваются на основе количества подготовленных единиц поиска.
|
|
properties.statusDetails
|
string
|
|
Сведения о состоянии службы поиска.
|
|
properties.upgradeAvailable
|
UpgradeAvailable
|
|
Указывает, доступна ли служба поиска обновление.
|
|
sku
|
Sku
|
|
SKU службы поиска, которая определяет ценовую категорию и ограничения емкости. Это свойство необходимо при создании новой службы поиска.
|
|
systemData
|
systemData
|
|
Метаданные Azure Resource Manager, содержащие данные createdBy и modifiedBy.
|
|
tags
|
object
|
|
Теги ресурсов.
|
|
type
|
string
|
|
Тип ресурса. Например, "Microsoft.Compute/virtualMachines" или "Microsoft.Storage/storageAccounts"
|
SearchServiceStatus
Перечисление
Состояние службы поиска. Возможные значения включают: "выполняется": служба поиска выполняется и не выполняется никаких операций подготовки. "подготовка": служба поиска подготавливается или масштабируется вверх или вниз. "удаление": служба поиска удаляется. "понижено": служба поиска снижается. Это может произойти, если базовые единицы поиска не работоспособны. Служба поиска, скорее всего, работает, но производительность может быть медленной, и некоторые запросы могут быть удалены. "отключено": служба поиска отключена. В этом состоянии служба отклонит все запросы API. "error": служба поиска находится в состоянии ошибки. "остановлено": служба поиска находится в подписке, которая отключена. Если ваш сервис находится в состоянии деградации, отключения или ошибки, это значит, что команда Поиск с использованием ИИ Azure активно исследует основную проблему. Выделенные службы в этих состояниях по-прежнему оплачиваются на основе количества подготовленных единиц поиска.
| Значение |
Описание |
|
running
|
Служба поиска выполняется и не выполняется никаких операций подготовки.
|
|
provisioning
|
Служба поиска подготавливается или масштабируется вверх или вниз.
|
|
deleting
|
Служба поиска удаляется.
|
|
degraded
|
Служба поиска снижается, так как базовые единицы поиска не работоспособны.
|
|
disabled
|
Служба поиска отключена, и все запросы API будут отклонены.
|
|
error
|
Служба поиска находится в состоянии ошибки, указывая на сбой подготовки или удаления.
|
|
stopped
|
Служба поиска находится в подписке, которая отключена.
|
SharedPrivateLinkResource
Объект
Описывает общий приватный ресурс связи, управляемый сервисом Поиск с использованием ИИ Azure.
| Имя. |
Тип |
Описание |
|
id
|
string
(arm-id)
|
Полный идентификатор ресурса. Например, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Имя ресурса.
|
|
properties
|
SharedPrivateLinkResourceProperties
|
Описывает свойства общего ресурса приватного канала, управляемого службой поиска ИИ Azure.
|
|
systemData
|
systemData
|
Метаданные Azure Resource Manager, содержащие данные createdBy и modifiedBy.
|
|
type
|
string
|
Тип ресурса. Например, "Microsoft.Compute/virtualMachines" или "Microsoft.Storage/storageAccounts"
|
SharedPrivateLinkResourceProperties
Объект
Описывает свойства существующего общего приватного ресурса связи, управляемого сервисом Поиск с использованием ИИ Azure.
| Имя. |
Тип |
Описание |
|
groupId
|
string
|
Идентификатор группы от поставщика ресурса, для которой используется общий ресурс приватного канала.
|
|
privateLinkResourceId
|
string
|
Идентификатор ресурса, для которой используется общий ресурс приватного канала.
|
|
provisioningState
|
SharedPrivateLinkResourceProvisioningState
|
Состояние подготовки общего ресурса приватного канала. Допустимые значения: обновление, удаление, сбой, успешное или неполное.
|
|
requestMessage
|
string
|
Сообщение о запросе утверждения общего ресурса приватного канала.
|
|
resourceRegion
|
string
|
Optional. Можно использовать для указания расположения Azure Resource Manager ресурса, для которого создается общая приватная ссылка. Это необходимо только для тех ресурсов, конфигурации DNS которых являются региональными (например, служба Azure Kubernetes).
|
|
status
|
SharedPrivateLinkResourceStatus
|
Состояние ресурса общего приватного канала. Допустимые значения: ожидающие, утвержденные, отклоненные или отключенные.
|
SharedPrivateLinkResourceProvisioningState
Перечисление
Состояние подготовки общего ресурса приватного канала. Допустимые значения: обновление, удаление, сбой, успешное или неполное.
| Значение |
Описание |
|
Updating
|
Общий ресурс приватного канала находится в процессе создания вместе с другими ресурсами, чтобы он был полностью функциональным.
|
|
Deleting
|
Общий ресурс приватного канала находится в процессе удаления.
|
|
Failed
|
Не удалось подготовить или удалить общий ресурс приватного канала.
|
|
Succeeded
|
Общий ресурс приватного канала завершил подготовку и готов к утверждению.
|
|
Incomplete
|
Запрос на подготовку ресурса общего приватного канала был принят, но процесс создания еще не начался.
|
SharedPrivateLinkResourceStatus
Перечисление
Состояние ресурса общего приватного канала. Допустимые значения: ожидающие, утвержденные, отклоненные или отключенные.
| Значение |
Описание |
|
Pending
|
Создан общий ресурс приватного канала и ожидает утверждения.
|
|
Approved
|
Общий ресурс приватного канала утвержден и готов к использованию.
|
|
Rejected
|
Общий ресурс приватного канала был отклонен и не может использоваться.
|
|
Disconnected
|
Общий ресурс приватного канала удален из службы.
|
Sku
Объект
Определяет номер SKU службы поиска, который определяет частоту выставления счетов и ограничения емкости.
| Имя. |
Тип |
Описание |
|
name
|
SkuName
|
Номер SKU службы поиска. Допустимые значения: "бесплатный": общая служба. "базовый": выделенная служба с 3 репликами. "Стандартный": выделенная служба с 12 секциями и 12 репликами. "standard2": аналогично стандарту, но с большей емкостью на единицу поиска. "Standard3": наибольшее стандартное предложение с до 12 секций и 12 реплик (или до 3 секций с большим количеством индексов, если свойство hostingMode также имеет значение highDensity). "storage_optimized_l1": поддерживает 1TB на секцию до 12 секций. 'storage_optimized_l2': поддерживает 2 ТБ на раздел, до 12 разделов. 'serverless': уровень без сервера с возможностью автомасштабирования.
|
SkuName
Перечисление
Номер SKU службы поиска. Допустимые значения: "бесплатный": общая служба. "базовый": выделенная служба с 3 репликами. "Стандартный": выделенная служба с 12 секциями и 12 репликами. "standard2": аналогично стандарту, но с большей емкостью на единицу поиска. "Standard3": наибольшее стандартное предложение с до 12 секций и 12 реплик (или до 3 секций с большим количеством индексов, если свойство hostingMode также имеет значение highDensity). "storage_optimized_l1": поддерживает 1TB на секцию до 12 секций. 'storage_optimized_l2': поддерживает 2 ТБ на раздел, до 12 разделов. 'serverless': уровень без сервера с возможностью автомасштабирования.
| Значение |
Описание |
|
free
|
Бесплатный уровень без гарантий обслуживания и подмножества функций, предлагаемых на платных уровнях.
|
|
basic
|
Оплачиваемый уровень для выделенной службы с 3 репликами.
|
|
standard
|
Уровень выставления счетов для выделенной службы с 12 секциями и 12 репликами.
|
|
standard2
|
Аналогично "стандарту", но с большей емкостью на единицу поиска.
|
|
standard3
|
Наибольшее предложение уровня "Стандартный" с до 12 секций и 12 реплик (или до 3 секций с большим количеством индексов, если свойство hostingMode также имеет значение highDensity).
|
|
storage_optimized_l1
|
Уровень выставления счетов для выделенной службы, поддерживающей 1TB на секцию, до 12 секций.
|
|
storage_optimized_l2
|
Уровень выставления счетов для выделенной службы, поддерживающей 2TB на секцию, до 12 секций.
|
|
serverless
|
Безсерверный уровень, предлагающий низкочувствительный, ориентированный на потребление и оплату по мере использования, с возможностью автоматического масштабирования.
|
systemData
Объект
Метаданные, относящиеся к созданию и последнему изменении ресурса.
| Имя. |
Тип |
Описание |
|
createdAt
|
string
(date-time)
|
Метка времени создания ресурса (UTC).
|
|
createdBy
|
string
|
Идентификатор, создавший ресурс.
|
|
createdByType
|
createdByType
|
Тип учётной записи, создавшей ресурс.
|
|
lastModifiedAt
|
string
(date-time)
|
Метка времени последнего изменения ресурса (UTC)
|
|
lastModifiedBy
|
string
|
Идентификатор, который последний раз изменил ресурс.
|
|
lastModifiedByType
|
createdByType
|
Тип удостоверения, который последний раз изменил ресурс.
|
UpgradeAvailable
Перечисление
Указывает, есть ли у специализированного поиска доступно обновление.
| Значение |
Описание |
|
notAvailable
|
В настоящее время обновление для специализированной службы недоступно.
|
|
available
|
Для специализированного сервиса доступна возможность улучшения.
|
UserAssignedIdentity
Объект
Свойства назначаемого пользователем удостоверения
| Имя. |
Тип |
Описание |
|
clientId
|
string
(uuid)
|
Идентификатор клиента назначенного удостоверения.
|
|
principalId
|
string
(uuid)
|
Основной идентификатор назначенного удостоверения.
|