- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListInvitationsCommand
Returns a list of all invitations for the current Amazon Web Services account.
Applies only to Hyperledger Fabric.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ManagedBlockchainClient, ListInvitationsCommand } from "@aws-sdk/client-managedblockchain"; // ES Modules import
// const { ManagedBlockchainClient, ListInvitationsCommand } = require("@aws-sdk/client-managedblockchain"); // CommonJS import
// import type { ManagedBlockchainClientConfig } from "@aws-sdk/client-managedblockchain";
const config = {}; // type is ManagedBlockchainClientConfig
const client = new ManagedBlockchainClient(config);
const input = { // ListInvitationsInput
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new ListInvitationsCommand(input);
const response = await client.send(command);
// { // ListInvitationsOutput
// Invitations: [ // InvitationList
// { // Invitation
// InvitationId: "STRING_VALUE",
// CreationDate: new Date("TIMESTAMP"),
// ExpirationDate: new Date("TIMESTAMP"),
// Status: "PENDING" || "ACCEPTED" || "ACCEPTING" || "REJECTED" || "EXPIRED",
// NetworkSummary: { // NetworkSummary
// Id: "STRING_VALUE",
// Name: "STRING_VALUE",
// Description: "STRING_VALUE",
// Framework: "HYPERLEDGER_FABRIC" || "ETHEREUM",
// FrameworkVersion: "STRING_VALUE",
// Status: "CREATING" || "AVAILABLE" || "CREATE_FAILED" || "DELETING" || "DELETED",
// CreationDate: new Date("TIMESTAMP"),
// Arn: "STRING_VALUE",
// },
// Arn: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListInvitationsCommand Input
Parameter | Type | Description |
|---|
Parameter | Type | Description |
|---|---|---|
MaxResults | number | undefined | The maximum number of invitations to return. |
NextToken | string | undefined | The pagination token that indicates the next set of results to retrieve. |
ListInvitationsCommand Output
Parameter | Type | Description |
|---|
Parameter | Type | Description |
|---|---|---|
$metadataRequired | ResponseMetadata | Metadata pertaining to this request. |
Invitations | Invitation[] | undefined | The invitations for the network. |
NextToken | string | undefined | The pagination token that indicates the next set of results to retrieve. |
Throws
Name | Fault | Details |
|---|
Name | Fault | Details |
|---|---|---|
| AccessDeniedException | client | You don't have sufficient access to perform this action. |
| InternalServiceErrorException | server | The request processing has failed because of an unknown error, exception or failure. |
| InvalidRequestException | client | The action or operation requested is invalid. Verify that the action is typed correctly. |
| ResourceLimitExceededException | client | The maximum number of resources of that type already exist. Ensure the resources requested are within the boundaries of the service edition and your account limits. |
| ResourceNotFoundException | client | A requested resource doesn't exist. It may have been deleted or referenced incorrectly. |
| ThrottlingException | client | The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is creating resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources if possible. |
| ManagedBlockchainServiceException | Base exception class for all service exceptions from ManagedBlockchain service. |