com.pulumi.aws.workspaces.Workspace Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.workspaces;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.workspaces.WorkspaceArgs;
import com.pulumi.aws.workspaces.inputs.WorkspaceState;
import com.pulumi.aws.workspaces.outputs.WorkspaceWorkspaceProperties;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a workspace in [AWS Workspaces](https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces.html) Service
*
* > **NOTE:** AWS WorkSpaces service requires [`workspaces_DefaultRole`](https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html#create-default-role) IAM role to operate normally.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.GetBundleArgs;
* import com.pulumi.aws.kms.KmsFunctions;
* import com.pulumi.aws.kms.inputs.GetKeyArgs;
* import com.pulumi.aws.workspaces.Workspace;
* import com.pulumi.aws.workspaces.WorkspaceArgs;
* import com.pulumi.aws.workspaces.inputs.WorkspaceWorkspacePropertiesArgs;
* 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 valueWindows10 = WorkspacesFunctions.getBundle(GetBundleArgs.builder()
* .bundleId("wsb-bh8rsxt14")
* .build());
*
* final var workspaces = KmsFunctions.getKey(GetKeyArgs.builder()
* .keyId("alias/aws/workspaces")
* .build());
*
* var example = new Workspace("example", WorkspaceArgs.builder()
* .directoryId(exampleAwsWorkspacesDirectory.id())
* .bundleId(valueWindows10.applyValue(getBundleResult -> getBundleResult.id()))
* .userName("john.doe")
* .rootVolumeEncryptionEnabled(true)
* .userVolumeEncryptionEnabled(true)
* .volumeEncryptionKey(workspaces.applyValue(getKeyResult -> getKeyResult.arn()))
* .workspaceProperties(WorkspaceWorkspacePropertiesArgs.builder()
* .computeTypeName("VALUE")
* .userVolumeSizeGib(10)
* .rootVolumeSizeGib(80)
* .runningMode("AUTO_STOP")
* .runningModeAutoStopTimeoutInMinutes(60)
* .build())
* .tags(Map.of("Department", "IT"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import Workspaces using their ID. For example:
*
* ```sh
* $ pulumi import aws:workspaces/workspace:Workspace example ws-9z9zmbkhv
* ```
*
*/
@ResourceType(type="aws:workspaces/workspace:Workspace")
public class Workspace extends com.pulumi.resources.CustomResource {
/**
* The ID of the bundle for the WorkSpace.
*
*/
@Export(name="bundleId", refs={String.class}, tree="[0]")
private Output bundleId;
/**
* @return The ID of the bundle for the WorkSpace.
*
*/
public Output bundleId() {
return this.bundleId;
}
/**
* The name of the WorkSpace, as seen by the operating system.
*
*/
@Export(name="computerName", refs={String.class}, tree="[0]")
private Output computerName;
/**
* @return The name of the WorkSpace, as seen by the operating system.
*
*/
public Output computerName() {
return this.computerName;
}
/**
* The ID of the directory for the WorkSpace.
*
*/
@Export(name="directoryId", refs={String.class}, tree="[0]")
private Output directoryId;
/**
* @return The ID of the directory for the WorkSpace.
*
*/
public Output directoryId() {
return this.directoryId;
}
/**
* The IP address of the WorkSpace.
*
*/
@Export(name="ipAddress", refs={String.class}, tree="[0]")
private Output ipAddress;
/**
* @return The IP address of the WorkSpace.
*
*/
public Output ipAddress() {
return this.ipAddress;
}
/**
* Indicates whether the data stored on the root volume is encrypted.
*
*/
@Export(name="rootVolumeEncryptionEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> rootVolumeEncryptionEnabled;
/**
* @return Indicates whether the data stored on the root volume is encrypted.
*
*/
public Output> rootVolumeEncryptionEnabled() {
return Codegen.optional(this.rootVolumeEncryptionEnabled);
}
/**
* The operational state of the WorkSpace.
*
*/
@Export(name="state", refs={String.class}, tree="[0]")
private Output state;
/**
* @return The operational state of the WorkSpace.
*
*/
public Output state() {
return this.state;
}
/**
* The tags for the WorkSpace. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return The tags for the WorkSpace. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy