1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eci
  5. getVirtualNodes
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.eci.getVirtualNodes

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    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, Any]] = 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, Any]]] = 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:eci/getVirtualNodes:getVirtualNodes
      arguments:
        # arguments dictionary

    The 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).
    ResourceGroupId string
    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.
    SecurityGroupId string
    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.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    VirtualNodeName string
    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).
    ResourceGroupId string
    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.
    SecurityGroupId string
    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.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    VirtualNodeName string
    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).
    resourceGroupId String
    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.
    securityGroupId String
    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.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    virtualNodeName String
    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).
    resourceGroupId string
    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.
    securityGroupId string
    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.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    virtualNodeName string
    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_id str
    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_id str
    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.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    virtual_node_name str
    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).
    resourceGroupId String
    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.
    securityGroupId String
    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.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    virtualNodeName String
    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.AliCloud.Eci.Outputs.GetVirtualNodesNode>
    NameRegex string
    OutputFile string
    ResourceGroupId string
    SecurityGroupId string
    Status string
    Tags Dictionary<string, object>
    VirtualNodeName string
    VswitchId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Nodes []GetVirtualNodesNode
    NameRegex string
    OutputFile string
    ResourceGroupId string
    SecurityGroupId string
    Status string
    Tags map[string]interface{}
    VirtualNodeName string
    VswitchId string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    nodes List<GetVirtualNodesNode>
    nameRegex String
    outputFile String
    resourceGroupId String
    securityGroupId String
    status String
    tags Map<String,Object>
    virtualNodeName String
    vswitchId String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    nodes GetVirtualNodesNode[]
    nameRegex string
    outputFile string
    resourceGroupId string
    securityGroupId string
    status string
    tags {[key: string]: any}
    virtualNodeName string
    vswitchId string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    nodes Sequence[GetVirtualNodesNode]
    name_regex str
    output_file str
    resource_group_id str
    security_group_id str
    status str
    tags Mapping[str, Any]
    virtual_node_name str
    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
    resourceGroupId String
    securityGroupId String
    status String
    tags Map<Any>
    virtualNodeName String
    vswitchId String

    Supporting Types

    GetVirtualNodesNode

    Cpu int
    The Number of CPU.
    CreateTime string
    The creation time of the virtual node.
    EniInstanceId string
    The ENI instance ID.
    Events List<Pulumi.AliCloud.Eci.Inputs.GetVirtualNodesNodeEvent>
    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.
    RamRoleName string
    The ram role.
    ResourceGroupId string
    The resource group ID.
    SecurityGroupId string
    The security group ID.
    Status string
    The Status of the virtual node.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    VirtualNodeId string
    Of the virtual node number.
    VirtualNodeName string
    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.
    EniInstanceId string
    The ENI instance ID.
    Events []GetVirtualNodesNodeEvent
    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.
    RamRoleName string
    The ram role.
    ResourceGroupId string
    The resource group ID.
    SecurityGroupId string
    The security group ID.
    Status string
    The Status of the virtual node.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    VirtualNodeId string
    Of the virtual node number.
    VirtualNodeName string
    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.
    eniInstanceId String
    The ENI instance ID.
    events List<GetVirtualNodesNodeEvent>
    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.
    ramRoleName String
    The ram role.
    resourceGroupId String
    The resource group ID.
    securityGroupId String
    The security group ID.
    status String
    The Status of the virtual node.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    virtualNodeId String
    Of the virtual node number.
    virtualNodeName String
    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.
    eniInstanceId string
    The ENI instance ID.
    events GetVirtualNodesNodeEvent[]
    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.
    ramRoleName string
    The ram role.
    resourceGroupId string
    The resource group ID.
    securityGroupId string
    The security group ID.
    status string
    The Status of the virtual node.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    virtualNodeId string
    Of the virtual node number.
    virtualNodeName string
    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_id str
    The ENI instance ID.
    events Sequence[GetVirtualNodesNodeEvent]
    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_name str
    The ram role.
    resource_group_id str
    The resource group ID.
    security_group_id str
    The security group ID.
    status str
    The Status of the virtual node.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    virtual_node_id str
    Of the virtual node number.
    virtual_node_name str
    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.
    eniInstanceId String
    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.
    ramRoleName String
    The ram role.
    resourceGroupId String
    The resource group ID.
    securityGroupId String
    The security group ID.
    status String
    The Status of the virtual node.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    virtualNodeId String
    Of the virtual node number.
    virtualNodeName String
    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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi