1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. search
  6. getService

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Search Service.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleService = Azure.Search.GetService.Invoke(new Azure.Search.GetServiceInvokeArgs
            {
                Name = "example-search-service",
                ResourceGroupName = exampleResourceGroup.Name,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/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, "exampleResourceGroup", &core.ResourceGroupArgs{
    			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
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleService = azure.search.getServiceOutput({
        name: "example-search-service",
        resourceGroupName: exampleResourceGroup.name,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_service = azure.search.get_service_output(name="example-search-service",
        resource_group_name=example_resource_group.name)
    

    Example coming soon!

    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 dictionary

    The following arguments are supported:

    Name string
    The Name of the Search Service.
    ResourceGroupName string
    The name of the Resource Group where the Search Service exists.
    Name string
    The Name of the Search Service.
    ResourceGroupName string
    The name of the Resource Group where the Search Service exists.
    name String
    The Name of the Search Service.
    resourceGroupName String
    The name of the Resource Group where the Search Service exists.
    name string
    The Name of the Search Service.
    resourceGroupName string
    The name of the Resource Group where the Search Service exists.
    name str
    The Name of the Search Service.
    resource_group_name str
    The name of the Resource Group where the Search Service exists.
    name String
    The Name of the Search Service.
    resourceGroupName String
    The name of the Resource Group where the Search Service exists.

    getService Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetServiceIdentity>
    An identity block 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.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is enabled for this resource.
    QueryKeys List<GetServiceQueryKey>
    A query_keys block as defined below.
    ReplicaCount int
    The number of replica's which have been created.
    ResourceGroupName string
    SecondaryKey string
    The Secondary Key used for Search Service Administration.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetServiceIdentity
    An identity block 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.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is enabled for this resource.
    QueryKeys []GetServiceQueryKey
    A query_keys block as defined below.
    ReplicaCount int
    The number of replica's which have been created.
    ResourceGroupName string
    SecondaryKey string
    The Secondary Key used for Search Service Administration.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetServiceIdentity>
    An identity block 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.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is enabled for this resource.
    queryKeys List<GetServiceQueryKey>
    A query_keys block as defined below.
    replicaCount Integer
    The number of replica's which have been created.
    resourceGroupName String
    secondaryKey String
    The Secondary Key used for Search Service Administration.
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetServiceIdentity[]
    An identity block 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.
    publicNetworkAccessEnabled boolean
    Whether or not public network access is enabled for this resource.
    queryKeys GetServiceQueryKey[]
    A query_keys block as defined below.
    replicaCount number
    The number of replica's which have been created.
    resourceGroupName string
    secondaryKey string
    The Secondary Key used for Search Service Administration.
    id str
    The provider-assigned unique ID for this managed resource.
    identities Sequence[GetServiceIdentity]
    An identity block 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_access_enabled bool
    Whether or not public network access is enabled for this resource.
    query_keys Sequence[GetServiceQueryKey]
    A query_keys block as defined below.
    replica_count int
    The number of replica's which have been created.
    resource_group_name str
    secondary_key str
    The Secondary Key used for Search Service Administration.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    An identity block 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.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is enabled for this resource.
    queryKeys List<Property Map>
    A query_keys block as defined below.
    replicaCount Number
    The number of replica's which have been created.
    resourceGroupName String
    secondaryKey String
    The Secondary Key used for Search Service Administration.

    Supporting Types

    GetServiceIdentity

    PrincipalId string
    The (Client) ID of the Service Principal.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    Type string
    The Type of Managed Identity which is used for the Search Service.
    PrincipalId string
    The (Client) ID of the Service Principal.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    Type string
    The Type of Managed Identity which is used for the Search Service.
    principalId String
    The (Client) ID of the Service Principal.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The Type of Managed Identity which is used for the Search Service.
    principalId string
    The (Client) ID of the Service Principal.
    tenantId string
    The ID of the Tenant the Service Principal is assigned in.
    type string
    The Type of Managed Identity which is used for the Search Service.
    principal_id str
    The (Client) ID of the Service Principal.
    tenant_id str
    The ID of the Tenant the Service Principal is assigned in.
    type str
    The Type of Managed Identity which is used for the Search Service.
    principalId String
    The (Client) ID of the Service Principal.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The Type of Managed Identity which is used for the Search Service.

    GetServiceQueryKey

    Key string
    The value of this Query Key.
    Name string
    The Name of the Search Service.
    Key string
    The value of this Query Key.
    Name string
    The Name of the Search Service.
    key String
    The value of this Query Key.
    name String
    The Name of the Search Service.
    key string
    The value of this Query Key.
    name string
    The Name of the Search Service.
    key str
    The value of this Query Key.
    name str
    The Name of the Search Service.
    key String
    The value of this Query Key.
    name String
    The Name of the Search Service.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.