Method: Aws::DirectConnect::Client#associate_mac_sec_key

Defined in:
lib/aws-sdk-directconnect/client.rb

#associate_mac_sec_key(params = {}) ⇒ Types::AssociateMacSecKeyResponse

Associates a MAC Security (MACsec) Connection Key Name (CKN)/ Connectivity Association Key (CAK) pair with a Direct Connect connection.

You must supply either the secretARN, or the CKN/CAK (ckn and cak) pair in the request.

For information about MAC Security (MACsec) key considerations, see

MACsec pre-shared CKN/CAK key considerations ][1

in the *Direct

Connect User Guide*.

[1]: docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-mac-sec-getting-started.html#mac-sec-key-consideration

Examples:

Request syntax with placeholder values


resp = client.associate_mac_sec_key({
  connection_id: "ConnectionId", # required
  secret_arn: "SecretARN",
  ckn: "Ckn",
  cak: "Cak",
})

Response structure


resp.connection_id #=> String
resp.mac_sec_keys #=> Array
resp.mac_sec_keys[0].secret_arn #=> String
resp.mac_sec_keys[0].ckn #=> String
resp.mac_sec_keys[0].state #=> String
resp.mac_sec_keys[0].start_on #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :connection_id (required, String)

    The ID of the dedicated connection (dxcon-xxxx), interconnect (dxcon-xxxx), or LAG (dxlag-xxxx).

    You can use DescribeConnections, DescribeInterconnects, or DescribeLags to retrieve connection ID.

  • :secret_arn (String)

    The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key to associate with the connection.

    You can use DescribeConnections or DescribeLags to retrieve the MAC Security (MACsec) secret key.

    If you use this request parameter, you do not use the ckn and cak request parameters.

  • :ckn (String)

    The MAC Security (MACsec) CKN to associate with the connection.

    You can create the CKN/CAK pair using an industry standard tool.

    The valid values are 64 hexadecimal characters (0-9, A-E).

    If you use this request parameter, you must use the cak request parameter and not use the secretARN request parameter.

  • :cak (String)

    The MAC Security (MACsec) CAK to associate with the connection.

    You can create the CKN/CAK pair using an industry standard tool.

    The valid values are 64 hexadecimal characters (0-9, A-E).

    If you use this request parameter, you must use the ckn request parameter and not use the secretARN request parameter.

Returns:

See Also:



1425
1426
1427
1428
# File 'lib/aws-sdk-directconnect/client.rb', line 1425

def associate_mac_sec_key(params = {}, options = {})
  req = build_request(:associate_mac_sec_key, params)
  req.send_request(options)
end