All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.mobile.kotlin.NetworkSimPolicy.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.mobile.kotlin

import com.pulumi.azure.mobile.kotlin.outputs.NetworkSimPolicySlice
import com.pulumi.azure.mobile.kotlin.outputs.NetworkSimPolicyUserEquipmentAggregateMaximumBitRate
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azure.mobile.kotlin.outputs.NetworkSimPolicySlice.Companion.toKotlin as networkSimPolicySliceToKotlin
import com.pulumi.azure.mobile.kotlin.outputs.NetworkSimPolicyUserEquipmentAggregateMaximumBitRate.Companion.toKotlin as networkSimPolicyUserEquipmentAggregateMaximumBitRateToKotlin

/**
 * Builder for [NetworkSimPolicy].
 */
@PulumiTagMarker
public class NetworkSimPolicyResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: NetworkSimPolicyArgs = NetworkSimPolicyArgs()

    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 NetworkSimPolicyArgsBuilder.() -> Unit) {
        val builder = NetworkSimPolicyArgsBuilder()
        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(): NetworkSimPolicy {
        val builtJavaResource = com.pulumi.azure.mobile.NetworkSimPolicy(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return NetworkSimPolicy(builtJavaResource)
    }
}

/**
 * Manages a Mobile Network Sim Policy.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleNetwork = new azure.mobile.Network("example", {
 *     name: "example-mn",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     mobileCountryCode: "001",
 *     mobileNetworkCode: "01",
 * });
 * const exampleNetworkDataNetwork = new azure.mobile.NetworkDataNetwork("example", {
 *     name: "example-mndn",
 *     mobileNetworkId: exampleNetwork.id,
 *     location: example.location,
 * });
 * const exampleNetworkService = new azure.mobile.NetworkService("example", {
 *     name: "example-mns",
 *     mobileNetworkId: exampleNetwork.id,
 *     location: example.location,
 *     servicePrecedence: 0,
 *     pccRules: [{
 *         name: "default-rule",
 *         precedence: 1,
 *         trafficControlEnabled: true,
 *         serviceDataFlowTemplates: [{
 *             direction: "Uplink",
 *             name: "IP-to-server",
 *             ports: [],
 *             protocols: ["ip"],
 *             remoteIpLists: ["10.3.4.0/24"],
 *         }],
 *     }],
 * });
 * const exampleNetworkSlice = new azure.mobile.NetworkSlice("example", {
 *     name: "example-mns",
 *     mobileNetworkId: exampleNetwork.id,
 *     location: example.location,
 *     singleNetworkSliceSelectionAssistanceInformation: {
 *         sliceServiceType: 1,
 *     },
 * });
 * const exampleNetworkSimPolicy = new azure.mobile.NetworkSimPolicy("example", {
 *     name: "example-mnsp",
 *     mobileNetworkId: exampleNetwork.id,
 *     location: example.location,
 *     registrationTimerInSeconds: 3240,
 *     defaultSliceId: exampleNetworkSlice.id,
 *     slices: [{
 *         defaultDataNetworkId: exampleNetworkDataNetwork.id,
 *         sliceId: exampleNetworkSlice.id,
 *         dataNetworks: [{
 *             dataNetworkId: exampleNetworkDataNetwork.id,
 *             allocationAndRetentionPriorityLevel: 9,
 *             defaultSessionType: "IPv4",
 *             qosIndicator: 9,
 *             preemptionCapability: "NotPreempt",
 *             preemptionVulnerability: "Preemptable",
 *             allowedServicesIds: [exampleNetworkService.id],
 *             sessionAggregateMaximumBitRate: {
 *                 downlink: "1 Gbps",
 *                 uplink: "500 Mbps",
 *             },
 *         }],
 *     }],
 *     userEquipmentAggregateMaximumBitRate: {
 *         downlink: "1 Gbps",
 *         uplink: "500 Mbps",
 *     },
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_network = azure.mobile.Network("example",
 *     name="example-mn",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     mobile_country_code="001",
 *     mobile_network_code="01")
 * example_network_data_network = azure.mobile.NetworkDataNetwork("example",
 *     name="example-mndn",
 *     mobile_network_id=example_network.id,
 *     location=example.location)
 * example_network_service = azure.mobile.NetworkService("example",
 *     name="example-mns",
 *     mobile_network_id=example_network.id,
 *     location=example.location,
 *     service_precedence=0,
 *     pcc_rules=[{
 *         "name": "default-rule",
 *         "precedence": 1,
 *         "traffic_control_enabled": True,
 *         "service_data_flow_templates": [{
 *             "direction": "Uplink",
 *             "name": "IP-to-server",
 *             "ports": [],
 *             "protocols": ["ip"],
 *             "remote_ip_lists": ["10.3.4.0/24"],
 *         }],
 *     }])
 * example_network_slice = azure.mobile.NetworkSlice("example",
 *     name="example-mns",
 *     mobile_network_id=example_network.id,
 *     location=example.location,
 *     single_network_slice_selection_assistance_information={
 *         "slice_service_type": 1,
 *     })
 * example_network_sim_policy = azure.mobile.NetworkSimPolicy("example",
 *     name="example-mnsp",
 *     mobile_network_id=example_network.id,
 *     location=example.location,
 *     registration_timer_in_seconds=3240,
 *     default_slice_id=example_network_slice.id,
 *     slices=[{
 *         "default_data_network_id": example_network_data_network.id,
 *         "slice_id": example_network_slice.id,
 *         "data_networks": [{
 *             "data_network_id": example_network_data_network.id,
 *             "allocation_and_retention_priority_level": 9,
 *             "default_session_type": "IPv4",
 *             "qos_indicator": 9,
 *             "preemption_capability": "NotPreempt",
 *             "preemption_vulnerability": "Preemptable",
 *             "allowed_services_ids": [example_network_service.id],
 *             "session_aggregate_maximum_bit_rate": {
 *                 "downlink": "1 Gbps",
 *                 "uplink": "500 Mbps",
 *             },
 *         }],
 *     }],
 *     user_equipment_aggregate_maximum_bit_rate={
 *         "downlink": "1 Gbps",
 *         "uplink": "500 Mbps",
 *     },
 *     tags={
 *         "key": "value",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleNetwork = new Azure.Mobile.Network("example", new()
 *     {
 *         Name = "example-mn",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         MobileCountryCode = "001",
 *         MobileNetworkCode = "01",
 *     });
 *     var exampleNetworkDataNetwork = new Azure.Mobile.NetworkDataNetwork("example", new()
 *     {
 *         Name = "example-mndn",
 *         MobileNetworkId = exampleNetwork.Id,
 *         Location = example.Location,
 *     });
 *     var exampleNetworkService = new Azure.Mobile.NetworkService("example", new()
 *     {
 *         Name = "example-mns",
 *         MobileNetworkId = exampleNetwork.Id,
 *         Location = example.Location,
 *         ServicePrecedence = 0,
 *         PccRules = new[]
 *         {
 *             new Azure.Mobile.Inputs.NetworkServicePccRuleArgs
 *             {
 *                 Name = "default-rule",
 *                 Precedence = 1,
 *                 TrafficControlEnabled = true,
 *                 ServiceDataFlowTemplates = new[]
 *                 {
 *                     new Azure.Mobile.Inputs.NetworkServicePccRuleServiceDataFlowTemplateArgs
 *                     {
 *                         Direction = "Uplink",
 *                         Name = "IP-to-server",
 *                         Ports = new() { },
 *                         Protocols = new[]
 *                         {
 *                             "ip",
 *                         },
 *                         RemoteIpLists = new[]
 *                         {
 *                             "10.3.4.0/24",
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var exampleNetworkSlice = new Azure.Mobile.NetworkSlice("example", new()
 *     {
 *         Name = "example-mns",
 *         MobileNetworkId = exampleNetwork.Id,
 *         Location = example.Location,
 *         SingleNetworkSliceSelectionAssistanceInformation = new Azure.Mobile.Inputs.NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs
 *         {
 *             SliceServiceType = 1,
 *         },
 *     });
 *     var exampleNetworkSimPolicy = new Azure.Mobile.NetworkSimPolicy("example", new()
 *     {
 *         Name = "example-mnsp",
 *         MobileNetworkId = exampleNetwork.Id,
 *         Location = example.Location,
 *         RegistrationTimerInSeconds = 3240,
 *         DefaultSliceId = exampleNetworkSlice.Id,
 *         Slices = new[]
 *         {
 *             new Azure.Mobile.Inputs.NetworkSimPolicySliceArgs
 *             {
 *                 DefaultDataNetworkId = exampleNetworkDataNetwork.Id,
 *                 SliceId = exampleNetworkSlice.Id,
 *                 DataNetworks = new[]
 *                 {
 *                     new Azure.Mobile.Inputs.NetworkSimPolicySliceDataNetworkArgs
 *                     {
 *                         DataNetworkId = exampleNetworkDataNetwork.Id,
 *                         AllocationAndRetentionPriorityLevel = 9,
 *                         DefaultSessionType = "IPv4",
 *                         QosIndicator = 9,
 *                         PreemptionCapability = "NotPreempt",
 *                         PreemptionVulnerability = "Preemptable",
 *                         AllowedServicesIds = new[]
 *                         {
 *                             exampleNetworkService.Id,
 *                         },
 *                         SessionAggregateMaximumBitRate = new Azure.Mobile.Inputs.NetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateArgs
 *                         {
 *                             Downlink = "1 Gbps",
 *                             Uplink = "500 Mbps",
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *         UserEquipmentAggregateMaximumBitRate = new Azure.Mobile.Inputs.NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs
 *         {
 *             Downlink = "1 Gbps",
 *             Uplink = "500 Mbps",
 *         },
 *         Tags =
 *         {
 *             { "key", "value" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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 {
 * 		example, 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:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			MobileCountryCode: pulumi.String("001"),
 * 			MobileNetworkCode: pulumi.String("01"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleNetworkDataNetwork, err := mobile.NewNetworkDataNetwork(ctx, "example", &mobile.NetworkDataNetworkArgs{
 * 			Name:            pulumi.String("example-mndn"),
 * 			MobileNetworkId: exampleNetwork.ID(),
 * 			Location:        example.Location,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleNetworkService, err := mobile.NewNetworkService(ctx, "example", &mobile.NetworkServiceArgs{
 * 			Name:              pulumi.String("example-mns"),
 * 			MobileNetworkId:   exampleNetwork.ID(),
 * 			Location:          example.Location,
 * 			ServicePrecedence: pulumi.Int(0),
 * 			PccRules: mobile.NetworkServicePccRuleArray{
 * 				&mobile.NetworkServicePccRuleArgs{
 * 					Name:                  pulumi.String("default-rule"),
 * 					Precedence:            pulumi.Int(1),
 * 					TrafficControlEnabled: pulumi.Bool(true),
 * 					ServiceDataFlowTemplates: mobile.NetworkServicePccRuleServiceDataFlowTemplateArray{
 * 						&mobile.NetworkServicePccRuleServiceDataFlowTemplateArgs{
 * 							Direction: pulumi.String("Uplink"),
 * 							Name:      pulumi.String("IP-to-server"),
 * 							Ports:     pulumi.StringArray{},
 * 							Protocols: pulumi.StringArray{
 * 								pulumi.String("ip"),
 * 							},
 * 							RemoteIpLists: pulumi.StringArray{
 * 								pulumi.String("10.3.4.0/24"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleNetworkSlice, err := mobile.NewNetworkSlice(ctx, "example", &mobile.NetworkSliceArgs{
 * 			Name:            pulumi.String("example-mns"),
 * 			MobileNetworkId: exampleNetwork.ID(),
 * 			Location:        example.Location,
 * 			SingleNetworkSliceSelectionAssistanceInformation: &mobile.NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs{
 * 				SliceServiceType: pulumi.Int(1),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = mobile.NewNetworkSimPolicy(ctx, "example", &mobile.NetworkSimPolicyArgs{
 * 			Name:                       pulumi.String("example-mnsp"),
 * 			MobileNetworkId:            exampleNetwork.ID(),
 * 			Location:                   example.Location,
 * 			RegistrationTimerInSeconds: pulumi.Int(3240),
 * 			DefaultSliceId:             exampleNetworkSlice.ID(),
 * 			Slices: mobile.NetworkSimPolicySliceArray{
 * 				&mobile.NetworkSimPolicySliceArgs{
 * 					DefaultDataNetworkId: exampleNetworkDataNetwork.ID(),
 * 					SliceId:              exampleNetworkSlice.ID(),
 * 					DataNetworks: mobile.NetworkSimPolicySliceDataNetworkArray{
 * 						&mobile.NetworkSimPolicySliceDataNetworkArgs{
 * 							DataNetworkId:                       exampleNetworkDataNetwork.ID(),
 * 							AllocationAndRetentionPriorityLevel: pulumi.Int(9),
 * 							DefaultSessionType:                  pulumi.String("IPv4"),
 * 							QosIndicator:                        pulumi.Int(9),
 * 							PreemptionCapability:                pulumi.String("NotPreempt"),
 * 							PreemptionVulnerability:             pulumi.String("Preemptable"),
 * 							AllowedServicesIds: pulumi.StringArray{
 * 								exampleNetworkService.ID(),
 * 							},
 * 							SessionAggregateMaximumBitRate: &mobile.NetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateArgs{
 * 								Downlink: pulumi.String("1 Gbps"),
 * 								Uplink:   pulumi.String("500 Mbps"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 			UserEquipmentAggregateMaximumBitRate: &mobile.NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs{
 * 				Downlink: pulumi.String("1 Gbps"),
 * 				Uplink:   pulumi.String("500 Mbps"),
 * 			},
 * 			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.mobile.NetworkDataNetwork;
 * import com.pulumi.azure.mobile.NetworkDataNetworkArgs;
 * import com.pulumi.azure.mobile.NetworkService;
 * import com.pulumi.azure.mobile.NetworkServiceArgs;
 * import com.pulumi.azure.mobile.inputs.NetworkServicePccRuleArgs;
 * import com.pulumi.azure.mobile.NetworkSlice;
 * import com.pulumi.azure.mobile.NetworkSliceArgs;
 * import com.pulumi.azure.mobile.inputs.NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs;
 * import com.pulumi.azure.mobile.NetworkSimPolicy;
 * import com.pulumi.azure.mobile.NetworkSimPolicyArgs;
 * import com.pulumi.azure.mobile.inputs.NetworkSimPolicySliceArgs;
 * import com.pulumi.azure.mobile.inputs.NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
 *             .name("example-mn")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .mobileCountryCode("001")
 *             .mobileNetworkCode("01")
 *             .build());
 *         var exampleNetworkDataNetwork = new NetworkDataNetwork("exampleNetworkDataNetwork", NetworkDataNetworkArgs.builder()
 *             .name("example-mndn")
 *             .mobileNetworkId(exampleNetwork.id())
 *             .location(example.location())
 *             .build());
 *         var exampleNetworkService = new NetworkService("exampleNetworkService", NetworkServiceArgs.builder()
 *             .name("example-mns")
 *             .mobileNetworkId(exampleNetwork.id())
 *             .location(example.location())
 *             .servicePrecedence(0)
 *             .pccRules(NetworkServicePccRuleArgs.builder()
 *                 .name("default-rule")
 *                 .precedence(1)
 *                 .trafficControlEnabled(true)
 *                 .serviceDataFlowTemplates(NetworkServicePccRuleServiceDataFlowTemplateArgs.builder()
 *                     .direction("Uplink")
 *                     .name("IP-to-server")
 *                     .ports()
 *                     .protocols("ip")
 *                     .remoteIpLists("10.3.4.0/24")
 *                     .build())
 *                 .build())
 *             .build());
 *         var exampleNetworkSlice = new NetworkSlice("exampleNetworkSlice", NetworkSliceArgs.builder()
 *             .name("example-mns")
 *             .mobileNetworkId(exampleNetwork.id())
 *             .location(example.location())
 *             .singleNetworkSliceSelectionAssistanceInformation(NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs.builder()
 *                 .sliceServiceType(1)
 *                 .build())
 *             .build());
 *         var exampleNetworkSimPolicy = new NetworkSimPolicy("exampleNetworkSimPolicy", NetworkSimPolicyArgs.builder()
 *             .name("example-mnsp")
 *             .mobileNetworkId(exampleNetwork.id())
 *             .location(example.location())
 *             .registrationTimerInSeconds(3240)
 *             .defaultSliceId(exampleNetworkSlice.id())
 *             .slices(NetworkSimPolicySliceArgs.builder()
 *                 .defaultDataNetworkId(exampleNetworkDataNetwork.id())
 *                 .sliceId(exampleNetworkSlice.id())
 *                 .dataNetworks(NetworkSimPolicySliceDataNetworkArgs.builder()
 *                     .dataNetworkId(exampleNetworkDataNetwork.id())
 *                     .allocationAndRetentionPriorityLevel(9)
 *                     .defaultSessionType("IPv4")
 *                     .qosIndicator(9)
 *                     .preemptionCapability("NotPreempt")
 *                     .preemptionVulnerability("Preemptable")
 *                     .allowedServicesIds(exampleNetworkService.id())
 *                     .sessionAggregateMaximumBitRate(NetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateArgs.builder()
 *                         .downlink("1 Gbps")
 *                         .uplink("500 Mbps")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .userEquipmentAggregateMaximumBitRate(NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs.builder()
 *                 .downlink("1 Gbps")
 *                 .uplink("500 Mbps")
 *                 .build())
 *             .tags(Map.of("key", "value"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleNetwork:
 *     type: azure:mobile:Network
 *     name: example
 *     properties:
 *       name: example-mn
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       mobileCountryCode: '001'
 *       mobileNetworkCode: '01'
 *   exampleNetworkDataNetwork:
 *     type: azure:mobile:NetworkDataNetwork
 *     name: example
 *     properties:
 *       name: example-mndn
 *       mobileNetworkId: ${exampleNetwork.id}
 *       location: ${example.location}
 *   exampleNetworkService:
 *     type: azure:mobile:NetworkService
 *     name: example
 *     properties:
 *       name: example-mns
 *       mobileNetworkId: ${exampleNetwork.id}
 *       location: ${example.location}
 *       servicePrecedence: 0
 *       pccRules:
 *         - name: default-rule
 *           precedence: 1
 *           trafficControlEnabled: true
 *           serviceDataFlowTemplates:
 *             - direction: Uplink
 *               name: IP-to-server
 *               ports: []
 *               protocols:
 *                 - ip
 *               remoteIpLists:
 *                 - 10.3.4.0/24
 *   exampleNetworkSlice:
 *     type: azure:mobile:NetworkSlice
 *     name: example
 *     properties:
 *       name: example-mns
 *       mobileNetworkId: ${exampleNetwork.id}
 *       location: ${example.location}
 *       singleNetworkSliceSelectionAssistanceInformation:
 *         sliceServiceType: 1
 *   exampleNetworkSimPolicy:
 *     type: azure:mobile:NetworkSimPolicy
 *     name: example
 *     properties:
 *       name: example-mnsp
 *       mobileNetworkId: ${exampleNetwork.id}
 *       location: ${example.location}
 *       registrationTimerInSeconds: 3240
 *       defaultSliceId: ${exampleNetworkSlice.id}
 *       slices:
 *         - defaultDataNetworkId: ${exampleNetworkDataNetwork.id}
 *           sliceId: ${exampleNetworkSlice.id}
 *           dataNetworks:
 *             - dataNetworkId: ${exampleNetworkDataNetwork.id}
 *               allocationAndRetentionPriorityLevel: 9
 *               defaultSessionType: IPv4
 *               qosIndicator: 9
 *               preemptionCapability: NotPreempt
 *               preemptionVulnerability: Preemptable
 *               allowedServicesIds:
 *                 - ${exampleNetworkService.id}
 *               sessionAggregateMaximumBitRate:
 *                 downlink: 1 Gbps
 *                 uplink: 500 Mbps
 *       userEquipmentAggregateMaximumBitRate:
 *         downlink: 1 Gbps
 *         uplink: 500 Mbps
 *       tags:
 *         key: value
 * ```
 * 
 * ## Import
 * Mobile Network Sim Policies can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:mobile/networkSimPolicy:NetworkSimPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.MobileNetwork/mobileNetworks/mobileNetwork1/simPolicies/simPolicy1
 * ```
 */
public class NetworkSimPolicy internal constructor(
    override val javaResource: com.pulumi.azure.mobile.NetworkSimPolicy,
) : KotlinCustomResource(javaResource, NetworkSimPolicyMapper) {
    /**
     * The ID of default slice to use if the UE does not explicitly specify it. This slice must exist in the `slice` block.
     */
    public val defaultSliceId: Output
        get() = javaResource.defaultSliceId().applyValue({ args0 -> args0 })

    /**
     * Specifies the Azure Region where the Mobile Network Sim Policy should exist. Changing this forces a new Mobile Network Sim Policies to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The ID of the Mobile Network which the Sim Policy belongs to. Changing this forces a new Mobile Network Sim Policies to be created.
     */
    public val mobileNetworkId: Output
        get() = javaResource.mobileNetworkId().applyValue({ args0 -> args0 })

    /**
     * The name which should be used for this Mobile Network Sim Policies. Changing this forces a new Mobile Network Sim Policies to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413.
     */
    public val ratFrequencySelectionPriorityIndex: Output?
        get() = javaResource.ratFrequencySelectionPriorityIndex().applyValue({ args0 ->
            args0.map({ args0 -> args0 }).orElse(null)
        })

    /**
     * Interval for the user equipment periodic registration update procedure. Defaults to `3240`.
     */
    public val registrationTimerInSeconds: Output?
        get() = javaResource.registrationTimerInSeconds().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * An array of `slice` block as defined below. The allowed slices and the settings to use for them. The list must not contain duplicate items and must contain at least one item.
     */
    public val slices: Output>
        get() = javaResource.slices().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    networkSimPolicySliceToKotlin(args0)
                })
            })
        })

    /**
     * A mapping of tags which should be assigned to the Mobile Network Sim Policies.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * A `user_equipment_aggregate_maximum_bit_rate` block as defined below.
     */
    public val userEquipmentAggregateMaximumBitRate:
        Output
        get() = javaResource.userEquipmentAggregateMaximumBitRate().applyValue({ args0 ->
            args0.let({ args0 -> networkSimPolicyUserEquipmentAggregateMaximumBitRateToKotlin(args0) })
        })
}

public object NetworkSimPolicyMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.mobile.NetworkSimPolicy::class == javaResource::class

    override fun map(javaResource: Resource): NetworkSimPolicy = NetworkSimPolicy(
        javaResource as
            com.pulumi.azure.mobile.NetworkSimPolicy,
    )
}

/**
 * @see [NetworkSimPolicy].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [NetworkSimPolicy].
 */
public suspend fun networkSimPolicy(
    name: String,
    block: suspend NetworkSimPolicyResourceBuilder.() -> Unit,
): NetworkSimPolicy {
    val builder = NetworkSimPolicyResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [NetworkSimPolicy].
 * @param name The _unique_ name of the resulting resource.
 */
public fun networkSimPolicy(name: String): NetworkSimPolicy {
    val builder = NetworkSimPolicyResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy