com.equinix.pulumi.metal.Port Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of equinix Show documentation
Show all versions of equinix Show documentation
A Pulumi package for creating and managing equinix cloud resources.
// *** 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.PortArgs;
import com.equinix.pulumi.metal.inputs.PortState;
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.List;
import java.util.Optional;
import javax.annotation.Nullable;
@ResourceType(type="equinix:metal/port:Port")
public class Port extends com.pulumi.resources.CustomResource {
/**
* UUID of the bond port.
*
*/
@Export(name="bondId", refs={String.class}, tree="[0]")
private Output bondId;
/**
* @return UUID of the bond port.
*
*/
public Output bondId() {
return this.bondId;
}
/**
* Name of the bond port.
*
*/
@Export(name="bondName", refs={String.class}, tree="[0]")
private Output bondName;
/**
* @return Name of the bond port.
*
*/
public Output bondName() {
return this.bondName;
}
/**
* Whether the port should be bonded.
*
*/
@Export(name="bonded", refs={Boolean.class}, tree="[0]")
private Output bonded;
/**
* @return Whether the port should be bonded.
*
*/
public Output bonded() {
return this.bonded;
}
/**
* Flag indicating whether the port can be removed from a bond.
*
*/
@Export(name="disbondSupported", refs={Boolean.class}, tree="[0]")
private Output disbondSupported;
/**
* @return Flag indicating whether the port can be removed from a bond.
*
*/
public Output disbondSupported() {
return this.disbondSupported;
}
/**
* Whether to put the port to Layer 2 mode, valid only for bond ports.
*
*/
@Export(name="layer2", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> layer2;
/**
* @return Whether to put the port to Layer 2 mode, valid only for bond ports.
*
*/
public Output> layer2() {
return Codegen.optional(this.layer2);
}
/**
* MAC address of the port.
*
*/
@Export(name="mac", refs={String.class}, tree="[0]")
private Output mac;
/**
* @return MAC address of the port.
*
*/
public Output mac() {
return this.mac;
}
/**
* Name of the port, e.g. `bond0` or `eth0`.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Name of the port, e.g. `bond0` or `eth0`.
*
*/
public Output name() {
return this.name;
}
/**
* UUID of a VLAN to assign as a native VLAN. It must be one of attached VLANs (from `vlan_ids` parameter).
*
*/
@Export(name="nativeVlanId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> nativeVlanId;
/**
* @return UUID of a VLAN to assign as a native VLAN. It must be one of attached VLANs (from `vlan_ids` parameter).
*
*/
public Output> nativeVlanId() {
return Codegen.optional(this.nativeVlanId);
}
/**
* One of layer2-bonded, layer2-individual, layer3, hybrid and hybrid-bonded. This attribute is only set on bond ports.
*
*/
@Export(name="networkType", refs={String.class}, tree="[0]")
private Output networkType;
/**
* @return One of layer2-bonded, layer2-individual, layer3, hybrid and hybrid-bonded. This attribute is only set on bond ports.
*
*/
public Output networkType() {
return this.networkType;
}
/**
* ID of the port to read.
*
*/
@Export(name="portId", refs={String.class}, tree="[0]")
private Output portId;
/**
* @return ID of the port to read.
*
*/
public Output portId() {
return this.portId;
}
/**
* Behavioral setting to reset the port to default settings (layer3 bonded mode without any vlan attached) before delete/destroy.
*
*/
@Export(name="resetOnDelete", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> resetOnDelete;
/**
* @return Behavioral setting to reset the port to default settings (layer3 bonded mode without any vlan attached) before delete/destroy.
*
*/
public Output> resetOnDelete() {
return Codegen.optional(this.resetOnDelete);
}
/**
* Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports.
*
*/
public Output type() {
return this.type;
}
/**
* List of VLAN UUIDs to attach to the port, valid only for L2 and Hybrid ports.
*
*/
@Export(name="vlanIds", refs={List.class,String.class}, tree="[0,1]")
private Output> vlanIds;
/**
* @return List of VLAN UUIDs to attach to the port, valid only for L2 and Hybrid ports.
*
*/
public Output> vlanIds() {
return this.vlanIds;
}
/**
* List of VXLAN IDs to attach to the port, valid only for L2 and Hybrid ports.
*
*/
@Export(name="vxlanIds", refs={List.class,Integer.class}, tree="[0,1]")
private Output> vxlanIds;
/**
* @return List of VXLAN IDs to attach to the port, valid only for L2 and Hybrid ports.
*
*/
public Output> vxlanIds() {
return this.vxlanIds;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Port(java.lang.String name) {
this(name, PortArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Port(java.lang.String name, PortArgs 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 Port(java.lang.String name, PortArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("equinix:metal/port:Port", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Port(java.lang.String name, Output id, @Nullable PortState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("equinix:metal/port:Port", name, state, makeResourceOptions(options, id), false);
}
private static PortArgs makeArgs(PortArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? PortArgs.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 Port get(java.lang.String name, Output id, @Nullable PortState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Port(name, id, state, options);
}
}