@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
276 lines (275 loc) • 10.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a VPC network interface resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const name = config.requireObject("name");
* const subnetId = config.requireObject("subnetId");
* const test = new huaweicloud.vpc.NetworkInterface("test", {subnetId: subnetId});
* ```
*
* ## Import
*
* The network interface can be imported using `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Vpc/networkInterface:NetworkInterface test <id>
* ```
*/
export declare class NetworkInterface extends pulumi.CustomResource {
/**
* Get an existing NetworkInterface 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 Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkInterfaceState, opts?: pulumi.CustomResourceOptions): NetworkInterface;
/**
* Returns true if the given object is an instance of NetworkInterface. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is NetworkInterface;
/**
* Specifies an array of IP addresses that can be active on the
* network interface. If the IP address is "1.1.1.1/0", it means that the source/destination address
* check switch is turned off.
*/
readonly allowedAddresses: pulumi.Output<string[] | undefined>;
/**
* Indicates the availability zone to which the network interface belongs.
*/
readonly availabilityZone: pulumi.Output<string>;
/**
* Indicates the ID of the device to which the network interface belongs.
*/
readonly deviceId: pulumi.Output<string>;
/**
* Indicates the belonged device, which can be the DHCP server, router, load balancer, or Nova.
*/
readonly deviceOwner: pulumi.Output<string>;
/**
* Specifies the DHCP lease time. The value format of value is "Xh",
* the value of "X" is "-1" or from "1" to "30000". If the value is "-1", the DHCP lease time is infinite.
*/
readonly dhcpLeaseTime: pulumi.Output<string>;
/**
* Indicates the default private network DNS name of the primary NIC.
*/
readonly dnsName: pulumi.Output<string>;
/**
* Indicates whether to enable EFI.
*/
readonly enableEfi: pulumi.Output<boolean>;
/**
* Specifies the network interface IPv4 address.
* Changing this creates a new resource.
*/
readonly fixedIpV4: pulumi.Output<string>;
/**
* Indicates the ID of the instance to which the network interface belongs.
*/
readonly instanceId: pulumi.Output<string>;
/**
* Indicates the type of the instance to which the network interface belongs.
*/
readonly instanceType: pulumi.Output<string>;
/**
* Indicates the Shared bandwidth ID bound to IPv6 network interface.
*/
readonly ipv6BandwidthId: pulumi.Output<string>;
/**
* Indicates the network interface MAC address.
*/
readonly macAddress: pulumi.Output<string>;
/**
* Specifies the network interface name.
*/
readonly name: pulumi.Output<string>;
/**
* Indicates whether the security option is enabled for the network interface.
* If the option is not enabled, the security group and DHCP snooping do not take effect.
*/
readonly portSecurityEnabled: pulumi.Output<boolean>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used.
* Changing this creates a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies an array of one or more security group IDs.
*/
readonly securityGroupIds: pulumi.Output<string[]>;
/**
* Indicates the network interface status.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the ID of the subnet to which the network interface belongs.
* Changing this creates a new resource.
*/
readonly subnetId: pulumi.Output<string>;
/**
* Specifies the network interface tags in the format of key-value pairs.
* This parameter can only be used in **cn-south-2** for now.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Create a NetworkInterface resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: NetworkInterfaceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering NetworkInterface resources.
*/
export interface NetworkInterfaceState {
/**
* Specifies an array of IP addresses that can be active on the
* network interface. If the IP address is "1.1.1.1/0", it means that the source/destination address
* check switch is turned off.
*/
allowedAddresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Indicates the availability zone to which the network interface belongs.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Indicates the ID of the device to which the network interface belongs.
*/
deviceId?: pulumi.Input<string>;
/**
* Indicates the belonged device, which can be the DHCP server, router, load balancer, or Nova.
*/
deviceOwner?: pulumi.Input<string>;
/**
* Specifies the DHCP lease time. The value format of value is "Xh",
* the value of "X" is "-1" or from "1" to "30000". If the value is "-1", the DHCP lease time is infinite.
*/
dhcpLeaseTime?: pulumi.Input<string>;
/**
* Indicates the default private network DNS name of the primary NIC.
*/
dnsName?: pulumi.Input<string>;
/**
* Indicates whether to enable EFI.
*/
enableEfi?: pulumi.Input<boolean>;
/**
* Specifies the network interface IPv4 address.
* Changing this creates a new resource.
*/
fixedIpV4?: pulumi.Input<string>;
/**
* Indicates the ID of the instance to which the network interface belongs.
*/
instanceId?: pulumi.Input<string>;
/**
* Indicates the type of the instance to which the network interface belongs.
*/
instanceType?: pulumi.Input<string>;
/**
* Indicates the Shared bandwidth ID bound to IPv6 network interface.
*/
ipv6BandwidthId?: pulumi.Input<string>;
/**
* Indicates the network interface MAC address.
*/
macAddress?: pulumi.Input<string>;
/**
* Specifies the network interface name.
*/
name?: pulumi.Input<string>;
/**
* Indicates whether the security option is enabled for the network interface.
* If the option is not enabled, the security group and DHCP snooping do not take effect.
*/
portSecurityEnabled?: pulumi.Input<boolean>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used.
* Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies an array of one or more security group IDs.
*/
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Indicates the network interface status.
*/
status?: pulumi.Input<string>;
/**
* Specifies the ID of the subnet to which the network interface belongs.
* Changing this creates a new resource.
*/
subnetId?: pulumi.Input<string>;
/**
* Specifies the network interface tags in the format of key-value pairs.
* This parameter can only be used in **cn-south-2** for now.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a NetworkInterface resource.
*/
export interface NetworkInterfaceArgs {
/**
* Specifies an array of IP addresses that can be active on the
* network interface. If the IP address is "1.1.1.1/0", it means that the source/destination address
* check switch is turned off.
*/
allowedAddresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the DHCP lease time. The value format of value is "Xh",
* the value of "X" is "-1" or from "1" to "30000". If the value is "-1", the DHCP lease time is infinite.
*/
dhcpLeaseTime?: pulumi.Input<string>;
/**
* Specifies the network interface IPv4 address.
* Changing this creates a new resource.
*/
fixedIpV4?: pulumi.Input<string>;
/**
* Specifies the network interface name.
*/
name?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used.
* Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies an array of one or more security group IDs.
*/
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the ID of the subnet to which the network interface belongs.
* Changing this creates a new resource.
*/
subnetId: pulumi.Input<string>;
/**
* Specifies the network interface tags in the format of key-value pairs.
* This parameter can only be used in **cn-south-2** for now.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}