ListMembershipsCommand

Lists all memberships resources within the caller's account.

Example Syntax

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

import { CleanRoomsClient, ListMembershipsCommand } from "@aws-sdk/client-cleanrooms"; // ES Modules import
// const { CleanRoomsClient, ListMembershipsCommand } = require("@aws-sdk/client-cleanrooms"); // CommonJS import
const client = new CleanRoomsClient(config);
const input = { // ListMembershipsInput
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  status: "STRING_VALUE",
};
const command = new ListMembershipsCommand(input);
const response = await client.send(command);
// { // ListMembershipsOutput
//   nextToken: "STRING_VALUE",
//   membershipSummaries: [ // MembershipSummaryList // required
//     { // MembershipSummary
//       id: "STRING_VALUE", // required
//       arn: "STRING_VALUE", // required
//       collaborationArn: "STRING_VALUE", // required
//       collaborationId: "STRING_VALUE", // required
//       collaborationCreatorAccountId: "STRING_VALUE", // required
//       collaborationCreatorDisplayName: "STRING_VALUE", // required
//       collaborationName: "STRING_VALUE", // required
//       createTime: new Date("TIMESTAMP"), // required
//       updateTime: new Date("TIMESTAMP"), // required
//       status: "STRING_VALUE", // required
//       memberAbilities: [ // MemberAbilities // required
//         "CAN_QUERY" || "CAN_RECEIVE_RESULTS",
//       ],
//       mlMemberAbilities: { // MLMemberAbilities
//         customMLMemberAbilities: [ // CustomMLMemberAbilities // required
//           "CAN_RECEIVE_MODEL_OUTPUT" || "CAN_RECEIVE_INFERENCE_OUTPUT",
//         ],
//       },
//       paymentConfiguration: { // MembershipPaymentConfiguration
//         queryCompute: { // MembershipQueryComputePaymentConfig
//           isResponsible: true || false, // required
//         },
//         machineLearning: { // MembershipMLPaymentConfig
//           modelTraining: { // MembershipModelTrainingPaymentConfig
//             isResponsible: true || false, // required
//           },
//           modelInference: { // MembershipModelInferencePaymentConfig
//             isResponsible: true || false, // required
//           },
//         },
//       },
//     },
//   ],
// };

ListMembershipsCommand Input

See ListMembershipsCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a nextToken even if the maxResults value has not been met.

nextToken
string | undefined

The pagination token that's used to fetch the next set of results.

status
MembershipStatus | undefined

A filter which will return only memberships in the specified status.

ListMembershipsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
membershipSummaries
Required
MembershipSummary[] | undefined

The list of memberships returned from the ListMemberships operation.

nextToken
string | undefined

The pagination token that's used to fetch the next set of results.

Throws

Name
Fault
Details
AccessDeniedException
client

Caller does not have sufficient access to perform this action.

InternalServerException
server

Unexpected error during processing of request.

ThrottlingException
client

Request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the specified constraints.

CleanRoomsServiceException
Base exception class for all service exceptions from CleanRooms service.