com.pulumi.azure.network.ExpressRouteCircuitConnection 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.ExpressRouteCircuitConnectionArgs;
import com.pulumi.azure.network.inputs.ExpressRouteCircuitConnectionState;
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.Optional;
import javax.annotation.Nullable;
/**
* Manages an Express Route Circuit Connection.
*
* ## 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.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.ExpressRouteCircuitConnection;
* import com.pulumi.azure.network.ExpressRouteCircuitConnectionArgs;
* 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 exampleExpressRoutePort = new ExpressRoutePort("exampleExpressRoutePort", ExpressRoutePortArgs.builder()
* .name("example-erport")
* .resourceGroupName(example.name())
* .location(example.location())
* .peeringLocation("Equinix-Seattle-SE2")
* .bandwidthInGbps(10)
* .encapsulation("Dot1Q")
* .build());
*
* var exampleExpressRouteCircuit = new ExpressRouteCircuit("exampleExpressRouteCircuit", ExpressRouteCircuitArgs.builder()
* .name("example-ercircuit")
* .location(example.location())
* .resourceGroupName(example.name())
* .expressRoutePortId(exampleExpressRoutePort.id())
* .bandwidthInGbps(5)
* .sku(ExpressRouteCircuitSkuArgs.builder()
* .tier("Standard")
* .family("MeteredData")
* .build())
* .build());
*
* var example2 = new ExpressRoutePort("example2", ExpressRoutePortArgs.builder()
* .name("example-erport2")
* .resourceGroupName(example.name())
* .location(example.location())
* .peeringLocation("Allied-Toronto-King-West")
* .bandwidthInGbps(10)
* .encapsulation("Dot1Q")
* .build());
*
* var example2ExpressRouteCircuit = new ExpressRouteCircuit("example2ExpressRouteCircuit", ExpressRouteCircuitArgs.builder()
* .name("example-ercircuit2")
* .location(example.location())
* .resourceGroupName(example.name())
* .expressRoutePortId(example2.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.1.0/30")
* .vlanId(100)
* .build());
*
* var example2ExpressRouteCircuitPeering = new ExpressRouteCircuitPeering("example2ExpressRouteCircuitPeering", ExpressRouteCircuitPeeringArgs.builder()
* .peeringType("AzurePrivatePeering")
* .expressRouteCircuitName(example2ExpressRouteCircuit.name())
* .resourceGroupName(example.name())
* .sharedKey("ItsASecret")
* .peerAsn(100)
* .primaryPeerAddressPrefix("192.168.1.0/30")
* .secondaryPeerAddressPrefix("192.168.1.0/30")
* .vlanId(100)
* .build());
*
* var exampleExpressRouteCircuitConnection = new ExpressRouteCircuitConnection("exampleExpressRouteCircuitConnection", ExpressRouteCircuitConnectionArgs.builder()
* .name("example-ercircuitconnection")
* .peeringId(exampleExpressRouteCircuitPeering.id())
* .peerPeeringId(example2ExpressRouteCircuitPeering.id())
* .addressPrefixIpv4("192.169.9.0/29")
* .authorizationKey("846a1918-b7a2-4917-b43c-8c4cdaee006a")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Express Route Circuit Connections can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/expressRouteCircuits/circuit1/peerings/peering1/connections/connection1
* ```
*
*/
@ResourceType(type="azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection")
public class ExpressRouteCircuitConnection extends com.pulumi.resources.CustomResource {
/**
* The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created.
*
*/
@Export(name="addressPrefixIpv4", refs={String.class}, tree="[0]")
private Output addressPrefixIpv4;
/**
* @return The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created.
*
*/
public Output addressPrefixIpv4() {
return this.addressPrefixIpv4;
}
/**
* The IPv6 address space from which to allocate customer addresses for global reach.
*
* > **NOTE:** `address_prefix_ipv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port.
*
*/
@Export(name="addressPrefixIpv6", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> addressPrefixIpv6;
/**
* @return The IPv6 address space from which to allocate customer addresses for global reach.
*
* > **NOTE:** `address_prefix_ipv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port.
*
*/
public Output> addressPrefixIpv6() {
return Codegen.optional(this.addressPrefixIpv6);
}
/**
* The authorization key which is associated with the Express Route Circuit Connection.
*
*/
@Export(name="authorizationKey", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> authorizationKey;
/**
* @return The authorization key which is associated with the Express Route Circuit Connection.
*
*/
public Output> authorizationKey() {
return Codegen.optional(this.authorizationKey);
}
/**
* The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection 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 Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created.
*
*/
@Export(name="peerPeeringId", refs={String.class}, tree="[0]")
private Output peerPeeringId;
/**
* @return The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created.
*
*/
public Output peerPeeringId() {
return this.peerPeeringId;
}
/**
* The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created.
*
*/
@Export(name="peeringId", refs={String.class}, tree="[0]")
private Output peeringId;
/**
* @return The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created.
*
*/
public Output peeringId() {
return this.peeringId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ExpressRouteCircuitConnection(java.lang.String name) {
this(name, ExpressRouteCircuitConnectionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ExpressRouteCircuitConnection(java.lang.String name, ExpressRouteCircuitConnectionArgs 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 ExpressRouteCircuitConnection(java.lang.String name, ExpressRouteCircuitConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ExpressRouteCircuitConnection(java.lang.String name, Output id, @Nullable ExpressRouteCircuitConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection", name, state, makeResourceOptions(options, id), false);
}
private static ExpressRouteCircuitConnectionArgs makeArgs(ExpressRouteCircuitConnectionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ExpressRouteCircuitConnectionArgs.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())
.additionalSecretOutputs(List.of(
"authorizationKey"
))
.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 ExpressRouteCircuitConnection get(java.lang.String name, Output id, @Nullable ExpressRouteCircuitConnectionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ExpressRouteCircuitConnection(name, id, state, options);
}
}