alicloud.ecs.EcsNetworkInterface
Explore with Pulumi AI
Provides a ECS Network Interface resource.
For information about ECS Network Interface and how to use it, see What is Network Interface.
NOTE: Available since v1.123.1.
NOTE Only one of
private_ip_addresses
orsecondary_private_ip_address_count
can be specified when assign private IPs.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "192.168.0.0/24",
});
const default = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
cidrBlock: "192.168.0.0/24",
zoneId: _default.then(_default => _default.zones?.[0]?.id),
vpcId: defaultNetwork.id,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: name,
vpcId: defaultNetwork.id,
});
const defaultGetResourceGroups = alicloud.resourcemanager.getResourceGroups({
status: "OK",
});
const defaultEcsNetworkInterface = new alicloud.ecs.EcsNetworkInterface("default", {
networkInterfaceName: name,
vswitchId: defaultSwitch.id,
securityGroupIds: [defaultSecurityGroup.id],
description: "Basic test",
primaryIpAddress: "192.168.0.2",
tags: {
Created: "TF",
For: "Test",
},
resourceGroupId: defaultGetResourceGroups.then(defaultGetResourceGroups => defaultGetResourceGroups.ids?.[0]),
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="192.168.0.0/24")
default = alicloud.get_zones(available_resource_creation="VSwitch")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
cidr_block="192.168.0.0/24",
zone_id=default.zones[0].id,
vpc_id=default_network.id)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=name,
vpc_id=default_network.id)
default_get_resource_groups = alicloud.resourcemanager.get_resource_groups(status="OK")
default_ecs_network_interface = alicloud.ecs.EcsNetworkInterface("default",
network_interface_name=name,
vswitch_id=default_switch.id,
security_group_ids=[default_security_group.id],
description="Basic test",
primary_ip_address="192.168.0.2",
tags={
"Created": "TF",
"For": "Test",
},
resource_group_id=default_get_resource_groups.ids[0])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.0.0/24"),
})
if err != nil {
return err
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.0.0/24"),
ZoneId: pulumi.String(_default.Zones[0].Id),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultGetResourceGroups, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
Status: pulumi.StringRef("OK"),
}, nil)
if err != nil {
return err
}
_, err = ecs.NewEcsNetworkInterface(ctx, "default", &ecs.EcsNetworkInterfaceArgs{
NetworkInterfaceName: pulumi.String(name),
VswitchId: defaultSwitch.ID(),
SecurityGroupIds: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
Description: pulumi.String("Basic test"),
PrimaryIpAddress: pulumi.String("192.168.0.2"),
Tags: pulumi.Map{
"Created": pulumi.Any("TF"),
"For": pulumi.Any("Test"),
},
ResourceGroupId: pulumi.String(defaultGetResourceGroups.Ids[0]),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "192.168.0.0/24",
});
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
CidrBlock = "192.168.0.0/24",
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
VpcId = defaultNetwork.Id,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
VpcId = defaultNetwork.Id,
});
var defaultGetResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
Status = "OK",
});
var defaultEcsNetworkInterface = new AliCloud.Ecs.EcsNetworkInterface("default", new()
{
NetworkInterfaceName = name,
VswitchId = defaultSwitch.Id,
SecurityGroupIds = new[]
{
defaultSecurityGroup.Id,
},
Description = "Basic test",
PrimaryIpAddress = "192.168.0.2",
Tags =
{
{ "Created", "TF" },
{ "For", "Test" },
},
ResourceGroupId = defaultGetResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0]),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.ecs.EcsNetworkInterface;
import com.pulumi.alicloud.ecs.EcsNetworkInterfaceArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tf-example");
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.168.0.0/24")
.build());
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("192.168.0.0/24")
.zoneId(default_.zones()[0].id())
.vpcId(defaultNetwork.id())
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.vpcId(defaultNetwork.id())
.build());
final var defaultGetResourceGroups = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.status("OK")
.build());
var defaultEcsNetworkInterface = new EcsNetworkInterface("defaultEcsNetworkInterface", EcsNetworkInterfaceArgs.builder()
.networkInterfaceName(name)
.vswitchId(defaultSwitch.id())
.securityGroupIds(defaultSecurityGroup.id())
.description("Basic test")
.primaryIpAddress("192.168.0.2")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "Test")
))
.resourceGroupId(defaultGetResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}
cidrBlock: 192.168.0.0/24
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: ${name}
cidrBlock: 192.168.0.0/24
zoneId: ${default.zones[0].id}
vpcId: ${defaultNetwork.id}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: ${name}
vpcId: ${defaultNetwork.id}
defaultEcsNetworkInterface:
type: alicloud:ecs:EcsNetworkInterface
name: default
properties:
networkInterfaceName: ${name}
vswitchId: ${defaultSwitch.id}
securityGroupIds:
- ${defaultSecurityGroup.id}
description: Basic test
primaryIpAddress: 192.168.0.2
tags:
Created: TF
For: Test
resourceGroupId: ${defaultGetResourceGroups.ids[0]}
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: VSwitch
defaultGetResourceGroups:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments:
status: OK
Create EcsNetworkInterface Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EcsNetworkInterface(name: string, args: EcsNetworkInterfaceArgs, opts?: CustomResourceOptions);
@overload
def EcsNetworkInterface(resource_name: str,
args: EcsNetworkInterfaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EcsNetworkInterface(resource_name: str,
opts: Optional[ResourceOptions] = None,
vswitch_id: Optional[str] = None,
private_ip: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
ipv4_prefixes: Optional[Sequence[str]] = None,
ipv6_address_count: Optional[int] = None,
ipv6_addresses: Optional[Sequence[str]] = None,
name: Optional[str] = None,
network_interface_name: Optional[str] = None,
private_ip_addresses: Optional[Sequence[str]] = None,
instance_type: Optional[str] = None,
ipv4_prefix_count: Optional[int] = None,
network_interface_traffic_mode: Optional[str] = None,
private_ips: Optional[Sequence[str]] = None,
private_ips_count: Optional[int] = None,
queue_number: Optional[int] = None,
resource_group_id: Optional[str] = None,
secondary_private_ip_address_count: Optional[int] = None,
security_group_ids: Optional[Sequence[str]] = None,
description: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
primary_ip_address: Optional[str] = None)
func NewEcsNetworkInterface(ctx *Context, name string, args EcsNetworkInterfaceArgs, opts ...ResourceOption) (*EcsNetworkInterface, error)
public EcsNetworkInterface(string name, EcsNetworkInterfaceArgs args, CustomResourceOptions? opts = null)
public EcsNetworkInterface(String name, EcsNetworkInterfaceArgs args)
public EcsNetworkInterface(String name, EcsNetworkInterfaceArgs args, CustomResourceOptions options)
type: alicloud:ecs:EcsNetworkInterface
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args EcsNetworkInterfaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args EcsNetworkInterfaceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args EcsNetworkInterfaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EcsNetworkInterfaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EcsNetworkInterfaceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var ecsNetworkInterfaceResource = new AliCloud.Ecs.EcsNetworkInterface("ecsNetworkInterfaceResource", new()
{
VswitchId = "string",
Ipv4Prefixes = new[]
{
"string",
},
Ipv6AddressCount = 0,
Ipv6Addresses = new[]
{
"string",
},
NetworkInterfaceName = "string",
PrivateIpAddresses = new[]
{
"string",
},
InstanceType = "string",
Ipv4PrefixCount = 0,
NetworkInterfaceTrafficMode = "string",
QueueNumber = 0,
ResourceGroupId = "string",
SecondaryPrivateIpAddressCount = 0,
SecurityGroupIds = new[]
{
"string",
},
Description = "string",
Tags =
{
{ "string", "any" },
},
PrimaryIpAddress = "string",
});
example, err := ecs.NewEcsNetworkInterface(ctx, "ecsNetworkInterfaceResource", &ecs.EcsNetworkInterfaceArgs{
VswitchId: pulumi.String("string"),
Ipv4Prefixes: pulumi.StringArray{
pulumi.String("string"),
},
Ipv6AddressCount: pulumi.Int(0),
Ipv6Addresses: pulumi.StringArray{
pulumi.String("string"),
},
NetworkInterfaceName: pulumi.String("string"),
PrivateIpAddresses: pulumi.StringArray{
pulumi.String("string"),
},
InstanceType: pulumi.String("string"),
Ipv4PrefixCount: pulumi.Int(0),
NetworkInterfaceTrafficMode: pulumi.String("string"),
QueueNumber: pulumi.Int(0),
ResourceGroupId: pulumi.String("string"),
SecondaryPrivateIpAddressCount: pulumi.Int(0),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
PrimaryIpAddress: pulumi.String("string"),
})
var ecsNetworkInterfaceResource = new EcsNetworkInterface("ecsNetworkInterfaceResource", EcsNetworkInterfaceArgs.builder()
.vswitchId("string")
.ipv4Prefixes("string")
.ipv6AddressCount(0)
.ipv6Addresses("string")
.networkInterfaceName("string")
.privateIpAddresses("string")
.instanceType("string")
.ipv4PrefixCount(0)
.networkInterfaceTrafficMode("string")
.queueNumber(0)
.resourceGroupId("string")
.secondaryPrivateIpAddressCount(0)
.securityGroupIds("string")
.description("string")
.tags(Map.of("string", "any"))
.primaryIpAddress("string")
.build());
ecs_network_interface_resource = alicloud.ecs.EcsNetworkInterface("ecsNetworkInterfaceResource",
vswitch_id="string",
ipv4_prefixes=["string"],
ipv6_address_count=0,
ipv6_addresses=["string"],
network_interface_name="string",
private_ip_addresses=["string"],
instance_type="string",
ipv4_prefix_count=0,
network_interface_traffic_mode="string",
queue_number=0,
resource_group_id="string",
secondary_private_ip_address_count=0,
security_group_ids=["string"],
description="string",
tags={
"string": "any",
},
primary_ip_address="string")
const ecsNetworkInterfaceResource = new alicloud.ecs.EcsNetworkInterface("ecsNetworkInterfaceResource", {
vswitchId: "string",
ipv4Prefixes: ["string"],
ipv6AddressCount: 0,
ipv6Addresses: ["string"],
networkInterfaceName: "string",
privateIpAddresses: ["string"],
instanceType: "string",
ipv4PrefixCount: 0,
networkInterfaceTrafficMode: "string",
queueNumber: 0,
resourceGroupId: "string",
secondaryPrivateIpAddressCount: 0,
securityGroupIds: ["string"],
description: "string",
tags: {
string: "any",
},
primaryIpAddress: "string",
});
type: alicloud:ecs:EcsNetworkInterface
properties:
description: string
instanceType: string
ipv4PrefixCount: 0
ipv4Prefixes:
- string
ipv6AddressCount: 0
ipv6Addresses:
- string
networkInterfaceName: string
networkInterfaceTrafficMode: string
primaryIpAddress: string
privateIpAddresses:
- string
queueNumber: 0
resourceGroupId: string
secondaryPrivateIpAddressCount: 0
securityGroupIds:
- string
tags:
string: any
vswitchId: string
EcsNetworkInterface Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The EcsNetworkInterface resource accepts the following input properties:
- Vswitch
Id string - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- Description string
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- Instance
Type string - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - Ipv4Prefix
Count int - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - Ipv4Prefixes List<string>
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses List<string>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Name string
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - Network
Interface stringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- Network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - Primary
Ip stringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- Private
Ip string - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - Private
Ip List<string>Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- Private
Ips List<string> - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - Private
Ips intCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - Queue
Number int - The queue number of the ENI.
- Resource
Group stringId - The resource group id.
- Secondary
Private intIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- Security
Group List<string>Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- Security
Groups List<string> - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - Dictionary<string, object>
- A mapping of tags to assign to the resource.
- Vswitch
Id string - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- Description string
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- Instance
Type string - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - Ipv4Prefix
Count int - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - Ipv4Prefixes []string
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses []string
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Name string
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - Network
Interface stringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- Network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - Primary
Ip stringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- Private
Ip string - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - Private
Ip []stringAddresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- Private
Ips []string - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - Private
Ips intCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - Queue
Number int - The queue number of the ENI.
- Resource
Group stringId - The resource group id.
- Secondary
Private intIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- Security
Group []stringIds - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- Security
Groups []string - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - map[string]interface{}
- A mapping of tags to assign to the resource.
- vswitch
Id String - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description String
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance
Type String - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4Prefix
Count Integer - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4Prefixes List<String>
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6Address
Count Integer - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- name String
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network
Interface StringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network
Interface StringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary
Ip StringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private
Ip String - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private
Ip List<String>Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private
Ips List<String> - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private
Ips IntegerCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue
Number Integer - The queue number of the ENI.
- resource
Group StringId - The resource group id.
- secondary
Private IntegerIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- security
Group List<String>Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security
Groups List<String> - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - Map<String,Object>
- A mapping of tags to assign to the resource.
- vswitch
Id string - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description string
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance
Type string - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4Prefix
Count number - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4Prefixes string[]
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6Address
Count number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses string[]
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- name string
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network
Interface stringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary
Ip stringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private
Ip string - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private
Ip string[]Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private
Ips string[] - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private
Ips numberCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue
Number number - The queue number of the ENI.
- resource
Group stringId - The resource group id.
- secondary
Private numberIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- security
Group string[]Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security
Groups string[] - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - {[key: string]: any}
- A mapping of tags to assign to the resource.
- vswitch_
id str - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description str
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance_
type str - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4_
prefix_ intcount - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4_
prefixes Sequence[str] - A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6_
address_ intcount - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6_
addresses Sequence[str] - A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- name str
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network_
interface_ strname - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network_
interface_ strtraffic_ mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary_
ip_ straddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private_
ip str - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private_
ip_ Sequence[str]addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private_
ips Sequence[str] - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private_
ips_ intcount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue_
number int - The queue number of the ENI.
- resource_
group_ strid - The resource group id.
- secondary_
private_ intip_ address_ count - The number of private IP addresses that can be automatically created by ECS.
- security_
group_ Sequence[str]ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security_
groups Sequence[str] - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - Mapping[str, Any]
- A mapping of tags to assign to the resource.
- vswitch
Id String - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description String
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance
Type String - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4Prefix
Count Number - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4Prefixes List<String>
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6Address
Count Number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- name String
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network
Interface StringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network
Interface StringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary
Ip StringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private
Ip String - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private
Ip List<String>Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private
Ips List<String> - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private
Ips NumberCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue
Number Number - The queue number of the ENI.
- resource
Group StringId - The resource group id.
- secondary
Private NumberIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- security
Group List<String>Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security
Groups List<String> - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - Map<Any>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the EcsNetworkInterface resource produces the following output properties:
Look up Existing EcsNetworkInterface Resource
Get an existing EcsNetworkInterface resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: EcsNetworkInterfaceState, opts?: CustomResourceOptions): EcsNetworkInterface
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
instance_type: Optional[str] = None,
ipv4_prefix_count: Optional[int] = None,
ipv4_prefixes: Optional[Sequence[str]] = None,
ipv6_address_count: Optional[int] = None,
ipv6_addresses: Optional[Sequence[str]] = None,
mac: Optional[str] = None,
name: Optional[str] = None,
network_interface_name: Optional[str] = None,
network_interface_traffic_mode: Optional[str] = None,
primary_ip_address: Optional[str] = None,
private_ip: Optional[str] = None,
private_ip_addresses: Optional[Sequence[str]] = None,
private_ips: Optional[Sequence[str]] = None,
private_ips_count: Optional[int] = None,
queue_number: Optional[int] = None,
resource_group_id: Optional[str] = None,
secondary_private_ip_address_count: Optional[int] = None,
security_group_ids: Optional[Sequence[str]] = None,
security_groups: Optional[Sequence[str]] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
vswitch_id: Optional[str] = None) -> EcsNetworkInterface
func GetEcsNetworkInterface(ctx *Context, name string, id IDInput, state *EcsNetworkInterfaceState, opts ...ResourceOption) (*EcsNetworkInterface, error)
public static EcsNetworkInterface Get(string name, Input<string> id, EcsNetworkInterfaceState? state, CustomResourceOptions? opts = null)
public static EcsNetworkInterface get(String name, Output<String> id, EcsNetworkInterfaceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- Instance
Type string - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - Ipv4Prefix
Count int - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - Ipv4Prefixes List<string>
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses List<string>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Mac string
- The MAC address of the ENI.
- Name string
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - Network
Interface stringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- Network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - Primary
Ip stringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- Private
Ip string - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - Private
Ip List<string>Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- Private
Ips List<string> - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - Private
Ips intCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - Queue
Number int - The queue number of the ENI.
- Resource
Group stringId - The resource group id.
- Secondary
Private intIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- Security
Group List<string>Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- Security
Groups List<string> - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - Status string
- The status of the ENI.
- Dictionary<string, object>
- A mapping of tags to assign to the resource.
- Vswitch
Id string - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- Description string
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- Instance
Type string - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - Ipv4Prefix
Count int - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - Ipv4Prefixes []string
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses []string
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Mac string
- The MAC address of the ENI.
- Name string
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - Network
Interface stringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- Network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - Primary
Ip stringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- Private
Ip string - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - Private
Ip []stringAddresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- Private
Ips []string - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - Private
Ips intCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - Queue
Number int - The queue number of the ENI.
- Resource
Group stringId - The resource group id.
- Secondary
Private intIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- Security
Group []stringIds - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- Security
Groups []string - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - Status string
- The status of the ENI.
- map[string]interface{}
- A mapping of tags to assign to the resource.
- Vswitch
Id string - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description String
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance
Type String - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4Prefix
Count Integer - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4Prefixes List<String>
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6Address
Count Integer - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- mac String
- The MAC address of the ENI.
- name String
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network
Interface StringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network
Interface StringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary
Ip StringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private
Ip String - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private
Ip List<String>Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private
Ips List<String> - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private
Ips IntegerCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue
Number Integer - The queue number of the ENI.
- resource
Group StringId - The resource group id.
- secondary
Private IntegerIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- security
Group List<String>Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security
Groups List<String> - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - status String
- The status of the ENI.
- Map<String,Object>
- A mapping of tags to assign to the resource.
- vswitch
Id String - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description string
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance
Type string - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4Prefix
Count number - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4Prefixes string[]
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6Address
Count number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses string[]
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- mac string
- The MAC address of the ENI.
- name string
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network
Interface stringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary
Ip stringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private
Ip string - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private
Ip string[]Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private
Ips string[] - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private
Ips numberCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue
Number number - The queue number of the ENI.
- resource
Group stringId - The resource group id.
- secondary
Private numberIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- security
Group string[]Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security
Groups string[] - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - status string
- The status of the ENI.
- {[key: string]: any}
- A mapping of tags to assign to the resource.
- vswitch
Id string - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description str
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance_
type str - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4_
prefix_ intcount - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4_
prefixes Sequence[str] - A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6_
address_ intcount - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6_
addresses Sequence[str] - A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- mac str
- The MAC address of the ENI.
- name str
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network_
interface_ strname - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network_
interface_ strtraffic_ mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary_
ip_ straddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private_
ip str - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private_
ip_ Sequence[str]addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private_
ips Sequence[str] - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private_
ips_ intcount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue_
number int - The queue number of the ENI.
- resource_
group_ strid - The resource group id.
- secondary_
private_ intip_ address_ count - The number of private IP addresses that can be automatically created by ECS.
- security_
group_ Sequence[str]ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security_
groups Sequence[str] - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - status str
- The status of the ENI.
- Mapping[str, Any]
- A mapping of tags to assign to the resource.
- vswitch_
id str - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
- description String
- The description of the ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- instance
Type String - The type of the ENI. Default value:
Secondary
. Valid values:Secondary
,Trunk
. - ipv4Prefix
Count Number - The number of IPv4 prefixes that can be automatically created by ECS. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv4_prefixes
andipv4_prefix_count
parameters. - ipv4Prefixes List<String>
- A list of IPv4 prefixes to be assigned to the ENI. Support up to 10.
- ipv6Address
Count Number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- mac String
- The MAC address of the ENI.
- name String
- Field
name
has been deprecated from provider version 1.123.1. New fieldnetwork_interface_name
instead - network
Interface StringName - The name of the ENI. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- network
Interface StringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
,HighPerformance
. - primary
Ip StringAddress - The primary private IP address of the ENI. The specified IP address must be available within the CIDR block of the VSwitch. If this parameter is not specified, an available IP address is assigned from the VSwitch CIDR block at random.
- private
Ip String - Field
private_ip
has been deprecated from provider version 1.123.1. New fieldprimary_ip_address
instead - private
Ip List<String>Addresses - Specifies secondary private IP address N of the ENI. This IP address must be an available IP address within the CIDR block of the VSwitch to which the ENI belongs.
- private
Ips List<String> - Field
private_ips
has been deprecated from provider version 1.123.1. New fieldprivate_ip_addresses
instead - private
Ips NumberCount - Field
private_ips_count
has been deprecated from provider version 1.123.1. New fieldsecondary_private_ip_address_count
instead - queue
Number Number - The queue number of the ENI.
- resource
Group StringId - The resource group id.
- secondary
Private NumberIp Address Count - The number of private IP addresses that can be automatically created by ECS.
- security
Group List<String>Ids - The ID of security group N. The security groups and the ENI must belong to the same VPC. The valid values of N are based on the maximum number of security groups to which an ENI can be added.
- security
Groups List<String> - Field
security_groups
has been deprecated from provider version 1.123.1. New fieldsecurity_group_ids
instead - status String
- The status of the ENI.
- Map<Any>
- A mapping of tags to assign to the resource.
- vswitch
Id String - The ID of the VSwitch in the specified VPC. The private IP addresses assigned to the ENI must be available IP addresses within the CIDR block of the VSwitch.
Import
ECS Network Interface can be imported using the id, e.g.
$ pulumi import alicloud:ecs/ecsNetworkInterface:EcsNetworkInterface example eni-abcd12345
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.