published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
This data source provides the list of Desktops in Oracle Cloud Infrastructure Desktops service.
Returns a list of desktops filtered by the specified parameters. You can limit the results to an availability domain, desktop name, desktop OCID, desktop state, pool OCID, or compartment OCID. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDesktops = oci.Desktops.getDesktops({
compartmentId: compartmentId,
availabilityDomain: desktopAvailabilityDomain,
desktopPoolId: testDesktopPool.id,
displayName: desktopDisplayName,
id: desktopId,
state: desktopState,
});
import pulumi
import pulumi_oci as oci
test_desktops = oci.Desktops.get_desktops(compartment_id=compartment_id,
availability_domain=desktop_availability_domain,
desktop_pool_id=test_desktop_pool["id"],
display_name=desktop_display_name,
id=desktop_id,
state=desktop_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/desktops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := desktops.GetDesktops(ctx, &desktops.GetDesktopsArgs{
CompartmentId: compartmentId,
AvailabilityDomain: pulumi.StringRef(desktopAvailabilityDomain),
DesktopPoolId: pulumi.StringRef(testDesktopPool.Id),
DisplayName: pulumi.StringRef(desktopDisplayName),
Id: pulumi.StringRef(desktopId),
State: pulumi.StringRef(desktopState),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testDesktops = Oci.Desktops.GetDesktops.Invoke(new()
{
CompartmentId = compartmentId,
AvailabilityDomain = desktopAvailabilityDomain,
DesktopPoolId = testDesktopPool.Id,
DisplayName = desktopDisplayName,
Id = desktopId,
State = desktopState,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Desktops.DesktopsFunctions;
import com.pulumi.oci.Desktops.inputs.GetDesktopsArgs;
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 testDesktops = DesktopsFunctions.getDesktops(GetDesktopsArgs.builder()
.compartmentId(compartmentId)
.availabilityDomain(desktopAvailabilityDomain)
.desktopPoolId(testDesktopPool.id())
.displayName(desktopDisplayName)
.id(desktopId)
.state(desktopState)
.build());
}
}
variables:
testDesktops:
fn::invoke:
function: oci:Desktops:getDesktops
arguments:
compartmentId: ${compartmentId}
availabilityDomain: ${desktopAvailabilityDomain}
desktopPoolId: ${testDesktopPool.id}
displayName: ${desktopDisplayName}
id: ${desktopId}
state: ${desktopState}
Using getDesktops
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 getDesktops(args: GetDesktopsArgs, opts?: InvokeOptions): Promise<GetDesktopsResult>
function getDesktopsOutput(args: GetDesktopsOutputArgs, opts?: InvokeOptions): Output<GetDesktopsResult>def get_desktops(availability_domain: Optional[str] = None,
compartment_id: Optional[str] = None,
desktop_pool_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[GetDesktopsFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDesktopsResult
def get_desktops_output(availability_domain: Optional[pulumi.Input[str]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
desktop_pool_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDesktopsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDesktopsResult]func GetDesktops(ctx *Context, args *GetDesktopsArgs, opts ...InvokeOption) (*GetDesktopsResult, error)
func GetDesktopsOutput(ctx *Context, args *GetDesktopsOutputArgs, opts ...InvokeOption) GetDesktopsResultOutput> Note: This function is named GetDesktops in the Go SDK.
public static class GetDesktops
{
public static Task<GetDesktopsResult> InvokeAsync(GetDesktopsArgs args, InvokeOptions? opts = null)
public static Output<GetDesktopsResult> Invoke(GetDesktopsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDesktopsResult> getDesktops(GetDesktopsArgs args, InvokeOptions options)
public static Output<GetDesktopsResult> getDesktops(GetDesktopsArgs args, InvokeOptions options)
fn::invoke:
function: oci:Desktops/getDesktops:getDesktops
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - The OCID of the compartment of the desktop pool.
- Availability
Domain string - The name of the availability domain.
- Desktop
Pool stringId - The OCID of the desktop pool.
- Display
Name string - A filter to return only results with the given displayName.
- Filters
List<Get
Desktops Filter> - Id string
- A filter to return only results with the given OCID.
- State string
- A filter to return only results with the given lifecycleState.
- Compartment
Id string - The OCID of the compartment of the desktop pool.
- Availability
Domain string - The name of the availability domain.
- Desktop
Pool stringId - The OCID of the desktop pool.
- Display
Name string - A filter to return only results with the given displayName.
- Filters
[]Get
Desktops Filter - Id string
- A filter to return only results with the given OCID.
- State string
- A filter to return only results with the given lifecycleState.
- compartment
Id String - The OCID of the compartment of the desktop pool.
- availability
Domain String - The name of the availability domain.
- desktop
Pool StringId - The OCID of the desktop pool.
- display
Name String - A filter to return only results with the given displayName.
- filters
List<Get
Filter> - id String
- A filter to return only results with the given OCID.
- state String
- A filter to return only results with the given lifecycleState.
- compartment
Id string - The OCID of the compartment of the desktop pool.
- availability
Domain string - The name of the availability domain.
- desktop
Pool stringId - The OCID of the desktop pool.
- display
Name string - A filter to return only results with the given displayName.
- filters
Get
Desktops Filter[] - id string
- A filter to return only results with the given OCID.
- state string
- A filter to return only results with the given lifecycleState.
- compartment_
id str - The OCID of the compartment of the desktop pool.
- availability_
domain str - The name of the availability domain.
- desktop_
pool_ strid - The OCID of the desktop pool.
- display_
name str - A filter to return only results with the given displayName.
- filters
Sequence[Get
Desktops Filter] - id str
- A filter to return only results with the given OCID.
- state str
- A filter to return only results with the given lifecycleState.
- compartment
Id String - The OCID of the compartment of the desktop pool.
- availability
Domain String - The name of the availability domain.
- desktop
Pool StringId - The OCID of the desktop pool.
- display
Name String - A filter to return only results with the given displayName.
- filters List<Property Map>
- id String
- A filter to return only results with the given OCID.
- state String
- A filter to return only results with the given lifecycleState.
getDesktops Result
The following output properties are available:
- Compartment
Id string - Desktop
Collections List<GetDesktops Desktop Collection> - The list of desktop_collection.
- Availability
Domain string - Desktop
Pool stringId - Display
Name string - A user friendly display name. Avoid entering confidential information.
- Filters
List<Get
Desktops Filter> - Id string
- The OCID of the desktop.
- State string
- The state of the desktop.
- Compartment
Id string - Desktop
Collections []GetDesktops Desktop Collection - The list of desktop_collection.
- Availability
Domain string - Desktop
Pool stringId - Display
Name string - A user friendly display name. Avoid entering confidential information.
- Filters
[]Get
Desktops Filter - Id string
- The OCID of the desktop.
- State string
- The state of the desktop.
- compartment
Id String - desktop
Collections List<GetDesktop Collection> - The list of desktop_collection.
- availability
Domain String - desktop
Pool StringId - display
Name String - A user friendly display name. Avoid entering confidential information.
- filters
List<Get
Filter> - id String
- The OCID of the desktop.
- state String
- The state of the desktop.
- compartment
Id string - desktop
Collections GetDesktops Desktop Collection[] - The list of desktop_collection.
- availability
Domain string - desktop
Pool stringId - display
Name string - A user friendly display name. Avoid entering confidential information.
- filters
Get
Desktops Filter[] - id string
- The OCID of the desktop.
- state string
- The state of the desktop.
- compartment_
id str - desktop_
collections Sequence[GetDesktops Desktop Collection] - The list of desktop_collection.
- availability_
domain str - desktop_
pool_ strid - display_
name str - A user friendly display name. Avoid entering confidential information.
- filters
Sequence[Get
Desktops Filter] - id str
- The OCID of the desktop.
- state str
- The state of the desktop.
- compartment
Id String - desktop
Collections List<Property Map> - The list of desktop_collection.
- availability
Domain String - desktop
Pool StringId - display
Name String - A user friendly display name. Avoid entering confidential information.
- filters List<Property Map>
- id String
- The OCID of the desktop.
- state String
- The state of the desktop.
Supporting Types
GetDesktopsDesktopCollection
GetDesktopsDesktopCollectionItem
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - Desktop
Connections List<GetDesktops Desktop Collection Item Desktop Connection> - Provides information about a connection to a desktop, including connect and disconnect time, and client properties.
- Display
Name string - A filter to return only results with the given displayName.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - Id string
- A filter to return only results with the given OCID.
- Images
List<Get
Desktops Desktop Collection Item Image> - Pool
Id string - The OCID of the desktop pool the desktop is a member of.
- State string
- A filter to return only results with the given lifecycleState.
- Time
Created string - The date and time the resource was created.
- User
Name string - The owner of the desktop.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - Desktop
Connections []GetDesktops Desktop Collection Item Desktop Connection - Provides information about a connection to a desktop, including connect and disconnect time, and client properties.
- Display
Name string - A filter to return only results with the given displayName.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - Id string
- A filter to return only results with the given OCID.
- Images
[]Get
Desktops Desktop Collection Item Image - Pool
Id string - The OCID of the desktop pool the desktop is a member of.
- State string
- A filter to return only results with the given lifecycleState.
- Time
Created string - The date and time the resource was created.
- User
Name string - The owner of the desktop.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - desktop
Connections List<GetDesktop Collection Item Desktop Connection> - Provides information about a connection to a desktop, including connect and disconnect time, and client properties.
- display
Name String - A filter to return only results with the given displayName.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id String
- A filter to return only results with the given OCID.
- images
List<Get
Desktop Collection Item Image> - pool
Id String - The OCID of the desktop pool the desktop is a member of.
- state String
- A filter to return only results with the given lifecycleState.
- time
Created String - The date and time the resource was created.
- user
Name String - The owner of the desktop.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - desktop
Connections GetDesktops Desktop Collection Item Desktop Connection[] - Provides information about a connection to a desktop, including connect and disconnect time, and client properties.
- display
Name string - A filter to return only results with the given displayName.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id string
- A filter to return only results with the given OCID.
- images
Get
Desktops Desktop Collection Item Image[] - pool
Id string - The OCID of the desktop pool the desktop is a member of.
- state string
- A filter to return only results with the given lifecycleState.
- time
Created string - The date and time the resource was created.
- user
Name string - The owner of the desktop.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - desktop_
connections Sequence[GetDesktops Desktop Collection Item Desktop Connection] - Provides information about a connection to a desktop, including connect and disconnect time, and client properties.
- display_
name str - A filter to return only results with the given displayName.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id str
- A filter to return only results with the given OCID.
- images
Sequence[Get
Desktops Desktop Collection Item Image] - pool_
id str - The OCID of the desktop pool the desktop is a member of.
- state str
- A filter to return only results with the given lifecycleState.
- time_
created str - The date and time the resource was created.
- user_
name str - The owner of the desktop.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - desktop
Connections List<Property Map> - Provides information about a connection to a desktop, including connect and disconnect time, and client properties.
- display
Name String - A filter to return only results with the given displayName.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id String
- A filter to return only results with the given OCID.
- images List<Property Map>
- pool
Id String - The OCID of the desktop pool the desktop is a member of.
- state String
- A filter to return only results with the given lifecycleState.
- time
Created String - The date and time the resource was created.
- user
Name String - The owner of the desktop.
GetDesktopsDesktopCollectionItemDesktopConnection
- Client
Platform string - The platform on which the Secure Desktops client runs.
- Client
Type string - The type of Secure Desktops client connected to a desktop.
- Client
Version string - The version of the Secure Desktops client connected to a desktop, applicable only to the installed client type.
- Last
Actions List<GetDesktops Desktop Collection Item Desktop Connection Last Action> - Provides information about actions performed on a desktop, including type and time.
- Next
Actions List<GetDesktops Desktop Collection Item Desktop Connection Next Action> - Provides information about actions performed on a desktop, including type and time.
- Time
Connected string - The time when the last connection to a desktop started.
- Time
Disconnected string - The time when the last connection to a desktop ended.
- Client
Platform string - The platform on which the Secure Desktops client runs.
- Client
Type string - The type of Secure Desktops client connected to a desktop.
- Client
Version string - The version of the Secure Desktops client connected to a desktop, applicable only to the installed client type.
- Last
Actions []GetDesktops Desktop Collection Item Desktop Connection Last Action - Provides information about actions performed on a desktop, including type and time.
- Next
Actions []GetDesktops Desktop Collection Item Desktop Connection Next Action - Provides information about actions performed on a desktop, including type and time.
- Time
Connected string - The time when the last connection to a desktop started.
- Time
Disconnected string - The time when the last connection to a desktop ended.
- client
Platform String - The platform on which the Secure Desktops client runs.
- client
Type String - The type of Secure Desktops client connected to a desktop.
- client
Version String - The version of the Secure Desktops client connected to a desktop, applicable only to the installed client type.
- last
Actions List<GetDesktop Collection Item Desktop Connection Last Action> - Provides information about actions performed on a desktop, including type and time.
- next
Actions List<GetDesktop Collection Item Desktop Connection Next Action> - Provides information about actions performed on a desktop, including type and time.
- time
Connected String - The time when the last connection to a desktop started.
- time
Disconnected String - The time when the last connection to a desktop ended.
- client
Platform string - The platform on which the Secure Desktops client runs.
- client
Type string - The type of Secure Desktops client connected to a desktop.
- client
Version string - The version of the Secure Desktops client connected to a desktop, applicable only to the installed client type.
- last
Actions GetDesktops Desktop Collection Item Desktop Connection Last Action[] - Provides information about actions performed on a desktop, including type and time.
- next
Actions GetDesktops Desktop Collection Item Desktop Connection Next Action[] - Provides information about actions performed on a desktop, including type and time.
- time
Connected string - The time when the last connection to a desktop started.
- time
Disconnected string - The time when the last connection to a desktop ended.
- client_
platform str - The platform on which the Secure Desktops client runs.
- client_
type str - The type of Secure Desktops client connected to a desktop.
- client_
version str - The version of the Secure Desktops client connected to a desktop, applicable only to the installed client type.
- last_
actions Sequence[GetDesktops Desktop Collection Item Desktop Connection Last Action] - Provides information about actions performed on a desktop, including type and time.
- next_
actions Sequence[GetDesktops Desktop Collection Item Desktop Connection Next Action] - Provides information about actions performed on a desktop, including type and time.
- time_
connected str - The time when the last connection to a desktop started.
- time_
disconnected str - The time when the last connection to a desktop ended.
- client
Platform String - The platform on which the Secure Desktops client runs.
- client
Type String - The type of Secure Desktops client connected to a desktop.
- client
Version String - The version of the Secure Desktops client connected to a desktop, applicable only to the installed client type.
- last
Actions List<Property Map> - Provides information about actions performed on a desktop, including type and time.
- next
Actions List<Property Map> - Provides information about actions performed on a desktop, including type and time.
- time
Connected String - The time when the last connection to a desktop started.
- time
Disconnected String - The time when the last connection to a desktop ended.
GetDesktopsDesktopCollectionItemDesktopConnectionLastAction
- Action string
- An action performed on a desktop.
- Time
Applied string - The time of an action performed on a desktop.
- Action string
- An action performed on a desktop.
- Time
Applied string - The time of an action performed on a desktop.
- action String
- An action performed on a desktop.
- time
Applied String - The time of an action performed on a desktop.
- action string
- An action performed on a desktop.
- time
Applied string - The time of an action performed on a desktop.
- action str
- An action performed on a desktop.
- time_
applied str - The time of an action performed on a desktop.
- action String
- An action performed on a desktop.
- time
Applied String - The time of an action performed on a desktop.
GetDesktopsDesktopCollectionItemDesktopConnectionNextAction
- Action string
- An action performed on a desktop.
- Time
Applied string - The time of an action performed on a desktop.
- Action string
- An action performed on a desktop.
- Time
Applied string - The time of an action performed on a desktop.
- action String
- An action performed on a desktop.
- time
Applied String - The time of an action performed on a desktop.
- action string
- An action performed on a desktop.
- time
Applied string - The time of an action performed on a desktop.
- action str
- An action performed on a desktop.
- time_
applied str - The time of an action performed on a desktop.
- action String
- An action performed on a desktop.
- time
Applied String - The time of an action performed on a desktop.
GetDesktopsDesktopCollectionItemImage
- Image
Id string - Image
Name string - Operating
System string
- Image
Id string - Image
Name string - Operating
System string
- image
Id String - image
Name String - operating
System String
- image
Id string - image
Name string - operating
System string
- image_
id str - image_
name str - operating_
system str
- image
Id String - image
Name String - operating
System String
GetDesktopsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
published on Thursday, Mar 19, 2026 by Pulumi
