UNPKG

19 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class Cloud9 extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: Cloud9.Types.ClientConfiguration)
13 config: Config & Cloud9.Types.ClientConfiguration;
14 /**
15 * Creates an AWS Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.
16 */
17 createEnvironmentEC2(params: Cloud9.Types.CreateEnvironmentEC2Request, callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentEC2Result) => void): Request<Cloud9.Types.CreateEnvironmentEC2Result, AWSError>;
18 /**
19 * Creates an AWS Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.
20 */
21 createEnvironmentEC2(callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentEC2Result) => void): Request<Cloud9.Types.CreateEnvironmentEC2Result, AWSError>;
22 /**
23 * Adds an environment member to an AWS Cloud9 development environment.
24 */
25 createEnvironmentMembership(params: Cloud9.Types.CreateEnvironmentMembershipRequest, callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentMembershipResult) => void): Request<Cloud9.Types.CreateEnvironmentMembershipResult, AWSError>;
26 /**
27 * Adds an environment member to an AWS Cloud9 development environment.
28 */
29 createEnvironmentMembership(callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentMembershipResult) => void): Request<Cloud9.Types.CreateEnvironmentMembershipResult, AWSError>;
30 /**
31 * Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.
32 */
33 deleteEnvironment(params: Cloud9.Types.DeleteEnvironmentRequest, callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentResult) => void): Request<Cloud9.Types.DeleteEnvironmentResult, AWSError>;
34 /**
35 * Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.
36 */
37 deleteEnvironment(callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentResult) => void): Request<Cloud9.Types.DeleteEnvironmentResult, AWSError>;
38 /**
39 * Deletes an environment member from an AWS Cloud9 development environment.
40 */
41 deleteEnvironmentMembership(params: Cloud9.Types.DeleteEnvironmentMembershipRequest, callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentMembershipResult) => void): Request<Cloud9.Types.DeleteEnvironmentMembershipResult, AWSError>;
42 /**
43 * Deletes an environment member from an AWS Cloud9 development environment.
44 */
45 deleteEnvironmentMembership(callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentMembershipResult) => void): Request<Cloud9.Types.DeleteEnvironmentMembershipResult, AWSError>;
46 /**
47 * Gets information about environment members for an AWS Cloud9 development environment.
48 */
49 describeEnvironmentMemberships(params: Cloud9.Types.DescribeEnvironmentMembershipsRequest, callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentMembershipsResult) => void): Request<Cloud9.Types.DescribeEnvironmentMembershipsResult, AWSError>;
50 /**
51 * Gets information about environment members for an AWS Cloud9 development environment.
52 */
53 describeEnvironmentMemberships(callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentMembershipsResult) => void): Request<Cloud9.Types.DescribeEnvironmentMembershipsResult, AWSError>;
54 /**
55 * Gets status information for an AWS Cloud9 development environment.
56 */
57 describeEnvironmentStatus(params: Cloud9.Types.DescribeEnvironmentStatusRequest, callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentStatusResult) => void): Request<Cloud9.Types.DescribeEnvironmentStatusResult, AWSError>;
58 /**
59 * Gets status information for an AWS Cloud9 development environment.
60 */
61 describeEnvironmentStatus(callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentStatusResult) => void): Request<Cloud9.Types.DescribeEnvironmentStatusResult, AWSError>;
62 /**
63 * Gets information about AWS Cloud9 development environments.
64 */
65 describeEnvironments(params: Cloud9.Types.DescribeEnvironmentsRequest, callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentsResult) => void): Request<Cloud9.Types.DescribeEnvironmentsResult, AWSError>;
66 /**
67 * Gets information about AWS Cloud9 development environments.
68 */
69 describeEnvironments(callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentsResult) => void): Request<Cloud9.Types.DescribeEnvironmentsResult, AWSError>;
70 /**
71 * Gets a list of AWS Cloud9 development environment identifiers.
72 */
73 listEnvironments(params: Cloud9.Types.ListEnvironmentsRequest, callback?: (err: AWSError, data: Cloud9.Types.ListEnvironmentsResult) => void): Request<Cloud9.Types.ListEnvironmentsResult, AWSError>;
74 /**
75 * Gets a list of AWS Cloud9 development environment identifiers.
76 */
77 listEnvironments(callback?: (err: AWSError, data: Cloud9.Types.ListEnvironmentsResult) => void): Request<Cloud9.Types.ListEnvironmentsResult, AWSError>;
78 /**
79 * Changes the settings of an existing AWS Cloud9 development environment.
80 */
81 updateEnvironment(params: Cloud9.Types.UpdateEnvironmentRequest, callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentResult) => void): Request<Cloud9.Types.UpdateEnvironmentResult, AWSError>;
82 /**
83 * Changes the settings of an existing AWS Cloud9 development environment.
84 */
85 updateEnvironment(callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentResult) => void): Request<Cloud9.Types.UpdateEnvironmentResult, AWSError>;
86 /**
87 * Changes the settings of an existing environment member for an AWS Cloud9 development environment.
88 */
89 updateEnvironmentMembership(params: Cloud9.Types.UpdateEnvironmentMembershipRequest, callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentMembershipResult) => void): Request<Cloud9.Types.UpdateEnvironmentMembershipResult, AWSError>;
90 /**
91 * Changes the settings of an existing environment member for an AWS Cloud9 development environment.
92 */
93 updateEnvironmentMembership(callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentMembershipResult) => void): Request<Cloud9.Types.UpdateEnvironmentMembershipResult, AWSError>;
94}
95declare namespace Cloud9 {
96 export type AutomaticStopTimeMinutes = number;
97 export type BoundedEnvironmentIdList = EnvironmentId[];
98 export type ClientRequestToken = string;
99 export interface CreateEnvironmentEC2Request {
100 /**
101 * The name of the environment to create. This name is visible to other AWS IAM users in the same AWS account.
102 */
103 name: EnvironmentName;
104 /**
105 * The description of the environment to create.
106 */
107 description?: EnvironmentDescription;
108 /**
109 * 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.
110 */
111 clientRequestToken?: ClientRequestToken;
112 /**
113 * The type of instance to connect to the environment (for example, t2.micro).
114 */
115 instanceType: InstanceType;
116 /**
117 * The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
118 */
119 subnetId?: SubnetId;
120 /**
121 * The number of minutes until the running instance is shut down after the environment has last been used.
122 */
123 automaticStopTimeMinutes?: AutomaticStopTimeMinutes;
124 /**
125 * 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.
126 */
127 ownerArn?: UserArn;
128 }
129 export interface CreateEnvironmentEC2Result {
130 /**
131 * The ID of the environment that was created.
132 */
133 environmentId?: EnvironmentId;
134 }
135 export interface CreateEnvironmentMembershipRequest {
136 /**
137 * The ID of the environment that contains the environment member you want to add.
138 */
139 environmentId: EnvironmentId;
140 /**
141 * The Amazon Resource Name (ARN) of the environment member you want to add.
142 */
143 userArn: UserArn;
144 /**
145 * 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.
146 */
147 permissions: MemberPermissions;
148 }
149 export interface CreateEnvironmentMembershipResult {
150 /**
151 * Information about the environment member that was added.
152 */
153 membership?: EnvironmentMember;
154 }
155 export interface DeleteEnvironmentMembershipRequest {
156 /**
157 * The ID of the environment to delete the environment member from.
158 */
159 environmentId: EnvironmentId;
160 /**
161 * The Amazon Resource Name (ARN) of the environment member to delete from the environment.
162 */
163 userArn: UserArn;
164 }
165 export interface DeleteEnvironmentMembershipResult {
166 }
167 export interface DeleteEnvironmentRequest {
168 /**
169 * The ID of the environment to delete.
170 */
171 environmentId: EnvironmentId;
172 }
173 export interface DeleteEnvironmentResult {
174 }
175 export interface DescribeEnvironmentMembershipsRequest {
176 /**
177 * 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.
178 */
179 userArn?: UserArn;
180 /**
181 * The ID of the environment to get environment member information about.
182 */
183 environmentId?: EnvironmentId;
184 /**
185 * 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.
186 */
187 permissions?: PermissionsList;
188 /**
189 * 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.
190 */
191 nextToken?: String;
192 /**
193 * The maximum number of environment members to get information about.
194 */
195 maxResults?: MaxResults;
196 }
197 export interface DescribeEnvironmentMembershipsResult {
198 /**
199 * Information about the environment members for the environment.
200 */
201 memberships?: EnvironmentMembersList;
202 /**
203 * 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.
204 */
205 nextToken?: String;
206 }
207 export interface DescribeEnvironmentStatusRequest {
208 /**
209 * The ID of the environment to get status information about.
210 */
211 environmentId: EnvironmentId;
212 }
213 export interface DescribeEnvironmentStatusResult {
214 /**
215 * 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.
216 */
217 status?: EnvironmentStatus;
218 /**
219 * Any informational message about the status of the environment.
220 */
221 message?: String;
222 }
223 export interface DescribeEnvironmentsRequest {
224 /**
225 * The IDs of individual environments to get information about.
226 */
227 environmentIds: BoundedEnvironmentIdList;
228 }
229 export interface DescribeEnvironmentsResult {
230 /**
231 * Information about the environments that are returned.
232 */
233 environments?: EnvironmentList;
234 }
235 export interface Environment {
236 /**
237 * The ID of the environment.
238 */
239 id?: EnvironmentId;
240 /**
241 * The name of the environment.
242 */
243 name?: EnvironmentName;
244 /**
245 * The description for the environment.
246 */
247 description?: EnvironmentDescription;
248 /**
249 * 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.
250 */
251 type?: EnvironmentType;
252 /**
253 * The Amazon Resource Name (ARN) of the environment.
254 */
255 arn?: String;
256 /**
257 * The Amazon Resource Name (ARN) of the environment owner.
258 */
259 ownerArn?: String;
260 /**
261 * The state of the environment in its creation or deletion lifecycle.
262 */
263 lifecycle?: EnvironmentLifecycle;
264 }
265 export type EnvironmentDescription = string;
266 export type EnvironmentId = string;
267 export type EnvironmentIdList = EnvironmentId[];
268 export interface EnvironmentLifecycle {
269 /**
270 * 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.
271 */
272 status?: EnvironmentLifecycleStatus;
273 /**
274 * Any informational message about the lifecycle state of the environment.
275 */
276 reason?: String;
277 /**
278 * If the environment failed to delete, the Amazon Resource Name (ARN) of the related AWS resource.
279 */
280 failureResource?: String;
281 }
282 export type EnvironmentLifecycleStatus = "CREATING"|"CREATED"|"CREATE_FAILED"|"DELETING"|"DELETE_FAILED"|string;
283 export type EnvironmentList = Environment[];
284 export interface EnvironmentMember {
285 /**
286 * 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.
287 */
288 permissions?: Permissions;
289 /**
290 * The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
291 */
292 userId?: String;
293 /**
294 * The Amazon Resource Name (ARN) of the environment member.
295 */
296 userArn?: UserArn;
297 /**
298 * The ID of the environment for the environment member.
299 */
300 environmentId?: EnvironmentId;
301 /**
302 * The time, expressed in epoch time format, when the environment member last opened the environment.
303 */
304 lastAccess?: Timestamp;
305 }
306 export type EnvironmentMembersList = EnvironmentMember[];
307 export type EnvironmentName = string;
308 export type EnvironmentStatus = "error"|"creating"|"connecting"|"ready"|"stopping"|"stopped"|"deleting"|string;
309 export type EnvironmentType = "ssh"|"ec2"|string;
310 export type InstanceType = string;
311 export interface ListEnvironmentsRequest {
312 /**
313 * 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.
314 */
315 nextToken?: String;
316 /**
317 * The maximum number of environments to get identifiers for.
318 */
319 maxResults?: MaxResults;
320 }
321 export interface ListEnvironmentsResult {
322 /**
323 * 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.
324 */
325 nextToken?: String;
326 /**
327 * The list of environment identifiers.
328 */
329 environmentIds?: EnvironmentIdList;
330 }
331 export type MaxResults = number;
332 export type MemberPermissions = "read-write"|"read-only"|string;
333 export type Permissions = "owner"|"read-write"|"read-only"|string;
334 export type PermissionsList = Permissions[];
335 export type String = string;
336 export type SubnetId = string;
337 export type Timestamp = Date;
338 export interface UpdateEnvironmentMembershipRequest {
339 /**
340 * The ID of the environment for the environment member whose settings you want to change.
341 */
342 environmentId: EnvironmentId;
343 /**
344 * The Amazon Resource Name (ARN) of the environment member whose settings you want to change.
345 */
346 userArn: UserArn;
347 /**
348 * 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.
349 */
350 permissions: MemberPermissions;
351 }
352 export interface UpdateEnvironmentMembershipResult {
353 /**
354 * Information about the environment member whose settings were changed.
355 */
356 membership?: EnvironmentMember;
357 }
358 export interface UpdateEnvironmentRequest {
359 /**
360 * The ID of the environment to change settings.
361 */
362 environmentId: EnvironmentId;
363 /**
364 * A replacement name for the environment.
365 */
366 name?: EnvironmentName;
367 /**
368 * Any new or replacement description for the environment.
369 */
370 description?: EnvironmentDescription;
371 }
372 export interface UpdateEnvironmentResult {
373 }
374 export type UserArn = string;
375 /**
376 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
377 */
378 export type apiVersion = "2017-09-23"|"latest"|string;
379 export interface ClientApiVersions {
380 /**
381 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
382 */
383 apiVersion?: apiVersion;
384 }
385 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
386 /**
387 * Contains interfaces for use with the Cloud9 client.
388 */
389 export import Types = Cloud9;
390}
391export = Cloud9;