@aws-sdk/client-networkmanager
Description
AWS SDK for JavaScript NetworkManager Client for Node.js, Browser and React Native.
Amazon Web Services enables you to centrally manage your Amazon Web Services Cloud WAN core network and your Transit Gateway network across Amazon Web Services accounts, Regions, and on-premises locations.
Installing
To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-networkmanager
yarn add @aws-sdk/client-networkmanager
pnpm add @aws-sdk/client-networkmanager
Getting Started
Import
The AWS SDK is modulized by clients and commands.
To send a request, you only need to import the NetworkManagerClient and
the commands you need, for example ListAttachmentsCommand:
// ES5 example
const { NetworkManagerClient, ListAttachmentsCommand } = require("@aws-sdk/client-networkmanager");
// ES6+ example
import { NetworkManagerClient, ListAttachmentsCommand } from "@aws-sdk/client-networkmanager";
Usage
To send a request:
- Instantiate a client with configuration (e.g. credentials, region).
- Instantiate a command with input parameters.
- Call the
send operation on the client, providing the command object as input.
const client = new NetworkManagerClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListAttachmentsCommand(params);
Async/await
We recommend using the await
operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
Promises
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
Aggregated client
The aggregated client class is exported from the same package, but without the "Client" suffix.
NetworkManager extends NetworkManagerClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (NetworkManagerClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { NetworkManager } from "@aws-sdk/client-networkmanager";
const client = new NetworkManager({ region: "REGION" });
// async/await.
try {
const data = await client.listAttachments(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listAttachments(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listAttachments(params, (err, data) => {
// process err and data.
});
Troubleshooting
When the service returns an exception, the error will include the exception information,
as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Getting Help
Please use these community resources for getting help.
We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
To test your universal JavaScript code in Node.js, browser and react-native environments,
visit our code samples repo.
Contributing
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-networkmanager package is updated.
To contribute to client you can check our generate clients scripts.
License
This SDK is distributed under the
Apache License, Version 2.0,
see LICENSE for more information.
Client Commands (Operations List)
AcceptAttachment
Command API Reference / Input / Output
AssociateConnectPeer
Command API Reference / Input / Output
AssociateCustomerGateway
Command API Reference / Input / Output
AssociateLink
Command API Reference / Input / Output
AssociateTransitGatewayConnectPeer
Command API Reference / Input / Output
CreateConnectAttachment
Command API Reference / Input / Output
CreateConnection
Command API Reference / Input / Output
CreateConnectPeer
Command API Reference / Input / Output
CreateCoreNetwork
Command API Reference / Input / Output
CreateCoreNetworkPrefixListAssociation
Command API Reference / Input / Output
CreateDevice
Command API Reference / Input / Output
CreateDirectConnectGatewayAttachment
Command API Reference / Input / Output
CreateGlobalNetwork
Command API Reference / Input / Output
CreateLink
Command API Reference / Input / Output
CreateSite
Command API Reference / Input / Output
CreateSiteToSiteVpnAttachment
Command API Reference / Input / Output
CreateTransitGatewayPeering
Command API Reference / Input / Output
CreateTransitGatewayRouteTableAttachment
Command API Reference / Input / Output
CreateVpcAttachment
Command API Reference / Input / Output
DeleteAttachment
Command API Reference / Input / Output
DeleteConnection
Command API Reference / Input / Output
DeleteConnectPeer
Command API Reference / Input / Output
DeleteCoreNetwork
Command API Reference / Input / Output
DeleteCoreNetworkPolicyVersion
Command API Reference / Input / Output
DeleteCoreNetworkPrefixListAssociation
Command API Reference / Input / Output
DeleteDevice
Command API Reference / Input / Output
DeleteGlobalNetwork
Command API Reference / Input / Output
DeleteLink
Command API Reference / Input / Output
DeletePeering
Command API Reference / Input / Output
DeleteResourcePolicy
Command API Reference / Input / Output
DeleteSite
Command API Reference / Input / Output
DeregisterTransitGateway
Command API Reference / Input / Output
DescribeGlobalNetworks
Command API Reference / Input / Output
DisassociateConnectPeer
Command API Reference / Input / Output
DisassociateCustomerGateway
Command API Reference / Input / Output
DisassociateLink
Command API Reference / Input / Output
DisassociateTransitGatewayConnectPeer
Command API Reference / Input / Output
ExecuteCoreNetworkChangeSet
Command API Reference / Input / Output
GetConnectAttachment
Command API Reference / Input / Output
GetConnections
Command API Reference / Input / Output
GetConnectPeer
Command API Reference / Input / Output
GetConnectPeerAssociations
Command API Reference / Input / Output
GetCoreNetwork
Command API Reference / Input / Output
GetCoreNetworkChangeEvents
Command API Reference / Input / Output
GetCoreNetworkChangeSet
Command API Reference / Input / Output
GetCoreNetworkPolicy
Command API Reference / Input / Output
GetCustomerGatewayAssociations
Command API Reference / Input / Output
GetDevices
Command API Reference / Input / Output
GetDirectConnectGatewayAttachment
Command API Reference / Input / Output
GetLinkAssociations
Command API Reference / Input / Output
GetLinks
Command API Reference / Input / Output
GetNetworkResourceCounts
Command API Reference / Input / Output
GetNetworkResourceRelationships
Command API Reference / Input / Output
GetNetworkResources
Command API Reference / Input / Output
GetNetworkRoutes
Command API Reference / Input / Output
GetNetworkTelemetry
Command API Reference / Input / Output
GetResourcePolicy
Command API Reference / Input / Output
GetRouteAnalysis
Command API Reference / Input / Output
GetSites
Command API Reference / Input / Output
GetSiteToSiteVpnAttachment
Command API Reference / Input / Output
GetTransitGatewayConnectPeerAssociations
Command API Reference / Input / Output
GetTransitGatewayPeering
Command API Reference / Input / Output
GetTransitGatewayRegistrations
Command API Reference / Input / Output
GetTransitGatewayRouteTableAttachment
Command API Reference / Input / Output
GetVpcAttachment
Command API Reference / Input / Output
ListAttachmentNatConfigurations
Command API Reference / Input / Output
ListAttachmentRoutingPolicyAssociations
Command API Reference / Input / Output
ListAttachments
Command API Reference / Input / Output
ListConnectPeers
Command API Reference / Input / Output
ListCoreNetworkPolicyVersions
Command API Reference / Input / Output
ListCoreNetworkPrefixListAssociations
Command API Reference / Input / Output
ListCoreNetworkRoutingInformation
Command API Reference / Input / Output
ListCoreNetworks
Command API Reference / Input / Output
ListOrganizationServiceAccessStatus
Command API Reference / Input / Output
ListPeerings
Command API Reference / Input / Output
ListTagsForResource
Command API Reference / Input / Output
PutAttachmentRoutingPolicyLabel
Command API Reference / Input / Output
PutCoreNetworkPolicy
Command API Reference / Input / Output
PutResourcePolicy
Command API Reference / Input / Output
RegisterTransitGateway
Command API Reference / Input / Output
RejectAttachment
Command API Reference / Input / Output
RemoveAttachmentRoutingPolicyLabel
Command API Reference / Input / Output
RestoreCoreNetworkPolicyVersion
Command API Reference / Input / Output
StartOrganizationServiceAccessUpdate
Command API Reference / Input / Output
StartRouteAnalysis
Command API Reference / Input / Output
TagResource
Command API Reference / Input / Output
UntagResource
Command API Reference / Input / Output
UpdateAttachmentNatConfiguration
Command API Reference / Input / Output
UpdateConnection
Command API Reference / Input / Output
UpdateCoreNetwork
Command API Reference / Input / Output
UpdateDevice
Command API Reference / Input / Output
UpdateDirectConnectGatewayAttachment
Command API Reference / Input / Output
UpdateGlobalNetwork
Command API Reference / Input / Output
UpdateLink
Command API Reference / Input / Output
UpdateNetworkResourceMetadata
Command API Reference / Input / Output
UpdateSite
Command API Reference / Input / Output
UpdateVpcAttachment
Command API Reference / Input / Output