com.pulumi.azure.stack.HciLogicalNetwork Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.stack;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.stack.HciLogicalNetworkArgs;
import com.pulumi.azure.stack.inputs.HciLogicalNetworkState;
import com.pulumi.azure.stack.outputs.HciLogicalNetworkSubnet;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages an Azure Stack HCI Logical Network.
*
* ## 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.stack.HciLogicalNetwork;
* import com.pulumi.azure.stack.HciLogicalNetworkArgs;
* import com.pulumi.azure.stack.inputs.HciLogicalNetworkSubnetArgs;
* 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-rg")
* .location("West Europe")
* .build());
*
* var exampleHciLogicalNetwork = new HciLogicalNetwork("exampleHciLogicalNetwork", HciLogicalNetworkArgs.builder()
* .name("example-hci-ln")
* .resourceGroupName(example.name())
* .location(example.location())
* .customLocationId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/cl1")
* .virtualSwitchName("ConvergedSwitch(managementcompute)")
* .dnsServers(
* "10.0.0.7",
* "10.0.0.8")
* .subnet(HciLogicalNetworkSubnetArgs.builder()
* .ipAllocationMethod("Static")
* .addressPrefix("10.0.0.0/24")
* .routes(HciLogicalNetworkSubnetRouteArgs.builder()
* .name("example-route")
* .addressPrefix("0.0.0.0/0")
* .nextHopIpAddress("10.0.20.1")
* .build())
* .vlanId(123)
* .build())
* .tags(Map.of("foo", "bar"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Azure Stack HCI Logical Networks can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:stack/hciLogicalNetwork:HciLogicalNetwork example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AzureStackHCI/logicalNetworks/ln1
* ```
*
*/
@ResourceType(type="azure:stack/hciLogicalNetwork:HciLogicalNetwork")
public class HciLogicalNetwork extends com.pulumi.resources.CustomResource {
/**
* The ID of Custom Location where the Azure Stack HCI Logical Network should exist. Changing this forces a new resource to be created.
*
*/
@Export(name="customLocationId", refs={String.class}, tree="[0]")
private Output customLocationId;
/**
* @return The ID of Custom Location where the Azure Stack HCI Logical Network should exist. Changing this forces a new resource to be created.
*
*/
public Output customLocationId() {
return this.customLocationId;
}
/**
* A list of IPv4 addresses of DNS servers available to VMs deployed in the Logical Networks. Changing this forces a new resource to be created.
*
*/
@Export(name="dnsServers", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> dnsServers;
/**
* @return A list of IPv4 addresses of DNS servers available to VMs deployed in the Logical Networks. Changing this forces a new resource to be created.
*
*/
public Output>> dnsServers() {
return Codegen.optional(this.dnsServers);
}
/**
* The Azure Region where the Azure Stack HCI Logical Network should exist. Changing this forces a new resource to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The Azure Region where the Azure Stack HCI Logical Network should exist. Changing this forces a new resource to be created.
*
*/
public Output location() {
return this.location;
}
/**
* The name which should be used for this Azure Stack HCI Logical Network. Changing this forces a new resource to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Azure Stack HCI Logical Network. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The name of the Resource Group where the Azure Stack HCI Logical Network should exist. Changing this forces a new resource to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the Resource Group where the Azure Stack HCI Logical Network should exist. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* A `subnet` block as defined below. Changing this forces a new resource to be created.
*
*/
@Export(name="subnet", refs={HciLogicalNetworkSubnet.class}, tree="[0]")
private Output subnet;
/**
* @return A `subnet` block as defined below. Changing this forces a new resource to be created.
*
*/
public Output subnet() {
return this.subnet;
}
/**
* A mapping of tags which should be assigned to the Azure Stack HCI Logical Network.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags which should be assigned to the Azure Stack HCI Logical Network.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* The name of the virtual switch on the cluster used to associate with the Azure Stack HCI Logical Network. Possible switch names can be retrieved by following this [Azure guide](https://learn.microsoft.com/azure-stack/hci/manage/create-logical-networks?tabs=azurecli#prerequisites). Changing this forces a new resource to be created.
*
*/
@Export(name="virtualSwitchName", refs={String.class}, tree="[0]")
private Output virtualSwitchName;
/**
* @return The name of the virtual switch on the cluster used to associate with the Azure Stack HCI Logical Network. Possible switch names can be retrieved by following this [Azure guide](https://learn.microsoft.com/azure-stack/hci/manage/create-logical-networks?tabs=azurecli#prerequisites). Changing this forces a new resource to be created.
*
*/
public Output virtualSwitchName() {
return this.virtualSwitchName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public HciLogicalNetwork(java.lang.String name) {
this(name, HciLogicalNetworkArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public HciLogicalNetwork(java.lang.String name, HciLogicalNetworkArgs 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 HciLogicalNetwork(java.lang.String name, HciLogicalNetworkArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:stack/hciLogicalNetwork:HciLogicalNetwork", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private HciLogicalNetwork(java.lang.String name, Output id, @Nullable HciLogicalNetworkState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:stack/hciLogicalNetwork:HciLogicalNetwork", name, state, makeResourceOptions(options, id), false);
}
private static HciLogicalNetworkArgs makeArgs(HciLogicalNetworkArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? HciLogicalNetworkArgs.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 HciLogicalNetwork get(java.lang.String name, Output id, @Nullable HciLogicalNetworkState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new HciLogicalNetwork(name, id, state, options);
}
}