We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

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

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 Cloud9, see the Cloud9 User Guide.

Cloud9 supports these operations:

  • CreateEnvironmentEC2: Creates an 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.

  • ListTagsForResource: Gets the tags for an environment.

  • TagResource: Adds tags to an environment.

  • UntagResource: Removes tags from an environment.

  • 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 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.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|AWS.Endpoint)

    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' or an Endpoint object.

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

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets 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 error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • 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|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

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

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

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 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.", 
  imageId: "amazonlinux-2023-x86_64", 
  instanceType: "t2.micro", 
  ownerArn: "arn:aws:iam::123456789012:user/MyDemoUser", 
  subnetId: "subnet-6300cd1b"
 };
 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 = {
  imageId: 'STRING_VALUE', /* required */
  instanceType: 'STRING_VALUE', /* required */
  name: 'STRING_VALUE', /* required */
  automaticStopTimeMinutes: 'NUMBER_VALUE',
  clientRequestToken: 'STRING_VALUE',
  connectionType: CONNECT_SSH | CONNECT_SSM,
  description: 'STRING_VALUE',
  dryRun: true || false,
  ownerArn: 'STRING_VALUE',
  subnetId: 'STRING_VALUE',
  tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
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 IAM users in the same Amazon Web Services account.

    • description — (String)

      The description of the environment to create.

    • clientRequestToken — (String)

      A unique, case-sensitive string that helps 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 Cloud9 will use to communicate with the Amazon EC2 instance.

    • imageId — (String)

      The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. To choose an AMI for the instance, you must specify a valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.

      From December 04, 2023, you will be required to include the imageId parameter for the CreateEnvironmentEC2 action. This change will be reflected across all direct methods of communicating with the API, such as Amazon Web Services SDK, Amazon Web Services CLI and Amazon Web Services CloudFormation. This change will only affect direct API consumers, and not Cloud9 console users.

      We recommend using Amazon Linux 2023 as the AMI to create your environment as it is fully supported.

      Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.

      AMI aliases

      • Amazon Linux 2: amazonlinux-2-x86_64

      • Amazon Linux 2023 (recommended): amazonlinux-2023-x86_64

      • Ubuntu 18.04: ubuntu-18.04-x86_64

      • Ubuntu 22.04: ubuntu-22.04-x86_64

      SSM paths

      • Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64

      • Amazon Linux 2023 (recommended): resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64

      • Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64

      • Ubuntu 22.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64

    • 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 IAM principal. If this value is not specified, the ARN defaults to this environment's creator.

    • tags — (Array<map>)

      An array of key-value pairs that will be associated with the new Cloud9 development environment.

      • Keyrequired — (String)

        The name part of a tag.

      • Valuerequired — (String)

        The value part of a tag.

    • connectionType — (String)

      The connection type used for connecting to an Amazon EC2 environment. Valid values are CONNECT_SSH (default) and CONNECT_SSM (connected through Amazon EC2 Systems Manager).

      For more information, see Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager in the Cloud9 User Guide.

      Possible values include:
      • "CONNECT_SSH"
      • "CONNECT_SSM"
    • dryRun — (Boolean)

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

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

        • permissionsrequired — (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"
        • userIdrequired — (String)

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

        • userArnrequired — (String)

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

        • environmentIdrequired — (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 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 a 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 Cloud9 development environment.

Service Reference:

Examples:

DescribeEnvironmentMemberships1


/* The following example gets information about all of the environment members for the specified 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 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 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.

        • permissionsrequired — (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"
        • userIdrequired — (String)

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

        • userArnrequired — (String)

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

        • environmentIdrequired — (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 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", 
      lifecycle: {
       status: "CREATED"
      }, 
      ownerArn: "arn:aws:iam::123456789012:user/MyDemoUser"
     }, 
       {
      name: "another-demo-environment", 
      type: "ssh", 
      arn: "arn:aws:cloud9:us-east-2:123456789012:environment:349c86d4579e4e7298d500ff57a6b2EX", 
      description: "", 
      id: "349c86d4579e4e7298d500ff57a6b2EX", 
      lifecycle: {
       status: "CREATED"
      }, 
      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.

        • typerequired — (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"
        • connectionType — (String)

          The connection type used for connecting to an Amazon EC2 environment. CONNECT_SSH is selected by default.

          Possible values include:
          • "CONNECT_SSH"
          • "CONNECT_SSM"
        • arnrequired — (String)

          The Amazon Resource Name (ARN) of the environment.

        • ownerArnrequired — (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.

            • CREATING: The environment is in the process of being created.

            • CREATED: The environment was successfully created.

            • CREATE_FAILED: The environment failed to be created.

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

            • DELETE_FAILED: The environment failed to delete.

            Possible values include:
            • "CREATING"
            • "CREATED"
            • "CREATE_FAILED"
            • "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 Amazon Web Services resource.

        • managedCredentialsStatus — (String)

          Describes the status of Amazon Web Services managed temporary credentials for the Cloud9 environment. Available values are:

          • ENABLED_ON_CREATE

          • ENABLED_BY_OWNER

          • DISABLED_BY_DEFAULT

          • DISABLED_BY_OWNER

          • DISABLED_BY_COLLABORATOR

          • PENDING_REMOVAL_BY_COLLABORATOR

          • PENDING_REMOVAL_BY_OWNER

          • FAILED_REMOVAL_BY_COLLABORATOR

          • ENABLED_BY_OWNER

          • DISABLED_BY_DEFAULT

          Possible values include:
          • "ENABLED_ON_CREATE"
          • "ENABLED_BY_OWNER"
          • "DISABLED_BY_DEFAULT"
          • "DISABLED_BY_OWNER"
          • "DISABLED_BY_COLLABORATOR"
          • "PENDING_REMOVAL_BY_COLLABORATOR"
          • "PENDING_START_REMOVAL_BY_COLLABORATOR"
          • "PENDING_REMOVAL_BY_OWNER"
          • "PENDING_START_REMOVAL_BY_OWNER"
          • "FAILED_REMOVAL_BY_COLLABORATOR"
          • "FAILED_REMOVAL_BY_OWNER"

Returns:

  • (AWS.Request)

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

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

Gets status information for an 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 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.

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

Gets a list of the tags associated with an Cloud9 development environment.

Service Reference:

Examples:

Calling the listTagsForResource operation

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

      The Amazon Resource Name (ARN) of the Cloud9 development environment to get the tags 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:

      • Tags — (Array<map>)

        The list of tags associated with the Cloud9 development environment.

        • Keyrequired — (String)

          The name part of a tag.

        • Valuerequired — (String)

          The value part of a tag.

Returns:

  • (AWS.Request)

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

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

Adds tags to an Cloud9 development environment.

Tags that you add to an Cloud9 environment by using this method will NOT be automatically propagated to underlying resources.

Service Reference:

Examples:

Calling the tagResource operation

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

      The Amazon Resource Name (ARN) of the Cloud9 development environment to add tags to.

    • Tags — (Array<map>)

      The list of tags to add to the given Cloud9 development environment.

      • Keyrequired — (String)

        The name part of a tag.

      • Valuerequired — (String)

        The value part of a 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.

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

Removes tags from an Cloud9 development environment.

Service Reference:

Examples:

Calling the untagResource operation

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

      The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.

    • TagKeys — (Array<String>)

      The tag names of the tags to remove from the given Cloud9 development 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.

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

Changes the settings of an existing 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',
  managedCredentialsAction: ENABLE | DISABLE,
  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.

    • managedCredentialsAction — (String)

      Allows the environment owner to turn on or turn off the Amazon Web Services managed temporary credentials for an Cloud9 environment by using one of the following values:

      • ENABLE

      • DISABLE

      Note: Only the environment owner can change the status of managed temporary credentials. An AccessDeniedException is thrown if an attempt to turn on or turn off managed temporary credentials is made by an account that's not the environment owner.
      Possible values include:
      • "ENABLE"
      • "DISABLE"

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

        • permissionsrequired — (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"
        • userIdrequired — (String)

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

        • userArnrequired — (String)

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

        • environmentIdrequired — (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.