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

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.communication.getService

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Use this data source to access information about an existing Communication Service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.communication.getService({
        name: "existing",
        resourceGroupName: "existing",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.communication.get_service(name="existing",
        resource_group_name="existing")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/communication"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := communication.LookupService(ctx, &communication.LookupServiceArgs{
    			Name:              "existing",
    			ResourceGroupName: "existing",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Communication.GetService.Invoke(new()
        {
            Name = "existing",
            ResourceGroupName = "existing",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getServiceResult => getServiceResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.communication.CommunicationFunctions;
    import com.pulumi.azure.communication.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) {
            final var example = CommunicationFunctions.getService(GetServiceArgs.builder()
                .name("existing")
                .resourceGroupName("existing")
                .build());
    
            ctx.export("id", example.applyValue(getServiceResult -> getServiceResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:communication:getService
          Arguments:
            name: existing
            resourceGroupName: existing
    outputs:
      id: ${example.id}
    

    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:communication/getService:getService
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getService Result

    The following output properties are available:

    DataLocation string
    The location where the Communication service stores its data at rest.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PrimaryConnectionString string
    The primary connection string of the Communication Service.
    PrimaryKey string
    The primary key of the Communication Service.
    ResourceGroupName string
    SecondaryConnectionString string
    The secondary connection string of the Communication Service.
    SecondaryKey string
    The secondary key of the Communication Service.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Communication Service.
    DataLocation string
    The location where the Communication service stores its data at rest.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PrimaryConnectionString string
    The primary connection string of the Communication Service.
    PrimaryKey string
    The primary key of the Communication Service.
    ResourceGroupName string
    SecondaryConnectionString string
    The secondary connection string of the Communication Service.
    SecondaryKey string
    The secondary key of the Communication Service.
    Tags map[string]string
    A mapping of tags assigned to the Communication Service.
    dataLocation String
    The location where the Communication service stores its data at rest.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    primaryConnectionString String
    The primary connection string of the Communication Service.
    primaryKey String
    The primary key of the Communication Service.
    resourceGroupName String
    secondaryConnectionString String
    The secondary connection string of the Communication Service.
    secondaryKey String
    The secondary key of the Communication Service.
    tags Map<String,String>
    A mapping of tags assigned to the Communication Service.
    dataLocation string
    The location where the Communication service stores its data at rest.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    primaryConnectionString string
    The primary connection string of the Communication Service.
    primaryKey string
    The primary key of the Communication Service.
    resourceGroupName string
    secondaryConnectionString string
    The secondary connection string of the Communication Service.
    secondaryKey string
    The secondary key of the Communication Service.
    tags {[key: string]: string}
    A mapping of tags assigned to the Communication Service.
    data_location str
    The location where the Communication service stores its data at rest.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    primary_connection_string str
    The primary connection string of the Communication Service.
    primary_key str
    The primary key of the Communication Service.
    resource_group_name str
    secondary_connection_string str
    The secondary connection string of the Communication Service.
    secondary_key str
    The secondary key of the Communication Service.
    tags Mapping[str, str]
    A mapping of tags assigned to the Communication Service.
    dataLocation String
    The location where the Communication service stores its data at rest.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    primaryConnectionString String
    The primary connection string of the Communication Service.
    primaryKey String
    The primary key of the Communication Service.
    resourceGroupName String
    secondaryConnectionString String
    The secondary connection string of the Communication Service.
    secondaryKey String
    The secondary key of the Communication Service.
    tags Map<String>
    A mapping of tags assigned to the Communication 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.

    Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi