Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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)
// 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.
- Name
Regex string - A regex string to filter results by Virtual Node name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Group 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.
- Security
Group 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.
- Virtual
Node stringName - The name of the virtual node.
- Vswitch
Id string
- Ids []string
- A list of Virtual Node IDs.
- Name
Regex string - A regex string to filter results by Virtual Node name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Group 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.
- Security
Group 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.
- Virtual
Node stringName - The name of the virtual node.
- Vswitch
Id string
- ids List<String>
- A list of Virtual Node IDs.
- name
Regex String - A regex string to filter results by Virtual Node name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Group 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.
- security
Group 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.
- virtual
Node StringName - The name of the virtual node.
- vswitch
Id String
- ids string[]
- A list of Virtual Node IDs.
- name
Regex string - A regex string to filter results by Virtual Node name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - resource
Group 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.
- security
Group 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.
- virtual
Node stringName - The name of the virtual node.
- vswitch
Id 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.
- name
Regex String - A regex string to filter results by Virtual Node name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Group 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.
- security
Group 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.
- virtual
Node StringName - The name of the virtual node.
- vswitch
Id 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> - Name
Regex string - Output
File string - Resource
Group stringId - Security
Group stringId - Status string
- Dictionary<string, string>
- Virtual
Node stringName - Vswitch
Id string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Nodes
[]Get
Virtual Nodes Node - Name
Regex string - Output
File string - Resource
Group stringId - Security
Group stringId - Status string
- map[string]string
- Virtual
Node stringName - Vswitch
Id string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- nodes
List<Get
Virtual Nodes Node> - name
Regex String - output
File String - resource
Group StringId - security
Group StringId - status String
- Map<String,String>
- virtual
Node StringName - vswitch
Id String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- nodes
Get
Virtual Nodes Node[] - name
Regex string - output
File string - resource
Group stringId - security
Group stringId - status string
- {[key: string]: string}
- virtual
Node stringName - vswitch
Id string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- nodes
Sequence[Get
Virtual 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>
- name
Regex String - output
File String - resource
Group StringId - security
Group StringId - status String
- Map<String>
- virtual
Node StringName - vswitch
Id String
Supporting Types
GetVirtualNodesNode
- Cpu int
- The Number of CPU.
- Create
Time string - The creation time of the virtual node.
- Eni
Instance 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.
- Internet
Ip string - The IP address of a public network.
- Intranet
Ip string - The private IP address of the RDS instance.
- Memory int
- The memory size.
- Ram
Role stringName - The ram role.
- Resource
Group stringId - The resource group ID.
- Security
Group 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.
- Virtual
Node stringId - Of the virtual node number.
- Virtual
Node stringName - The name of the virtual node.
- Vpc
Id string - Vswitch
Id string - The vswitch id.
- Zone
Id string - The Zone.
- Cpu int
- The Number of CPU.
- Create
Time string - The creation time of the virtual node.
- Eni
Instance stringId - The ENI instance ID.
- Events
[]Get
Virtual Nodes Node Event - The event list.
- Id string
- The ID of the Virtual Node.
- Internet
Ip string - The IP address of a public network.
- Intranet
Ip string - The private IP address of the RDS instance.
- Memory int
- The memory size.
- Ram
Role stringName - The ram role.
- Resource
Group stringId - The resource group ID.
- Security
Group 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.
- Virtual
Node stringId - Of the virtual node number.
- Virtual
Node stringName - The name of the virtual node.
- Vpc
Id string - Vswitch
Id string - The vswitch id.
- Zone
Id string - The Zone.
- cpu Integer
- The Number of CPU.
- create
Time String - The creation time of the virtual node.
- eni
Instance StringId - The ENI instance ID.
- events
List<Get
Virtual Nodes Node Event> - The event list.
- id String
- The ID of the Virtual Node.
- internet
Ip String - The IP address of a public network.
- intranet
Ip String - The private IP address of the RDS instance.
- memory Integer
- The memory size.
- ram
Role StringName - The ram role.
- resource
Group StringId - The resource group ID.
- security
Group 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.
- virtual
Node StringId - Of the virtual node number.
- virtual
Node StringName - The name of the virtual node.
- vpc
Id String - vswitch
Id String - The vswitch id.
- zone
Id String - The Zone.
- cpu number
- The Number of CPU.
- create
Time string - The creation time of the virtual node.
- eni
Instance stringId - The ENI instance ID.
- events
Get
Virtual Nodes Node Event[] - The event list.
- id string
- The ID of the Virtual Node.
- internet
Ip string - The IP address of a public network.
- intranet
Ip string - The private IP address of the RDS instance.
- memory number
- The memory size.
- ram
Role stringName - The ram role.
- resource
Group stringId - The resource group ID.
- security
Group 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.
- virtual
Node stringId - Of the virtual node number.
- virtual
Node stringName - The name of the virtual node.
- vpc
Id string - vswitch
Id string - The vswitch id.
- zone
Id 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[Get
Virtual 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.
- create
Time String - The creation time of the virtual node.
- eni
Instance StringId - The ENI instance ID.
- events List<Property Map>
- The event list.
- id String
- The ID of the Virtual Node.
- internet
Ip String - The IP address of a public network.
- intranet
Ip String - The private IP address of the RDS instance.
- memory Number
- The memory size.
- ram
Role StringName - The ram role.
- resource
Group StringId - The resource group ID.
- security
Group StringId - The security group ID.
- status String
- The Status of the virtual node.
- Map<String>
- A mapping of tags to assign to the resource.
- virtual
Node StringId - Of the virtual node number.
- virtual
Node StringName - The name of the virtual node.
- vpc
Id String - vswitch
Id String - The vswitch id.
- zone
Id String - The Zone.
GetVirtualNodesNodeEvent
- Count int
- The number of occurrences.
- First
Timestamp string - The first presentation time stamp.
- Last
Timestamp 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 string - The first presentation time stamp.
- Last
Timestamp 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.
- first
Timestamp String - The first presentation time stamp.
- last
Timestamp 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.
- first
Timestamp string - The first presentation time stamp.
- last
Timestamp 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.
- first
Timestamp String - The first presentation time stamp.
- last
Timestamp 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.