AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.workspaces.getWorkspace
Explore with Pulumi AI
Use this data source to get information about a workspace in AWS Workspaces Service.
Example Usage
Filter By Workspace ID
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.workspaces.getWorkspace({
workspaceId: "ws-cj5xcxsz5",
});
import pulumi
import pulumi_aws as aws
example = aws.workspaces.get_workspace(workspace_id="ws-cj5xcxsz5")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspaces"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := workspaces.LookupWorkspace(ctx, &workspaces.LookupWorkspaceArgs{
WorkspaceId: pulumi.StringRef("ws-cj5xcxsz5"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Workspaces.GetWorkspace.Invoke(new()
{
WorkspaceId = "ws-cj5xcxsz5",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workspaces.WorkspacesFunctions;
import com.pulumi.aws.workspaces.inputs.GetWorkspaceArgs;
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 example = WorkspacesFunctions.getWorkspace(GetWorkspaceArgs.builder()
.workspaceId("ws-cj5xcxsz5")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:workspaces:getWorkspace
Arguments:
workspaceId: ws-cj5xcxsz5
Filter By Directory ID & User Name
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.workspaces.getWorkspace({
directoryId: "d-9967252f57",
userName: "Example",
});
import pulumi
import pulumi_aws as aws
example = aws.workspaces.get_workspace(directory_id="d-9967252f57",
user_name="Example")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspaces"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := workspaces.LookupWorkspace(ctx, &workspaces.LookupWorkspaceArgs{
DirectoryId: pulumi.StringRef("d-9967252f57"),
UserName: pulumi.StringRef("Example"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Workspaces.GetWorkspace.Invoke(new()
{
DirectoryId = "d-9967252f57",
UserName = "Example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workspaces.WorkspacesFunctions;
import com.pulumi.aws.workspaces.inputs.GetWorkspaceArgs;
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 example = WorkspacesFunctions.getWorkspace(GetWorkspaceArgs.builder()
.directoryId("d-9967252f57")
.userName("Example")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:workspaces:getWorkspace
Arguments:
directoryId: d-9967252f57
userName: Example
Using getWorkspace
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 getWorkspace(args: GetWorkspaceArgs, opts?: InvokeOptions): Promise<GetWorkspaceResult>
function getWorkspaceOutput(args: GetWorkspaceOutputArgs, opts?: InvokeOptions): Output<GetWorkspaceResult>
def get_workspace(directory_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
user_name: Optional[str] = None,
workspace_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWorkspaceResult
def get_workspace_output(directory_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
user_name: Optional[pulumi.Input[str]] = None,
workspace_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetWorkspaceResult]
func LookupWorkspace(ctx *Context, args *LookupWorkspaceArgs, opts ...InvokeOption) (*LookupWorkspaceResult, error)
func LookupWorkspaceOutput(ctx *Context, args *LookupWorkspaceOutputArgs, opts ...InvokeOption) LookupWorkspaceResultOutput
> Note: This function is named LookupWorkspace
in the Go SDK.
public static class GetWorkspace
{
public static Task<GetWorkspaceResult> InvokeAsync(GetWorkspaceArgs args, InvokeOptions? opts = null)
public static Output<GetWorkspaceResult> Invoke(GetWorkspaceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetWorkspaceResult> getWorkspace(GetWorkspaceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:workspaces/getWorkspace:getWorkspace
arguments:
# arguments dictionary
The following arguments are supported:
- Directory
Id string - ID of the directory for the WorkSpace. You have to specify
user_name
along withdirectory_id
. You cannot combine this parameter withworkspace_id
. - Dictionary<string, string>
- Tags for the WorkSpace.
- User
Name string - User name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace. You cannot combine this parameter with
workspace_id
. - Workspace
Id string - ID of the WorkSpace. You cannot combine this parameter with
directory_id
.
- Directory
Id string - ID of the directory for the WorkSpace. You have to specify
user_name
along withdirectory_id
. You cannot combine this parameter withworkspace_id
. - map[string]string
- Tags for the WorkSpace.
- User
Name string - User name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace. You cannot combine this parameter with
workspace_id
. - Workspace
Id string - ID of the WorkSpace. You cannot combine this parameter with
directory_id
.
- directory
Id String - ID of the directory for the WorkSpace. You have to specify
user_name
along withdirectory_id
. You cannot combine this parameter withworkspace_id
. - Map<String,String>
- Tags for the WorkSpace.
- user
Name String - User name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace. You cannot combine this parameter with
workspace_id
. - workspace
Id String - ID of the WorkSpace. You cannot combine this parameter with
directory_id
.
- directory
Id string - ID of the directory for the WorkSpace. You have to specify
user_name
along withdirectory_id
. You cannot combine this parameter withworkspace_id
. - {[key: string]: string}
- Tags for the WorkSpace.
- user
Name string - User name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace. You cannot combine this parameter with
workspace_id
. - workspace
Id string - ID of the WorkSpace. You cannot combine this parameter with
directory_id
.
- directory_
id str - ID of the directory for the WorkSpace. You have to specify
user_name
along withdirectory_id
. You cannot combine this parameter withworkspace_id
. - Mapping[str, str]
- Tags for the WorkSpace.
- user_
name str - User name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace. You cannot combine this parameter with
workspace_id
. - workspace_
id str - ID of the WorkSpace. You cannot combine this parameter with
directory_id
.
- directory
Id String - ID of the directory for the WorkSpace. You have to specify
user_name
along withdirectory_id
. You cannot combine this parameter withworkspace_id
. - Map<String>
- Tags for the WorkSpace.
- user
Name String - User name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace. You cannot combine this parameter with
workspace_id
. - workspace
Id String - ID of the WorkSpace. You cannot combine this parameter with
directory_id
.
getWorkspace Result
The following output properties are available:
- Bundle
Id string - Computer
Name string - Name of the WorkSpace, as seen by the operating system.
- Directory
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string - IP address of the WorkSpace.
- Root
Volume boolEncryption Enabled - State string
- Operational state of the WorkSpace.
- Dictionary<string, string>
- User
Name string - User
Volume boolEncryption Enabled - Volume
Encryption stringKey - Workspace
Id string - Workspace
Properties List<GetWorkspace Workspace Property>
- Bundle
Id string - Computer
Name string - Name of the WorkSpace, as seen by the operating system.
- Directory
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string - IP address of the WorkSpace.
- Root
Volume boolEncryption Enabled - State string
- Operational state of the WorkSpace.
- map[string]string
- User
Name string - User
Volume boolEncryption Enabled - Volume
Encryption stringKey - Workspace
Id string - Workspace
Properties []GetWorkspace Workspace Property
- bundle
Id String - computer
Name String - Name of the WorkSpace, as seen by the operating system.
- directory
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ip
Address String - IP address of the WorkSpace.
- root
Volume BooleanEncryption Enabled - state String
- Operational state of the WorkSpace.
- Map<String,String>
- user
Name String - user
Volume BooleanEncryption Enabled - volume
Encryption StringKey - workspace
Id String - workspace
Properties List<GetWorkspace Workspace Property>
- bundle
Id string - computer
Name string - Name of the WorkSpace, as seen by the operating system.
- directory
Id string - id string
- The provider-assigned unique ID for this managed resource.
- ip
Address string - IP address of the WorkSpace.
- root
Volume booleanEncryption Enabled - state string
- Operational state of the WorkSpace.
- {[key: string]: string}
- user
Name string - user
Volume booleanEncryption Enabled - volume
Encryption stringKey - workspace
Id string - workspace
Properties GetWorkspace Workspace Property[]
- bundle_
id str - computer_
name str - Name of the WorkSpace, as seen by the operating system.
- directory_
id str - id str
- The provider-assigned unique ID for this managed resource.
- ip_
address str - IP address of the WorkSpace.
- root_
volume_ boolencryption_ enabled - state str
- Operational state of the WorkSpace.
- Mapping[str, str]
- user_
name str - user_
volume_ boolencryption_ enabled - volume_
encryption_ strkey - workspace_
id str - workspace_
properties Sequence[GetWorkspace Workspace Property]
- bundle
Id String - computer
Name String - Name of the WorkSpace, as seen by the operating system.
- directory
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ip
Address String - IP address of the WorkSpace.
- root
Volume BooleanEncryption Enabled - state String
- Operational state of the WorkSpace.
- Map<String>
- user
Name String - user
Volume BooleanEncryption Enabled - volume
Encryption StringKey - workspace
Id String - workspace
Properties List<Property Map>
Supporting Types
GetWorkspaceWorkspaceProperty
- Compute
Type stringName - Compute type. For more information, see Amazon WorkSpaces Bundles. Valid values are
VALUE
,STANDARD
,PERFORMANCE
,POWER
,GRAPHICS
,POWERPRO
andGRAPHICSPRO
. - Root
Volume intSize Gib - Size of the root volume.
- Running
Mode string - Running mode. For more information, see Manage the WorkSpace Running Mode. Valid values are
AUTO_STOP
andALWAYS_ON
. - Running
Mode intAuto Stop Timeout In Minutes - Time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
- User
Volume intSize Gib - Size of the user storage.
- Compute
Type stringName - Compute type. For more information, see Amazon WorkSpaces Bundles. Valid values are
VALUE
,STANDARD
,PERFORMANCE
,POWER
,GRAPHICS
,POWERPRO
andGRAPHICSPRO
. - Root
Volume intSize Gib - Size of the root volume.
- Running
Mode string - Running mode. For more information, see Manage the WorkSpace Running Mode. Valid values are
AUTO_STOP
andALWAYS_ON
. - Running
Mode intAuto Stop Timeout In Minutes - Time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
- User
Volume intSize Gib - Size of the user storage.
- compute
Type StringName - Compute type. For more information, see Amazon WorkSpaces Bundles. Valid values are
VALUE
,STANDARD
,PERFORMANCE
,POWER
,GRAPHICS
,POWERPRO
andGRAPHICSPRO
. - root
Volume IntegerSize Gib - Size of the root volume.
- running
Mode String - Running mode. For more information, see Manage the WorkSpace Running Mode. Valid values are
AUTO_STOP
andALWAYS_ON
. - running
Mode IntegerAuto Stop Timeout In Minutes - Time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
- user
Volume IntegerSize Gib - Size of the user storage.
- compute
Type stringName - Compute type. For more information, see Amazon WorkSpaces Bundles. Valid values are
VALUE
,STANDARD
,PERFORMANCE
,POWER
,GRAPHICS
,POWERPRO
andGRAPHICSPRO
. - root
Volume numberSize Gib - Size of the root volume.
- running
Mode string - Running mode. For more information, see Manage the WorkSpace Running Mode. Valid values are
AUTO_STOP
andALWAYS_ON
. - running
Mode numberAuto Stop Timeout In Minutes - Time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
- user
Volume numberSize Gib - Size of the user storage.
- compute_
type_ strname - Compute type. For more information, see Amazon WorkSpaces Bundles. Valid values are
VALUE
,STANDARD
,PERFORMANCE
,POWER
,GRAPHICS
,POWERPRO
andGRAPHICSPRO
. - root_
volume_ intsize_ gib - Size of the root volume.
- running_
mode str - Running mode. For more information, see Manage the WorkSpace Running Mode. Valid values are
AUTO_STOP
andALWAYS_ON
. - running_
mode_ intauto_ stop_ timeout_ in_ minutes - Time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
- user_
volume_ intsize_ gib - Size of the user storage.
- compute
Type StringName - Compute type. For more information, see Amazon WorkSpaces Bundles. Valid values are
VALUE
,STANDARD
,PERFORMANCE
,POWER
,GRAPHICS
,POWERPRO
andGRAPHICSPRO
. - root
Volume NumberSize Gib - Size of the root volume.
- running
Mode String - Running mode. For more information, see Manage the WorkSpace Running Mode. Valid values are
AUTO_STOP
andALWAYS_ON
. - running
Mode NumberAuto Stop Timeout In Minutes - Time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
- user
Volume NumberSize Gib - Size of the user storage.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.