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

com.pulumi.azure.network.NetworkManagerConnectivityConfiguration 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.network;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.network.NetworkManagerConnectivityConfigurationArgs;
import com.pulumi.azure.network.inputs.NetworkManagerConnectivityConfigurationState;
import com.pulumi.azure.network.outputs.NetworkManagerConnectivityConfigurationAppliesToGroup;
import com.pulumi.azure.network.outputs.NetworkManagerConnectivityConfigurationHub;
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 a Network Manager Connectivity Configuration.
 * 
 * > **Note:** The `azure.network.NetworkManagerConnectivityConfiguration` deployment may modify or delete existing Network Peering resource.
 * 
 * ## 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.core.CoreFunctions;
 * import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
 * import com.pulumi.azure.network.NetworkManager;
 * import com.pulumi.azure.network.NetworkManagerArgs;
 * import com.pulumi.azure.network.inputs.NetworkManagerScopeArgs;
 * import com.pulumi.azure.network.NetworkManagerNetworkGroup;
 * import com.pulumi.azure.network.NetworkManagerNetworkGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.NetworkManagerConnectivityConfiguration;
 * import com.pulumi.azure.network.NetworkManagerConnectivityConfigurationArgs;
 * import com.pulumi.azure.network.inputs.NetworkManagerConnectivityConfigurationAppliesToGroupArgs;
 * import com.pulumi.azure.network.inputs.NetworkManagerConnectivityConfigurationHubArgs;
 * 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());
 * 
 *         final var current = CoreFunctions.getSubscription();
 * 
 *         var exampleNetworkManager = new NetworkManager("exampleNetworkManager", NetworkManagerArgs.builder()
 *             .name("example-network-manager")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .scope(NetworkManagerScopeArgs.builder()
 *                 .subscriptionIds(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
 *                 .build())
 *             .scopeAccesses(            
 *                 "Connectivity",
 *                 "SecurityAdmin")
 *             .description("example network manager")
 *             .build());
 * 
 *         var exampleNetworkManagerNetworkGroup = new NetworkManagerNetworkGroup("exampleNetworkManagerNetworkGroup", NetworkManagerNetworkGroupArgs.builder()
 *             .name("example-group")
 *             .networkManagerId(exampleNetworkManager.id())
 *             .build());
 * 
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("example-net")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .addressSpaces("10.0.0.0/16")
 *             .flowTimeoutInMinutes(10)
 *             .build());
 * 
 *         var example2 = new NetworkManagerNetworkGroup("example2", NetworkManagerNetworkGroupArgs.builder()
 *             .name("example-group2")
 *             .networkManagerId(exampleNetworkManager.id())
 *             .build());
 * 
 *         var exampleNetworkManagerConnectivityConfiguration = new NetworkManagerConnectivityConfiguration("exampleNetworkManagerConnectivityConfiguration", NetworkManagerConnectivityConfigurationArgs.builder()
 *             .name("example-connectivity-conf")
 *             .networkManagerId(exampleNetworkManager.id())
 *             .connectivityTopology("HubAndSpoke")
 *             .appliesToGroups(            
 *                 NetworkManagerConnectivityConfigurationAppliesToGroupArgs.builder()
 *                     .groupConnectivity("DirectlyConnected")
 *                     .networkGroupId(exampleNetworkManagerNetworkGroup.id())
 *                     .build(),
 *                 NetworkManagerConnectivityConfigurationAppliesToGroupArgs.builder()
 *                     .groupConnectivity("DirectlyConnected")
 *                     .networkGroupId(example2.id())
 *                     .build())
 *             .hub(NetworkManagerConnectivityConfigurationHubArgs.builder()
 *                 .resourceId(exampleVirtualNetwork.id())
 *                 .resourceType("Microsoft.Network/virtualNetworks")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Network Manager Connectivity Configuration can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/connectivityConfigurations/configuration1 * ``` * */ @ResourceType(type="azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration") public class NetworkManagerConnectivityConfiguration extends com.pulumi.resources.CustomResource { /** * One or more `applies_to_group` blocks as defined below. * */ @Export(name="appliesToGroups", refs={List.class,NetworkManagerConnectivityConfigurationAppliesToGroup.class}, tree="[0,1]") private Output> appliesToGroups; /** * @return One or more `applies_to_group` blocks as defined below. * */ public Output> appliesToGroups() { return this.appliesToGroups; } /** * Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. * */ @Export(name="connectivityTopology", refs={String.class}, tree="[0]") private Output connectivityTopology; /** * @return Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. * */ public Output connectivityTopology() { return this.connectivityTopology; } /** * Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. * */ @Export(name="deleteExistingPeeringEnabled", refs={Boolean.class}, tree="[0]") private Output deleteExistingPeeringEnabled; /** * @return Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. * */ public Output> deleteExistingPeeringEnabled() { return Codegen.optional(this.deleteExistingPeeringEnabled); } /** * A description of the Connectivity Configuration. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return A description of the Connectivity Configuration. * */ public Output> description() { return Codegen.optional(this.description); } /** * Indicates whether to global mesh is supported. Possible values are `true` and `false`. * */ @Export(name="globalMeshEnabled", refs={Boolean.class}, tree="[0]") private Output globalMeshEnabled; /** * @return Indicates whether to global mesh is supported. Possible values are `true` and `false`. * */ public Output> globalMeshEnabled() { return Codegen.optional(this.globalMeshEnabled); } /** * A `hub` block as defined below. * */ @Export(name="hub", refs={NetworkManagerConnectivityConfigurationHub.class}, tree="[0]") private Output hub; /** * @return A `hub` block as defined below. * */ public Output> hub() { return Codegen.optional(this.hub); } /** * Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. * */ public Output name() { return this.name; } /** * Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. * */ @Export(name="networkManagerId", refs={String.class}, tree="[0]") private Output networkManagerId; /** * @return Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. * */ public Output networkManagerId() { return this.networkManagerId; } /** * * @param name The _unique_ name of the resulting resource. */ public NetworkManagerConnectivityConfiguration(java.lang.String name) { this(name, NetworkManagerConnectivityConfigurationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public NetworkManagerConnectivityConfiguration(java.lang.String name, NetworkManagerConnectivityConfigurationArgs 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 NetworkManagerConnectivityConfiguration(java.lang.String name, NetworkManagerConnectivityConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private NetworkManagerConnectivityConfiguration(java.lang.String name, Output id, @Nullable NetworkManagerConnectivityConfigurationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration", name, state, makeResourceOptions(options, id), false); } private static NetworkManagerConnectivityConfigurationArgs makeArgs(NetworkManagerConnectivityConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? NetworkManagerConnectivityConfigurationArgs.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 NetworkManagerConnectivityConfiguration get(java.lang.String name, Output id, @Nullable NetworkManagerConnectivityConfigurationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new NetworkManagerConnectivityConfiguration(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy