DeleteCoreNetworkCommand

Deletes a core network along with all core network policies. This can only be done if there are no attachments on a core network.

Example Syntax

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

import { NetworkManagerClient, DeleteCoreNetworkCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import
// const { NetworkManagerClient, DeleteCoreNetworkCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import
const client = new NetworkManagerClient(config);
const input = { // DeleteCoreNetworkRequest
  CoreNetworkId: "STRING_VALUE", // required
};
const command = new DeleteCoreNetworkCommand(input);
const response = await client.send(command);
// { // DeleteCoreNetworkResponse
//   CoreNetwork: { // CoreNetwork
//     GlobalNetworkId: "STRING_VALUE",
//     CoreNetworkId: "STRING_VALUE",
//     CoreNetworkArn: "STRING_VALUE",
//     Description: "STRING_VALUE",
//     CreatedAt: new Date("TIMESTAMP"),
//     State: "CREATING" || "UPDATING" || "AVAILABLE" || "DELETING",
//     Segments: [ // CoreNetworkSegmentList
//       { // CoreNetworkSegment
//         Name: "STRING_VALUE",
//         EdgeLocations: [ // ExternalRegionCodeList
//           "STRING_VALUE",
//         ],
//         SharedSegments: [ // ConstrainedStringList
//           "STRING_VALUE",
//         ],
//       },
//     ],
//     NetworkFunctionGroups: [ // CoreNetworkNetworkFunctionGroupList
//       { // CoreNetworkNetworkFunctionGroup
//         Name: "STRING_VALUE",
//         EdgeLocations: [
//           "STRING_VALUE",
//         ],
//         Segments: { // ServiceInsertionSegments
//           SendVia: [
//             "STRING_VALUE",
//           ],
//           SendTo: [
//             "STRING_VALUE",
//           ],
//         },
//       },
//     ],
//     Edges: [ // CoreNetworkEdgeList
//       { // CoreNetworkEdge
//         EdgeLocation: "STRING_VALUE",
//         Asn: Number("long"),
//         InsideCidrBlocks: [
//           "STRING_VALUE",
//         ],
//       },
//     ],
//     Tags: [ // TagList
//       { // Tag
//         Key: "STRING_VALUE",
//         Value: "STRING_VALUE",
//       },
//     ],
//   },
// };

DeleteCoreNetworkCommand Input

See DeleteCoreNetworkCommandInput for more details

Parameter
Type
Description
CoreNetworkId
Required
string | undefined

The network ID of the deleted core network.

DeleteCoreNetworkCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
CoreNetwork
CoreNetwork | undefined

Information about the deleted core network.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ConflictException
client

There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent state.

InternalServerException
server

The request has failed due to an internal error.

ResourceNotFoundException
client

The specified resource could not be found.

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.