We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.
Protected
Associates a MAC Security (MACsec) Connection Key Name (CKN)/ Connectivity Association Key (CAK) pair with an Direct Connect dedicated connection.
You must supply either the secretARN, or the CKN/CAK (ckn and cak) pair in the request.
secretARN,
ckn
cak
For information about MAC Security (MACsec) key considerations, see MACsec pre-shared CKN/CAK key considerations in the Direct Connect User Guide.
Use a bare-bones client and the command you need to make an API call.
import { DirectConnectClient, AssociateMacSecKeyCommand } from "@aws-sdk/client-direct-connect"; // ES Modules import// const { DirectConnectClient, AssociateMacSecKeyCommand } = require("@aws-sdk/client-direct-connect"); // CommonJS importconst client = new DirectConnectClient(config);const input = { // AssociateMacSecKeyRequest connectionId: "STRING_VALUE", // required secretARN: "STRING_VALUE", ckn: "STRING_VALUE", cak: "STRING_VALUE",};const command = new AssociateMacSecKeyCommand(input);const response = await client.send(command);// { // AssociateMacSecKeyResponse// connectionId: "STRING_VALUE",// macSecKeys: [ // MacSecKeyList// { // MacSecKey// secretARN: "STRING_VALUE",// ckn: "STRING_VALUE",// state: "STRING_VALUE",// startOn: "STRING_VALUE",// },// ],// };
AssociateMacSecKeyCommandInput
AssociateMacSecKeyCommandOutput
input
response
config
DirectConnectClientException (client fault)
One or more parameters are not valid.
DirectConnectServerException (server fault)
A server-side error occurred.
DirectConnectServiceException
Base exception class for all service exceptions from DirectConnect service.
Readonly
Static
Associates a MAC Security (MACsec) Connection Key Name (CKN)/ Connectivity Association Key (CAK) pair with an Direct Connect dedicated connection.
You must supply either the
secretARN,
or the CKN/CAK (ckn
andcak
) pair in the request.For information about MAC Security (MACsec) key considerations, see MACsec pre-shared CKN/CAK key considerations in the Direct Connect User Guide.
Example
Use a bare-bones client and the command you need to make an API call.
Param
AssociateMacSecKeyCommandInput
Returns
AssociateMacSecKeyCommandOutput
See
input
shape.response
shape.config
shape.Throws
DirectConnectClientException (client fault)
One or more parameters are not valid.
Throws
DirectConnectServerException (server fault)
A server-side error occurred.
Throws
DirectConnectServiceException
Base exception class for all service exceptions from DirectConnect service.