get Network Service
Get information about a Mobile Network Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.mobile.getNetwork({
name: "example-mn",
resourceGroupName: "example-rg",
});
const exampleNetworkService = new azure.mobile.NetworkService("example", {
name: "example-mns",
mobileNetworkId: example.then(example => example.id),
});
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.mobile.get_network(name="example-mn",
resource_group_name="example-rg")
example_network_service = azure.mobile.NetworkService("example",
name="example-mns",
mobile_network_id=example.id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Mobile.GetNetwork.Invoke(new()
{
Name = "example-mn",
ResourceGroupName = "example-rg",
});
var exampleNetworkService = new Azure.Mobile.NetworkService("example", new()
{
Name = "example-mns",
MobileNetworkId = example.Apply(getNetworkResult => getNetworkResult.Id),
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mobile"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := mobile.LookupNetwork(ctx, &mobile.LookupNetworkArgs{
Name: "example-mn",
ResourceGroupName: "example-rg",
}, nil)
if err != nil {
return err
}
_, err = mobile.NewNetworkService(ctx, "example", &mobile.NetworkServiceArgs{
Name: pulumi.String("example-mns"),
MobileNetworkId: pulumi.String(example.Id),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mobile.MobileFunctions;
import com.pulumi.azure.mobile.inputs.GetNetworkArgs;
import com.pulumi.azure.mobile.NetworkService;
import com.pulumi.azure.mobile.NetworkServiceArgs;
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 = MobileFunctions.getNetwork(GetNetworkArgs.builder()
.name("example-mn")
.resourceGroupName("example-rg")
.build());
var exampleNetworkService = new NetworkService("exampleNetworkService", NetworkServiceArgs.builder()
.name("example-mns")
.mobileNetworkId(example.id())
.build());
}
}
Content copied to clipboard
resources:
exampleNetworkService:
type: azure:mobile:NetworkService
name: example
properties:
name: example-mns
mobileNetworkId: ${example.id}
variables:
example:
fn::invoke:
function: azure:mobile:getNetwork
arguments:
name: example-mn
resourceGroupName: example-rg
Content copied to clipboard
API Providers
This data source uses the following Azure API Providers:
Microsoft.MobileNetwork
: 2022-11-01
Return
A collection of values returned by getNetworkService.
Parameters
argument
A collection of arguments for invoking getNetworkService.
Return
A collection of values returned by getNetworkService.
Parameters
mobile Network Id
Specifies the ID of the Mobile Network Service.
name
Specifies the name which should be used for this Mobile Network Service.
See also
suspend fun getNetworkService(argument: suspend GetNetworkServicePlainArgsBuilder.() -> Unit): GetNetworkServiceResult
Return
A collection of values returned by getNetworkService.
Parameters
argument
Builder for com.pulumi.azure.mobile.kotlin.inputs.GetNetworkServicePlainArgs.