Class: AWS.WorkSpaces

Inherits:
AWS.Service show all
Identifier:
workspaces
API Version:
2015-04-08
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Sending a Request Using WorkSpaces

var workspaces = new AWS.WorkSpaces();
workspaces.createTags(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the WorkSpaces object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var workspaces = new AWS.WorkSpaces({apiVersion: '2015-04-08'});

You can also set the API version globally in AWS.config.apiVersions using the workspaces service identifier:

AWS.config.apiVersions = {
  workspaces: '2015-04-08',
  // other service API versions
};

var workspaces = new AWS.WorkSpaces();

Version:

  • 2015-04-08

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.WorkSpaces(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a WorkSpaces object

var workspaces = new AWS.WorkSpaces({apiVersion: '2015-04-08'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.WorkSpaces.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.WorkSpaces.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.WorkSpaces.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services accept DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createTags(params = {}, callback) ⇒ AWS.Request

Creates tags for a WorkSpace.

Service Reference:

Examples:

Calling the createTags operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
workspaces.createTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The resource ID of the request.

    • Tags — (Array<map>)

      The tags of the request.

      • Keyrequired — (String)

        The key of the tag.

      • Value — (String)

        The value of the tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createWorkspaces(params = {}, callback) ⇒ AWS.Request

Creates one or more WorkSpaces.

Note: This operation is asynchronous and returns before the WorkSpaces are created.

Service Reference:

Examples:

Calling the createWorkspaces operation

var params = {
  Workspaces: [ /* required */
    {
      BundleId: 'STRING_VALUE', /* required */
      DirectoryId: 'STRING_VALUE', /* required */
      UserName: 'STRING_VALUE', /* required */
      RootVolumeEncryptionEnabled: true || false,
      Tags: [
        {
          Key: 'STRING_VALUE', /* required */
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      UserVolumeEncryptionEnabled: true || false,
      VolumeEncryptionKey: 'STRING_VALUE',
      WorkspaceProperties: {
        RunningMode: AUTO_STOP | ALWAYS_ON,
        RunningModeAutoStopTimeoutInMinutes: 0
      }
    },
    /* more items */
  ]
};
workspaces.createWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Workspaces — (Array<map>)

      An array of structures that specify the WorkSpaces to create.

      • DirectoryIdrequired — (String)

        The identifier of the AWS Directory Service directory to create the WorkSpace in. You can use the DescribeWorkspaceDirectories operation to obtain a list of the directories that are available.

      • UserNamerequired — (String)

        The username that the WorkSpace is assigned to. This username must exist in the AWS Directory Service directory specified by the DirectoryId member.

      • BundleIdrequired — (String)

        The identifier of the bundle to create the WorkSpace from. You can use the DescribeWorkspaceBundles operation to obtain a list of the bundles that are available.

      • VolumeEncryptionKey — (String)

        The KMS key used to encrypt data stored on your WorkSpace.

      • UserVolumeEncryptionEnabled — (Boolean)

        Specifies whether the data stored on the user volume, or D: drive, is encrypted.

      • RootVolumeEncryptionEnabled — (Boolean)

        Specifies whether the data stored on the root volume, or C: drive, is encrypted.

      • WorkspaceProperties — (map)

        Describes the properties of a WorkSpace.

        • RunningMode — (String)

          The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.

          Possible values include:
          • "AUTO_STOP"
          • "ALWAYS_ON"
        • RunningModeAutoStopTimeoutInMinutes — (Integer)

          The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.

      • Tags — (Array<map>)

        The tags of the WorkSpace request.

        • Keyrequired — (String)

          The key of the tag.

        • Value — (String)

          The value of the tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedRequests — (Array<map>)

        An array of structures that represent the WorkSpaces that could not be created.

        • WorkspaceRequest — (map)

          A FailedCreateWorkspaceRequest$WorkspaceRequest object that contains the information about the WorkSpace that could not be created.

          • DirectoryIdrequired — (String)

            The identifier of the AWS Directory Service directory to create the WorkSpace in. You can use the DescribeWorkspaceDirectories operation to obtain a list of the directories that are available.

          • UserNamerequired — (String)

            The username that the WorkSpace is assigned to. This username must exist in the AWS Directory Service directory specified by the DirectoryId member.

          • BundleIdrequired — (String)

            The identifier of the bundle to create the WorkSpace from. You can use the DescribeWorkspaceBundles operation to obtain a list of the bundles that are available.

          • VolumeEncryptionKey — (String)

            The KMS key used to encrypt data stored on your WorkSpace.

          • UserVolumeEncryptionEnabled — (Boolean)

            Specifies whether the data stored on the user volume, or D: drive, is encrypted.

          • RootVolumeEncryptionEnabled — (Boolean)

            Specifies whether the data stored on the root volume, or C: drive, is encrypted.

          • WorkspaceProperties — (map)

            Describes the properties of a WorkSpace.

            • RunningMode — (String)

              The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.

              Possible values include:
              • "AUTO_STOP"
              • "ALWAYS_ON"
            • RunningModeAutoStopTimeoutInMinutes — (Integer)

              The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.

          • Tags — (Array<map>)

            The tags of the WorkSpace request.

            • Keyrequired — (String)

              The key of the tag.

            • Value — (String)

              The value of the tag.

        • ErrorCode — (String)

          The error code.

        • ErrorMessage — (String)

          The textual error message.

      • PendingRequests — (Array<map>)

        An array of structures that represent the WorkSpaces that were created.

        Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • DirectoryId — (String)

          The identifier of the AWS Directory Service directory that the WorkSpace belongs to.

        • UserName — (String)

          The user that the WorkSpace is assigned to.

        • IpAddress — (String)

          The IP address of the WorkSpace.

        • State — (String)

          The operational state of the WorkSpace.

          Possible values include:
          • "PENDING"
          • "AVAILABLE"
          • "IMPAIRED"
          • "UNHEALTHY"
          • "REBOOTING"
          • "STARTING"
          • "REBUILDING"
          • "MAINTENANCE"
          • "TERMINATING"
          • "TERMINATED"
          • "SUSPENDED"
          • "STOPPING"
          • "STOPPED"
          • "ERROR"
        • BundleId — (String)

          The identifier of the bundle that the WorkSpace was created from.

        • SubnetId — (String)

          The identifier of the subnet that the WorkSpace is in.

        • ErrorMessage — (String)

          If the WorkSpace could not be created, this contains a textual error message that describes the failure.

        • ErrorCode — (String)

          If the WorkSpace could not be created, this contains the error code.

        • ComputerName — (String)

          The name of the WorkSpace as seen by the operating system.

        • VolumeEncryptionKey — (String)

          The KMS key used to encrypt data stored on your WorkSpace.

        • UserVolumeEncryptionEnabled — (Boolean)

          Specifies whether the data stored on the user volume, or D: drive, is encrypted.

        • RootVolumeEncryptionEnabled — (Boolean)

          Specifies whether the data stored on the root volume, or C: drive, is encrypted.

        • WorkspaceProperties — (map)

          Describes the properties of a WorkSpace.

          • RunningMode — (String)

            The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.

            Possible values include:
            • "AUTO_STOP"
            • "ALWAYS_ON"
          • RunningModeAutoStopTimeoutInMinutes — (Integer)

            The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteTags(params = {}, callback) ⇒ AWS.Request

Deletes tags from a WorkSpace.

Service Reference:

Examples:

Calling the deleteTags operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
workspaces.deleteTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The resource ID of the request.

    • TagKeys — (Array<String>)

      The tag keys of the request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeTags(params = {}, callback) ⇒ AWS.Request

Describes tags for a WorkSpace.

Service Reference:

Examples:

Calling the describeTags operation

var params = {
  ResourceId: 'STRING_VALUE' /* required */
};
workspaces.describeTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The resource ID of the request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • TagList — (Array<map>)

        The list of tags.

        • Keyrequired — (String)

          The key of the tag.

        • Value — (String)

          The value of the tag.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeWorkspaceBundles(params = {}, callback) ⇒ AWS.Request

Obtains information about the WorkSpace bundles that are available to your account in the specified region.

You can filter the results with either the BundleIds parameter, or the Owner parameter, but not both.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Service Reference:

Examples:

Calling the describeWorkspaceBundles operation

var params = {
  BundleIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE',
  Owner: 'STRING_VALUE'
};
workspaces.describeWorkspaceBundles(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BundleIds — (Array<String>)

      An array of strings that contains the identifiers of the bundles to retrieve. This parameter cannot be combined with any other filter parameter.

    • Owner — (String)

      The owner of the bundles to retrieve. This parameter cannot be combined with any other filter parameter.

      This contains one of the following values:

      • null- Retrieves the bundles that belong to the account making the call.

      • AMAZON- Retrieves the bundles that are provided by AWS.

    • NextToken — (String)

      The NextToken value from a previous call to this operation. Pass null if this is the first call.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Bundles — (Array<map>)

        An array of structures that contain information about the bundles.

        • BundleId — (String)

          The bundle identifier.

        • Name — (String)

          The name of the bundle.

        • Owner — (String)

          The owner of the bundle. This contains the owner's account identifier, or AMAZON if the bundle is provided by AWS.

        • Description — (String)

          The bundle description.

        • UserStorage — (map)

          A UserStorage object that specifies the amount of user storage that the bundle contains.

          • Capacity — (String)

            The amount of user storage for the bundle.

        • ComputeType — (map)

          A ComputeType object that specifies the compute type for the bundle.

          • Name — (String)

            The name of the compute type for the bundle.

            Possible values include:
            • "VALUE"
            • "STANDARD"
            • "PERFORMANCE"
      • NextToken — (String)

        If not null, more results are available. Pass this value for the NextToken parameter in a subsequent call to this operation to retrieve the next set of items. This token is valid for one day and must be used within that time frame.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeWorkspaceDirectories(params = {}, callback) ⇒ AWS.Request

Retrieves information about the AWS Directory Service directories in the region that are registered with Amazon WorkSpaces and are available to your account.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Service Reference:

Examples:

Calling the describeWorkspaceDirectories operation

var params = {
  DirectoryIds: [
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE'
};
workspaces.describeWorkspaceDirectories(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DirectoryIds — (Array<String>)

      An array of strings that contains the directory identifiers to retrieve information for. If this member is null, all directories are retrieved.

    • NextToken — (String)

      The NextToken value from a previous call to this operation. Pass null if this is the first call.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Directories — (Array<map>)

        An array of structures that contain information about the directories.

        • DirectoryId — (String)

          The directory identifier.

        • Alias — (String)

          The directory alias.

        • DirectoryName — (String)

          The name of the directory.

        • RegistrationCode — (String)

          The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory.

        • SubnetIds — (Array<String>)

          An array of strings that contains the identifiers of the subnets used with the directory.

        • DnsIpAddresses — (Array<String>)

          An array of strings that contains the IP addresses of the DNS servers for the directory.

        • CustomerUserName — (String)

          The user name for the service account.

        • IamRoleId — (String)

          The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf.

        • DirectoryType — (String)

          The directory type.

          Possible values include:
          • "SIMPLE_AD"
          • "AD_CONNECTOR"
        • WorkspaceSecurityGroupId — (String)

          The identifier of the security group that is assigned to new WorkSpaces.

        • State — (String)

          The state of the directory's registration with Amazon WorkSpaces

          Possible values include:
          • "REGISTERING"
          • "REGISTERED"
          • "DEREGISTERING"
          • "DEREGISTERED"
          • "ERROR"
        • WorkspaceCreationProperties — (map)

          A structure that specifies the default creation properties for all WorkSpaces in the directory.

          • EnableWorkDocs — (Boolean)

            Specifies if the directory is enabled for Amazon WorkDocs.

          • EnableInternetAccess — (Boolean)

            A public IP address will be attached to all WorkSpaces that are created or rebuilt.

          • DefaultOu — (String)

            The organizational unit (OU) in the directory that the WorkSpace machine accounts are placed in.

          • CustomSecurityGroupId — (String)

            The identifier of any custom security groups that are applied to the WorkSpaces when they are created.

          • UserEnabledAsLocalAdministrator — (Boolean)

            The WorkSpace user is an administrator on the WorkSpace.

      • NextToken — (String)

        If not null, more results are available. Pass this value for the NextToken parameter in a subsequent call to this operation to retrieve the next set of items. This token is valid for one day and must be used within that time frame.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeWorkspaces(params = {}, callback) ⇒ AWS.Request

Obtains information about the specified WorkSpaces.

Only one of the filter parameters, such as BundleId, DirectoryId, or WorkspaceIds, can be specified at a time.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Service Reference:

Examples:

Calling the describeWorkspaces operation

var params = {
  BundleId: 'STRING_VALUE',
  DirectoryId: 'STRING_VALUE',
  Limit: 0,
  NextToken: 'STRING_VALUE',
  UserName: 'STRING_VALUE',
  WorkspaceIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
workspaces.describeWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • WorkspaceIds — (Array<String>)

      An array of strings that contain the identifiers of the WorkSpaces for which to retrieve information. This parameter cannot be combined with any other filter parameter.

      Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.

    • DirectoryId — (String)

      Specifies the directory identifier to which to limit the WorkSpaces. Optionally, you can specify a specific directory user with the UserName parameter. This parameter cannot be combined with any other filter parameter.

    • UserName — (String)

      Used with the DirectoryId parameter to specify the directory user for whom to obtain the WorkSpace.

    • BundleId — (String)

      The identifier of a bundle to obtain the WorkSpaces for. All WorkSpaces that are created from this bundle will be retrieved. This parameter cannot be combined with any other filter parameter.

    • Limit — (Integer)

      The maximum number of items to return.

    • NextToken — (String)

      The NextToken value from a previous call to this operation. Pass null if this is the first call.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Workspaces — (Array<map>)

        An array of structures that contain the information about the WorkSpaces.

        Because the CreateWorkspaces operation is asynchronous, some of this information may be incomplete for a newly-created WorkSpace.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • DirectoryId — (String)

          The identifier of the AWS Directory Service directory that the WorkSpace belongs to.

        • UserName — (String)

          The user that the WorkSpace is assigned to.

        • IpAddress — (String)

          The IP address of the WorkSpace.

        • State — (String)

          The operational state of the WorkSpace.

          Possible values include:
          • "PENDING"
          • "AVAILABLE"
          • "IMPAIRED"
          • "UNHEALTHY"
          • "REBOOTING"
          • "STARTING"
          • "REBUILDING"
          • "MAINTENANCE"
          • "TERMINATING"
          • "TERMINATED"
          • "SUSPENDED"
          • "STOPPING"
          • "STOPPED"
          • "ERROR"
        • BundleId — (String)

          The identifier of the bundle that the WorkSpace was created from.

        • SubnetId — (String)

          The identifier of the subnet that the WorkSpace is in.

        • ErrorMessage — (String)

          If the WorkSpace could not be created, this contains a textual error message that describes the failure.

        • ErrorCode — (String)

          If the WorkSpace could not be created, this contains the error code.

        • ComputerName — (String)

          The name of the WorkSpace as seen by the operating system.

        • VolumeEncryptionKey — (String)

          The KMS key used to encrypt data stored on your WorkSpace.

        • UserVolumeEncryptionEnabled — (Boolean)

          Specifies whether the data stored on the user volume, or D: drive, is encrypted.

        • RootVolumeEncryptionEnabled — (Boolean)

          Specifies whether the data stored on the root volume, or C: drive, is encrypted.

        • WorkspaceProperties — (map)

          Describes the properties of a WorkSpace.

          • RunningMode — (String)

            The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.

            Possible values include:
            • "AUTO_STOP"
            • "ALWAYS_ON"
          • RunningModeAutoStopTimeoutInMinutes — (Integer)

            The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.

      • NextToken — (String)

        If not null, more results are available. Pass this value for the NextToken parameter in a subsequent call to this operation to retrieve the next set of items. This token is valid for one day and must be used within that time frame.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeWorkspacesConnectionStatus(params = {}, callback) ⇒ AWS.Request

Describes the connection status of a specified WorkSpace.

Examples:

Calling the describeWorkspacesConnectionStatus operation

var params = {
  NextToken: 'STRING_VALUE',
  WorkspaceIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
workspaces.describeWorkspacesConnectionStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • WorkspaceIds — (Array<String>)

      An array of strings that contain the identifiers of the WorkSpaces.

    • NextToken — (String)

      The next token of the request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • WorkspacesConnectionStatus — (Array<map>)

        The connection status of the WorkSpace.

        • WorkspaceId — (String)

          The ID of the WorkSpace.

        • ConnectionState — (String)

          The connection state of the WorkSpace. Returns UNKOWN if the WorkSpace is in a Stopped state.

          Possible values include:
          • "CONNECTED"
          • "DISCONNECTED"
          • "UNKNOWN"
        • ConnectionStateCheckTimestamp — (Date)

          The timestamp of the connection state check.

        • LastKnownUserConnectionTimestamp — (Date)

          The timestamp of the last known user connection.

      • NextToken — (String)

        The next token of the result.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyWorkspaceProperties(params = {}, callback) ⇒ AWS.Request

Modifies the WorkSpace properties, including the RunningMode and AutoStop time.

Service Reference:

Examples:

Calling the modifyWorkspaceProperties operation

var params = {
  WorkspaceId: 'STRING_VALUE', /* required */
  WorkspaceProperties: { /* required */
    RunningMode: AUTO_STOP | ALWAYS_ON,
    RunningModeAutoStopTimeoutInMinutes: 0
  }
};
workspaces.modifyWorkspaceProperties(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • WorkspaceId — (String)

      The ID of the WorkSpace.

    • WorkspaceProperties — (map)

      The WorkSpace properties of the request.

      • RunningMode — (String)

        The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.

        Possible values include:
        • "AUTO_STOP"
        • "ALWAYS_ON"
      • RunningModeAutoStopTimeoutInMinutes — (Integer)

        The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rebootWorkspaces(params = {}, callback) ⇒ AWS.Request

Reboots the specified WorkSpaces.

To be able to reboot a WorkSpace, the WorkSpace must have a State of AVAILABLE, IMPAIRED, or INOPERABLE.

Note: This operation is asynchronous and returns before the WorkSpaces have rebooted.

Service Reference:

Examples:

Calling the rebootWorkspaces operation

var params = {
  RebootWorkspaceRequests: [ /* required */
    {
      WorkspaceId: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
workspaces.rebootWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • RebootWorkspaceRequests — (Array<map>)

      An array of structures that specify the WorkSpaces to reboot.

      • WorkspaceIdrequired — (String)

        The identifier of the WorkSpace to reboot.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedRequests — (Array<map>)

        An array of structures representing any WorkSpaces that could not be rebooted.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • ErrorCode — (String)

          The error code.

        • ErrorMessage — (String)

          The textual error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rebuildWorkspaces(params = {}, callback) ⇒ AWS.Request

Rebuilds the specified WorkSpaces.

Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. Rebuilding a WorkSpace causes the following to occur:

  • The system is restored to the image of the bundle that the WorkSpace is created from. Any applications that have been installed, or system settings that have been made since the WorkSpace was created will be lost.

  • The data drive (D drive) is re-created from the last automatic snapshot taken of the data drive. The current contents of the data drive are overwritten. Automatic snapshots of the data drive are taken every 12 hours, so the snapshot can be as much as 12 hours old.

To be able to rebuild a WorkSpace, the WorkSpace must have a State of AVAILABLE or ERROR.

Note: This operation is asynchronous and returns before the WorkSpaces have been completely rebuilt.

Service Reference:

Examples:

Calling the rebuildWorkspaces operation

var params = {
  RebuildWorkspaceRequests: [ /* required */
    {
      WorkspaceId: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
workspaces.rebuildWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • RebuildWorkspaceRequests — (Array<map>)

      An array of structures that specify the WorkSpaces to rebuild.

      • WorkspaceIdrequired — (String)

        The identifier of the WorkSpace to rebuild.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedRequests — (Array<map>)

        An array of structures representing any WorkSpaces that could not be rebuilt.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • ErrorCode — (String)

          The error code.

        • ErrorMessage — (String)

          The textual error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startWorkspaces(params = {}, callback) ⇒ AWS.Request

Starts the specified WorkSpaces. The API only works with WorkSpaces that have RunningMode configured as AutoStop and the State set to “STOPPED.”

Service Reference:

Examples:

Calling the startWorkspaces operation

var params = {
  StartWorkspaceRequests: [ /* required */
    {
      WorkspaceId: 'STRING_VALUE'
    },
    /* more items */
  ]
};
workspaces.startWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StartWorkspaceRequests — (Array<map>)

      The requests.

      • WorkspaceId — (String)

        The ID of the WorkSpace.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedRequests — (Array<map>)

        The failed requests.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • ErrorCode — (String)

          The error code.

        • ErrorMessage — (String)

          The textual error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopWorkspaces(params = {}, callback) ⇒ AWS.Request

Stops the specified WorkSpaces. The API only works with WorkSpaces that have RunningMode configured as AutoStop and the State set to AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR.

Service Reference:

Examples:

Calling the stopWorkspaces operation

var params = {
  StopWorkspaceRequests: [ /* required */
    {
      WorkspaceId: 'STRING_VALUE'
    },
    /* more items */
  ]
};
workspaces.stopWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StopWorkspaceRequests — (Array<map>)

      The requests.

      • WorkspaceId — (String)

        The ID of the WorkSpace.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedRequests — (Array<map>)

        The failed requests.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • ErrorCode — (String)

          The error code.

        • ErrorMessage — (String)

          The textual error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

terminateWorkspaces(params = {}, callback) ⇒ AWS.Request

Terminates the specified WorkSpaces.

Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is not maintained and will be destroyed. If you need to archive any user data, contact Amazon Web Services before terminating the WorkSpace.

You can terminate a WorkSpace that is in any state except SUSPENDED.

Note: This operation is asynchronous and returns before the WorkSpaces have been completely terminated.

Service Reference:

Examples:

Calling the terminateWorkspaces operation

var params = {
  TerminateWorkspaceRequests: [ /* required */
    {
      WorkspaceId: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
workspaces.terminateWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TerminateWorkspaceRequests — (Array<map>)

      An array of structures that specify the WorkSpaces to terminate.

      • WorkspaceIdrequired — (String)

        The identifier of the WorkSpace to terminate.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedRequests — (Array<map>)

        An array of structures representing any WorkSpaces that could not be terminated.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • ErrorCode — (String)

          The error code.

        • ErrorMessage — (String)

          The textual error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.