Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.eci.getVirtualNodes
Explore with Pulumi AI
This data source provides the Eci Virtual Nodes of the current Alibaba Cloud user.
NOTE: Available in v1.145.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.eci.getVirtualNodes({
    ids: [
        "example_value-1",
        "example_value-2",
    ],
});
export const eciVirtualNodeId1 = ids.then(ids => ids.nodes?.[0]?.id);
const nameRegex = alicloud.eci.getVirtualNodes({
    nameRegex: "^my-VirtualNode",
});
export const eciVirtualNodeId2 = nameRegex.then(nameRegex => nameRegex.nodes?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.eci.get_virtual_nodes(ids=[
    "example_value-1",
    "example_value-2",
])
pulumi.export("eciVirtualNodeId1", ids.nodes[0].id)
name_regex = alicloud.eci.get_virtual_nodes(name_regex="^my-VirtualNode")
pulumi.export("eciVirtualNodeId2", name_regex.nodes[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eci"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := eci.GetVirtualNodes(ctx, &eci.GetVirtualNodesArgs{
			Ids: []string{
				"example_value-1",
				"example_value-2",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("eciVirtualNodeId1", ids.Nodes[0].Id)
		nameRegex, err := eci.GetVirtualNodes(ctx, &eci.GetVirtualNodesArgs{
			NameRegex: pulumi.StringRef("^my-VirtualNode"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("eciVirtualNodeId2", nameRegex.Nodes[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Eci.GetVirtualNodes.Invoke(new()
    {
        Ids = new[]
        {
            "example_value-1",
            "example_value-2",
        },
    });
    var nameRegex = AliCloud.Eci.GetVirtualNodes.Invoke(new()
    {
        NameRegex = "^my-VirtualNode",
    });
    return new Dictionary<string, object?>
    {
        ["eciVirtualNodeId1"] = ids.Apply(getVirtualNodesResult => getVirtualNodesResult.Nodes[0]?.Id),
        ["eciVirtualNodeId2"] = nameRegex.Apply(getVirtualNodesResult => getVirtualNodesResult.Nodes[0]?.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eci.EciFunctions;
import com.pulumi.alicloud.eci.inputs.GetVirtualNodesArgs;
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 ids = EciFunctions.getVirtualNodes(GetVirtualNodesArgs.builder()
            .ids(            
                "example_value-1",
                "example_value-2")
            .build());
        ctx.export("eciVirtualNodeId1", ids.applyValue(getVirtualNodesResult -> getVirtualNodesResult.nodes()[0].id()));
        final var nameRegex = EciFunctions.getVirtualNodes(GetVirtualNodesArgs.builder()
            .nameRegex("^my-VirtualNode")
            .build());
        ctx.export("eciVirtualNodeId2", nameRegex.applyValue(getVirtualNodesResult -> getVirtualNodesResult.nodes()[0].id()));
    }
}
variables:
  ids:
    fn::invoke:
      function: alicloud:eci:getVirtualNodes
      arguments:
        ids:
          - example_value-1
          - example_value-2
  nameRegex:
    fn::invoke:
      function: alicloud:eci:getVirtualNodes
      arguments:
        nameRegex: ^my-VirtualNode
outputs:
  eciVirtualNodeId1: ${ids.nodes[0].id}
  eciVirtualNodeId2: ${nameRegex.nodes[0].id}
Using getVirtualNodes
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVirtualNodes(args: GetVirtualNodesArgs, opts?: InvokeOptions): Promise<GetVirtualNodesResult>
function getVirtualNodesOutput(args: GetVirtualNodesOutputArgs, opts?: InvokeOptions): Output<GetVirtualNodesResult>def get_virtual_nodes(ids: Optional[Sequence[str]] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      resource_group_id: Optional[str] = None,
                      security_group_id: Optional[str] = None,
                      status: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      virtual_node_name: Optional[str] = None,
                      vswitch_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetVirtualNodesResult
def get_virtual_nodes_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      resource_group_id: Optional[pulumi.Input[str]] = None,
                      security_group_id: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                      virtual_node_name: Optional[pulumi.Input[str]] = None,
                      vswitch_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetVirtualNodesResult]func GetVirtualNodes(ctx *Context, args *GetVirtualNodesArgs, opts ...InvokeOption) (*GetVirtualNodesResult, error)
func GetVirtualNodesOutput(ctx *Context, args *GetVirtualNodesOutputArgs, opts ...InvokeOption) GetVirtualNodesResultOutput> Note: This function is named GetVirtualNodes in the Go SDK.
public static class GetVirtualNodes 
{
    public static Task<GetVirtualNodesResult> InvokeAsync(GetVirtualNodesArgs args, InvokeOptions? opts = null)
    public static Output<GetVirtualNodesResult> Invoke(GetVirtualNodesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVirtualNodesResult> getVirtualNodes(GetVirtualNodesArgs args, InvokeOptions options)
public static Output<GetVirtualNodesResult> getVirtualNodes(GetVirtualNodesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:eci/getVirtualNodes:getVirtualNodes
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Virtual Node IDs.
- NameRegex string
- A regex string to filter results by Virtual Node name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The resource group ID. If when you create a GPU does not specify a resource group instance will automatically add the account's default resource group.
- SecurityGroup stringId 
- VNode itself and by VNode created (ECI) the security group used by.
- Status string
- The Status of the virtual node. Valid values: Cleaned,Failed,Pending,Ready.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VirtualNode stringName 
- The name of the virtual node.
- VswitchId string
- Ids []string
- A list of Virtual Node IDs.
- NameRegex string
- A regex string to filter results by Virtual Node name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The resource group ID. If when you create a GPU does not specify a resource group instance will automatically add the account's default resource group.
- SecurityGroup stringId 
- VNode itself and by VNode created (ECI) the security group used by.
- Status string
- The Status of the virtual node. Valid values: Cleaned,Failed,Pending,Ready.
- map[string]string
- A mapping of tags to assign to the resource.
- VirtualNode stringName 
- The name of the virtual node.
- VswitchId string
- ids List<String>
- A list of Virtual Node IDs.
- nameRegex String
- A regex string to filter results by Virtual Node name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The resource group ID. If when you create a GPU does not specify a resource group instance will automatically add the account's default resource group.
- securityGroup StringId 
- VNode itself and by VNode created (ECI) the security group used by.
- status String
- The Status of the virtual node. Valid values: Cleaned,Failed,Pending,Ready.
- Map<String,String>
- A mapping of tags to assign to the resource.
- virtualNode StringName 
- The name of the virtual node.
- vswitchId String
- ids string[]
- A list of Virtual Node IDs.
- nameRegex string
- A regex string to filter results by Virtual Node name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- resourceGroup stringId 
- The resource group ID. If when you create a GPU does not specify a resource group instance will automatically add the account's default resource group.
- securityGroup stringId 
- VNode itself and by VNode created (ECI) the security group used by.
- status string
- The Status of the virtual node. Valid values: Cleaned,Failed,Pending,Ready.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- virtualNode stringName 
- The name of the virtual node.
- vswitchId string
- ids Sequence[str]
- A list of Virtual Node IDs.
- name_regex str
- A regex string to filter results by Virtual Node name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- resource_group_ strid 
- The resource group ID. If when you create a GPU does not specify a resource group instance will automatically add the account's default resource group.
- security_group_ strid 
- VNode itself and by VNode created (ECI) the security group used by.
- status str
- The Status of the virtual node. Valid values: Cleaned,Failed,Pending,Ready.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- virtual_node_ strname 
- The name of the virtual node.
- vswitch_id str
- ids List<String>
- A list of Virtual Node IDs.
- nameRegex String
- A regex string to filter results by Virtual Node name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The resource group ID. If when you create a GPU does not specify a resource group instance will automatically add the account's default resource group.
- securityGroup StringId 
- VNode itself and by VNode created (ECI) the security group used by.
- status String
- The Status of the virtual node. Valid values: Cleaned,Failed,Pending,Ready.
- Map<String>
- A mapping of tags to assign to the resource.
- virtualNode StringName 
- The name of the virtual node.
- vswitchId String
getVirtualNodes Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Nodes
List<Pulumi.Ali Cloud. Eci. Outputs. Get Virtual Nodes Node> 
- NameRegex string
- OutputFile string
- ResourceGroup stringId 
- SecurityGroup stringId 
- Status string
- Dictionary<string, string>
- VirtualNode stringName 
- VswitchId string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Nodes
[]GetVirtual Nodes Node 
- NameRegex string
- OutputFile string
- ResourceGroup stringId 
- SecurityGroup stringId 
- Status string
- map[string]string
- VirtualNode stringName 
- VswitchId string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- nodes
List<GetVirtual Nodes Node> 
- nameRegex String
- outputFile String
- resourceGroup StringId 
- securityGroup StringId 
- status String
- Map<String,String>
- virtualNode StringName 
- vswitchId String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- nodes
GetVirtual Nodes Node[] 
- nameRegex string
- outputFile string
- resourceGroup stringId 
- securityGroup stringId 
- status string
- {[key: string]: string}
- virtualNode stringName 
- vswitchId string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- nodes
Sequence[GetVirtual Nodes Node] 
- name_regex str
- output_file str
- resource_group_ strid 
- security_group_ strid 
- status str
- Mapping[str, str]
- virtual_node_ strname 
- vswitch_id str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- nodes List<Property Map>
- nameRegex String
- outputFile String
- resourceGroup StringId 
- securityGroup StringId 
- status String
- Map<String>
- virtualNode StringName 
- vswitchId String
Supporting Types
GetVirtualNodesNode   
- Cpu int
- The Number of CPU.
- CreateTime string
- The creation time of the virtual node.
- EniInstance stringId 
- The ENI instance ID.
- Events
List<Pulumi.Ali Cloud. Eci. Inputs. Get Virtual Nodes Node Event> 
- The event list.
- Id string
- The ID of the Virtual Node.
- InternetIp string
- The IP address of a public network.
- IntranetIp string
- The private IP address of the RDS instance.
- Memory int
- The memory size.
- RamRole stringName 
- The ram role.
- ResourceGroup stringId 
- The resource group ID.
- SecurityGroup stringId 
- The security group ID.
- Status string
- The Status of the virtual node.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VirtualNode stringId 
- Of the virtual node number.
- VirtualNode stringName 
- The name of the virtual node.
- VpcId string
- VswitchId string
- The vswitch id.
- ZoneId string
- The Zone.
- Cpu int
- The Number of CPU.
- CreateTime string
- The creation time of the virtual node.
- EniInstance stringId 
- The ENI instance ID.
- Events
[]GetVirtual Nodes Node Event 
- The event list.
- Id string
- The ID of the Virtual Node.
- InternetIp string
- The IP address of a public network.
- IntranetIp string
- The private IP address of the RDS instance.
- Memory int
- The memory size.
- RamRole stringName 
- The ram role.
- ResourceGroup stringId 
- The resource group ID.
- SecurityGroup stringId 
- The security group ID.
- Status string
- The Status of the virtual node.
- map[string]string
- A mapping of tags to assign to the resource.
- VirtualNode stringId 
- Of the virtual node number.
- VirtualNode stringName 
- The name of the virtual node.
- VpcId string
- VswitchId string
- The vswitch id.
- ZoneId string
- The Zone.
- cpu Integer
- The Number of CPU.
- createTime String
- The creation time of the virtual node.
- eniInstance StringId 
- The ENI instance ID.
- events
List<GetVirtual Nodes Node Event> 
- The event list.
- id String
- The ID of the Virtual Node.
- internetIp String
- The IP address of a public network.
- intranetIp String
- The private IP address of the RDS instance.
- memory Integer
- The memory size.
- ramRole StringName 
- The ram role.
- resourceGroup StringId 
- The resource group ID.
- securityGroup StringId 
- The security group ID.
- status String
- The Status of the virtual node.
- Map<String,String>
- A mapping of tags to assign to the resource.
- virtualNode StringId 
- Of the virtual node number.
- virtualNode StringName 
- The name of the virtual node.
- vpcId String
- vswitchId String
- The vswitch id.
- zoneId String
- The Zone.
- cpu number
- The Number of CPU.
- createTime string
- The creation time of the virtual node.
- eniInstance stringId 
- The ENI instance ID.
- events
GetVirtual Nodes Node Event[] 
- The event list.
- id string
- The ID of the Virtual Node.
- internetIp string
- The IP address of a public network.
- intranetIp string
- The private IP address of the RDS instance.
- memory number
- The memory size.
- ramRole stringName 
- The ram role.
- resourceGroup stringId 
- The resource group ID.
- securityGroup stringId 
- The security group ID.
- status string
- The Status of the virtual node.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- virtualNode stringId 
- Of the virtual node number.
- virtualNode stringName 
- The name of the virtual node.
- vpcId string
- vswitchId string
- The vswitch id.
- zoneId string
- The Zone.
- cpu int
- The Number of CPU.
- create_time str
- The creation time of the virtual node.
- eni_instance_ strid 
- The ENI instance ID.
- events
Sequence[GetVirtual Nodes Node Event] 
- The event list.
- id str
- The ID of the Virtual Node.
- internet_ip str
- The IP address of a public network.
- intranet_ip str
- The private IP address of the RDS instance.
- memory int
- The memory size.
- ram_role_ strname 
- The ram role.
- resource_group_ strid 
- The resource group ID.
- security_group_ strid 
- The security group ID.
- status str
- The Status of the virtual node.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- virtual_node_ strid 
- Of the virtual node number.
- virtual_node_ strname 
- The name of the virtual node.
- vpc_id str
- vswitch_id str
- The vswitch id.
- zone_id str
- The Zone.
- cpu Number
- The Number of CPU.
- createTime String
- The creation time of the virtual node.
- eniInstance StringId 
- The ENI instance ID.
- events List<Property Map>
- The event list.
- id String
- The ID of the Virtual Node.
- internetIp String
- The IP address of a public network.
- intranetIp String
- The private IP address of the RDS instance.
- memory Number
- The memory size.
- ramRole StringName 
- The ram role.
- resourceGroup StringId 
- The resource group ID.
- securityGroup StringId 
- The security group ID.
- status String
- The Status of the virtual node.
- Map<String>
- A mapping of tags to assign to the resource.
- virtualNode StringId 
- Of the virtual node number.
- virtualNode StringName 
- The name of the virtual node.
- vpcId String
- vswitchId String
- The vswitch id.
- zoneId String
- The Zone.
GetVirtualNodesNodeEvent    
- Count int
- The number of occurrences.
- FirstTimestamp string
- The first presentation time stamp.
- LastTimestamp string
- The most recent time stamp.
- Message string
- The event of the message body.
- Name string
- The name of the event.
- Reason string
- The causes of the incident.
- Type string
- The Event type.
- Count int
- The number of occurrences.
- FirstTimestamp string
- The first presentation time stamp.
- LastTimestamp string
- The most recent time stamp.
- Message string
- The event of the message body.
- Name string
- The name of the event.
- Reason string
- The causes of the incident.
- Type string
- The Event type.
- count Integer
- The number of occurrences.
- firstTimestamp String
- The first presentation time stamp.
- lastTimestamp String
- The most recent time stamp.
- message String
- The event of the message body.
- name String
- The name of the event.
- reason String
- The causes of the incident.
- type String
- The Event type.
- count number
- The number of occurrences.
- firstTimestamp string
- The first presentation time stamp.
- lastTimestamp string
- The most recent time stamp.
- message string
- The event of the message body.
- name string
- The name of the event.
- reason string
- The causes of the incident.
- type string
- The Event type.
- count int
- The number of occurrences.
- first_timestamp str
- The first presentation time stamp.
- last_timestamp str
- The most recent time stamp.
- message str
- The event of the message body.
- name str
- The name of the event.
- reason str
- The causes of the incident.
- type str
- The Event type.
- count Number
- The number of occurrences.
- firstTimestamp String
- The first presentation time stamp.
- lastTimestamp String
- The most recent time stamp.
- message String
- The event of the message body.
- name String
- The name of the event.
- reason String
- The causes of the incident.
- type String
- The Event type.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.