CreateConnectPeerCommand

Creates a core network Connect peer for a specified core network connect attachment between a core network and an appliance. The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).

Example Syntax

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

import { NetworkManagerClient, CreateConnectPeerCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import
// const { NetworkManagerClient, CreateConnectPeerCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import
const client = new NetworkManagerClient(config);
const input = { // CreateConnectPeerRequest
  ConnectAttachmentId: "STRING_VALUE", // required
  CoreNetworkAddress: "STRING_VALUE",
  PeerAddress: "STRING_VALUE", // required
  BgpOptions: { // BgpOptions
    PeerAsn: Number("long"),
  },
  InsideCidrBlocks: [ // ConstrainedStringList
    "STRING_VALUE",
  ],
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE",
      Value: "STRING_VALUE",
    },
  ],
  ClientToken: "STRING_VALUE",
  SubnetArn: "STRING_VALUE",
};
const command = new CreateConnectPeerCommand(input);
const response = await client.send(command);
// { // CreateConnectPeerResponse
//   ConnectPeer: { // ConnectPeer
//     CoreNetworkId: "STRING_VALUE",
//     ConnectAttachmentId: "STRING_VALUE",
//     ConnectPeerId: "STRING_VALUE",
//     EdgeLocation: "STRING_VALUE",
//     State: "CREATING" || "FAILED" || "AVAILABLE" || "DELETING",
//     CreatedAt: new Date("TIMESTAMP"),
//     Configuration: { // ConnectPeerConfiguration
//       CoreNetworkAddress: "STRING_VALUE",
//       PeerAddress: "STRING_VALUE",
//       InsideCidrBlocks: [ // ConstrainedStringList
//         "STRING_VALUE",
//       ],
//       Protocol: "GRE" || "NO_ENCAP",
//       BgpConfigurations: [ // ConnectPeerBgpConfigurationList
//         { // ConnectPeerBgpConfiguration
//           CoreNetworkAsn: Number("long"),
//           PeerAsn: Number("long"),
//           CoreNetworkAddress: "STRING_VALUE",
//           PeerAddress: "STRING_VALUE",
//         },
//       ],
//     },
//     Tags: [ // TagList
//       { // Tag
//         Key: "STRING_VALUE",
//         Value: "STRING_VALUE",
//       },
//     ],
//     SubnetArn: "STRING_VALUE",
//     LastModificationErrors: [ // ConnectPeerErrorList
//       { // ConnectPeerError
//         Code: "EDGE_LOCATION_NO_FREE_IPS" || "EDGE_LOCATION_PEER_DUPLICATE" || "SUBNET_NOT_FOUND" || "IP_OUTSIDE_SUBNET_CIDR_RANGE" || "INVALID_INSIDE_CIDR_BLOCK" || "NO_ASSOCIATED_CIDR_BLOCK",
//         Message: "STRING_VALUE",
//         ResourceArn: "STRING_VALUE",
//         RequestId: "STRING_VALUE",
//       },
//     ],
//   },
// };

CreateConnectPeerCommand Input

See CreateConnectPeerCommandInput for more details

Parameter
Type
Description
ConnectAttachmentId
Required
string | undefined

The ID of the connection attachment.

PeerAddress
Required
string | undefined

The Connect peer address.

BgpOptions
BgpOptions | undefined

The Connect peer BGP options. This only applies only when the protocol is GRE.

ClientToken
string | undefined

The client token associated with the request.

CoreNetworkAddress
string | undefined

A Connect peer core network address. This only applies only when the protocol is GRE.

InsideCidrBlocks
string[] | undefined

The inside IP addresses used for BGP peering.

SubnetArn
string | undefined

The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP.

Tags
Tag[] | undefined

The tags associated with the peer request.

CreateConnectPeerCommand Output

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

The response to the request.

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.