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

com.pulumi.azurenative.network.NetworkInterface Maven / Gradle / Ivy

// *** 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.azurenative.network;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.network.NetworkInterfaceArgs;
import com.pulumi.azurenative.network.outputs.ExtendedLocationResponse;
import com.pulumi.azurenative.network.outputs.NetworkInterfaceDnsSettingsResponse;
import com.pulumi.azurenative.network.outputs.NetworkInterfaceIPConfigurationResponse;
import com.pulumi.azurenative.network.outputs.NetworkInterfaceTapConfigurationResponse;
import com.pulumi.azurenative.network.outputs.NetworkSecurityGroupResponse;
import com.pulumi.azurenative.network.outputs.PrivateEndpointResponse;
import com.pulumi.azurenative.network.outputs.PrivateLinkServiceResponse;
import com.pulumi.azurenative.network.outputs.SubResourceResponse;
import com.pulumi.core.Alias;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * A network interface in a resource group.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
 * 
 * Other available API versions: 2015-05-01-preview, 2018-07-01, 2019-02-01, 2019-06-01, 2019-08-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01.
 * 
 * ## Example Usage
 * ### Create network interface
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.NetworkInterface;
 * import com.pulumi.azurenative.network.NetworkInterfaceArgs;
 * import com.pulumi.azurenative.network.inputs.NetworkInterfaceIPConfigurationArgs;
 * import com.pulumi.azurenative.network.inputs.PublicIPAddressArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 networkInterface = new NetworkInterface("networkInterface", NetworkInterfaceArgs.builder()
 *             .disableTcpStateTracking(true)
 *             .enableAcceleratedNetworking(true)
 *             .ipConfigurations(NetworkInterfaceIPConfigurationArgs.builder()
 *                 .name("ipconfig1")
 *                 .publicIPAddress(PublicIPAddressArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip")
 *                     .build())
 *                 .subnet(SubnetArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default")
 *                     .build())
 *                 .build())
 *             .location("eastus")
 *             .networkInterfaceName("test-nic")
 *             .resourceGroupName("rg1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create network interface with Gateway Load Balancer Consumer configured * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.NetworkInterface;
 * import com.pulumi.azurenative.network.NetworkInterfaceArgs;
 * import com.pulumi.azurenative.network.inputs.NetworkInterfaceIPConfigurationArgs;
 * import com.pulumi.azurenative.network.inputs.SubResourceArgs;
 * import com.pulumi.azurenative.network.inputs.PublicIPAddressArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 networkInterface = new NetworkInterface("networkInterface", NetworkInterfaceArgs.builder()
 *             .enableAcceleratedNetworking(true)
 *             .ipConfigurations(NetworkInterfaceIPConfigurationArgs.builder()
 *                 .gatewayLoadBalancer(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider")
 *                     .build())
 *                 .name("ipconfig1")
 *                 .publicIPAddress(PublicIPAddressArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip")
 *                     .build())
 *                 .subnet(SubnetArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default")
 *                     .build())
 *                 .build())
 *             .location("eastus")
 *             .networkInterfaceName("test-nic")
 *             .resourceGroupName("rg1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:network:NetworkInterface test-nic /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName} * ``` * */ @ResourceType(type="azure-native:network:NetworkInterface") public class NetworkInterface extends com.pulumi.resources.CustomResource { /** * Auxiliary mode of Network Interface resource. * */ @Export(name="auxiliaryMode", refs={String.class}, tree="[0]") private Output auxiliaryMode; /** * @return Auxiliary mode of Network Interface resource. * */ public Output> auxiliaryMode() { return Codegen.optional(this.auxiliaryMode); } /** * Auxiliary sku of Network Interface resource. * */ @Export(name="auxiliarySku", refs={String.class}, tree="[0]") private Output auxiliarySku; /** * @return Auxiliary sku of Network Interface resource. * */ public Output> auxiliarySku() { return Codegen.optional(this.auxiliarySku); } /** * Indicates whether to disable tcp state tracking. * */ @Export(name="disableTcpStateTracking", refs={Boolean.class}, tree="[0]") private Output disableTcpStateTracking; /** * @return Indicates whether to disable tcp state tracking. * */ public Output> disableTcpStateTracking() { return Codegen.optional(this.disableTcpStateTracking); } /** * The DNS settings in network interface. * */ @Export(name="dnsSettings", refs={NetworkInterfaceDnsSettingsResponse.class}, tree="[0]") private Output dnsSettings; /** * @return The DNS settings in network interface. * */ public Output> dnsSettings() { return Codegen.optional(this.dnsSettings); } /** * A reference to the dscp configuration to which the network interface is linked. * */ @Export(name="dscpConfiguration", refs={SubResourceResponse.class}, tree="[0]") private Output dscpConfiguration; /** * @return A reference to the dscp configuration to which the network interface is linked. * */ public Output dscpConfiguration() { return this.dscpConfiguration; } /** * If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated networking. * */ @Export(name="enableAcceleratedNetworking", refs={Boolean.class}, tree="[0]") private Output enableAcceleratedNetworking; /** * @return If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated networking. * */ public Output> enableAcceleratedNetworking() { return Codegen.optional(this.enableAcceleratedNetworking); } /** * Indicates whether IP forwarding is enabled on this network interface. * */ @Export(name="enableIPForwarding", refs={Boolean.class}, tree="[0]") private Output enableIPForwarding; /** * @return Indicates whether IP forwarding is enabled on this network interface. * */ public Output> enableIPForwarding() { return Codegen.optional(this.enableIPForwarding); } /** * A unique read-only string that changes whenever the resource is updated. * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return A unique read-only string that changes whenever the resource is updated. * */ public Output etag() { return this.etag; } /** * The extended location of the network interface. * */ @Export(name="extendedLocation", refs={ExtendedLocationResponse.class}, tree="[0]") private Output extendedLocation; /** * @return The extended location of the network interface. * */ public Output> extendedLocation() { return Codegen.optional(this.extendedLocation); } /** * A list of references to linked BareMetal resources. * */ @Export(name="hostedWorkloads", refs={List.class,String.class}, tree="[0,1]") private Output> hostedWorkloads; /** * @return A list of references to linked BareMetal resources. * */ public Output> hostedWorkloads() { return this.hostedWorkloads; } /** * A list of IPConfigurations of the network interface. * */ @Export(name="ipConfigurations", refs={List.class,NetworkInterfaceIPConfigurationResponse.class}, tree="[0,1]") private Output> ipConfigurations; /** * @return A list of IPConfigurations of the network interface. * */ public Output>> ipConfigurations() { return Codegen.optional(this.ipConfigurations); } /** * Resource location. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource location. * */ public Output> location() { return Codegen.optional(this.location); } /** * The MAC address of the network interface. * */ @Export(name="macAddress", refs={String.class}, tree="[0]") private Output macAddress; /** * @return The MAC address of the network interface. * */ public Output macAddress() { return this.macAddress; } /** * Migration phase of Network Interface resource. * */ @Export(name="migrationPhase", refs={String.class}, tree="[0]") private Output migrationPhase; /** * @return Migration phase of Network Interface resource. * */ public Output> migrationPhase() { return Codegen.optional(this.migrationPhase); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * The reference to the NetworkSecurityGroup resource. * */ @Export(name="networkSecurityGroup", refs={NetworkSecurityGroupResponse.class}, tree="[0]") private Output networkSecurityGroup; /** * @return The reference to the NetworkSecurityGroup resource. * */ public Output> networkSecurityGroup() { return Codegen.optional(this.networkSecurityGroup); } /** * Type of Network Interface resource. * */ @Export(name="nicType", refs={String.class}, tree="[0]") private Output nicType; /** * @return Type of Network Interface resource. * */ public Output> nicType() { return Codegen.optional(this.nicType); } /** * Whether this is a primary network interface on a virtual machine. * */ @Export(name="primary", refs={Boolean.class}, tree="[0]") private Output primary; /** * @return Whether this is a primary network interface on a virtual machine. * */ public Output primary() { return this.primary; } /** * A reference to the private endpoint to which the network interface is linked. * */ @Export(name="privateEndpoint", refs={PrivateEndpointResponse.class}, tree="[0]") private Output privateEndpoint; /** * @return A reference to the private endpoint to which the network interface is linked. * */ public Output privateEndpoint() { return this.privateEndpoint; } /** * Privatelinkservice of the network interface resource. * */ @Export(name="privateLinkService", refs={PrivateLinkServiceResponse.class}, tree="[0]") private Output privateLinkService; /** * @return Privatelinkservice of the network interface resource. * */ public Output> privateLinkService() { return Codegen.optional(this.privateLinkService); } /** * The provisioning state of the network interface resource. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The provisioning state of the network interface resource. * */ public Output provisioningState() { return this.provisioningState; } /** * The resource GUID property of the network interface resource. * */ @Export(name="resourceGuid", refs={String.class}, tree="[0]") private Output resourceGuid; /** * @return The resource GUID property of the network interface resource. * */ public Output resourceGuid() { return this.resourceGuid; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * A list of TapConfigurations of the network interface. * */ @Export(name="tapConfigurations", refs={List.class,NetworkInterfaceTapConfigurationResponse.class}, tree="[0,1]") private Output> tapConfigurations; /** * @return A list of TapConfigurations of the network interface. * */ public Output> tapConfigurations() { return this.tapConfigurations; } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * The reference to a virtual machine. * */ @Export(name="virtualMachine", refs={SubResourceResponse.class}, tree="[0]") private Output virtualMachine; /** * @return The reference to a virtual machine. * */ public Output virtualMachine() { return this.virtualMachine; } /** * Whether the virtual machine this nic is attached to supports encryption. * */ @Export(name="vnetEncryptionSupported", refs={Boolean.class}, tree="[0]") private Output vnetEncryptionSupported; /** * @return Whether the virtual machine this nic is attached to supports encryption. * */ public Output vnetEncryptionSupported() { return this.vnetEncryptionSupported; } /** * WorkloadType of the NetworkInterface for BareMetal resources * */ @Export(name="workloadType", refs={String.class}, tree="[0]") private Output workloadType; /** * @return WorkloadType of the NetworkInterface for BareMetal resources * */ public Output> workloadType() { return Codegen.optional(this.workloadType); } /** * * @param name The _unique_ name of the resulting resource. */ public NetworkInterface(java.lang.String name) { this(name, NetworkInterfaceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public NetworkInterface(java.lang.String name, NetworkInterfaceArgs 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 NetworkInterface(java.lang.String name, NetworkInterfaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:NetworkInterface", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private NetworkInterface(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:NetworkInterface", name, null, makeResourceOptions(options, id), false); } private static NetworkInterfaceArgs makeArgs(NetworkInterfaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? NetworkInterfaceArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:network/v20150501preview:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20150615:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20160330:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20160601:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20160901:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20161201:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20170301:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20170601:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20170801:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20170901:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20171001:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20171101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20180101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20180201:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20180401:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20180601:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20180701:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20180801:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20181001:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20181101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20181201:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20190201:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20190401:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20190601:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20190701:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20190801:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20190901:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20191101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20191201:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20200301:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20200401:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20200501:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20200601:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20200701:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20200801:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20201101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20210201:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20210301:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20210501:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20210801:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20220101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20220501:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20220701:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20220901:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20221101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20230201:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20230401:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20230501:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20230601:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20230901:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20231101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20240101:NetworkInterface").build()), Output.of(Alias.builder().type("azure-native:network/v20240301:NetworkInterface").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static NetworkInterface get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new NetworkInterface(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy