ServiceArgs

data class ServiceArgs(val allowedIps: Output<List<String>>? = null, val authenticationFailureMode: Output<String>? = null, val customerManagedKeyEnforcementEnabled: Output<Boolean>? = null, val hostingMode: Output<String>? = null, val identity: Output<ServiceIdentityArgs>? = null, val localAuthenticationEnabled: Output<Boolean>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val networkRuleBypassOption: Output<String>? = null, val partitionCount: Output<Int>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val replicaCount: Output<Int>? = null, val resourceGroupName: Output<String>? = null, val semanticSearchSku: Output<String>? = null, val sku: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ServiceArgs>

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

Constructors

Link copied to clipboard
constructor(allowedIps: Output<List<String>>? = null, authenticationFailureMode: Output<String>? = null, customerManagedKeyEnforcementEnabled: Output<Boolean>? = null, hostingMode: Output<String>? = null, identity: Output<ServiceIdentityArgs>? = null, localAuthenticationEnabled: Output<Boolean>? = null, location: Output<String>? = null, name: Output<String>? = null, networkRuleBypassOption: Output<String>? = null, partitionCount: Output<Int>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, replicaCount: Output<Int>? = null, resourceGroupName: Output<String>? = null, semanticSearchSku: Output<String>? = null, sku: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

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
val authenticationFailureMode: Output<String>? = null

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

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>? = null

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 identity: Output<ServiceIdentityArgs>? = null

An identity block as defined below.

Link copied to clipboard
val localAuthenticationEnabled: Output<Boolean>? = null

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

Link copied to clipboard
val location: Output<String>? = null

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>? = null

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

Link copied to clipboard
val networkRuleBypassOption: Output<String>? = null

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>? = null

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 publicNetworkAccessEnabled: Output<Boolean>? = null

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

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

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
val resourceGroupName: Output<String>? = null

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 semanticSearchSku: Output<String>? = null

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>? = null

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>>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): ServiceArgs