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

com.pulumi.azure.iotcentral.ApplicationNetworkRuleSet Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.iotcentral;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.iotcentral.ApplicationNetworkRuleSetArgs;
import com.pulumi.azure.iotcentral.inputs.ApplicationNetworkRuleSetState;
import com.pulumi.azure.iotcentral.outputs.ApplicationNetworkRuleSetIpRule;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages an IoT Central Application Network Rule Set.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## 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 * ``` * */ @ResourceType(type="azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet") public class ApplicationNetworkRuleSet extends com.pulumi.resources.CustomResource { /** * 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` * */ @Export(name="applyToDevice", refs={Boolean.class}, tree="[0]") private Output applyToDevice; /** * @return 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` * */ public Output> applyToDevice() { return Codegen.optional(this.applyToDevice); } /** * Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`. * */ @Export(name="defaultAction", refs={String.class}, tree="[0]") private Output defaultAction; /** * @return Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`. * */ public Output> defaultAction() { return Codegen.optional(this.defaultAction); } /** * The ID of the IoT Central Application. Changing this forces a new resource to be created. * */ @Export(name="iotcentralApplicationId", refs={String.class}, tree="[0]") private Output iotcentralApplicationId; /** * @return The ID of the IoT Central Application. Changing this forces a new resource to be created. * */ public Output iotcentralApplicationId() { return this.iotcentralApplicationId; } /** * One or more `ip_rule` blocks as defined below. * */ @Export(name="ipRules", refs={List.class,ApplicationNetworkRuleSetIpRule.class}, tree="[0,1]") private Output> ipRules; /** * @return One or more `ip_rule` blocks as defined below. * */ public Output>> ipRules() { return Codegen.optional(this.ipRules); } /** * * @param name The _unique_ name of the resulting resource. */ public ApplicationNetworkRuleSet(java.lang.String name) { this(name, ApplicationNetworkRuleSetArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ApplicationNetworkRuleSet(java.lang.String name, ApplicationNetworkRuleSetArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ApplicationNetworkRuleSet(java.lang.String name, ApplicationNetworkRuleSetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ApplicationNetworkRuleSet(java.lang.String name, Output id, @Nullable ApplicationNetworkRuleSetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet", name, state, makeResourceOptions(options, id), false); } private static ApplicationNetworkRuleSetArgs makeArgs(ApplicationNetworkRuleSetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ApplicationNetworkRuleSetArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ApplicationNetworkRuleSet get(java.lang.String name, Output id, @Nullable ApplicationNetworkRuleSetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ApplicationNetworkRuleSet(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy