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

com.pulumi.azurenative.servicebus.NamespaceNetworkRuleSet Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** 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.azurenative.servicebus;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.servicebus.NamespaceNetworkRuleSetArgs;
import com.pulumi.azurenative.servicebus.outputs.NWRuleSetIpRulesResponse;
import com.pulumi.azurenative.servicebus.outputs.NWRuleSetVirtualNetworkRulesResponse;
import com.pulumi.azurenative.servicebus.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
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;

/**
 * Description of NetworkRuleSet resource.
 * Azure REST API version: 2022-01-01-preview. Prior API version in Azure Native 1.x: 2017-04-01.
 * 
 * Other available API versions: 2022-10-01-preview, 2023-01-01-preview, 2024-01-01.
 * 
 * ## Example Usage
 * ### NameSpaceNetworkRuleSetCreate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.servicebus.NamespaceNetworkRuleSet;
 * import com.pulumi.azurenative.servicebus.NamespaceNetworkRuleSetArgs;
 * import com.pulumi.azurenative.servicebus.inputs.NWRuleSetIpRulesArgs;
 * import com.pulumi.azurenative.servicebus.inputs.NWRuleSetVirtualNetworkRulesArgs;
 * import com.pulumi.azurenative.servicebus.inputs.SubnetArgs;
 * 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 namespaceNetworkRuleSet = new NamespaceNetworkRuleSet("namespaceNetworkRuleSet", NamespaceNetworkRuleSetArgs.builder()
 *             .defaultAction("Deny")
 *             .ipRules(            
 *                 NWRuleSetIpRulesArgs.builder()
 *                     .action("Allow")
 *                     .ipMask("1.1.1.1")
 *                     .build(),
 *                 NWRuleSetIpRulesArgs.builder()
 *                     .action("Allow")
 *                     .ipMask("1.1.1.2")
 *                     .build(),
 *                 NWRuleSetIpRulesArgs.builder()
 *                     .action("Allow")
 *                     .ipMask("1.1.1.3")
 *                     .build(),
 *                 NWRuleSetIpRulesArgs.builder()
 *                     .action("Allow")
 *                     .ipMask("1.1.1.4")
 *                     .build(),
 *                 NWRuleSetIpRulesArgs.builder()
 *                     .action("Allow")
 *                     .ipMask("1.1.1.5")
 *                     .build())
 *             .namespaceName("sdk-Namespace-6019")
 *             .resourceGroupName("ResourceGroup")
 *             .virtualNetworkRules(            
 *                 NWRuleSetVirtualNetworkRulesArgs.builder()
 *                     .ignoreMissingVnetServiceEndpoint(true)
 *                     .subnet(SubnetArgs.builder()
 *                         .id("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2")
 *                         .build())
 *                     .build(),
 *                 NWRuleSetVirtualNetworkRulesArgs.builder()
 *                     .ignoreMissingVnetServiceEndpoint(false)
 *                     .subnet(SubnetArgs.builder()
 *                         .id("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3")
 *                         .build())
 *                     .build(),
 *                 NWRuleSetVirtualNetworkRulesArgs.builder()
 *                     .ignoreMissingVnetServiceEndpoint(false)
 *                     .subnet(SubnetArgs.builder()
 *                         .id("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6")
 *                         .build())
 *                     .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:servicebus:NamespaceNetworkRuleSet default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default * ``` * */ @ResourceType(type="azure-native:servicebus:NamespaceNetworkRuleSet") public class NamespaceNetworkRuleSet extends com.pulumi.resources.CustomResource { /** * Default Action for Network Rule Set * */ @Export(name="defaultAction", refs={String.class}, tree="[0]") private Output defaultAction; /** * @return Default Action for Network Rule Set * */ public Output> defaultAction() { return Codegen.optional(this.defaultAction); } /** * List of IpRules * */ @Export(name="ipRules", refs={List.class,NWRuleSetIpRulesResponse.class}, tree="[0,1]") private Output> ipRules; /** * @return List of IpRules * */ public Output>> ipRules() { return Codegen.optional(this.ipRules); } /** * The geo-location where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The geo-location where the resource lives * */ public Output location() { return this.location; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * This determines if traffic is allowed over public network. By default it is enabled. * */ @Export(name="publicNetworkAccess", refs={String.class}, tree="[0]") private Output publicNetworkAccess; /** * @return This determines if traffic is allowed over public network. By default it is enabled. * */ public Output> publicNetworkAccess() { return Codegen.optional(this.publicNetworkAccess); } /** * The system meta data relating to this resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return The system meta data relating to this resource. * */ public Output systemData() { return this.systemData; } /** * Value that indicates whether Trusted Service Access is Enabled or not. * */ @Export(name="trustedServiceAccessEnabled", refs={Boolean.class}, tree="[0]") private Output trustedServiceAccessEnabled; /** * @return Value that indicates whether Trusted Service Access is Enabled or not. * */ public Output> trustedServiceAccessEnabled() { return Codegen.optional(this.trustedServiceAccessEnabled); } /** * The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" * */ public Output type() { return this.type; } /** * List VirtualNetwork Rules * */ @Export(name="virtualNetworkRules", refs={List.class,NWRuleSetVirtualNetworkRulesResponse.class}, tree="[0,1]") private Output> virtualNetworkRules; /** * @return List VirtualNetwork Rules * */ public Output>> virtualNetworkRules() { return Codegen.optional(this.virtualNetworkRules); } /** * * @param name The _unique_ name of the resulting resource. */ public NamespaceNetworkRuleSet(java.lang.String name) { this(name, NamespaceNetworkRuleSetArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public NamespaceNetworkRuleSet(java.lang.String name, NamespaceNetworkRuleSetArgs 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 NamespaceNetworkRuleSet(java.lang.String name, NamespaceNetworkRuleSetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:servicebus:NamespaceNetworkRuleSet", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private NamespaceNetworkRuleSet(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:servicebus:NamespaceNetworkRuleSet", name, null, makeResourceOptions(options, id), false); } private static NamespaceNetworkRuleSetArgs makeArgs(NamespaceNetworkRuleSetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? NamespaceNetworkRuleSetArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:servicebus/v20170401:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20180101preview:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20210101preview:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20210601preview:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20211101:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20220101preview:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20221001preview:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20230101preview:NamespaceNetworkRuleSet").build()), Output.of(Alias.builder().type("azure-native:servicebus/v20240101:NamespaceNetworkRuleSet").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static NamespaceNetworkRuleSet get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new NamespaceNetworkRuleSet(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy