AssociateMacSecKey
Associates a MACsec key with a dedicated Express Connect circuit port. This implements low-latency encryption and decryption by using dedicated encryption chips such as NICs or switches to directly encrypt the physical link, such as optical fiber or Ethernet, and covers all traffic from the sender to the receiver.
Operation description
You must meet the following prerequisites to use this feature:
-
The device where the Express Connect circuit is located supports the MACsec feature.
-
Payment for the Express Connect circuit is completed.
-
Only dedicated Express Connect circuits are supported.
Note the following:
-
You can configure up to three sets of Ckn and Cak.
-
Associating a key that is currently in the Disassociated state disassociates the previously effective key.
-
Associating a key that is currently in the AssociatedFailed state triggers the device to renegotiate the session.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:AssociateMacSecKey |
update |
*PhysicalConnection
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Express Connect circuit. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| PhysicalConnectionId |
string |
Yes |
The ID of the Express Connect circuit. The Express Connect circuit must be a dedicated circuit that is paid, supports MACsec on the device, and is in the Enabled state. You can call the DescribePhysicalConnections operation to query the current state and device capabilities. |
pc-bp1hp0wr072f6**** |
| CipherSuite |
string |
Yes |
The encryption algorithm type. Valid values:
|
GCM-AES-128 |
| Ckn |
string |
Yes |
The key name. Only hexadecimal characters are supported. Lowercase letters are automatically converted to uppercase letters. If the encryption algorithm type is GCM-AES-128 or GCM-AES-XPN-128, the length must be 32 hexadecimal characters. If the encryption algorithm type is GCM-AES-256 or GCM-AES-XPN-256, the length must be 64 hexadecimal characters. |
0123456789ABCDEF0123456789ABCDEF |
| Cak |
string |
Yes |
The passphrase. Only hexadecimal characters are supported. Lowercase letters automatically transform to uppercase letters. If the encryption algorithm type is GCM-AES-128 or GCM-AES-XPN-128, the length must be 32 hexadecimal characters. If the encryption algorithm type is GCM-AES-256 or GCM-AES-XPN-256, the length must be 64 hexadecimal characters. |
0123456789ABCDEF0123456789ABCDEF |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
D32B3C26-6C6C-4988-93E9-D2A6444CE6AE |
Examples
Success response
JSON format
{
"RequestId": "D32B3C26-6C6C-4988-93E9-D2A6444CE6AE"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.%s | The param of %s is illegal. | The parameter is invalid. |
| 400 | ResourceNotFound.PhysicalConnectionId | The specified resource of [%s] is not found. | The Express Connect circuit does not exist. |
| 400 | IncorrectStatus.PhysicalConnection | The status of %s [%s] is incorrect. | The status of the physical connection does not support this operation. |
| 400 | UnsupportedFeature.Macsec | The feature of Macsec is not supported. | The current physical connection does not support the MACSec feature. |
| 400 | IncorrectStatus.PconnMacsec | The status of %s [%s] is incorrect. | The operation is not allowed because the MACSec key is in an unstable state. |
| 400 | QuotaExceeded.PconnMacsec | The quota of PconnMacsec is exceeded, usage 3/3. | A physical connection supports binding up to three sets of MACSec keys. |
| 400 | UnsupportedFeature.Macsec.CipherSuite | The feature of Macsec.CipherSuite is not supported. | The current physical connection supports MACSec, but does not support the selected encryption algorithm. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.