- 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.
ListConnectorsCommand
List Connectors.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MgnClient, ListConnectorsCommand } from "@aws-sdk/client-mgn"; // ES Modules import
// const { MgnClient, ListConnectorsCommand } = require("@aws-sdk/client-mgn"); // CommonJS import
const client = new MgnClient(config);
const input = { // ListConnectorsRequest
filters: { // ListConnectorsRequestFilters
connectorIDs: [ // ConnectorIDsFilter
"STRING_VALUE",
],
},
maxResults: Number("int"),
nextToken: "STRING_VALUE",
};
const command = new ListConnectorsCommand(input);
const response = await client.send(command);
// { // ListConnectorsResponse
// items: [ // ConnectorsList
// { // Connector
// connectorID: "STRING_VALUE",
// name: "STRING_VALUE",
// ssmInstanceID: "STRING_VALUE",
// arn: "STRING_VALUE",
// tags: { // TagsMap
// "<keys>": "STRING_VALUE",
// },
// ssmCommandConfig: { // ConnectorSsmCommandConfig
// s3OutputEnabled: true || false, // required
// outputS3BucketName: "STRING_VALUE",
// cloudWatchOutputEnabled: true || false, // required
// cloudWatchLogGroupName: "STRING_VALUE",
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListConnectorsCommand Input
See ListConnectorsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
filters | ListConnectorsRequestFilters | undefined | List Connectors Request filters. |
maxResults | number | undefined | List Connectors Request max results. |
nextToken | string | undefined | List Connectors Request next token. |
ListConnectorsCommand Output
See ListConnectorsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
items | Connector[] | undefined | List connectors response items. |
nextToken | string | undefined | List connectors response next token. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
UninitializedAccountException | client | Uninitialized account exception. |
ValidationException | client | Validate exception. |
MgnServiceException | Base exception class for all service exceptions from Mgn service. |