Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.mobile.kotlin.NetworkSimGroupArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.mobile.kotlin
import com.pulumi.azure.mobile.NetworkSimGroupArgs.builder
import com.pulumi.azure.mobile.kotlin.inputs.NetworkSimGroupIdentityArgs
import com.pulumi.azure.mobile.kotlin.inputs.NetworkSimGroupIdentityArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* 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={
* "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
* ```
* @property encryptionKeyUrl A key to encrypt the SIM data that belongs to this SIM group.
* @property identity An `identity` block as defined below.
* > **NOTE:** A `UserAssigned` identity must be specified when `encryption_key_url` is specified.
* @property location Specifies the Azure Region where the Mobile Network Sim Groups should exist. Changing this forces a new Mobile Network Sim Group to be created.
* @property mobileNetworkId The ID of Mobile Network which the Mobile Network Sim Group belongs to. Changing this forces a new Mobile Network Slice to be created.
* @property name 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.
* @property tags A mapping of tags which should be assigned to the Mobile Network Sim Groups.
*/
public data class NetworkSimGroupArgs(
public val encryptionKeyUrl: Output? = null,
public val identity: Output? = null,
public val location: Output? = null,
public val mobileNetworkId: Output? = null,
public val name: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.mobile.NetworkSimGroupArgs =
com.pulumi.azure.mobile.NetworkSimGroupArgs.builder()
.encryptionKeyUrl(encryptionKeyUrl?.applyValue({ args0 -> args0 }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.mobileNetworkId(mobileNetworkId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [NetworkSimGroupArgs].
*/
@PulumiTagMarker
public class NetworkSimGroupArgsBuilder internal constructor() {
private var encryptionKeyUrl: Output? = null
private var identity: Output? = null
private var location: Output? = null
private var mobileNetworkId: Output? = null
private var name: Output? = null
private var tags: Output>? = null
/**
* @param value A key to encrypt the SIM data that belongs to this SIM group.
*/
@JvmName("ichlfuetulytbwcq")
public suspend fun encryptionKeyUrl(`value`: Output) {
this.encryptionKeyUrl = value
}
/**
* @param value An `identity` block as defined below.
* > **NOTE:** A `UserAssigned` identity must be specified when `encryption_key_url` is specified.
*/
@JvmName("vsqrpxpnyoipkpiy")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value Specifies the Azure Region where the Mobile Network Sim Groups should exist. Changing this forces a new Mobile Network Sim Group to be created.
*/
@JvmName("gnrpspjalhotbhpq")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The ID of Mobile Network which the Mobile Network Sim Group belongs to. Changing this forces a new Mobile Network Slice to be created.
*/
@JvmName("wxycdcanubgtkhou")
public suspend fun mobileNetworkId(`value`: Output) {
this.mobileNetworkId = value
}
/**
* @param value 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.
*/
@JvmName("eqmfyqpqqpyovldd")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value A mapping of tags which should be assigned to the Mobile Network Sim Groups.
*/
@JvmName("oeuhllmayvxaxhrr")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value A key to encrypt the SIM data that belongs to this SIM group.
*/
@JvmName("esyiosfvqxdagrnc")
public suspend fun encryptionKeyUrl(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryptionKeyUrl = mapped
}
/**
* @param value An `identity` block as defined below.
* > **NOTE:** A `UserAssigned` identity must be specified when `encryption_key_url` is specified.
*/
@JvmName("youjhnyqmfxqidlc")
public suspend fun identity(`value`: NetworkSimGroupIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument An `identity` block as defined below.
* > **NOTE:** A `UserAssigned` identity must be specified when `encryption_key_url` is specified.
*/
@JvmName("rifdvylgpqeleyly")
public suspend fun identity(argument: suspend NetworkSimGroupIdentityArgsBuilder.() -> Unit) {
val toBeMapped = NetworkSimGroupIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value Specifies the Azure Region where the Mobile Network Sim Groups should exist. Changing this forces a new Mobile Network Sim Group to be created.
*/
@JvmName("jmvansxcngppwkdx")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The ID of Mobile Network which the Mobile Network Sim Group belongs to. Changing this forces a new Mobile Network Slice to be created.
*/
@JvmName("eywxsjhmjupnbvnl")
public suspend fun mobileNetworkId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mobileNetworkId = mapped
}
/**
* @param value 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.
*/
@JvmName("gprpkeunkiostxjj")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value A mapping of tags which should be assigned to the Mobile Network Sim Groups.
*/
@JvmName("svwhouncspdvgqex")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags which should be assigned to the Mobile Network Sim Groups.
*/
@JvmName("dbjthqjeaborqmrr")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): NetworkSimGroupArgs = NetworkSimGroupArgs(
encryptionKeyUrl = encryptionKeyUrl,
identity = identity,
location = location,
mobileNetworkId = mobileNetworkId,
name = name,
tags = tags,
)
}