ListCoreNetworksCommand

Returns a list of owned and shared core networks.

Example Syntax

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

import { NetworkManagerClient, ListCoreNetworksCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import
// const { NetworkManagerClient, ListCoreNetworksCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import
const client = new NetworkManagerClient(config);
const input = { // ListCoreNetworksRequest
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListCoreNetworksCommand(input);
const response = await client.send(command);
// { // ListCoreNetworksResponse
//   CoreNetworks: [ // CoreNetworkSummaryList
//     { // CoreNetworkSummary
//       CoreNetworkId: "STRING_VALUE",
//       CoreNetworkArn: "STRING_VALUE",
//       GlobalNetworkId: "STRING_VALUE",
//       OwnerAccountId: "STRING_VALUE",
//       State: "CREATING" || "UPDATING" || "AVAILABLE" || "DELETING",
//       Description: "STRING_VALUE",
//       Tags: [ // TagList
//         { // Tag
//           Key: "STRING_VALUE",
//           Value: "STRING_VALUE",
//         },
//       ],
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListCoreNetworksCommand Input

See ListCoreNetworksCommandInput for more details

Parameter
Type
Description
MaxResults
number | undefined

The maximum number of results to return.

NextToken
string | undefined

The token for the next page of results.

ListCoreNetworksCommand Output

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

Describes the list of core networks.

NextToken
string | undefined

The token for the next page of results.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

The request has failed due to an internal error.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the constraints.

NetworkManagerServiceException
Base exception class for all service exceptions from NetworkManager service.