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

com.equinix.pulumi.metal.VirtualCircuit Maven / Gradle / Ivy

There is a newer version: 0.19.0
Show newest version
// *** 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.equinix.pulumi.metal;

import com.equinix.pulumi.Utilities;
import com.equinix.pulumi.metal.VirtualCircuitArgs;
import com.equinix.pulumi.metal.inputs.VirtualCircuitState;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Use this resource to associate VLAN with a Dedicated Port from [Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#associating-a-vlan-with-a-dedicated-port).
 * 
 * See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material.
 * 
 * ## Example Usage
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.equinix.metal.MetalFunctions;
 * import com.pulumi.equinix.metal.inputs.GetInterconnectionArgs;
 * import com.pulumi.equinix.metal.Vlan;
 * import com.pulumi.equinix.metal.VlanArgs;
 * import com.pulumi.equinix.metal.VirtualCircuit;
 * import com.pulumi.equinix.metal.VirtualCircuitArgs;
 * 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) {
 *         final var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";
 * 
 *         final var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";
 * 
 *         final var test = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder()
 *             .connectionId(connId)
 *             .build());
 * 
 *         var testVlan = new Vlan("testVlan", VlanArgs.builder()
 *             .projectId(projectId)
 *             .metro(test.applyValue(getInterconnectionResult -> getInterconnectionResult.metro()))
 *             .build());
 * 
 *         var testVirtualCircuit = new VirtualCircuit("testVirtualCircuit", VirtualCircuitArgs.builder()
 *             .connectionId(connId)
 *             .projectId(projectId)
 *             .portId(test.applyValue(getInterconnectionResult -> getInterconnectionResult.ports()[0].id()))
 *             .vlanId(testVlan.id())
 *             .nniVlan(1056)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* * ## Import * * ```sh * $ pulumi import equinix:metal/virtualCircuit:VirtualCircuit equinix_metal_virtual_circuit {existing_id} * ``` * */ @ResourceType(type="equinix:metal/virtualCircuit:VirtualCircuit") public class VirtualCircuit extends com.pulumi.resources.CustomResource { /** * UUID of Connection where the VC is scoped to. Only used for dedicated connections * */ @Export(name="connectionId", refs={String.class}, tree="[0]") private Output connectionId; /** * @return UUID of Connection where the VC is scoped to. Only used for dedicated connections * */ public Output connectionId() { return this.connectionId; } /** * The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. * */ @Export(name="customerIp", refs={String.class}, tree="[0]") private Output customerIp; /** * @return The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. * */ public Output customerIp() { return this.customerIp; } /** * The Customer IPv6 address which the CSR switch will peer with. Will default to the other usable IP in the IPv6 subnet. * */ @Export(name="customerIpv6", refs={String.class}, tree="[0]") private Output customerIpv6; /** * @return The Customer IPv6 address which the CSR switch will peer with. Will default to the other usable IP in the IPv6 subnet. * */ public Output customerIpv6() { return this.customerIpv6; } /** * Description of the Virtual Circuit resource * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Description of the Virtual Circuit resource * */ public Output> description() { return Codegen.optional(this.description); } /** * The password that can be set for the VRF BGP peer * */ @Export(name="md5", refs={String.class}, tree="[0]") private Output md5; /** * @return The password that can be set for the VRF BGP peer * */ public Output> md5() { return Codegen.optional(this.md5); } /** * The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. * */ @Export(name="metalIp", refs={String.class}, tree="[0]") private Output metalIp; /** * @return The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. * */ public Output metalIp() { return this.metalIp; } /** * The Metal IPv6 address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the IPv6 subnet. * */ @Export(name="metalIpv6", refs={String.class}, tree="[0]") private Output metalIpv6; /** * @return The Metal IPv6 address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the IPv6 subnet. * */ public Output metalIpv6() { return this.metalIpv6; } /** * Name of the Virtual Circuit resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Name of the Virtual Circuit resource * */ public Output name() { return this.name; } /** * Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel) * */ @Export(name="nniVlan", refs={Integer.class}, tree="[0]") private Output nniVlan; /** * @return Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel) * */ public Output nniVlan() { return this.nniVlan; } /** * Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/ * */ @Export(name="nniVnid", refs={Integer.class}, tree="[0]") private Output nniVnid; /** * @return Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/ * */ public Output nniVnid() { return this.nniVnid; } /** * The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the local_asn of the VRF. * */ @Export(name="peerAsn", refs={Integer.class}, tree="[0]") private Output peerAsn; /** * @return The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the local_asn of the VRF. * */ public Output> peerAsn() { return Codegen.optional(this.peerAsn); } /** * UUID of the Connection Port where the VC is scoped to * */ @Export(name="portId", refs={String.class}, tree="[0]") private Output portId; /** * @return UUID of the Connection Port where the VC is scoped to * */ public Output portId() { return this.portId; } /** * UUID of the Project where the VC is scoped to * */ @Export(name="projectId", refs={String.class}, tree="[0]") private Output projectId; /** * @return UUID of the Project where the VC is scoped to * */ public Output projectId() { return this.projectId; } /** * Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared. * */ @Export(name="speed", refs={String.class}, tree="[0]") private Output speed; /** * @return Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared. * */ public Output speed() { return this.speed; } /** * Status of the virtual circuit resource * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return Status of the virtual circuit resource * */ public Output status() { return this.status; } /** * A subnet from one of the IP blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. * * For a /31 block, it will only have two IP addresses, which will be used for the metal*ip and customer*ip. * * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. * */ @Export(name="subnet", refs={String.class}, tree="[0]") private Output subnet; /** * @return A subnet from one of the IP blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. * * For a /31 block, it will only have two IP addresses, which will be used for the metal*ip and customer*ip. * * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. * */ public Output> subnet() { return Codegen.optional(this.subnet); } /** * A subnet from one of the IPv6 blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /126 or /127. * * For a /127 block, it will only have two IP addresses, which will be used for the metal*ip and customer*ip. * * For a /126 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. * */ @Export(name="subnetIpv6", refs={String.class}, tree="[0]") private Output subnetIpv6; /** * @return A subnet from one of the IPv6 blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /126 or /127. * * For a /127 block, it will only have two IP addresses, which will be used for the metal*ip and customer*ip. * * For a /126 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. * */ public Output> subnetIpv6() { return Codegen.optional(this.subnetIpv6); } /** * Tags attached to the virtual circuit * */ @Export(name="tags", refs={List.class,String.class}, tree="[0,1]") private Output> tags; /** * @return Tags attached to the virtual circuit * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created. * */ @Export(name="virtualCircuitId", refs={String.class}, tree="[0]") private Output virtualCircuitId; /** * @return UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created. * */ public Output> virtualCircuitId() { return Codegen.optional(this.virtualCircuitId); } /** * UUID of the VLAN to associate * */ @Export(name="vlanId", refs={String.class}, tree="[0]") private Output vlanId; /** * @return UUID of the VLAN to associate * */ public Output> vlanId() { return Codegen.optional(this.vlanId); } /** * VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/ * */ @Export(name="vnid", refs={Integer.class}, tree="[0]") private Output vnid; /** * @return VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/ * */ public Output vnid() { return this.vnid; } /** * UUID of the VRF to associate * */ @Export(name="vrfId", refs={String.class}, tree="[0]") private Output vrfId; /** * @return UUID of the VRF to associate * */ public Output> vrfId() { return Codegen.optional(this.vrfId); } /** * * @param name The _unique_ name of the resulting resource. */ public VirtualCircuit(java.lang.String name) { this(name, VirtualCircuitArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public VirtualCircuit(java.lang.String name, VirtualCircuitArgs 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 VirtualCircuit(java.lang.String name, VirtualCircuitArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("equinix:metal/virtualCircuit:VirtualCircuit", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private VirtualCircuit(java.lang.String name, Output id, @Nullable VirtualCircuitState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("equinix:metal/virtualCircuit:VirtualCircuit", name, state, makeResourceOptions(options, id), false); } private static VirtualCircuitArgs makeArgs(VirtualCircuitArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? VirtualCircuitArgs.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( "md5" )) .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 VirtualCircuit get(java.lang.String name, Output id, @Nullable VirtualCircuitState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new VirtualCircuit(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy