vra 0.12.0 published on Monday, Apr 14, 2025 by vmware
vra.getMachine
Explore with Pulumi AI
—layout: “vra”
page_title: “VMware vRealize Automation: vra.Machine” description: |- Provides a data lookup for vra_machine.
Data Source: vra.Machine
Example Usage
S
This is an example of how to read a machine data source.
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getMachine({
id: _var.my_machine_id,
});
import pulumi
import pulumi_vra as vra
this = vra.get_machine(id=var["my_machine_id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vra.LookupMachine(ctx, &vra.LookupMachineArgs{
Id: pulumi.StringRef(_var.My_machine_id),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() =>
{
var @this = Vra.GetMachine.Invoke(new()
{
Id = @var.My_machine_id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetMachineArgs;
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 this = VraFunctions.getMachine(GetMachineArgs.builder()
.id(var_.my_machine_id())
.build());
}
}
variables:
this:
fn::invoke:
function: vra:getMachine
arguments:
id: ${var.my_machine_id}
Machine data source filter by name:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getMachine({
filter: `name eq '${_var.machine_name}'`,
});
import pulumi
import pulumi_vra as vra
this = vra.get_machine(filter=f"name eq '{var['machine_name']}'")
package main
import (
"fmt"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vra.LookupMachine(ctx, &vra.LookupMachineArgs{
Filter: pulumi.StringRef(fmt.Sprintf("name eq '%v'", _var.Machine_name)),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() =>
{
var @this = Vra.GetMachine.Invoke(new()
{
Filter = $"name eq '{@var.Machine_name}'",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetMachineArgs;
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 this = VraFunctions.getMachine(GetMachineArgs.builder()
.filter(String.format("name eq '%s'", var_.machine_name()))
.build());
}
}
variables:
this:
fn::invoke:
function: vra:getMachine
arguments:
filter: name eq '${var.machine_name}'
Using getMachine
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 getMachine(args: GetMachineArgs, opts?: InvokeOptions): Promise<GetMachineResult>
function getMachineOutput(args: GetMachineOutputArgs, opts?: InvokeOptions): Output<GetMachineResult>
def get_machine(description: Optional[str] = None,
filter: Optional[str] = None,
id: Optional[str] = None,
tags: Optional[Sequence[GetMachineTag]] = None,
opts: Optional[InvokeOptions] = None) -> GetMachineResult
def get_machine_output(description: Optional[pulumi.Input[str]] = None,
filter: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetMachineTagArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMachineResult]
func LookupMachine(ctx *Context, args *LookupMachineArgs, opts ...InvokeOption) (*LookupMachineResult, error)
func LookupMachineOutput(ctx *Context, args *LookupMachineOutputArgs, opts ...InvokeOption) LookupMachineResultOutput
> Note: This function is named LookupMachine
in the Go SDK.
public static class GetMachine
{
public static Task<GetMachineResult> InvokeAsync(GetMachineArgs args, InvokeOptions? opts = null)
public static Output<GetMachineResult> Invoke(GetMachineInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMachineResult> getMachine(GetMachineArgs args, InvokeOptions options)
public static Output<GetMachineResult> getMachine(GetMachineArgs args, InvokeOptions options)
fn::invoke:
function: vra:index/getMachine:getMachine
arguments:
# arguments dictionary
The following arguments are supported:
- Description string
- A human-friendly description.
- Filter string
- Filter query string that is supported by vRA multi-cloud IaaS API. Example:
regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'
. - Id string
- The id of the image profile instance.
- List<Get
Machine Tag> - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- Description string
- A human-friendly description.
- Filter string
- Filter query string that is supported by vRA multi-cloud IaaS API. Example:
regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'
. - Id string
- The id of the image profile instance.
- []Get
Machine Tag - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- description String
- A human-friendly description.
- filter String
- Filter query string that is supported by vRA multi-cloud IaaS API. Example:
regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'
. - id String
- The id of the image profile instance.
- List<Get
Machine Tag> - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- description string
- A human-friendly description.
- filter string
- Filter query string that is supported by vRA multi-cloud IaaS API. Example:
regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'
. - id string
- The id of the image profile instance.
- Get
Machine Tag[] - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- description str
- A human-friendly description.
- filter str
- Filter query string that is supported by vRA multi-cloud IaaS API. Example:
regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'
. - id str
- The id of the image profile instance.
- Sequence[Get
Machine Tag] - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- description String
- A human-friendly description.
- filter String
- Filter query string that is supported by vRA multi-cloud IaaS API. Example:
regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'
. - id String
- The id of the image profile instance.
- List<Property Map>
- A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
getMachine Result
The following output properties are available:
- Address string
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- Cloud
Account List<string>Ids - Set of ids of the cloud accounts this resource belongs to.
- Created
At string - Date when the entity was created. The date is in ISO 6801 and UTC.
- Custom
Properties Dictionary<string, string> - Additional properties that may be used to extend the base resource.
- Deployment
Id string - Deployment id that is associated with this resource.
- External
Id string - External entity Id on the provider side.
- External
Region stringId - The external regionId of the resource.
- External
Zone stringId - The external zoneId of the resource.
- Id string
- Links
List<Get
Machine Link> - HATEOAS of the entity
- Name string
- A human-friendly name used as an identifier in APIs that support this option.
- Org
Id string - The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- Power
State string - Power state of machine.
- Project
Id string - The id of the project this resource belongs to.
- Updated
At string - Description string
- Filter string
- List<Get
Machine Tag> - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- Address string
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- Cloud
Account []stringIds - Set of ids of the cloud accounts this resource belongs to.
- Created
At string - Date when the entity was created. The date is in ISO 6801 and UTC.
- Custom
Properties map[string]string - Additional properties that may be used to extend the base resource.
- Deployment
Id string - Deployment id that is associated with this resource.
- External
Id string - External entity Id on the provider side.
- External
Region stringId - The external regionId of the resource.
- External
Zone stringId - The external zoneId of the resource.
- Id string
- Links
[]Get
Machine Link - HATEOAS of the entity
- Name string
- A human-friendly name used as an identifier in APIs that support this option.
- Org
Id string - The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- Power
State string - Power state of machine.
- Project
Id string - The id of the project this resource belongs to.
- Updated
At string - Description string
- Filter string
- []Get
Machine Tag - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- address String
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloud
Account List<String>Ids - Set of ids of the cloud accounts this resource belongs to.
- created
At String - Date when the entity was created. The date is in ISO 6801 and UTC.
- custom
Properties Map<String,String> - Additional properties that may be used to extend the base resource.
- deployment
Id String - Deployment id that is associated with this resource.
- external
Id String - External entity Id on the provider side.
- external
Region StringId - The external regionId of the resource.
- external
Zone StringId - The external zoneId of the resource.
- id String
- links
List<Get
Machine Link> - HATEOAS of the entity
- name String
- A human-friendly name used as an identifier in APIs that support this option.
- org
Id String - The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- power
State String - Power state of machine.
- project
Id String - The id of the project this resource belongs to.
- updated
At String - description String
- filter String
- List<Get
Machine Tag> - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- address string
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloud
Account string[]Ids - Set of ids of the cloud accounts this resource belongs to.
- created
At string - Date when the entity was created. The date is in ISO 6801 and UTC.
- custom
Properties {[key: string]: string} - Additional properties that may be used to extend the base resource.
- deployment
Id string - Deployment id that is associated with this resource.
- external
Id string - External entity Id on the provider side.
- external
Region stringId - The external regionId of the resource.
- external
Zone stringId - The external zoneId of the resource.
- id string
- links
Get
Machine Link[] - HATEOAS of the entity
- name string
- A human-friendly name used as an identifier in APIs that support this option.
- org
Id string - The id of the organization this entity belongs to.
- owner string
- Email of the user that owns the entity.
- power
State string - Power state of machine.
- project
Id string - The id of the project this resource belongs to.
- updated
At string - description string
- filter string
- Get
Machine Tag[] - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- address str
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloud_
account_ Sequence[str]ids - Set of ids of the cloud accounts this resource belongs to.
- created_
at str - Date when the entity was created. The date is in ISO 6801 and UTC.
- custom_
properties Mapping[str, str] - Additional properties that may be used to extend the base resource.
- deployment_
id str - Deployment id that is associated with this resource.
- external_
id str - External entity Id on the provider side.
- external_
region_ strid - The external regionId of the resource.
- external_
zone_ strid - The external zoneId of the resource.
- id str
- links
Sequence[Get
Machine Link] - HATEOAS of the entity
- name str
- A human-friendly name used as an identifier in APIs that support this option.
- org_
id str - The id of the organization this entity belongs to.
- owner str
- Email of the user that owns the entity.
- power_
state str - Power state of machine.
- project_
id str - The id of the project this resource belongs to.
- updated_
at str - description str
- filter str
- Sequence[Get
Machine Tag] - A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
- address String
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloud
Account List<String>Ids - Set of ids of the cloud accounts this resource belongs to.
- created
At String - Date when the entity was created. The date is in ISO 6801 and UTC.
- custom
Properties Map<String> - Additional properties that may be used to extend the base resource.
- deployment
Id String - Deployment id that is associated with this resource.
- external
Id String - External entity Id on the provider side.
- external
Region StringId - The external regionId of the resource.
- external
Zone StringId - The external zoneId of the resource.
- id String
- links List<Property Map>
- HATEOAS of the entity
- name String
- A human-friendly name used as an identifier in APIs that support this option.
- org
Id String - The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- power
State String - Power state of machine.
- project
Id String - The id of the project this resource belongs to.
- updated
At String - description String
- filter String
- List<Property Map>
- A set of tag keys and optional values that were set on this resource.
example:
[ { "key" : "ownedBy", "value": "Rainpole" } ]
Supporting Types
GetMachineLink
GetMachineTag
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the
vra
Terraform Provider.