Class: AWS.Cloud9

Inherits:
AWS.Service show all
Identifier:
cloud9
API Version:
2017-09-23
Defined in:
(unknown)

Overview

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

Service Description

AWS Cloud9 is a collection of tools that you can use to code, build, run, test, debug, and release software in the cloud.

For more information about AWS Cloud9, see the AWS Cloud9 User Guide.

AWS Cloud9 supports these operations:

  • CreateEnvironmentEC2: Creates an AWS Cloud9 development environment, launches an Amazon EC2 instance, and then connects from the instance to the environment.

  • CreateEnvironmentMembership: Adds an environment member to an environment.

  • DeleteEnvironment: Deletes an environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.

  • DeleteEnvironmentMembership: Deletes an environment member from an environment.

  • DescribeEnvironmentMemberships: Gets information about environment members for an environment.

  • DescribeEnvironments: Gets information about environments.

  • DescribeEnvironmentStatus: Gets status information for an environment.

  • ListEnvironments: Gets a list of environment identifiers.

  • UpdateEnvironment: Changes the settings of an existing environment.

  • UpdateEnvironmentMembership: Changes the settings of an existing environment member for an environment.

Sending a Request Using Cloud9

var cloud9 = new AWS.Cloud9();
cloud9.createEnvironmentEC2(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 Cloud9 object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var cloud9 = new AWS.Cloud9({apiVersion: '2017-09-23'});

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

AWS.config.apiVersions = {
  cloud9: '2017-09-23',
  // other service API versions
};

var cloud9 = new AWS.Cloud9();

Version:

  • 2017-09-23

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

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

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

Examples:

Constructing a Cloud9 object

var cloud9 = new AWS.Cloud9({apiVersion: '2017-09-23'});

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.Cloud9.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Cloud9.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.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. 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

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

Creates an AWS Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.

Service Reference:

Examples:

CreateEnvironmentEC2


/*  */

 var params = {
  name: "my-demo-environment", 
  automaticStopTimeMinutes: 60, 
  description: "This is my demonstration environment.", 
  instanceType: "t2.micro", 
  ownerArn: "arn:aws:iam::123456789012:user/MyDemoUser", 
  subnetId: "subnet-1fab8aEX"
 };
 cloud9.createEnvironmentEC2(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    environmentId: "8d9967e2f0624182b74e7690ad69ebEX"
   }
   */
 });

Calling the createEnvironmentEC2 operation

var params = {
  instanceType: 'STRING_VALUE', /* required */
  name: 'STRING_VALUE', /* required */
  automaticStopTimeMinutes: 'NUMBER_VALUE',
  clientRequestToken: 'STRING_VALUE',
  description: 'STRING_VALUE',
  ownerArn: 'STRING_VALUE',
  subnetId: 'STRING_VALUE'
};
cloud9.createEnvironmentEC2(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: {})
    • name — (String)

      The name of the environment to create.

      This name is visible to other AWS IAM users in the same AWS account.

    • description — (String)

      The description of the environment to create.

    • clientRequestToken — (String)

      A unique, case-sensitive string that helps AWS Cloud9 to ensure this operation completes no more than one time.

      For more information, see Client Tokens in the Amazon EC2 API Reference.

    • instanceType — (String)

      The type of instance to connect to the environment (for example, t2.micro).

    • subnetId — (String)

      The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.

    • automaticStopTimeMinutes — (Integer)

      The number of minutes until the running instance is shut down after the environment has last been used.

    • ownerArn — (String)

      The Amazon Resource Name (ARN) of the environment owner. This ARN can be the ARN of any AWS IAM principal. If this value is not specified, the ARN defaults to this environment's creator.

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:

      • environmentId — (String)

        The ID of the environment that was created.

Returns:

  • (AWS.Request)

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

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

Adds an environment member to an AWS Cloud9 development environment.

Service Reference:

Examples:

CreateEnvironmentMembership


/*  */

 var params = {
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
  permissions: "read-write", 
  userArn: "arn:aws:iam::123456789012:user/AnotherDemoUser"
 };
 cloud9.createEnvironmentMembership(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    membership: {
     environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
     permissions: "read-write", 
     userArn: "arn:aws:iam::123456789012:user/AnotherDemoUser", 
     userId: "AIDAJ3BA6O2FMJWCWXHEX"
    }
   }
   */
 });

Calling the createEnvironmentMembership operation

var params = {
  environmentId: 'STRING_VALUE', /* required */
  permissions: read-write | read-only, /* required */
  userArn: 'STRING_VALUE' /* required */
};
cloud9.createEnvironmentMembership(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: {})
    • environmentId — (String)

      The ID of the environment that contains the environment member you want to add.

    • userArn — (String)

      The Amazon Resource Name (ARN) of the environment member you want to add.

    • permissions — (String)

      The type of environment member permissions you want to associate with this environment member. Available values include:

      • read-only: Has read-only access to the environment.

      • read-write: Has read-write access to the environment.

      Possible values include:
      • "read-write"
      • "read-only"

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:

      • membership — (map)

        Information about the environment member that was added.

        • permissions — (String)

          The type of environment member permissions associated with this environment member. Available values include:

          • owner: Owns the environment.

          • read-only: Has read-only access to the environment.

          • read-write: Has read-write access to the environment.

          Possible values include:
          • "owner"
          • "read-write"
          • "read-only"
        • userId — (String)

          The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.

        • userArn — (String)

          The Amazon Resource Name (ARN) of the environment member.

        • environmentId — (String)

          The ID of the environment for the environment member.

        • lastAccess — (Date)

          The time, expressed in epoch time format, when the environment member last opened the environment.

Returns:

  • (AWS.Request)

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

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

Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.

Service Reference:

Examples:

DeleteEnvironment


/*  */

 var params = {
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX"
 };
 cloud9.deleteEnvironment(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the deleteEnvironment operation

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

      The ID of the environment to delete.

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.

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

Deletes an environment member from an AWS Cloud9 development environment.

Service Reference:

Examples:

DeleteEnvironmentMembership


/*  */

 var params = {
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
  userArn: "arn:aws:iam::123456789012:user/AnotherDemoUser"
 };
 cloud9.deleteEnvironmentMembership(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the deleteEnvironmentMembership operation

var params = {
  environmentId: 'STRING_VALUE', /* required */
  userArn: 'STRING_VALUE' /* required */
};
cloud9.deleteEnvironmentMembership(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: {})
    • environmentId — (String)

      The ID of the environment to delete the environment member from.

    • userArn — (String)

      The Amazon Resource Name (ARN) of the environment member to delete from the environment.

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.

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

Gets information about environment members for an AWS Cloud9 development environment.

Service Reference:

Examples:

DescribeEnvironmentMemberships1


/* The following example gets information about all of the environment members for the specified AWS Cloud9 development environment. */

 var params = {
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX"
 };
 cloud9.describeEnvironmentMemberships(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    memberships: [
       {
      environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
      permissions: "read-write", 
      userArn: "arn:aws:iam::123456789012:user/AnotherDemoUser", 
      userId: "AIDAJ3BA6O2FMJWCWXHEX"
     }, 
       {
      environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
      permissions: "owner", 
      userArn: "arn:aws:iam::123456789012:user/MyDemoUser", 
      userId: "AIDAJNUEDQAQWFELJDLEX"
     }
    ]
   }
   */
 });

DescribeEnvironmentMemberships2


/* The following example gets information about the owner of the specified AWS Cloud9 development environment. */

 var params = {
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
  permissions: [
     "owner"
  ]
 };
 cloud9.describeEnvironmentMemberships(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    memberships: [
       {
      environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
      permissions: "owner", 
      userArn: "arn:aws:iam::123456789012:user/MyDemoUser", 
      userId: "AIDAJNUEDQAQWFELJDLEX"
     }
    ]
   }
   */
 });

DescribeEnvironmentMemberships3


/* The following example gets AWS Cloud9 development environment membership information for the specified user. */

 var params = {
  userArn: "arn:aws:iam::123456789012:user/MyDemoUser"
 };
 cloud9.describeEnvironmentMemberships(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    memberships: [
       {
      environmentId: "10a75714bd494714929e7f5ec4125aEX", 
      lastAccess: <Date Representation>, 
      permissions: "owner", 
      userArn: "arn:aws:iam::123456789012:user/MyDemoUser", 
      userId: "AIDAJNUEDQAQWFELJDLEX"
     }, 
       {
      environmentId: "12bfc3cd537f41cb9776f8af5525c9EX", 
      lastAccess: <Date Representation>, 
      permissions: "owner", 
      userArn: "arn:aws:iam::123456789012:user/MyDemoUser", 
      userId: "AIDAJNUEDQAQWFELJDLEX"
     }
    ]
   }
   */
 });

Calling the describeEnvironmentMemberships operation

var params = {
  environmentId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  permissions: [
    owner | read-write | read-only,
    /* more items */
  ],
  userArn: 'STRING_VALUE'
};
cloud9.describeEnvironmentMemberships(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: {})
    • userArn — (String)

      The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.

    • environmentId — (String)

      The ID of the environment to get environment member information about.

    • permissions — (Array<String>)

      The type of environment member permissions to get information about. Available values include:

      • owner: Owns the environment.

      • read-only: Has read-only access to the environment.

      • read-write: Has read-write access to the environment.

      If no value is specified, information about all environment members are returned.

    • nextToken — (String)

      During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

    • maxResults — (Integer)

      The maximum number of environment members to get information about.

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:

      • memberships — (Array<map>)

        Information about the environment members for the environment.

        • permissions — (String)

          The type of environment member permissions associated with this environment member. Available values include:

          • owner: Owns the environment.

          • read-only: Has read-only access to the environment.

          • read-write: Has read-write access to the environment.

          Possible values include:
          • "owner"
          • "read-write"
          • "read-only"
        • userId — (String)

          The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.

        • userArn — (String)

          The Amazon Resource Name (ARN) of the environment member.

        • environmentId — (String)

          The ID of the environment for the environment member.

        • lastAccess — (Date)

          The time, expressed in epoch time format, when the environment member last opened the environment.

      • nextToken — (String)

        If there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.

Returns:

  • (AWS.Request)

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

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

Gets information about AWS Cloud9 development environments.

Service Reference:

Examples:

DescribeEnvironments


/*  */

 var params = {
  environmentIds: [
     "8d9967e2f0624182b74e7690ad69ebEX", 
     "349c86d4579e4e7298d500ff57a6b2EX"
  ]
 };
 cloud9.describeEnvironments(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    environments: [
       {
      name: "my-demo-environment", 
      type: "ec2", 
      arn: "arn:aws:cloud9:us-east-2:123456789012:environment:8d9967e2f0624182b74e7690ad69ebEX", 
      description: "This is my demonstration environment.", 
      id: "8d9967e2f0624182b74e7690ad69ebEX", 
      ownerArn: "arn:aws:iam::123456789012:user/MyDemoUser"
     }, 
       {
      name: "another-demo-environment", 
      type: "ssh", 
      arn: "arn:aws:cloud9:us-east-2:123456789012:environment:349c86d4579e4e7298d500ff57a6b2EX", 
      id: "349c86d4579e4e7298d500ff57a6b2EX", 
      ownerArn: "arn:aws:sts::123456789012:assumed-role/AnotherDemoUser/AnotherDemoUser"
     }
    ]
   }
   */
 });

Calling the describeEnvironments operation

var params = {
  environmentIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
cloud9.describeEnvironments(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: {})
    • environmentIds — (Array<String>)

      The IDs of individual environments to get information about.

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:

      • environments — (Array<map>)

        Information about the environments that are returned.

        • id — (String)

          The ID of the environment.

        • name — (String)

          The name of the environment.

        • description — (String)

          The description for the environment.

        • type — (String)

          The type of environment. Valid values include the following:

          • ec2: An Amazon Elastic Compute Cloud (Amazon EC2) instance connects to the environment.

          • ssh: Your own server connects to the environment.

          Possible values include:
          • "ssh"
          • "ec2"
        • arn — (String)

          The Amazon Resource Name (ARN) of the environment.

        • ownerArn — (String)

          The Amazon Resource Name (ARN) of the environment owner.

        • lifecycle — (map)

          The state of the environment in its creation or deletion lifecycle.

          • status — (String)

            The current creation or deletion lifecycle state of the environment.

            • CREATED: The environment was successfully created.

            • DELETE_FAILED: The environment failed to delete.

            • DELETING: The environment is in the process of being deleted.

            Possible values include:
            • "CREATED"
            • "DELETING"
            • "DELETE_FAILED"
          • reason — (String)

            Any informational message about the lifecycle state of the environment.

          • failureResource — (String)

            If the environment failed to delete, the Amazon Resource Name (ARN) of the related AWS resource.

Returns:

  • (AWS.Request)

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

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

Gets status information for an AWS Cloud9 development environment.

Service Reference:

Examples:

DescribeEnvironmentStatus


/*  */

 var params = {
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX"
 };
 cloud9.describeEnvironmentStatus(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    message: "Environment is ready to use", 
    status: "ready"
   }
   */
 });

Calling the describeEnvironmentStatus operation

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

      The ID of the environment to get status information about.

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:

      • status — (String)

        The status of the environment. Available values include:

        • connecting: The environment is connecting.

        • creating: The environment is being created.

        • deleting: The environment is being deleted.

        • error: The environment is in an error state.

        • ready: The environment is ready.

        • stopped: The environment is stopped.

        • stopping: The environment is stopping.

        Possible values include:
        • "error"
        • "creating"
        • "connecting"
        • "ready"
        • "stopping"
        • "stopped"
        • "deleting"
      • message — (String)

        Any informational message about the status of the environment.

Returns:

  • (AWS.Request)

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

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

Gets a list of AWS Cloud9 development environment identifiers.

Service Reference:

Examples:

ListEnvironments


/*  */

 var params = {
 };
 cloud9.listEnvironments(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    environmentIds: [
       "349c86d4579e4e7298d500ff57a6b2EX", 
       "45a3da47af0840f2b0c0824f5ee232EX"
    ]
   }
   */
 });

Calling the listEnvironments operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
cloud9.listEnvironments(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: {})
    • nextToken — (String)

      During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

    • maxResults — (Integer)

      The maximum number of environments to get identifiers for.

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:

      • nextToken — (String)

        If there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.

      • environmentIds — (Array<String>)

        The list of environment identifiers.

Returns:

  • (AWS.Request)

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

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

Changes the settings of an existing AWS Cloud9 development environment.

Service Reference:

Examples:

UpdateEnvironment


/*  */

 var params = {
  name: "my-changed-demo-environment", 
  description: "This is my changed demonstration environment.", 
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX"
 };
 cloud9.updateEnvironment(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the updateEnvironment operation

var params = {
  environmentId: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  name: 'STRING_VALUE'
};
cloud9.updateEnvironment(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: {})
    • environmentId — (String)

      The ID of the environment to change settings.

    • name — (String)

      A replacement name for the environment.

    • description — (String)

      Any new or replacement description for the environment.

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.

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

Changes the settings of an existing environment member for an AWS Cloud9 development environment.

Service Reference:

Examples:

UpdateEnvironmentMembership


/*  */

 var params = {
  environmentId: "8d9967e2f0624182b74e7690ad69ebEX", 
  permissions: "read-only", 
  userArn: "arn:aws:iam::123456789012:user/AnotherDemoUser"
 };
 cloud9.updateEnvironmentMembership(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    membership: {
     environmentId: "8d9967e2f0624182b74e7690ad69eb31", 
     permissions: "read-only", 
     userArn: "arn:aws:iam::123456789012:user/AnotherDemoUser", 
     userId: "AIDAJ3BA6O2FMJWCWXHEX"
    }
   }
   */
 });

Calling the updateEnvironmentMembership operation

var params = {
  environmentId: 'STRING_VALUE', /* required */
  permissions: read-write | read-only, /* required */
  userArn: 'STRING_VALUE' /* required */
};
cloud9.updateEnvironmentMembership(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: {})
    • environmentId — (String)

      The ID of the environment for the environment member whose settings you want to change.

    • userArn — (String)

      The Amazon Resource Name (ARN) of the environment member whose settings you want to change.

    • permissions — (String)

      The replacement type of environment member permissions you want to associate with this environment member. Available values include:

      • read-only: Has read-only access to the environment.

      • read-write: Has read-write access to the environment.

      Possible values include:
      • "read-write"
      • "read-only"

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:

      • membership — (map)

        Information about the environment member whose settings were changed.

        • permissions — (String)

          The type of environment member permissions associated with this environment member. Available values include:

          • owner: Owns the environment.

          • read-only: Has read-only access to the environment.

          • read-write: Has read-write access to the environment.

          Possible values include:
          • "owner"
          • "read-write"
          • "read-only"
        • userId — (String)

          The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.

        • userArn — (String)

          The Amazon Resource Name (ARN) of the environment member.

        • environmentId — (String)

          The ID of the environment for the environment member.

        • lastAccess — (Date)

          The time, expressed in epoch time format, when the environment member last opened the environment.

Returns:

  • (AWS.Request)

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