com.pulumi.azure.mobile.kotlin.NetworkSimGroup.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.mobile.kotlin
import com.pulumi.azure.mobile.kotlin.outputs.NetworkSimGroupIdentity
import com.pulumi.azure.mobile.kotlin.outputs.NetworkSimGroupIdentity.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [NetworkSimGroup].
*/
@PulumiTagMarker
public class NetworkSimGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: NetworkSimGroupArgs = NetworkSimGroupArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend NetworkSimGroupArgsBuilder.() -> Unit) {
val builder = NetworkSimGroupArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): NetworkSimGroup {
val builtJavaResource = com.pulumi.azure.mobile.NetworkSimGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return NetworkSimGroup(builtJavaResource)
}
}
/**
* Manages a Mobile Network Sim Group.
* ## Example Usage
*
* ```typescript
* 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 exampleNetwork = new azure.mobile.Network("example", {
* name: "example-mn",
* location: exampleResourceGroup.location,
* resourceGroupName: exampleResourceGroup.name,
* mobileCountryCode: "001",
* mobileNetworkCode: "01",
* });
* const example = azure.authorization.getUserAssignedIdentity({
* name: "name_of_user_assigned_identity",
* resourceGroupName: "name_of_resource_group",
* });
* const exampleGetKeyVault = azure.keyvault.getKeyVault({
* name: "example-kv",
* resourceGroupName: "some-resource-group",
* });
* const exampleGetKey = exampleGetKeyVault.then(exampleGetKeyVault => azure.keyvault.getKey({
* name: "example-key",
* keyVaultId: exampleGetKeyVault.id,
* }));
* const exampleNetworkSimGroup = new azure.mobile.NetworkSimGroup("example", {
* name: "example-mnsg",
* location: exampleResourceGroup.location,
* mobileNetworkId: exampleNetwork.id,
* encryptionKeyUrl: exampleGetKey.then(exampleGetKey => exampleGetKey.id),
* identity: {
* type: "SystemAssigned, UserAssigned",
* identityIds: [example.then(example => example.id)],
* },
* tags: {
* key: "value",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example_resource_group = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_network = azure.mobile.Network("example",
* name="example-mn",
* location=example_resource_group.location,
* resource_group_name=example_resource_group.name,
* mobile_country_code="001",
* mobile_network_code="01")
* example = azure.authorization.get_user_assigned_identity(name="name_of_user_assigned_identity",
* resource_group_name="name_of_resource_group")
* example_get_key_vault = azure.keyvault.get_key_vault(name="example-kv",
* resource_group_name="some-resource-group")
* example_get_key = azure.keyvault.get_key(name="example-key",
* key_vault_id=example_get_key_vault.id)
* example_network_sim_group = azure.mobile.NetworkSimGroup("example",
* name="example-mnsg",
* location=example_resource_group.location,
* mobile_network_id=example_network.id,
* encryption_key_url=example_get_key.id,
* identity=azure.mobile.NetworkSimGroupIdentityArgs(
* type="SystemAssigned, UserAssigned",
* identity_ids=[example.id],
* ),
* tags={
* "key": "value",
* })
* ```
* ```csharp
* 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 exampleNetwork = new Azure.Mobile.Network("example", new()
* {
* Name = "example-mn",
* Location = exampleResourceGroup.Location,
* ResourceGroupName = exampleResourceGroup.Name,
* MobileCountryCode = "001",
* MobileNetworkCode = "01",
* });
* var example = Azure.Authorization.GetUserAssignedIdentity.Invoke(new()
* {
* Name = "name_of_user_assigned_identity",
* ResourceGroupName = "name_of_resource_group",
* });
* var exampleGetKeyVault = Azure.KeyVault.GetKeyVault.Invoke(new()
* {
* Name = "example-kv",
* ResourceGroupName = "some-resource-group",
* });
* var exampleGetKey = Azure.KeyVault.GetKey.Invoke(new()
* {
* Name = "example-key",
* KeyVaultId = exampleGetKeyVault.Apply(getKeyVaultResult => getKeyVaultResult.Id),
* });
* var exampleNetworkSimGroup = new Azure.Mobile.NetworkSimGroup("example", new()
* {
* Name = "example-mnsg",
* Location = exampleResourceGroup.Location,
* MobileNetworkId = exampleNetwork.Id,
* EncryptionKeyUrl = exampleGetKey.Apply(getKeyResult => getKeyResult.Id),
* Identity = new Azure.Mobile.Inputs.NetworkSimGroupIdentityArgs
* {
* Type = "SystemAssigned, UserAssigned",
* IdentityIds = new[]
* {
* example.Apply(getUserAssignedIdentityResult => getUserAssignedIdentityResult.Id),
* },
* },
* Tags =
* {
* { "key", "value" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mobile"
* "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
* }
* exampleNetwork, err := mobile.NewNetwork(ctx, "example", &mobile.NetworkArgs{
* Name: pulumi.String("example-mn"),
* Location: exampleResourceGroup.Location,
* ResourceGroupName: exampleResourceGroup.Name,
* MobileCountryCode: pulumi.String("001"),
* MobileNetworkCode: pulumi.String("01"),
* })
* if err != nil {
* return err
* }
* example, err := authorization.LookupUserAssignedIdentity(ctx, &authorization.LookupUserAssignedIdentityArgs{
* Name: "name_of_user_assigned_identity",
* ResourceGroupName: "name_of_resource_group",
* }, nil)
* if err != nil {
* return err
* }
* exampleGetKeyVault, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{
* Name: "example-kv",
* ResourceGroupName: "some-resource-group",
* }, nil)
* if err != nil {
* return err
* }
* exampleGetKey, err := keyvault.LookupKey(ctx, &keyvault.LookupKeyArgs{
* Name: "example-key",
* KeyVaultId: exampleGetKeyVault.Id,
* }, nil)
* if err != nil {
* return err
* }
* _, err = mobile.NewNetworkSimGroup(ctx, "example", &mobile.NetworkSimGroupArgs{
* Name: pulumi.String("example-mnsg"),
* Location: exampleResourceGroup.Location,
* MobileNetworkId: exampleNetwork.ID(),
* EncryptionKeyUrl: pulumi.String(exampleGetKey.Id),
* Identity: &mobile.NetworkSimGroupIdentityArgs{
* Type: pulumi.String("SystemAssigned, UserAssigned"),
* IdentityIds: pulumi.StringArray{
* pulumi.String(example.Id),
* },
* },
* Tags: pulumi.StringMap{
* "key": pulumi.String("value"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.mobile.Network;
* import com.pulumi.azure.mobile.NetworkArgs;
* import com.pulumi.azure.authorization.AuthorizationFunctions;
* import com.pulumi.azure.authorization.inputs.GetUserAssignedIdentityArgs;
* import com.pulumi.azure.keyvault.KeyvaultFunctions;
* import com.pulumi.azure.keyvault.inputs.GetKeyVaultArgs;
* import com.pulumi.azure.keyvault.inputs.GetKeyArgs;
* import com.pulumi.azure.mobile.NetworkSimGroup;
* import com.pulumi.azure.mobile.NetworkSimGroupArgs;
* import com.pulumi.azure.mobile.inputs.NetworkSimGroupIdentityArgs;
* 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());
* var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
* .name("example-mn")
* .location(exampleResourceGroup.location())
* .resourceGroupName(exampleResourceGroup.name())
* .mobileCountryCode("001")
* .mobileNetworkCode("01")
* .build());
* final var example = AuthorizationFunctions.getUserAssignedIdentity(GetUserAssignedIdentityArgs.builder()
* .name("name_of_user_assigned_identity")
* .resourceGroupName("name_of_resource_group")
* .build());
* final var exampleGetKeyVault = KeyvaultFunctions.getKeyVault(GetKeyVaultArgs.builder()
* .name("example-kv")
* .resourceGroupName("some-resource-group")
* .build());
* final var exampleGetKey = KeyvaultFunctions.getKey(GetKeyArgs.builder()
* .name("example-key")
* .keyVaultId(exampleGetKeyVault.applyValue(getKeyVaultResult -> getKeyVaultResult.id()))
* .build());
* var exampleNetworkSimGroup = new NetworkSimGroup("exampleNetworkSimGroup", NetworkSimGroupArgs.builder()
* .name("example-mnsg")
* .location(exampleResourceGroup.location())
* .mobileNetworkId(exampleNetwork.id())
* .encryptionKeyUrl(exampleGetKey.applyValue(getKeyResult -> getKeyResult.id()))
* .identity(NetworkSimGroupIdentityArgs.builder()
* .type("SystemAssigned, UserAssigned")
* .identityIds(example.applyValue(getUserAssignedIdentityResult -> getUserAssignedIdentityResult.id()))
* .build())
* .tags(Map.of("key", "value"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: example-resources
* location: West Europe
* exampleNetwork:
* type: azure:mobile:Network
* name: example
* properties:
* name: example-mn
* location: ${exampleResourceGroup.location}
* resourceGroupName: ${exampleResourceGroup.name}
* mobileCountryCode: '001'
* mobileNetworkCode: '01'
* exampleNetworkSimGroup:
* type: azure:mobile:NetworkSimGroup
* name: example
* properties:
* name: example-mnsg
* location: ${exampleResourceGroup.location}
* mobileNetworkId: ${exampleNetwork.id}
* encryptionKeyUrl: ${exampleGetKey.id}
* identity:
* type: SystemAssigned, UserAssigned
* identityIds:
* - ${example.id}
* tags:
* key: value
* variables:
* example:
* fn::invoke:
* Function: azure:authorization:getUserAssignedIdentity
* Arguments:
* name: name_of_user_assigned_identity
* resourceGroupName: name_of_resource_group
* exampleGetKeyVault:
* fn::invoke:
* Function: azure:keyvault:getKeyVault
* Arguments:
* name: example-kv
* resourceGroupName: some-resource-group
* exampleGetKey:
* fn::invoke:
* Function: azure:keyvault:getKey
* Arguments:
* name: example-key
* keyVaultId: ${exampleGetKeyVault.id}
* ```
*
* ## Import
* Mobile Network Sim Groups can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:mobile/networkSimGroup:NetworkSimGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.MobileNetwork/simGroups/simGroup1
* ```
*/
public class NetworkSimGroup internal constructor(
override val javaResource: com.pulumi.azure.mobile.NetworkSimGroup,
) : KotlinCustomResource(javaResource, NetworkSimGroupMapper) {
/**
* A key to encrypt the SIM data that belongs to this SIM group.
*/
public val encryptionKeyUrl: Output?
get() = javaResource.encryptionKeyUrl().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An `identity` block as defined below.
* > **NOTE:** A `UserAssigned` identity must be specified when `encryption_key_url` is specified.
*/
public val identity: Output?
get() = javaResource.identity().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
}).orElse(null)
})
/**
* Specifies the Azure Region where the Mobile Network Sim Groups should exist. Changing this forces a new Mobile Network Sim Group to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The ID of Mobile Network which the Mobile Network Sim Group belongs to. Changing this forces a new Mobile Network Slice to be created.
*/
public val mobileNetworkId: Output
get() = javaResource.mobileNetworkId().applyValue({ args0 -> args0 })
/**
* Specifies the name which should be used for this Mobile Network Sim Groups. Changing this forces a new Mobile Network Sim Group to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A mapping of tags which should be assigned to the Mobile Network Sim Groups.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy