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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.search.getService

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)
func LookupServiceOutput(ctx *Context, args *LookupServiceOutputArgs, opts ...InvokeOption) LookupServiceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:search/getService:getService
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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

getService Result

The following output properties are available:

CustomerManagedKeyEncryptionComplianceStatus string
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.
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.
Tags Dictionary<string, string>
A mapping of tags assigned to the resource.
CustomerManagedKeyEncryptionComplianceStatus string
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.
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.
Tags map[string]string
A mapping of tags assigned to the resource.
customerManagedKeyEncryptionComplianceStatus String
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.
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.
tags Map<String,String>
A mapping of tags assigned to the resource.
customerManagedKeyEncryptionComplianceStatus string
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.
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.
tags {[key: string]: string}
A mapping of tags assigned to the resource.
customer_managed_key_encryption_compliance_status str
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.
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.
tags Mapping[str, str]
A mapping of tags assigned to the resource.
customerManagedKeyEncryptionComplianceStatus String
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.
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.
tags Map<String>
A mapping of tags assigned to the resource.

Supporting Types

GetServiceIdentity

IdentityIds This property is required. List<string>
The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
PrincipalId This property is required. string
The Principal ID associated with this Managed Service Identity.
TenantId This property is required. string
The Tenant ID associated with this Managed Service Identity.
Type This property is required. string
The identity type of this Managed Service Identity.
IdentityIds This property is required. []string
The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
PrincipalId This property is required. string
The Principal ID associated with this Managed Service Identity.
TenantId This property is required. string
The Tenant ID associated with this Managed Service Identity.
Type This property is required. string
The identity type of this Managed Service Identity.
identityIds This property is required. List<String>
The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
principalId This property is required. String
The Principal ID associated with this Managed Service Identity.
tenantId This property is required. String
The Tenant ID associated with this Managed Service Identity.
type This property is required. String
The identity type of this Managed Service Identity.
identityIds This property is required. string[]
The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
principalId This property is required. string
The Principal ID associated with this Managed Service Identity.
tenantId This property is required. string
The Tenant ID associated with this Managed Service Identity.
type This property is required. string
The identity type of this Managed Service Identity.
identity_ids This property is required. Sequence[str]
The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
principal_id This property is required. str
The Principal ID associated with this Managed Service Identity.
tenant_id This property is required. str
The Tenant ID associated with this Managed Service Identity.
type This property is required. str
The identity type of this Managed Service Identity.
identityIds This property is required. List<String>
The list of User Assigned Managed Service Identity IDs assigned to this Search Service.
principalId This property is required. String
The Principal ID associated with this Managed Service Identity.
tenantId This property is required. String
The Tenant ID associated with this Managed Service Identity.
type This property is required. String
The identity type of this Managed Service Identity.

GetServiceQueryKey

Key This property is required. string
The value of this Query Key.
Name This property is required. string
The Name of the Search Service.
Key This property is required. string
The value of this Query Key.
Name This property is required. string
The Name of the Search Service.
key This property is required. String
The value of this Query Key.
name This property is required. String
The Name of the Search Service.
key This property is required. string
The value of this Query Key.
name This property is required. string
The Name of the Search Service.
key This property is required. str
The value of this Query Key.
name This property is required. str
The Name of the Search Service.
key This property is required. String
The value of this Query Key.
name This property is required. 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.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi