Network Service Args
Manages a Mobile Network Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "east us",
});
const exampleNetwork = new azure.mobile.Network("example", {
name: "example-mn",
location: example.location,
resourceGroupName: example.name,
mobileCountryCode: "001",
mobileNetworkCode: "01",
});
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,
qosPolicy: {
allocationAndRetentionPriorityLevel: 9,
qosIndicator: 9,
preemptionCapability: "NotPreempt",
preemptionVulnerability: "Preemptable",
guaranteedBitRate: {
downlink: "100 Mbps",
uplink: "10 Mbps",
},
maximumBitRate: {
downlink: "1 Gbps",
uplink: "100 Mbps",
},
},
serviceDataFlowTemplates: [{
direction: "Uplink",
name: "IP-to-server",
ports: [],
protocols: ["ip"],
remoteIpLists: ["10.3.4.0/24"],
}],
}],
serviceQosPolicy: {
allocationAndRetentionPriorityLevel: 9,
qosIndicator: 9,
preemptionCapability: "NotPreempt",
preemptionVulnerability: "Preemptable",
maximumBitRate: {
downlink: "1 Gbps",
uplink: "100 Mbps",
},
},
tags: {
key: "value",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="east us")
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_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,
"qos_policy": {
"allocation_and_retention_priority_level": 9,
"qos_indicator": 9,
"preemption_capability": "NotPreempt",
"preemption_vulnerability": "Preemptable",
"guaranteed_bit_rate": {
"downlink": "100 Mbps",
"uplink": "10 Mbps",
},
"maximum_bit_rate": {
"downlink": "1 Gbps",
"uplink": "100 Mbps",
},
},
"service_data_flow_templates": [{
"direction": "Uplink",
"name": "IP-to-server",
"ports": [],
"protocols": ["ip"],
"remote_ip_lists": ["10.3.4.0/24"],
}],
}],
service_qos_policy={
"allocation_and_retention_priority_level": 9,
"qos_indicator": 9,
"preemption_capability": "NotPreempt",
"preemption_vulnerability": "Preemptable",
"maximum_bit_rate": {
"downlink": "1 Gbps",
"uplink": "100 Mbps",
},
},
tags={
"key": "value",
})
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 = "east us",
});
var exampleNetwork = new Azure.Mobile.Network("example", new()
{
Name = "example-mn",
Location = example.Location,
ResourceGroupName = example.Name,
MobileCountryCode = "001",
MobileNetworkCode = "01",
});
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,
QosPolicy = new Azure.Mobile.Inputs.NetworkServicePccRuleQosPolicyArgs
{
AllocationAndRetentionPriorityLevel = 9,
QosIndicator = 9,
PreemptionCapability = "NotPreempt",
PreemptionVulnerability = "Preemptable",
GuaranteedBitRate = new Azure.Mobile.Inputs.NetworkServicePccRuleQosPolicyGuaranteedBitRateArgs
{
Downlink = "100 Mbps",
Uplink = "10 Mbps",
},
MaximumBitRate = new Azure.Mobile.Inputs.NetworkServicePccRuleQosPolicyMaximumBitRateArgs
{
Downlink = "1 Gbps",
Uplink = "100 Mbps",
},
},
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",
},
},
},
},
},
ServiceQosPolicy = new Azure.Mobile.Inputs.NetworkServiceServiceQosPolicyArgs
{
AllocationAndRetentionPriorityLevel = 9,
QosIndicator = 9,
PreemptionCapability = "NotPreempt",
PreemptionVulnerability = "Preemptable",
MaximumBitRate = new Azure.Mobile.Inputs.NetworkServiceServiceQosPolicyMaximumBitRateArgs
{
Downlink = "1 Gbps",
Uplink = "100 Mbps",
},
},
Tags =
{
{ "key", "value" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"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 := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("east us"),
})
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
}
_, 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),
QosPolicy: &mobile.NetworkServicePccRuleQosPolicyArgs{
AllocationAndRetentionPriorityLevel: pulumi.Int(9),
QosIndicator: pulumi.Int(9),
PreemptionCapability: pulumi.String("NotPreempt"),
PreemptionVulnerability: pulumi.String("Preemptable"),
GuaranteedBitRate: &mobile.NetworkServicePccRuleQosPolicyGuaranteedBitRateArgs{
Downlink: pulumi.String("100 Mbps"),
Uplink: pulumi.String("10 Mbps"),
},
MaximumBitRate: &mobile.NetworkServicePccRuleQosPolicyMaximumBitRateArgs{
Downlink: pulumi.String("1 Gbps"),
Uplink: pulumi.String("100 Mbps"),
},
},
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"),
},
},
},
},
},
ServiceQosPolicy: &mobile.NetworkServiceServiceQosPolicyArgs{
AllocationAndRetentionPriorityLevel: pulumi.Int(9),
QosIndicator: pulumi.Int(9),
PreemptionCapability: pulumi.String("NotPreempt"),
PreemptionVulnerability: pulumi.String("Preemptable"),
MaximumBitRate: &mobile.NetworkServiceServiceQosPolicyMaximumBitRateArgs{
Downlink: pulumi.String("1 Gbps"),
Uplink: pulumi.String("100 Mbps"),
},
},
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
},
})
if err != nil {
return err
}
return nil
})
}
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.NetworkService;
import com.pulumi.azure.mobile.NetworkServiceArgs;
import com.pulumi.azure.mobile.inputs.NetworkServicePccRuleArgs;
import com.pulumi.azure.mobile.inputs.NetworkServicePccRuleQosPolicyArgs;
import com.pulumi.azure.mobile.inputs.NetworkServicePccRuleQosPolicyGuaranteedBitRateArgs;
import com.pulumi.azure.mobile.inputs.NetworkServicePccRuleQosPolicyMaximumBitRateArgs;
import com.pulumi.azure.mobile.inputs.NetworkServiceServiceQosPolicyArgs;
import com.pulumi.azure.mobile.inputs.NetworkServiceServiceQosPolicyMaximumBitRateArgs;
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("east us")
.build());
var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.name("example-mn")
.location(example.location())
.resourceGroupName(example.name())
.mobileCountryCode("001")
.mobileNetworkCode("01")
.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)
.qosPolicy(NetworkServicePccRuleQosPolicyArgs.builder()
.allocationAndRetentionPriorityLevel(9)
.qosIndicator(9)
.preemptionCapability("NotPreempt")
.preemptionVulnerability("Preemptable")
.guaranteedBitRate(NetworkServicePccRuleQosPolicyGuaranteedBitRateArgs.builder()
.downlink("100 Mbps")
.uplink("10 Mbps")
.build())
.maximumBitRate(NetworkServicePccRuleQosPolicyMaximumBitRateArgs.builder()
.downlink("1 Gbps")
.uplink("100 Mbps")
.build())
.build())
.serviceDataFlowTemplates(NetworkServicePccRuleServiceDataFlowTemplateArgs.builder()
.direction("Uplink")
.name("IP-to-server")
.ports()
.protocols("ip")
.remoteIpLists("10.3.4.0/24")
.build())
.build())
.serviceQosPolicy(NetworkServiceServiceQosPolicyArgs.builder()
.allocationAndRetentionPriorityLevel(9)
.qosIndicator(9)
.preemptionCapability("NotPreempt")
.preemptionVulnerability("Preemptable")
.maximumBitRate(NetworkServiceServiceQosPolicyMaximumBitRateArgs.builder()
.downlink("1 Gbps")
.uplink("100 Mbps")
.build())
.build())
.tags(Map.of("key", "value"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: east us
exampleNetwork:
type: azure:mobile:Network
name: example
properties:
name: example-mn
location: ${example.location}
resourceGroupName: ${example.name}
mobileCountryCode: '001'
mobileNetworkCode: '01'
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
qosPolicy:
allocationAndRetentionPriorityLevel: 9
qosIndicator: 9
preemptionCapability: NotPreempt
preemptionVulnerability: Preemptable
guaranteedBitRate:
downlink: 100 Mbps
uplink: 10 Mbps
maximumBitRate:
downlink: 1 Gbps
uplink: 100 Mbps
serviceDataFlowTemplates:
- direction: Uplink
name: IP-to-server
ports: []
protocols:
- ip
remoteIpLists:
- 10.3.4.0/24
serviceQosPolicy:
allocationAndRetentionPriorityLevel: 9
qosIndicator: 9
preemptionCapability: NotPreempt
preemptionVulnerability: Preemptable
maximumBitRate:
downlink: 1 Gbps
uplink: 100 Mbps
tags:
key: value
API Providers
This resource uses the following Azure API Providers:
Microsoft.MobileNetwork
: 2022-11-01
Import
Mobile Network Service can be imported using the resource id
, e.g.
$ pulumi import azure:mobile/networkService:NetworkService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.MobileNetwork/mobileNetworks/mobileNetwork1/services/service1
Constructors
Properties
Specifies the ID of the Mobile Network Service. Changing this forces a new Mobile Network Service to be created.
A pcc_rule
block as defined below. The set of PCC Rules that make up this service.
A precedence value that is used to decide between services when identifying the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique among all services configured in the mobile network. Must be between 0
and 255
.
A service_qos_policy
block as defined below. The QoS policy to use for packets matching this service. This can be overridden for particular flows using the ruleQosPolicy field in a pcc_rule
. If this field is not specified then the sim_policy
of User Equipment (UE) will define the QoS settings.