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.associateIpGroups(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 except 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.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: 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

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

Associates the specified IP access control group with the specified directory.

Service Reference:

Examples:

Calling the associateIpGroups operation

var params = {
  DirectoryId: 'STRING_VALUE', /* required */
  GroupIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
workspaces.associateIpGroups(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: {})
    • DirectoryId — (String)

      The ID of the directory.

    • GroupIds — (Array<String>)

      The IDs of one or more IP access control groups.

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.

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

Adds one or more rules to the specified IP access control group.

This action gives users permission to access their WorkSpaces from the CIDR address ranges specified in the rules.

Service Reference:

Examples:

Calling the authorizeIpRules operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  UserRules: [ /* required */
    {
      ipRule: 'STRING_VALUE',
      ruleDesc: 'STRING_VALUE'
    },
    /* more items */
  ]
};
workspaces.authorizeIpRules(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: {})
    • GroupId — (String)

      The ID of the group.

    • UserRules — (Array<map>)

      The rules to add to the group.

      • ipRule — (String)

        The IP address range, in CIDR notation.

      • ruleDesc — (String)

        The description.

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.

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

Creates an IP access control group.

An IP access control group provides you with the ability to control the IP addresses from which users are allowed to access their WorkSpaces. To specify the CIDR address ranges, add rules to your IP access control group and then associate the group with your directory. You can add rules when you create the group or at any time using AuthorizeIpRules.

There is a default IP access control group associated with your directory. If you don't associate an IP access control group with your directory, the default group is used. The default group includes a default rule that allows users to access their WorkSpaces from anywhere. You cannot modify the default IP access control group for your directory.

Service Reference:

Examples:

Calling the createIpGroup operation

var params = {
  GroupName: 'STRING_VALUE', /* required */
  GroupDesc: 'STRING_VALUE',
  UserRules: [
    {
      ipRule: 'STRING_VALUE',
      ruleDesc: 'STRING_VALUE'
    },
    /* more items */
  ]
};
workspaces.createIpGroup(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: {})
    • GroupName — (String)

      The name of the group.

    • GroupDesc — (String)

      The description of the group.

    • UserRules — (Array<map>)

      The rules to add to the group.

      • ipRule — (String)

        The IP address range, in CIDR notation.

      • ruleDesc — (String)

        The description.

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:

      • GroupId — (String)

        The ID of the group.

Returns:

  • (AWS.Request)

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

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

Creates the specified tags for the specified 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 ID of the WorkSpace. To find this ID, use DescribeWorkspaces.

    • Tags — (Array<map>)

      The tags. Each WorkSpace can have a maximum of 50 tags.

      • 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.

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: {
        ComputeTypeName: VALUE | STANDARD | PERFORMANCE | POWER | GRAPHICS,
        RootVolumeSizeGib: 0,
        RunningMode: AUTO_STOP | ALWAYS_ON,
        RunningModeAutoStopTimeoutInMinutes: 0,
        UserVolumeSizeGib: 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>)

      The WorkSpaces to create. You can specify up to 25 WorkSpaces.

      • DirectoryIdrequired — (String)

        The identifier of the AWS Directory Service directory for the WorkSpace. You can use DescribeWorkspaceDirectories to list the available directories.

      • UserNamerequired — (String)

        The username of the user for the WorkSpace. This username must exist in the AWS Directory Service directory for the WorkSpace.

      • BundleIdrequired — (String)

        The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available bundles.

      • VolumeEncryptionKey — (String)

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

      • UserVolumeEncryptionEnabled — (Boolean)

        Indicates whether the data stored on the user volume is encrypted.

      • RootVolumeEncryptionEnabled — (Boolean)

        Indicates whether the data stored on the root volume is encrypted.

      • WorkspaceProperties — (map)

        The WorkSpace properties.

        • RunningMode — (String)

          The running mode. For more information, see Manage the WorkSpace Running Mode.

          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.

        • RootVolumeSizeGib — (Integer)

          The size of the root volume.

        • UserVolumeSizeGib — (Integer)

          The size of the user storage.

        • ComputeTypeName — (String)

          The compute type. For more information, see Amazon WorkSpaces Bundles.

          Possible values include:
          • "VALUE"
          • "STANDARD"
          • "PERFORMANCE"
          • "POWER"
          • "GRAPHICS"
      • Tags — (Array<map>)

        The tags for the WorkSpace.

        • 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>)

        Information about the WorkSpaces that could not be created.

        • WorkspaceRequest — (map)

          Information about the WorkSpace.

          • DirectoryIdrequired — (String)

            The identifier of the AWS Directory Service directory for the WorkSpace. You can use DescribeWorkspaceDirectories to list the available directories.

          • UserNamerequired — (String)

            The username of the user for the WorkSpace. This username must exist in the AWS Directory Service directory for the WorkSpace.

          • BundleIdrequired — (String)

            The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available bundles.

          • VolumeEncryptionKey — (String)

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

          • UserVolumeEncryptionEnabled — (Boolean)

            Indicates whether the data stored on the user volume is encrypted.

          • RootVolumeEncryptionEnabled — (Boolean)

            Indicates whether the data stored on the root volume is encrypted.

          • WorkspaceProperties — (map)

            The WorkSpace properties.

            • RunningMode — (String)

              The running mode. For more information, see Manage the WorkSpace Running Mode.

              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.

            • RootVolumeSizeGib — (Integer)

              The size of the root volume.

            • UserVolumeSizeGib — (Integer)

              The size of the user storage.

            • ComputeTypeName — (String)

              The compute type. For more information, see Amazon WorkSpaces Bundles.

              Possible values include:
              • "VALUE"
              • "STANDARD"
              • "PERFORMANCE"
              • "POWER"
              • "GRAPHICS"
          • Tags — (Array<map>)

            The tags for the WorkSpace.

            • 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>)

        Information about the WorkSpaces that were created.

        Because this operation is asynchronous, the identifier returned is not immediately available for use with other operations. For example, if you call DescribeWorkspaces before the WorkSpace is created, the information returned can be incomplete.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • DirectoryId — (String)

          The identifier of the AWS Directory Service directory for the WorkSpace.

        • UserName — (String)

          The user for the WorkSpace.

        • 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"
          • "ADMIN_MAINTENANCE"
          • "TERMINATING"
          • "TERMINATED"
          • "SUSPENDED"
          • "UPDATING"
          • "STOPPING"
          • "STOPPED"
          • "ERROR"
        • BundleId — (String)

          The identifier of the bundle used to create the WorkSpace.

        • SubnetId — (String)

          The identifier of the subnet for the WorkSpace.

        • ErrorMessage — (String)

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

        • ErrorCode — (String)

          If the WorkSpace could not be created, 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)

          Indicates whether the data stored on the user volume is encrypted.

        • RootVolumeEncryptionEnabled — (Boolean)

          Indicates whether the data stored on the root volume is encrypted.

        • WorkspaceProperties — (map)

          The properties of the WorkSpace.

          • RunningMode — (String)

            The running mode. For more information, see Manage the WorkSpace Running Mode.

            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.

          • RootVolumeSizeGib — (Integer)

            The size of the root volume.

          • UserVolumeSizeGib — (Integer)

            The size of the user storage.

          • ComputeTypeName — (String)

            The compute type. For more information, see Amazon WorkSpaces Bundles.

            Possible values include:
            • "VALUE"
            • "STANDARD"
            • "PERFORMANCE"
            • "POWER"
            • "GRAPHICS"
        • ModificationStates — (Array<map>)

          The modification states of the WorkSpace.

          • Resource — (String)

            The resource.

            Possible values include:
            • "ROOT_VOLUME"
            • "USER_VOLUME"
            • "COMPUTE_TYPE"
          • State — (String)

            The modification state.

            Possible values include:
            • "UPDATE_INITIATED"
            • "UPDATE_IN_PROGRESS"

Returns:

  • (AWS.Request)

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

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

Deletes the specified IP access control group.

You cannot delete an IP access control group that is associated with a directory.

Service Reference:

Examples:

Calling the deleteIpGroup operation

var params = {
  GroupId: 'STRING_VALUE' /* required */
};
workspaces.deleteIpGroup(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: {})
    • GroupId — (String)

      The ID of the IP access control group.

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.

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

Deletes the specified tags from the specified 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 ID of the WorkSpace. To find this ID, use DescribeWorkspaces.

    • TagKeys — (Array<String>)

      The tag keys.

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.

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

Describes one or more of your IP access control groups.

Service Reference:

Examples:

Calling the describeIpGroups operation

var params = {
  GroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 0,
  NextToken: 'STRING_VALUE'
};
workspaces.describeIpGroups(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: {})
    • GroupIds — (Array<String>)

      The IDs of one or more IP access control groups.

    • NextToken — (String)

      The token for the next set of results. (You received this token from a previous call.)

    • MaxResults — (Integer)

      The maximum number of items to return.

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:

      • Result — (Array<map>)

        Information about the IP access control groups.

        • groupId — (String)

          The ID of the group.

        • groupName — (String)

          The name of the group.

        • groupDesc — (String)

          The description of the group.

        • userRules — (Array<map>)

          The rules.

          • ipRule — (String)

            The IP address range, in CIDR notation.

          • ruleDesc — (String)

            The description.

      • NextToken — (String)

        The token to use to retrieve the next set of results, or null if there are no more results available. 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.

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

Describes the specified tags for the specified 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 ID of the WorkSpace. To find this ID, use DescribeWorkspaces.

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 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

Describes the available WorkSpace bundles.

You can filter the results using either bundle ID or owner, but not both.

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>)

      The IDs of the bundles. This parameter cannot be combined with any other filter.

    • Owner — (String)

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

      Specify AMAZON to describe the bundles provided by AWS or null to describe the bundles that belong to your account.

    • NextToken — (String)

      The token for the next set of results. (You received this token from a previous 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>)

        Information about the bundles.

        • BundleId — (String)

          The bundle identifier.

        • Name — (String)

          The name of the bundle.

        • Owner — (String)

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

        • Description — (String)

          A description.

        • RootStorage — (map)

          The size of the root volume.

          • Capacity — (String)

            The size of the root volume.

        • UserStorage — (map)

          The size of the user storage.

          • Capacity — (String)

            The size of the user storage.

        • ComputeType — (map)

          The compute type. For more information, see Amazon WorkSpaces Bundles.

          • Name — (String)

            The compute type.

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

        The token to use to retrieve the next set of results, or null if there are no more results available. 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

Describes the available AWS Directory Service directories that are registered with Amazon WorkSpaces.

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>)

      The identifiers of the directories. If the value is null, all directories are retrieved.

    • NextToken — (String)

      The token for the next set of results. (You received this token from a previous 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>)

        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>)

          The identifiers of the subnets used with the directory.

        • DnsIpAddresses — (Array<String>)

          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)

          The default creation properties for all WorkSpaces in the directory.

          • EnableWorkDocs — (Boolean)

            Indicates whether the directory is enabled for Amazon WorkDocs.

          • EnableInternetAccess — (Boolean)

            The public IP address to attach to all WorkSpaces that are created or rebuilt.

          • DefaultOu — (String)

            The organizational unit (OU) in the directory for the WorkSpace machine accounts.

          • CustomSecurityGroupId — (String)

            The identifier of any security groups to apply to WorkSpaces when they are created.

          • UserEnabledAsLocalAdministrator — (Boolean)

            Indicates whether the WorkSpace user is an administrator on the WorkSpace.

        • ipGroupIds — (Array<String>)

          The identifiers of the IP access control groups associated with the directory.

      • NextToken — (String)

        The token to use to retrieve the next set of results, or null if there are no more results available. 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

Describes the specified WorkSpaces.

You can filter the results using bundle ID, directory ID, or owner, but you can specify only one filter at a time.

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>)

      The IDs of the WorkSpaces. This parameter cannot be combined with any other filter.

      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)

      The ID of the directory. In addition, you can optionally specify a specific directory user (see UserName). This parameter cannot be combined with any other filter.

    • UserName — (String)

      The name of the directory user. You must specify this parameter with DirectoryId.

    • BundleId — (String)

      The ID of the bundle. All WorkSpaces that are created from this bundle are retrieved. This parameter cannot be combined with any other filter.

    • Limit — (Integer)

      The maximum number of items to return.

    • NextToken — (String)

      The token for the next set of results. (You received this token from a previous 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>)

        Information about the WorkSpaces.

        Because CreateWorkspaces is an asynchronous operation, some of the returned information could be incomplete.

        • WorkspaceId — (String)

          The identifier of the WorkSpace.

        • DirectoryId — (String)

          The identifier of the AWS Directory Service directory for the WorkSpace.

        • UserName — (String)

          The user for the WorkSpace.

        • 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"
          • "ADMIN_MAINTENANCE"
          • "TERMINATING"
          • "TERMINATED"
          • "SUSPENDED"
          • "UPDATING"
          • "STOPPING"
          • "STOPPED"
          • "ERROR"
        • BundleId — (String)

          The identifier of the bundle used to create the WorkSpace.

        • SubnetId — (String)

          The identifier of the subnet for the WorkSpace.

        • ErrorMessage — (String)

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

        • ErrorCode — (String)

          If the WorkSpace could not be created, 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)

          Indicates whether the data stored on the user volume is encrypted.

        • RootVolumeEncryptionEnabled — (Boolean)

          Indicates whether the data stored on the root volume is encrypted.

        • WorkspaceProperties — (map)

          The properties of the WorkSpace.

          • RunningMode — (String)

            The running mode. For more information, see Manage the WorkSpace Running Mode.

            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.

          • RootVolumeSizeGib — (Integer)

            The size of the root volume.

          • UserVolumeSizeGib — (Integer)

            The size of the user storage.

          • ComputeTypeName — (String)

            The compute type. For more information, see Amazon WorkSpaces Bundles.

            Possible values include:
            • "VALUE"
            • "STANDARD"
            • "PERFORMANCE"
            • "POWER"
            • "GRAPHICS"
        • ModificationStates — (Array<map>)

          The modification states of the WorkSpace.

          • Resource — (String)

            The resource.

            Possible values include:
            • "ROOT_VOLUME"
            • "USER_VOLUME"
            • "COMPUTE_TYPE"
          • State — (String)

            The modification state.

            Possible values include:
            • "UPDATE_INITIATED"
            • "UPDATE_IN_PROGRESS"
      • NextToken — (String)

        The token to use to retrieve the next set of results, or null if there are no more results available. 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 the specified WorkSpaces.

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>)

      The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces.

    • NextToken — (String)

      The token for the next set of results. (You received this token from a previous 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:

      • WorkspacesConnectionStatus — (Array<map>)

        Information about the connection status of the WorkSpace.

        • WorkspaceId — (String)

          The ID of the WorkSpace.

        • ConnectionState — (String)

          The connection state of the WorkSpace. The connection state is unknown if the WorkSpace is stopped.

          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 token to use to retrieve the next set of results, or null if there are no more results available.

Returns:

  • (AWS.Request)

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

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

Disassociates the specified IP access control group from the specified directory.

Service Reference:

Examples:

Calling the disassociateIpGroups operation

var params = {
  DirectoryId: 'STRING_VALUE', /* required */
  GroupIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
workspaces.disassociateIpGroups(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: {})
    • DirectoryId — (String)

      The ID of the directory.

    • GroupIds — (Array<String>)

      The IDs of one or more IP access control groups.

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.

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

Modifies the specified WorkSpace properties.

Service Reference:

Examples:

Calling the modifyWorkspaceProperties operation

var params = {
  WorkspaceId: 'STRING_VALUE', /* required */
  WorkspaceProperties: { /* required */
    ComputeTypeName: VALUE | STANDARD | PERFORMANCE | POWER | GRAPHICS,
    RootVolumeSizeGib: 0,
    RunningMode: AUTO_STOP | ALWAYS_ON,
    RunningModeAutoStopTimeoutInMinutes: 0,
    UserVolumeSizeGib: 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 properties of the WorkSpace.

      • RunningMode — (String)

        The running mode. For more information, see Manage the WorkSpace Running Mode.

        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.

      • RootVolumeSizeGib — (Integer)

        The size of the root volume.

      • UserVolumeSizeGib — (Integer)

        The size of the user storage.

      • ComputeTypeName — (String)

        The compute type. For more information, see Amazon WorkSpaces Bundles.

        Possible values include:
        • "VALUE"
        • "STANDARD"
        • "PERFORMANCE"
        • "POWER"
        • "GRAPHICS"

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.

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

Sets the state of the specified WorkSpace.

To maintain a WorkSpace without being interrupted, set the WorkSpace state to ADMIN_MAINTENANCE. WorkSpaces in this state do not respond to requests to reboot, stop, start, or rebuild. An AutoStop WorkSpace in this state is not stopped. Users can log into a WorkSpace in the ADMIN_MAINTENANCE state.

Service Reference:

Examples:

Calling the modifyWorkspaceState operation

var params = {
  WorkspaceId: 'STRING_VALUE', /* required */
  WorkspaceState: AVAILABLE | ADMIN_MAINTENANCE /* required */
};
workspaces.modifyWorkspaceState(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.

    • WorkspaceState — (String)

      The WorkSpace state.

      Possible values include:
      • "AVAILABLE"
      • "ADMIN_MAINTENANCE"

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.

You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY.

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>)

      The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.

      • WorkspaceIdrequired — (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>)

        Information about the 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 WorkSpace.

You cannot rebuild a WorkSpace unless its state is AVAILABLE, ERROR, or UNHEALTHY.

Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. For more information, see Rebuild a WorkSpace.

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>)

      The WorkSpace to rebuild. You can specify a single WorkSpace.

      • WorkspaceIdrequired — (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>)

        Information about the WorkSpace if it 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.

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

Removes one or more rules from the specified IP access control group.

Service Reference:

Examples:

Calling the revokeIpRules operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  UserRules: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
workspaces.revokeIpRules(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: {})
    • GroupId — (String)

      The ID of the group.

    • UserRules — (Array<String>)

      The rules to remove from the group.

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.

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

Starts the specified WorkSpaces.

You cannot start a WorkSpace unless it has a running mode of AutoStop and a state of 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 WorkSpaces to start. You can specify up to 25 WorkSpaces.

      • 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>)

        Information about the WorkSpaces that could not be started.

        • 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.

You cannot stop a WorkSpace unless it has a running mode of AutoStop and a state of 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 WorkSpaces to stop. You can specify up to 25 WorkSpaces.

      • 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>)

        Information about the WorkSpaces that could not be stopped.

        • 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 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.

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>)

      The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.

      • WorkspaceIdrequired — (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>)

        Information about the 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.

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

Replaces the current rules of the specified IP access control group with the specified rules.

Service Reference:

Examples:

Calling the updateRulesOfIpGroup operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  UserRules: [ /* required */
    {
      ipRule: 'STRING_VALUE',
      ruleDesc: 'STRING_VALUE'
    },
    /* more items */
  ]
};
workspaces.updateRulesOfIpGroup(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: {})
    • GroupId — (String)

      The ID of the group.

    • UserRules — (Array<map>)

      One or more rules.

      • ipRule — (String)

        The IP address range, in CIDR notation.

      • ruleDesc — (String)

        The description.

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.