Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class DescribeEnvironmentMembershipsCommandProtected

Gets information about environment members for an Cloud9 development environment.

Example

Use a bare-bones client and the command you need to make an API call.

import { Cloud9Client, DescribeEnvironmentMembershipsCommand } from "@aws-sdk/client-cloud9"; // ES Modules import
// const { Cloud9Client, DescribeEnvironmentMembershipsCommand } = require("@aws-sdk/client-cloud9"); // CommonJS import
const client = new Cloud9Client(config);
const input = { // DescribeEnvironmentMembershipsRequest
userArn: "STRING_VALUE",
environmentId: "STRING_VALUE",
permissions: [ // PermissionsList
"owner" || "read-write" || "read-only",
],
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new DescribeEnvironmentMembershipsCommand(input);
const response = await client.send(command);
// { // DescribeEnvironmentMembershipsResult
// memberships: [ // EnvironmentMembersList
// { // EnvironmentMember
// permissions: "owner" || "read-write" || "read-only", // required
// userId: "STRING_VALUE", // required
// userArn: "STRING_VALUE", // required
// environmentId: "STRING_VALUE", // required
// lastAccess: new Date("TIMESTAMP"),
// },
// ],
// nextToken: "STRING_VALUE",
// };

Param

DescribeEnvironmentMembershipsCommandInput

Returns

DescribeEnvironmentMembershipsCommandOutput

See

Throws

BadRequestException (client fault)

The target request is invalid.

Throws

ConflictException (client fault)

A conflict occurred.

Throws

ForbiddenException (client fault)

An access permissions issue occurred.

Throws

InternalServerErrorException (server fault)

An internal server error occurred.

Throws

LimitExceededException (client fault)

A service limit was exceeded.

Throws

NotFoundException (client fault)

The target resource cannot be found.

Throws

TooManyRequestsException (client fault)

Too many service requests were made over the given time period.

Throws

Cloud9ServiceException

Base exception class for all service exceptions from Cloud9 service.

Example

DescribeEnvironmentMemberships1

// The following example gets information about all of the environment members for the specified development environment.
const input = {
"environmentId": "8d9967e2f0624182b74e7690ad69ebEX"
};
const command = new DescribeEnvironmentMembershipsCommand(input);
const response = await client.send(command);
/* response ==
{
"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"
}
]
}
*/
// example id: describeenvironmentmemberships1-1516823070453

Example

DescribeEnvironmentMemberships2

// The following example gets information about the owner of the specified development environment.
const input = {
"environmentId": "8d9967e2f0624182b74e7690ad69ebEX",
"permissions": [
"owner"
]
};
const command = new DescribeEnvironmentMembershipsCommand(input);
const response = await client.send(command);
/* response ==
{
"memberships": [
{
"environmentId": "8d9967e2f0624182b74e7690ad69ebEX",
"permissions": "owner",
"userArn": "arn:aws:iam::123456789012:user/MyDemoUser",
"userId": "AIDAJNUEDQAQWFELJDLEX"
}
]
}
*/
// example id: describeenvironmentmemberships2-1516823191355

Example

DescribeEnvironmentMemberships3

// The following example gets development environment membership information for the specified user.
const input = {
"userArn": "arn:aws:iam::123456789012:user/MyDemoUser"
};
const command = new DescribeEnvironmentMembershipsCommand(input);
const response = await client.send(command);
/* response ==
{
"memberships": [
{
"environmentId": "10a75714bd494714929e7f5ec4125aEX",
"lastAccess": "2018-01-19T11:06:13Z",
"permissions": "owner",
"userArn": "arn:aws:iam::123456789012:user/MyDemoUser",
"userId": "AIDAJNUEDQAQWFELJDLEX"
},
{
"environmentId": "12bfc3cd537f41cb9776f8af5525c9EX",
"lastAccess": "2018-01-19T11:39:19Z",
"permissions": "owner",
"userArn": "arn:aws:iam::123456789012:user/MyDemoUser",
"userId": "AIDAJNUEDQAQWFELJDLEX"
}
]
}
*/
// example id: describeenvironmentmemberships3-1516823268793

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods