azure logo
Azure Classic v5.37.0, Mar 15 23

azure.search.getService

Manages a Search Service.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleService = Azure.Search.GetService.Invoke(new()
    {
        Name = "example-search-service",
        ResourceGroupName = exampleResourceGroup.Name,
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/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
	})
}
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()        
            .location("West Europe")
            .build());

        final var exampleService = SearchFunctions.getService(GetServiceArgs.builder()
            .name("example-search-service")
            .resourceGroupName(exampleResourceGroup.name())
            .build());

    }
}
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)
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,
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
variables:
  exampleService:
    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)
// Output-based functions aren't available in Java yet
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 identity type of this Managed Service Identity.

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 identity type of this Managed Service Identity.

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 identity type of this Managed Service Identity.

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 identity type of this Managed Service Identity.

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 identity type of this Managed Service Identity.

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 identity type of this Managed Service Identity.

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.