We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.search.getService
Explore with Pulumi AI
Manages a Search Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const example = azure.search.getServiceOutput({
    name: "example-search-service",
    resourceGroupName: exampleResourceGroup.name,
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example = azure.search.get_service_output(name="example-search-service",
    resource_group_name=example_resource_group.name)
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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_ = search.LookupServiceOutput(ctx, search.GetServiceOutputArgs{
			Name:              pulumi.String("example-search-service"),
			ResourceGroupName: exampleResourceGroup.Name,
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });
    var example = Azure.Search.GetService.Invoke(new()
    {
        Name = "example-search-service",
        ResourceGroupName = exampleResourceGroup.Name,
    });
});
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.SearchFunctions;
import com.pulumi.azure.search.inputs.GetServiceArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());
        final var example = SearchFunctions.getService(GetServiceArgs.builder()
            .name("example-search-service")
            .resourceGroupName(exampleResourceGroup.name())
            .build());
    }
}
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    name: example
    properties:
      name: example-resources
      location: West Europe
variables:
  example:
    fn::invoke:
      function: azure:search:getService
      arguments:
        name: example-search-service
        resourceGroupName: ${exampleResourceGroup.name}
Using getService
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function getServiceOutput(args: GetServiceOutputArgs, opts?: InvokeOptions): Output<GetServiceResult>def get_service(name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetServiceResult
def get_service_output(name: Optional[pulumi.Input[str]] = None,
                resource_group_name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetServiceResult]func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)
func LookupServiceOutput(ctx *Context, args *LookupServiceOutputArgs, opts ...InvokeOption) LookupServiceResultOutput> Note: This function is named LookupService in the Go SDK.
public static class GetService 
{
    public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
fn::invoke:
  function: azure:search/getService:getService
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The Name of the Search Service.
- ResourceGroup stringName 
- The name of the Resource Group where the Search Service exists.
- Name string
- The Name of the Search Service.
- ResourceGroup stringName 
- The name of the Resource Group where the Search Service exists.
- name String
- The Name of the Search Service.
- resourceGroup StringName 
- The name of the Resource Group where the Search Service exists.
- name string
- The Name of the Search Service.
- resourceGroup stringName 
- The name of the Resource Group where the Search Service exists.
- name str
- The Name of the Search Service.
- resource_group_ strname 
- The name of the Resource Group where the Search Service exists.
- name String
- The Name of the Search Service.
- resourceGroup StringName 
- The name of the Resource Group where the Search Service exists.
getService Result
The following output properties are available:
- CustomerManaged stringKey Encryption Compliance Status 
- 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 Enforcementisenabledthen the service will be marked asNonCompliant. If all the resources are customer encrypted, then the service will be marked asCompliant.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
List<GetService Identity> 
- An identityblock as defined below.
- Name string
- The name of this Query Key.
- PartitionCount int
- The number of partitions which have been created.
- PrimaryKey string
- The Primary Key used for Search Service Administration.
- PublicNetwork boolAccess Enabled 
- Whether or not public network access is enabled for this resource.
- QueryKeys List<GetService Query Key> 
- A query_keysblock as defined below.
- ReplicaCount int
- The number of replica's which have been created.
- ResourceGroup stringName 
- SecondaryKey string
- The Secondary Key used for Search Service Administration.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- CustomerManaged stringKey Encryption Compliance Status 
- 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 Enforcementisenabledthen the service will be marked asNonCompliant. If all the resources are customer encrypted, then the service will be marked asCompliant.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
[]GetService Identity 
- An identityblock as defined below.
- Name string
- The name of this Query Key.
- PartitionCount int
- The number of partitions which have been created.
- PrimaryKey string
- The Primary Key used for Search Service Administration.
- PublicNetwork boolAccess Enabled 
- Whether or not public network access is enabled for this resource.
- QueryKeys []GetService Query Key 
- A query_keysblock as defined below.
- ReplicaCount int
- The number of replica's which have been created.
- ResourceGroup stringName 
- SecondaryKey string
- The Secondary Key used for Search Service Administration.
- map[string]string
- A mapping of tags assigned to the resource.
- customerManaged StringKey Encryption Compliance Status 
- 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 Enforcementisenabledthen the service will be marked asNonCompliant. If all the resources are customer encrypted, then the service will be marked asCompliant.
- id String
- The provider-assigned unique ID for this managed resource.
- identities
List<GetService Identity> 
- An identityblock as defined below.
- name String
- The name of this Query Key.
- partitionCount Integer
- The number of partitions which have been created.
- primaryKey String
- The Primary Key used for Search Service Administration.
- publicNetwork BooleanAccess Enabled 
- Whether or not public network access is enabled for this resource.
- queryKeys List<GetService Query Key> 
- A query_keysblock as defined below.
- replicaCount Integer
- The number of replica's which have been created.
- resourceGroup StringName 
- secondaryKey String
- The Secondary Key used for Search Service Administration.
- Map<String,String>
- A mapping of tags assigned to the resource.
- customerManaged stringKey Encryption Compliance Status 
- 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 Enforcementisenabledthen the service will be marked asNonCompliant. If all the resources are customer encrypted, then the service will be marked asCompliant.
- id string
- The provider-assigned unique ID for this managed resource.
- identities
GetService Identity[] 
- An identityblock as defined below.
- name string
- The name of this Query Key.
- partitionCount number
- The number of partitions which have been created.
- primaryKey string
- The Primary Key used for Search Service Administration.
- publicNetwork booleanAccess Enabled 
- Whether or not public network access is enabled for this resource.
- queryKeys GetService Query Key[] 
- A query_keysblock as defined below.
- replicaCount number
- The number of replica's which have been created.
- resourceGroup stringName 
- secondaryKey string
- The Secondary Key used for Search Service Administration.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- customer_managed_ strkey_ encryption_ compliance_ status 
- 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 Enforcementisenabledthen the service will be marked asNonCompliant. If all the resources are customer encrypted, then the service will be marked asCompliant.
- id str
- The provider-assigned unique ID for this managed resource.
- identities
Sequence[GetService Identity] 
- An identityblock as defined below.
- name str
- The name of this Query Key.
- partition_count int
- The number of partitions which have been created.
- primary_key str
- The Primary Key used for Search Service Administration.
- public_network_ boolaccess_ enabled 
- Whether or not public network access is enabled for this resource.
- query_keys Sequence[GetService Query Key] 
- A query_keysblock as defined below.
- replica_count int
- The number of replica's which have been created.
- resource_group_ strname 
- secondary_key str
- The Secondary Key used for Search Service Administration.
- Mapping[str, str]
- A mapping of tags assigned to the resource.
- customerManaged StringKey Encryption Compliance Status 
- 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 Enforcementisenabledthen the service will be marked asNonCompliant. If all the resources are customer encrypted, then the service will be marked asCompliant.
- id String
- The provider-assigned unique ID for this managed resource.
- identities List<Property Map>
- An identityblock as defined below.
- name String
- The name of this Query Key.
- partitionCount Number
- The number of partitions which have been created.
- primaryKey String
- The Primary Key used for Search Service Administration.
- publicNetwork BooleanAccess Enabled 
- Whether or not public network access is enabled for this resource.
- queryKeys List<Property Map>
- A query_keysblock as defined below.
- replicaCount Number
- The number of replica's which have been created.
- resourceGroup StringName 
- secondaryKey String
- The Secondary Key used for Search Service Administration.
- Map<String>
- A mapping of tags assigned to the resource.
Supporting Types
GetServiceIdentity  
- IdentityIds List<string>
- The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
- PrincipalId string
- The Principal ID associated with this Managed Service Identity.
- TenantId string
- The Tenant ID associated with this Managed Service Identity.
- Type string
- The identity type of this Managed Service Identity.
- IdentityIds []string
- The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
- PrincipalId string
- The Principal ID associated with this Managed Service Identity.
- TenantId string
- The Tenant ID associated with this Managed Service Identity.
- Type string
- The identity type of this Managed Service Identity.
- identityIds List<String>
- The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
- principalId String
- The Principal ID associated with this Managed Service Identity.
- tenantId String
- The Tenant ID associated with this Managed Service Identity.
- type String
- The identity type of this Managed Service Identity.
- identityIds string[]
- The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
- principalId string
- The Principal ID associated with this Managed Service Identity.
- tenantId string
- The Tenant ID associated with this Managed Service Identity.
- type string
- The identity type of this Managed Service Identity.
- identity_ids Sequence[str]
- The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
- principal_id str
- The Principal ID associated with this Managed Service Identity.
- tenant_id str
- The Tenant ID associated with this Managed Service Identity.
- type str
- The identity type of this Managed Service Identity.
- identityIds List<String>
- The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
- principalId String
- The Principal ID associated with this Managed Service Identity.
- tenantId String
- The Tenant ID associated with this Managed Service Identity.
- type String
- The identity type of this Managed Service Identity.
GetServiceQueryKey   
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.