ListPartnershipsCommand

Lists the partnerships associated with your Amazon Web Services account for your current or specified region. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

Example Syntax

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

import { B2biClient, ListPartnershipsCommand } from "@aws-sdk/client-b2bi"; // ES Modules import
// const { B2biClient, ListPartnershipsCommand } = require("@aws-sdk/client-b2bi"); // CommonJS import
const client = new B2biClient(config);
const input = { // ListPartnershipsRequest
  profileId: "STRING_VALUE",
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListPartnershipsCommand(input);
const response = await client.send(command);
// { // ListPartnershipsResponse
//   partnerships: [ // PartnershipList // required
//     { // PartnershipSummary
//       profileId: "STRING_VALUE", // required
//       partnershipId: "STRING_VALUE", // required
//       name: "STRING_VALUE",
//       capabilities: [ // PartnershipCapabilities
//         "STRING_VALUE",
//       ],
//       capabilityOptions: { // CapabilityOptions
//         outboundEdi: { // OutboundEdiOptions Union: only one key present
//           x12: { // X12Envelope
//             common: { // X12OutboundEdiHeaders
//               interchangeControlHeaders: { // X12InterchangeControlHeaders
//                 senderIdQualifier: "STRING_VALUE",
//                 senderId: "STRING_VALUE",
//                 receiverIdQualifier: "STRING_VALUE",
//                 receiverId: "STRING_VALUE",
//                 repetitionSeparator: "STRING_VALUE",
//                 acknowledgmentRequestedCode: "STRING_VALUE",
//                 usageIndicatorCode: "STRING_VALUE",
//               },
//               functionalGroupHeaders: { // X12FunctionalGroupHeaders
//                 applicationSenderCode: "STRING_VALUE",
//                 applicationReceiverCode: "STRING_VALUE",
//                 responsibleAgencyCode: "STRING_VALUE",
//               },
//               delimiters: { // X12Delimiters
//                 componentSeparator: "STRING_VALUE",
//                 dataElementSeparator: "STRING_VALUE",
//                 segmentTerminator: "STRING_VALUE",
//               },
//               validateEdi: true || false,
//             },
//           },
//         },
//       },
//       tradingPartnerId: "STRING_VALUE",
//       createdAt: new Date("TIMESTAMP"), // required
//       modifiedAt: new Date("TIMESTAMP"),
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

Example Usage

 Loading code editor

ListPartnershipsCommand Input

See ListPartnershipsCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

Specifies the maximum number of capabilities to return.

nextToken
string | undefined

When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.

profileId
string | undefined

Specifies the unique, system-generated identifier for the profile connected to this partnership.

ListPartnershipsCommand Output

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

Specifies a list of your partnerships.

nextToken
string | undefined

When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.

ResourceNotFoundException
client

Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.

ThrottlingException
client

The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.

ValidationException
client

Occurs when a B2BI object cannot be validated against a request from another object.

B2biServiceException
Base exception class for all service exceptions from B2bi service.