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
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. *
- Resource
Group stringName - The name of the Resource Group where the Communication Service exists. *
- Name string
- The name of this Communication Service. *
- Resource
Group stringName - The name of the Resource Group where the Communication Service exists. *
- name String
- The name of this Communication Service. *
- resource
Group StringName - The name of the Resource Group where the Communication Service exists. *
- name string
- The name of this Communication Service. *
- resource
Group stringName - The name of the Resource Group where the Communication Service exists. *
- name str
- The name of this Communication Service. *
- resource_
group_ strname - The name of the Resource Group where the Communication Service exists. *
- name String
- The name of this Communication Service. *
- resource
Group StringName - The name of the Resource Group where the Communication Service exists. *
getService Result
The following output properties are available:
- Data
Location 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
- Primary
Connection stringString - The primary connection string of the Communication Service.
- Primary
Key string - The primary key of the Communication Service.
- Resource
Group stringName - Secondary
Connection stringString - The secondary connection string of the Communication Service.
- Secondary
Key string - The secondary key of the Communication Service.
- Dictionary<string, string>
- A mapping of tags assigned to the Communication Service.
- Data
Location 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
- Primary
Connection stringString - The primary connection string of the Communication Service.
- Primary
Key string - The primary key of the Communication Service.
- Resource
Group stringName - Secondary
Connection stringString - The secondary connection string of the Communication Service.
- Secondary
Key string - The secondary key of the Communication Service.
- map[string]string
- A mapping of tags assigned to the Communication Service.
- data
Location 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
- primary
Connection StringString - The primary connection string of the Communication Service.
- primary
Key String - The primary key of the Communication Service.
- resource
Group StringName - secondary
Connection StringString - The secondary connection string of the Communication Service.
- secondary
Key String - The secondary key of the Communication Service.
- Map<String,String>
- A mapping of tags assigned to the Communication Service.
- data
Location 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
- primary
Connection stringString - The primary connection string of the Communication Service.
- primary
Key string - The primary key of the Communication Service.
- resource
Group stringName - secondary
Connection stringString - The secondary connection string of the Communication Service.
- secondary
Key string - The secondary key of the Communication Service.
- {[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_ strstring - The primary connection string of the Communication Service.
- primary_
key str - The primary key of the Communication Service.
- resource_
group_ strname - secondary_
connection_ strstring - The secondary connection string of the Communication Service.
- secondary_
key str - The secondary key of the Communication Service.
- Mapping[str, str]
- A mapping of tags assigned to the Communication Service.
- data
Location 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
- primary
Connection StringString - The primary connection string of the Communication Service.
- primary
Key String - The primary key of the Communication Service.
- resource
Group StringName - secondary
Connection StringString - The secondary connection string of the Communication Service.
- secondary
Key String - The secondary key of the Communication Service.
- 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.