- 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.
ListLinksCommand
Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
To find a list of links for one monitoring account sink, use ListAttachedLinks from within the monitoring account.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { OAMClient, ListLinksCommand } from "@aws-sdk/client-oam"; // ES Modules import
// const { OAMClient, ListLinksCommand } = require("@aws-sdk/client-oam"); // CommonJS import
const client = new OAMClient(config);
const input = { // ListLinksInput
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new ListLinksCommand(input);
const response = await client.send(command);
// { // ListLinksOutput
// Items: [ // ListLinksItems // required
// { // ListLinksItem
// Arn: "STRING_VALUE",
// Id: "STRING_VALUE",
// Label: "STRING_VALUE",
// ResourceTypes: [ // ResourceTypesOutput
// "STRING_VALUE",
// ],
// SinkArn: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListLinksCommand Input
See ListLinksCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | Limits the number of returned links to the specified number. |
NextToken | string | undefined | The token for the next set of items to return. You received this token from a previous call. |
ListLinksCommand Output
See ListLinksCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Items Required | ListLinksItem[] | undefined | An array of structures that contain the information about the returned links. |
NextToken | string | undefined | The token to use when requesting the next set of links. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceFault | server | Unexpected error while processing the request. Retry the request. |
InvalidParameterException | client | A parameter is specified incorrectly. |
ResourceNotFoundException | client | The request references a resource that does not exist. |
OAMServiceException | Base exception class for all service exceptions from OAM service. |