Service

class Service : KotlinCustomResource

Manages a Search Service.

Example Usage

Supporting API Keys)

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleService = new azure.search.Service("example", {
name: "example-resource",
resourceGroupName: example.name,
location: example.location,
sku: "standard",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_service = azure.search.Service("example",
name="example-resource",
resource_group_name=example.name,
location=example.location,
sku="standard")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleService = new Azure.Search.Service("example", new()
{
Name = "example-resource",
ResourceGroupName = example.Name,
Location = example.Location,
Sku = "standard",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/search"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = search.NewService(ctx, "example", &search.ServiceArgs{
Name: pulumi.String("example-resource"),
ResourceGroupName: example.Name,
Location: example.Location,
Sku: pulumi.String("standard"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.search.Service;
import com.pulumi.azure.search.ServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.name("example-resource")
.resourceGroupName(example.name())
.location(example.location())
.sku("standard")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleService:
type: azure:search:Service
name: example
properties:
name: example-resource
resourceGroupName: ${example.name}
location: ${example.location}
sku: standard

Using Both AzureAD And API Keys)

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleService = new azure.search.Service("example", {
name: "example-resource",
resourceGroupName: example.name,
location: example.location,
sku: "standard",
localAuthenticationEnabled: true,
authenticationFailureMode: "http403",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_service = azure.search.Service("example",
name="example-resource",
resource_group_name=example.name,
location=example.location,
sku="standard",
local_authentication_enabled=True,
authentication_failure_mode="http403")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleService = new Azure.Search.Service("example", new()
{
Name = "example-resource",
ResourceGroupName = example.Name,
Location = example.Location,
Sku = "standard",
LocalAuthenticationEnabled = true,
AuthenticationFailureMode = "http403",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/search"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = search.NewService(ctx, "example", &search.ServiceArgs{
Name: pulumi.String("example-resource"),
ResourceGroupName: example.Name,
Location: example.Location,
Sku: pulumi.String("standard"),
LocalAuthenticationEnabled: pulumi.Bool(true),
AuthenticationFailureMode: pulumi.String("http403"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.search.Service;
import com.pulumi.azure.search.ServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.name("example-resource")
.resourceGroupName(example.name())
.location(example.location())
.sku("standard")
.localAuthenticationEnabled(true)
.authenticationFailureMode("http403")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleService:
type: azure:search:Service
name: example
properties:
name: example-resource
resourceGroupName: ${example.name}
location: ${example.location}
sku: standard
localAuthenticationEnabled: true
authenticationFailureMode: http403

Supporting Only AzureAD Authentication)

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleService = new azure.search.Service("example", {
name: "example-resource",
resourceGroupName: example.name,
location: example.location,
sku: "standard",
localAuthenticationEnabled: false,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_service = azure.search.Service("example",
name="example-resource",
resource_group_name=example.name,
location=example.location,
sku="standard",
local_authentication_enabled=False)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleService = new Azure.Search.Service("example", new()
{
Name = "example-resource",
ResourceGroupName = example.Name,
Location = example.Location,
Sku = "standard",
LocalAuthenticationEnabled = false,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/search"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = search.NewService(ctx, "example", &search.ServiceArgs{
Name: pulumi.String("example-resource"),
ResourceGroupName: example.Name,
Location: example.Location,
Sku: pulumi.String("standard"),
LocalAuthenticationEnabled: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.search.Service;
import com.pulumi.azure.search.ServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.name("example-resource")
.resourceGroupName(example.name())
.location(example.location())
.sku("standard")
.localAuthenticationEnabled(false)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleService:
type: azure:search:Service
name: example
properties:
name: example-resource
resourceGroupName: ${example.name}
location: ${example.location}
sku: standard
localAuthenticationEnabled: false

API Providers

This resource uses the following Azure API Providers:

  • Microsoft.Search: 2024-06-01-preview

Import

Search Services can be imported using the resource id, e.g.

$ pulumi import azure:search/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Search/searchServices/service1

Properties

Link copied to clipboard
val allowedIps: Output<List<String>>?

Specifies a list of inbound IPv4 or CIDRs that are allowed to access the Search Service. If the incoming IP request is from an IP address which is not included in the allowed_ips it will be blocked by the Search Services firewall.

Link copied to clipboard

Specifies the response that the Search Service should return for requests that fail authentication. Possible values include http401WithBearerChallenge or http403.

Describes whether the search service is compliant or not with respect to having non-customer encrypted resources. If a service has more than one non-customer encrypted resource and Enforcement is enabled then the service will be marked as NonCompliant. If all the resources are customer encrypted, then the service will be marked as Compliant.

Link copied to clipboard

Specifies whether the Search Service should enforce that non-customer resources are encrypted. Defaults to false.

Link copied to clipboard
val hostingMode: Output<String>?

Specifies the Hosting Mode, which allows for High Density partitions (that allow for up to 1000 indexes) should be supported. Possible values are highDensity or default. Defaults to default. Changing this forces a new Search Service to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

An identity block as defined below.

Link copied to clipboard

Specifies whether the Search Service allows authenticating using API Keys? Defaults to true.

Link copied to clipboard
val location: Output<String>

The Azure Region where the Search Service should exist. Changing this forces a new Search Service to be created.

Link copied to clipboard
val name: Output<String>

The Name which should be used for this Search Service. Changing this forces a new Search Service to be created.

Link copied to clipboard

Whether to allow trusted Azure services to access a network restricted Container Registry? Possible values are None and AzureServices. Defaults to None.

Link copied to clipboard
val partitionCount: Output<Int>?

Specifies the number of partitions which should be created. This field cannot be set when using a free sku (see the Microsoft documentation). Possible values include 1, 2, 3, 4, 6, or 12. Defaults to 1.

Link copied to clipboard
val primaryKey: Output<String>

The Primary Key used for Search Service Administration.

Link copied to clipboard

Specifies whether Public Network Access is allowed for this resource. Defaults to true.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A query_keys block as defined below.

Link copied to clipboard
val replicaCount: Output<Int>?

Specifies the number of Replica's which should be created for this Search Service. This field cannot be set when using a free sku (see the Microsoft documentation).

Link copied to clipboard

The name of the Resource Group where the Search Service should exist. Changing this forces a new Search Service to be created.

Link copied to clipboard
val secondaryKey: Output<String>

The Secondary Key used for Search Service Administration.

Link copied to clipboard

Specifies the Semantic Search SKU which should be used for this Search Service. Possible values include free and standard.

Link copied to clipboard
val sku: Output<String>

The SKU which should be used for this Search Service. Possible values include basic, free, standard, standard2, standard3, storage_optimized_l1 and storage_optimized_l2. Changing this forces a new Search Service to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Specifies a mapping of tags which should be assigned to this Search Service.

Link copied to clipboard
val urn: Output<String>