com.pulumi.azure.network.ExpressRouteConnection 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.ExpressRouteConnectionArgs;
import com.pulumi.azure.network.inputs.ExpressRouteConnectionState;
import com.pulumi.azure.network.outputs.ExpressRouteConnectionRouting;
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.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages an Express Route Connection.
*
* > **NOTE:** The provider status of the Express Route Circuit must be set as provisioned while creating the Express Route Connection. See more details [here](https://docs.microsoft.com/azure/expressroute/expressroute-howto-circuit-portal-resource-manager#send-the-service-key-to-your-connectivity-provider-for-provisioning).
*
* ## 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.VirtualHub;
* import com.pulumi.azure.network.VirtualHubArgs;
* import com.pulumi.azure.network.ExpressRouteGateway;
* import com.pulumi.azure.network.ExpressRouteGatewayArgs;
* import com.pulumi.azure.network.ExpressRoutePort;
* import com.pulumi.azure.network.ExpressRoutePortArgs;
* import com.pulumi.azure.network.ExpressRouteCircuit;
* import com.pulumi.azure.network.ExpressRouteCircuitArgs;
* import com.pulumi.azure.network.inputs.ExpressRouteCircuitSkuArgs;
* import com.pulumi.azure.network.ExpressRouteCircuitPeering;
* import com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs;
* import com.pulumi.azure.network.ExpressRouteConnection;
* import com.pulumi.azure.network.ExpressRouteConnectionArgs;
* 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());
*
* var exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
* .name("example-vwan")
* .resourceGroupName(example.name())
* .location(example.location())
* .build());
*
* var exampleVirtualHub = new VirtualHub("exampleVirtualHub", VirtualHubArgs.builder()
* .name("example-vhub")
* .resourceGroupName(example.name())
* .location(example.location())
* .virtualWanId(exampleVirtualWan.id())
* .addressPrefix("10.0.1.0/24")
* .build());
*
* var exampleExpressRouteGateway = new ExpressRouteGateway("exampleExpressRouteGateway", ExpressRouteGatewayArgs.builder()
* .name("example-expressroutegateway")
* .resourceGroupName(example.name())
* .location(example.location())
* .virtualHubId(exampleVirtualHub.id())
* .scaleUnits(1)
* .build());
*
* var exampleExpressRoutePort = new ExpressRoutePort("exampleExpressRoutePort", ExpressRoutePortArgs.builder()
* .name("example-erp")
* .resourceGroupName(example.name())
* .location(example.location())
* .peeringLocation("Equinix-Seattle-SE2")
* .bandwidthInGbps(10)
* .encapsulation("Dot1Q")
* .build());
*
* var exampleExpressRouteCircuit = new ExpressRouteCircuit("exampleExpressRouteCircuit", ExpressRouteCircuitArgs.builder()
* .name("example-erc")
* .location(example.location())
* .resourceGroupName(example.name())
* .expressRoutePortId(exampleExpressRoutePort.id())
* .bandwidthInGbps(5)
* .sku(ExpressRouteCircuitSkuArgs.builder()
* .tier("Standard")
* .family("MeteredData")
* .build())
* .build());
*
* var exampleExpressRouteCircuitPeering = new ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering", ExpressRouteCircuitPeeringArgs.builder()
* .peeringType("AzurePrivatePeering")
* .expressRouteCircuitName(exampleExpressRouteCircuit.name())
* .resourceGroupName(example.name())
* .sharedKey("ItsASecret")
* .peerAsn(100)
* .primaryPeerAddressPrefix("192.168.1.0/30")
* .secondaryPeerAddressPrefix("192.168.2.0/30")
* .vlanId(100)
* .build());
*
* var exampleExpressRouteConnection = new ExpressRouteConnection("exampleExpressRouteConnection", ExpressRouteConnectionArgs.builder()
* .name("example-expressrouteconn")
* .expressRouteGatewayId(exampleExpressRouteGateway.id())
* .expressRouteCircuitPeeringId(exampleExpressRouteCircuitPeering.id())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Express Route Connections can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:network/expressRouteConnection:ExpressRouteConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/expressRouteGateways/expressRouteGateway1/expressRouteConnections/connection1
* ```
*
*/
@ResourceType(type="azure:network/expressRouteConnection:ExpressRouteConnection")
public class ExpressRouteConnection extends com.pulumi.resources.CustomResource {
/**
* The authorization key to establish the Express Route Connection.
*
*/
@Export(name="authorizationKey", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> authorizationKey;
/**
* @return The authorization key to establish the Express Route Connection.
*
*/
public Output> authorizationKey() {
return Codegen.optional(this.authorizationKey);
}
/**
* Is Internet security enabled for this Express Route Connection?
*
*/
@Export(name="enableInternetSecurity", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enableInternetSecurity;
/**
* @return Is Internet security enabled for this Express Route Connection?
*
*/
public Output> enableInternetSecurity() {
return Codegen.optional(this.enableInternetSecurity);
}
/**
* The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
*
*/
@Export(name="expressRouteCircuitPeeringId", refs={String.class}, tree="[0]")
private Output expressRouteCircuitPeeringId;
/**
* @return The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created.
*
*/
public Output expressRouteCircuitPeeringId() {
return this.expressRouteCircuitPeeringId;
}
/**
* Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`.
*
*/
@Export(name="expressRouteGatewayBypassEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> expressRouteGatewayBypassEnabled;
/**
* @return Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`.
*
*/
public Output> expressRouteGatewayBypassEnabled() {
return Codegen.optional(this.expressRouteGatewayBypassEnabled);
}
/**
* The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
*
*/
@Export(name="expressRouteGatewayId", refs={String.class}, tree="[0]")
private Output expressRouteGatewayId;
/**
* @return The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created.
*
*/
public Output expressRouteGatewayId() {
return this.expressRouteGatewayId;
}
/**
* The name which should be used for this Express Route Connection. 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 Express Route Connection. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* Bypass the Express Route gateway when accessing private-links. When enabled `express_route_gateway_bypass_enabled` must be set to `true`.
*
*/
@Export(name="privateLinkFastPathEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> privateLinkFastPathEnabled;
/**
* @return Bypass the Express Route gateway when accessing private-links. When enabled `express_route_gateway_bypass_enabled` must be set to `true`.
*
*/
public Output> privateLinkFastPathEnabled() {
return Codegen.optional(this.privateLinkFastPathEnabled);
}
/**
* A `routing` block as defined below.
*
*/
@Export(name="routing", refs={ExpressRouteConnectionRouting.class}, tree="[0]")
private Output routing;
/**
* @return A `routing` block as defined below.
*
*/
public Output routing() {
return this.routing;
}
/**
* The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`.
*
*/
@Export(name="routingWeight", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> routingWeight;
/**
* @return The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`.
*
*/
public Output> routingWeight() {
return Codegen.optional(this.routingWeight);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ExpressRouteConnection(java.lang.String name) {
this(name, ExpressRouteConnectionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ExpressRouteConnection(java.lang.String name, ExpressRouteConnectionArgs 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 ExpressRouteConnection(java.lang.String name, ExpressRouteConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:network/expressRouteConnection:ExpressRouteConnection", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ExpressRouteConnection(java.lang.String name, Output id, @Nullable ExpressRouteConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:network/expressRouteConnection:ExpressRouteConnection", name, state, makeResourceOptions(options, id), false);
}
private static ExpressRouteConnectionArgs makeArgs(ExpressRouteConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ExpressRouteConnectionArgs.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 ExpressRouteConnection get(java.lang.String name, Output id, @Nullable ExpressRouteConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ExpressRouteConnection(name, id, state, options);
}
}