com.pulumi.azure.network.VpnSite 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.network;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.network.VpnSiteArgs;
import com.pulumi.azure.network.inputs.VpnSiteState;
import com.pulumi.azure.network.outputs.VpnSiteLink;
import com.pulumi.azure.network.outputs.VpnSiteO365Policy;
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 a VPN Site.
*
* ## 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.network.VirtualWan;
* import com.pulumi.azure.network.VirtualWanArgs;
* import com.pulumi.azure.network.VpnSite;
* import com.pulumi.azure.network.VpnSiteArgs;
* import com.pulumi.azure.network.inputs.VpnSiteLinkArgs;
* 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 exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
* .name("example-vwan")
* .resourceGroupName(example.name())
* .location(example.location())
* .build());
*
* var exampleVpnSite = new VpnSite("exampleVpnSite", VpnSiteArgs.builder()
* .name("site1")
* .resourceGroupName(example.name())
* .location(example.location())
* .virtualWanId(exampleVirtualWan.id())
* .addressCidrs("10.0.0.0/24")
* .links(VpnSiteLinkArgs.builder()
* .name("link1")
* .ipAddress("10.0.0.1")
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* VPN Sites can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:network/vpnSite:VpnSite example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/vpnSites/site1
* ```
*
*/
@ResourceType(type="azure:network/vpnSite:VpnSite")
public class VpnSite extends com.pulumi.resources.CustomResource {
/**
* Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site.
*
* > **NOTE:** The `address_cidrs` has to be set when the `link.bgp` isn't specified.
*
*/
@Export(name="addressCidrs", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> addressCidrs;
/**
* @return Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site.
*
* > **NOTE:** The `address_cidrs` has to be set when the `link.bgp` isn't specified.
*
*/
public Output>> addressCidrs() {
return Codegen.optional(this.addressCidrs);
}
/**
* The model of the VPN device.
*
*/
@Export(name="deviceModel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> deviceModel;
/**
* @return The model of the VPN device.
*
*/
public Output> deviceModel() {
return Codegen.optional(this.deviceModel);
}
/**
* The name of the VPN device vendor.
*
*/
@Export(name="deviceVendor", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> deviceVendor;
/**
* @return The name of the VPN device vendor.
*
*/
public Output> deviceVendor() {
return Codegen.optional(this.deviceVendor);
}
/**
* One or more `link` blocks as defined below.
*
*/
@Export(name="links", refs={List.class,VpnSiteLink.class}, tree="[0,1]")
private Output* @Nullable */ List> links;
/**
* @return One or more `link` blocks as defined below.
*
*/
public Output>> links() {
return Codegen.optional(this.links);
}
/**
* The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*
*/
public Output location() {
return this.location;
}
/**
* The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created.
*
*/
public Output name() {
return this.name;
}
/**
* An `o365_policy` block as defined below.
*
*/
@Export(name="o365Policy", refs={VpnSiteO365Policy.class}, tree="[0]")
private Output o365Policy;
/**
* @return An `o365_policy` block as defined below.
*
*/
public Output o365Policy() {
return this.o365Policy;
}
/**
* The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* A mapping of tags which should be assigned to the VPN Site.
*
*/
@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 VPN Site.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created.
*
*/
@Export(name="virtualWanId", refs={String.class}, tree="[0]")
private Output virtualWanId;
/**
* @return The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created.
*
*/
public Output virtualWanId() {
return this.virtualWanId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public VpnSite(java.lang.String name) {
this(name, VpnSiteArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public VpnSite(java.lang.String name, VpnSiteArgs 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 VpnSite(java.lang.String name, VpnSiteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:network/vpnSite:VpnSite", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private VpnSite(java.lang.String name, Output id, @Nullable VpnSiteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:network/vpnSite:VpnSite", name, state, makeResourceOptions(options, id), false);
}
private static VpnSiteArgs makeArgs(VpnSiteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? VpnSiteArgs.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 VpnSite get(java.lang.String name, Output id, @Nullable VpnSiteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new VpnSite(name, id, state, options);
}
}