1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Desktops
  5. getDesktopPoolDesktops
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Desktops.getDesktopPoolDesktops

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the list of Desktop Pool Desktops in Oracle Cloud Infrastructure Desktops service.

    Returns a list of desktops within a given desktop pool. You can limit the results to an availability domain, desktop name, or desktop state. 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 testDesktopPoolDesktops = oci.Desktops.getDesktopPoolDesktops({
        compartmentId: compartmentId,
        desktopPoolId: testDesktopPool.id,
        availabilityDomain: desktopPoolDesktopAvailabilityDomain,
        displayName: desktopPoolDesktopDisplayName,
        id: desktopPoolDesktopId,
        state: desktopPoolDesktopState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_desktop_pool_desktops = oci.Desktops.get_desktop_pool_desktops(compartment_id=compartment_id,
        desktop_pool_id=test_desktop_pool["id"],
        availability_domain=desktop_pool_desktop_availability_domain,
        display_name=desktop_pool_desktop_display_name,
        id=desktop_pool_desktop_id,
        state=desktop_pool_desktop_state)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Desktops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Desktops.GetDesktopPoolDesktops(ctx, &desktops.GetDesktopPoolDesktopsArgs{
    			CompartmentId:      compartmentId,
    			DesktopPoolId:      testDesktopPool.Id,
    			AvailabilityDomain: pulumi.StringRef(desktopPoolDesktopAvailabilityDomain),
    			DisplayName:        pulumi.StringRef(desktopPoolDesktopDisplayName),
    			Id:                 pulumi.StringRef(desktopPoolDesktopId),
    			State:              pulumi.StringRef(desktopPoolDesktopState),
    		}, 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 testDesktopPoolDesktops = Oci.Desktops.GetDesktopPoolDesktops.Invoke(new()
        {
            CompartmentId = compartmentId,
            DesktopPoolId = testDesktopPool.Id,
            AvailabilityDomain = desktopPoolDesktopAvailabilityDomain,
            DisplayName = desktopPoolDesktopDisplayName,
            Id = desktopPoolDesktopId,
            State = desktopPoolDesktopState,
        });
    
    });
    
    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.GetDesktopPoolDesktopsArgs;
    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 testDesktopPoolDesktops = DesktopsFunctions.getDesktopPoolDesktops(GetDesktopPoolDesktopsArgs.builder()
                .compartmentId(compartmentId)
                .desktopPoolId(testDesktopPool.id())
                .availabilityDomain(desktopPoolDesktopAvailabilityDomain)
                .displayName(desktopPoolDesktopDisplayName)
                .id(desktopPoolDesktopId)
                .state(desktopPoolDesktopState)
                .build());
    
        }
    }
    
    variables:
      testDesktopPoolDesktops:
        fn::invoke:
          Function: oci:Desktops:getDesktopPoolDesktops
          Arguments:
            compartmentId: ${compartmentId}
            desktopPoolId: ${testDesktopPool.id}
            availabilityDomain: ${desktopPoolDesktopAvailabilityDomain}
            displayName: ${desktopPoolDesktopDisplayName}
            id: ${desktopPoolDesktopId}
            state: ${desktopPoolDesktopState}
    

    Using getDesktopPoolDesktops

    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 getDesktopPoolDesktops(args: GetDesktopPoolDesktopsArgs, opts?: InvokeOptions): Promise<GetDesktopPoolDesktopsResult>
    function getDesktopPoolDesktopsOutput(args: GetDesktopPoolDesktopsOutputArgs, opts?: InvokeOptions): Output<GetDesktopPoolDesktopsResult>
    def get_desktop_pool_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[_desktops.GetDesktopPoolDesktopsFilter]] = None,
                                  id: Optional[str] = None,
                                  state: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetDesktopPoolDesktopsResult
    def get_desktop_pool_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[_desktops.GetDesktopPoolDesktopsFilterArgs]]]] = None,
                                  id: Optional[pulumi.Input[str]] = None,
                                  state: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetDesktopPoolDesktopsResult]
    func GetDesktopPoolDesktops(ctx *Context, args *GetDesktopPoolDesktopsArgs, opts ...InvokeOption) (*GetDesktopPoolDesktopsResult, error)
    func GetDesktopPoolDesktopsOutput(ctx *Context, args *GetDesktopPoolDesktopsOutputArgs, opts ...InvokeOption) GetDesktopPoolDesktopsResultOutput

    > Note: This function is named GetDesktopPoolDesktops in the Go SDK.

    public static class GetDesktopPoolDesktops 
    {
        public static Task<GetDesktopPoolDesktopsResult> InvokeAsync(GetDesktopPoolDesktopsArgs args, InvokeOptions? opts = null)
        public static Output<GetDesktopPoolDesktopsResult> Invoke(GetDesktopPoolDesktopsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDesktopPoolDesktopsResult> getDesktopPoolDesktops(GetDesktopPoolDesktopsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Desktops/getDesktopPoolDesktops:getDesktopPoolDesktops
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment of the desktop pool.
    DesktopPoolId string
    The OCID of the desktop pool.
    AvailabilityDomain string
    The name of the availability domain.
    DisplayName string
    A filter to return only results with the given displayName.
    Filters List<GetDesktopPoolDesktopsFilter>
    Id string
    A filter to return only results with the given OCID.
    State string
    A filter to return only results with the given lifecycleState.
    CompartmentId string
    The OCID of the compartment of the desktop pool.
    DesktopPoolId string
    The OCID of the desktop pool.
    AvailabilityDomain string
    The name of the availability domain.
    DisplayName string
    A filter to return only results with the given displayName.
    Filters []GetDesktopPoolDesktopsFilter
    Id string
    A filter to return only results with the given OCID.
    State string
    A filter to return only results with the given lifecycleState.
    compartmentId String
    The OCID of the compartment of the desktop pool.
    desktopPoolId String
    The OCID of the desktop pool.
    availabilityDomain String
    The name of the availability domain.
    displayName String
    A filter to return only results with the given displayName.
    filters List<GetDesktopPoolFilter>
    id String
    A filter to return only results with the given OCID.
    state String
    A filter to return only results with the given lifecycleState.
    compartmentId string
    The OCID of the compartment of the desktop pool.
    desktopPoolId string
    The OCID of the desktop pool.
    availabilityDomain string
    The name of the availability domain.
    displayName string
    A filter to return only results with the given displayName.
    filters GetDesktopPoolDesktopsFilter[]
    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.
    desktop_pool_id str
    The OCID of the desktop pool.
    availability_domain str
    The name of the availability domain.
    display_name str
    A filter to return only results with the given displayName.
    filters Sequence[desktops.GetDesktopPoolDesktopsFilter]
    id str
    A filter to return only results with the given OCID.
    state str
    A filter to return only results with the given lifecycleState.
    compartmentId String
    The OCID of the compartment of the desktop pool.
    desktopPoolId String
    The OCID of the desktop pool.
    availabilityDomain String
    The name of the availability domain.
    displayName 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.

    getDesktopPoolDesktops Result

    The following output properties are available:

    compartmentId String
    desktopPoolDesktopCollections List<Property Map>
    The list of desktop_pool_desktop_collection.
    desktopPoolId String
    availabilityDomain String
    displayName String
    filters List<Property Map>
    id String
    state String
    The state of the desktop.

    Supporting Types

    GetDesktopPoolDesktopsDesktopPoolDesktopCollection

    items List<Property Map>
    A list of desktops.

    GetDesktopPoolDesktopsDesktopPoolDesktopCollectionItem

    DefinedTags 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"}
    DesktopId string
    The OCID of the desktop.
    FreeformTags 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"}
    InstanceId string
    The OCID of the compute resource used by this desktop.
    IsAssigned bool
    Indicates whether the desktop is assigned to a user.
    State string
    A filter to return only results with the given lifecycleState.
    TimeCreated string
    The date and time the resource was created.
    UserName string
    The owner of the desktop.
    DefinedTags 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"}
    DesktopId string
    The OCID of the desktop.
    FreeformTags 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"}
    InstanceId string
    The OCID of the compute resource used by this desktop.
    IsAssigned bool
    Indicates whether the desktop is assigned to a user.
    State string
    A filter to return only results with the given lifecycleState.
    TimeCreated string
    The date and time the resource was created.
    UserName string
    The owner of the desktop.
    definedTags 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"}
    desktopId String
    The OCID of the desktop.
    freeformTags 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"}
    instanceId String
    The OCID of the compute resource used by this desktop.
    isAssigned Boolean
    Indicates whether the desktop is assigned to a user.
    state String
    A filter to return only results with the given lifecycleState.
    timeCreated String
    The date and time the resource was created.
    userName String
    The owner of the desktop.
    definedTags {[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"}
    desktopId string
    The OCID of the desktop.
    freeformTags {[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"}
    instanceId string
    The OCID of the compute resource used by this desktop.
    isAssigned boolean
    Indicates whether the desktop is assigned to a user.
    state string
    A filter to return only results with the given lifecycleState.
    timeCreated string
    The date and time the resource was created.
    userName string
    The owner of the desktop.
    defined_tags 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_id str
    The OCID of the desktop.
    freeform_tags 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"}
    instance_id str
    The OCID of the compute resource used by this desktop.
    is_assigned bool
    Indicates whether the desktop is assigned to a user.
    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.
    definedTags 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"}
    desktopId String
    The OCID of the desktop.
    freeformTags 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"}
    instanceId String
    The OCID of the compute resource used by this desktop.
    isAssigned Boolean
    Indicates whether the desktop is assigned to a user.
    state String
    A filter to return only results with the given lifecycleState.
    timeCreated String
    The date and time the resource was created.
    userName String
    The owner of the desktop.

    GetDesktopPoolDesktopsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi