![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.iotcentral.kotlin.ApplicationNetworkRuleSetArgs.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.iotcentral.kotlin
import com.pulumi.azure.iotcentral.ApplicationNetworkRuleSetArgs.builder
import com.pulumi.azure.iotcentral.kotlin.inputs.ApplicationNetworkRuleSetIpRuleArgs
import com.pulumi.azure.iotcentral.kotlin.inputs.ApplicationNetworkRuleSetIpRuleArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Manages an IoT Central Application Network Rule Set.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resource",
* location: "West Europe",
* });
* const exampleApplication = new azure.iotcentral.Application("example", {
* name: "example-iotcentral-app",
* resourceGroupName: example.name,
* location: example.location,
* subDomain: "example-iotcentral-app-subdomain",
* displayName: "example-iotcentral-app-display-name",
* sku: "ST1",
* tags: {
* Foo: "Bar",
* },
* });
* const exampleApplicationNetworkRuleSet = new azure.iotcentral.ApplicationNetworkRuleSet("example", {
* iotcentralApplicationId: exampleApplication.id,
* ipRules: [
* {
* name: "rule1",
* ipMask: "10.0.1.0/24",
* },
* {
* name: "rule2",
* ipMask: "10.1.1.0/24",
* },
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resource",
* location="West Europe")
* example_application = azure.iotcentral.Application("example",
* name="example-iotcentral-app",
* resource_group_name=example.name,
* location=example.location,
* sub_domain="example-iotcentral-app-subdomain",
* display_name="example-iotcentral-app-display-name",
* sku="ST1",
* tags={
* "Foo": "Bar",
* })
* example_application_network_rule_set = azure.iotcentral.ApplicationNetworkRuleSet("example",
* iotcentral_application_id=example_application.id,
* ip_rules=[
* {
* "name": "rule1",
* "ip_mask": "10.0.1.0/24",
* },
* {
* "name": "rule2",
* "ip_mask": "10.1.1.0/24",
* },
* ])
* ```
* ```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-resource",
* Location = "West Europe",
* });
* var exampleApplication = new Azure.IotCentral.Application("example", new()
* {
* Name = "example-iotcentral-app",
* ResourceGroupName = example.Name,
* Location = example.Location,
* SubDomain = "example-iotcentral-app-subdomain",
* DisplayName = "example-iotcentral-app-display-name",
* Sku = "ST1",
* Tags =
* {
* { "Foo", "Bar" },
* },
* });
* var exampleApplicationNetworkRuleSet = new Azure.IotCentral.ApplicationNetworkRuleSet("example", new()
* {
* IotcentralApplicationId = exampleApplication.Id,
* IpRules = new[]
* {
* new Azure.IotCentral.Inputs.ApplicationNetworkRuleSetIpRuleArgs
* {
* Name = "rule1",
* IpMask = "10.0.1.0/24",
* },
* new Azure.IotCentral.Inputs.ApplicationNetworkRuleSetIpRuleArgs
* {
* Name = "rule2",
* IpMask = "10.1.1.0/24",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iotcentral"
* "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-resource"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleApplication, err := iotcentral.NewApplication(ctx, "example", &iotcentral.ApplicationArgs{
* Name: pulumi.String("example-iotcentral-app"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* SubDomain: pulumi.String("example-iotcentral-app-subdomain"),
* DisplayName: pulumi.String("example-iotcentral-app-display-name"),
* Sku: pulumi.String("ST1"),
* Tags: pulumi.StringMap{
* "Foo": pulumi.String("Bar"),
* },
* })
* if err != nil {
* return err
* }
* _, err = iotcentral.NewApplicationNetworkRuleSet(ctx, "example", &iotcentral.ApplicationNetworkRuleSetArgs{
* IotcentralApplicationId: exampleApplication.ID(),
* IpRules: iotcentral.ApplicationNetworkRuleSetIpRuleArray{
* &iotcentral.ApplicationNetworkRuleSetIpRuleArgs{
* Name: pulumi.String("rule1"),
* IpMask: pulumi.String("10.0.1.0/24"),
* },
* &iotcentral.ApplicationNetworkRuleSetIpRuleArgs{
* Name: pulumi.String("rule2"),
* IpMask: pulumi.String("10.1.1.0/24"),
* },
* },
* })
* 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.iotcentral.Application;
* import com.pulumi.azure.iotcentral.ApplicationArgs;
* import com.pulumi.azure.iotcentral.ApplicationNetworkRuleSet;
* import com.pulumi.azure.iotcentral.ApplicationNetworkRuleSetArgs;
* import com.pulumi.azure.iotcentral.inputs.ApplicationNetworkRuleSetIpRuleArgs;
* 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-resource")
* .location("West Europe")
* .build());
* var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
* .name("example-iotcentral-app")
* .resourceGroupName(example.name())
* .location(example.location())
* .subDomain("example-iotcentral-app-subdomain")
* .displayName("example-iotcentral-app-display-name")
* .sku("ST1")
* .tags(Map.of("Foo", "Bar"))
* .build());
* var exampleApplicationNetworkRuleSet = new ApplicationNetworkRuleSet("exampleApplicationNetworkRuleSet", ApplicationNetworkRuleSetArgs.builder()
* .iotcentralApplicationId(exampleApplication.id())
* .ipRules(
* ApplicationNetworkRuleSetIpRuleArgs.builder()
* .name("rule1")
* .ipMask("10.0.1.0/24")
* .build(),
* ApplicationNetworkRuleSetIpRuleArgs.builder()
* .name("rule2")
* .ipMask("10.1.1.0/24")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resource
* location: West Europe
* exampleApplication:
* type: azure:iotcentral:Application
* name: example
* properties:
* name: example-iotcentral-app
* resourceGroupName: ${example.name}
* location: ${example.location}
* subDomain: example-iotcentral-app-subdomain
* displayName: example-iotcentral-app-display-name
* sku: ST1
* tags:
* Foo: Bar
* exampleApplicationNetworkRuleSet:
* type: azure:iotcentral:ApplicationNetworkRuleSet
* name: example
* properties:
* iotcentralApplicationId: ${exampleApplication.id}
* ipRules:
* - name: rule1
* ipMask: 10.0.1.0/24
* - name: rule2
* ipMask: 10.1.1.0/24
* ```
*
* ## Import
* IoT Central Application Network Rule Sets can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.IoTCentral/iotApps/app1
* ```
* @property applyToDevice Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
* @property defaultAction Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
* @property iotcentralApplicationId The ID of the IoT Central Application. Changing this forces a new resource to be created.
* @property ipRules One or more `ip_rule` blocks as defined below.
*/
public data class ApplicationNetworkRuleSetArgs(
public val applyToDevice: Output? = null,
public val defaultAction: Output? = null,
public val iotcentralApplicationId: Output? = null,
public val ipRules: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.iotcentral.ApplicationNetworkRuleSetArgs =
com.pulumi.azure.iotcentral.ApplicationNetworkRuleSetArgs.builder()
.applyToDevice(applyToDevice?.applyValue({ args0 -> args0 }))
.defaultAction(defaultAction?.applyValue({ args0 -> args0 }))
.iotcentralApplicationId(iotcentralApplicationId?.applyValue({ args0 -> args0 }))
.ipRules(
ipRules?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [ApplicationNetworkRuleSetArgs].
*/
@PulumiTagMarker
public class ApplicationNetworkRuleSetArgsBuilder internal constructor() {
private var applyToDevice: Output? = null
private var defaultAction: Output? = null
private var iotcentralApplicationId: Output? = null
private var ipRules: Output>? = null
/**
* @param value Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
*/
@JvmName("dftvecvdocgbihyu")
public suspend fun applyToDevice(`value`: Output) {
this.applyToDevice = value
}
/**
* @param value Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
*/
@JvmName("degnkyguueeajhgb")
public suspend fun defaultAction(`value`: Output) {
this.defaultAction = value
}
/**
* @param value The ID of the IoT Central Application. Changing this forces a new resource to be created.
*/
@JvmName("jbagkoaghktnmogv")
public suspend fun iotcentralApplicationId(`value`: Output) {
this.iotcentralApplicationId = value
}
/**
* @param value One or more `ip_rule` blocks as defined below.
*/
@JvmName("lgtwawdpwxungcmd")
public suspend fun ipRules(`value`: Output>) {
this.ipRules = value
}
@JvmName("exlhaynnamfofffx")
public suspend fun ipRules(vararg values: Output) {
this.ipRules = Output.all(values.asList())
}
/**
* @param values One or more `ip_rule` blocks as defined below.
*/
@JvmName("yhgstewgxxnjsapk")
public suspend fun ipRules(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy