We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 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)
// 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.
- Resource
Group stringName - The name of the Resource Group where the Search Service exists.
- Name string
- The Name of the Search Service.
- Resource
Group stringName - The name of the Resource Group where the Search Service exists.
- name String
- The Name of the Search Service.
- resource
Group StringName - The name of the Resource Group where the Search Service exists.
- name string
- The Name of the Search Service.
- resource
Group 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.
- resource
Group StringName - 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<Get
Service Identity> - An
identity
block as defined below. - Name string
- The name of this Query Key.
- Partition
Count int - The number of partitions which have been created.
- Primary
Key string - 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 List<GetService Query Key> - A
query_keys
block as defined below. - Replica
Count int - The number of replica's which have been created.
- Resource
Group stringName - Secondary
Key string - The Secondary Key used for Search Service Administration.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
[]Get
Service Identity - An
identity
block as defined below. - Name string
- The name of this Query Key.
- Partition
Count int - The number of partitions which have been created.
- Primary
Key string - 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 []GetService Query Key - A
query_keys
block as defined below. - Replica
Count int - The number of replica's which have been created.
- Resource
Group stringName - Secondary
Key string - The Secondary Key used for Search Service Administration.
- map[string]string
- A mapping of tags assigned to the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- identities
List<Get
Service Identity> - An
identity
block as defined below. - name String
- The name of this Query Key.
- partition
Count Integer - The number of partitions which have been created.
- primary
Key String - The Primary Key used for Search Service Administration.
- public
Network BooleanAccess Enabled - Whether or not public network access is enabled for this resource.
- query
Keys List<GetService Query Key> - A
query_keys
block as defined below. - replica
Count Integer - The number of replica's which have been created.
- resource
Group StringName - secondary
Key String - The Secondary Key used for Search Service Administration.
- Map<String,String>
- A mapping of tags assigned to the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- identities
Get
Service Identity[] - An
identity
block as defined below. - name string
- The name of this Query Key.
- partition
Count number - The number of partitions which have been created.
- primary
Key string - The Primary Key used for Search Service Administration.
- public
Network booleanAccess Enabled - Whether or not public network access is enabled for this resource.
- query
Keys GetService Query Key[] - A
query_keys
block as defined below. - replica
Count number - The number of replica's which have been created.
- resource
Group stringName - secondary
Key string - The Secondary Key used for Search Service Administration.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- identities
Sequence[Get
Service Identity] - 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_ boolaccess_ enabled - Whether or not public network access is enabled for this resource.
- query_
keys Sequence[GetService Query Key] - A
query_keys
block 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.
- 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.
- partition
Count Number - The number of partitions which have been created.
- primary
Key String - The Primary Key used for Search Service Administration.
- public
Network BooleanAccess Enabled - Whether or not public network access is enabled for this resource.
- query
Keys List<Property Map> - A
query_keys
block as defined below. - replica
Count Number - The number of replica's which have been created.
- resource
Group StringName - secondary
Key String - The Secondary Key used for Search Service Administration.
- Map<String>
- A mapping of tags assigned to the resource.
Supporting Types
GetServiceIdentity
- Principal
Id string - The (Client) ID of the Service Principal.
- Tenant
Id string - The ID of the Tenant the Service Principal is assigned in.
- Type string
- The identity type of this Managed Service Identity.
- Principal
Id string - The (Client) ID of the Service Principal.
- Tenant
Id string - The ID of the Tenant the Service Principal is assigned in.
- Type string
- The identity type of this Managed Service Identity.
- principal
Id String - The (Client) ID of the Service Principal.
- tenant
Id String - The ID of the Tenant the Service Principal is assigned in.
- type String
- The identity type of this Managed Service Identity.
- principal
Id string - The (Client) ID of the Service Principal.
- tenant
Id 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.
- principal
Id String - The (Client) ID of the Service Principal.
- tenant
Id String - The ID of the Tenant the Service Principal is assigned in.
- 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
azurerm
Terraform Provider.