acceptConnectionProposal method

Future<AcceptConnectionProposalResponse> acceptConnectionProposal({
  1. required String activationKey,
  2. required AttachPoint attachPoint,
  3. String? clientToken,
  4. String? description,
  5. Map<String, String>? tags,
})

Accepts a connection proposal which was generated at a supported partner's portal.

The proposal contains the Environment and bandwidth that were chosen on the partner's portal and cannot be modified.

Upon accepting the proposal a connection will be made between the AWS network as accessed via the selected Attach Point and the network previously selected network on the partner's portal.

Parameter activationKey : An Activation Key that was generated on a supported partner's portal. This key captures the desired parameters from the initial creation request.

The details of this request can be described using with DescribeConnectionProposal.

Parameter attachPoint : The Attach Point to which the connection should be associated.

Parameter clientToken : Idempotency token used for the request.

Parameter description : A description to distinguish this Connection.

Parameter tags : The tags to associate with the resulting Connection.

Implementation

Future<AcceptConnectionProposalResponse> acceptConnectionProposal({
  required String activationKey,
  required AttachPoint attachPoint,
  String? clientToken,
  String? description,
  Map<String, String>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Interconnect.AcceptConnectionProposal'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'activationKey': activationKey,
      'attachPoint': attachPoint,
      'clientToken': clientToken ?? _s.generateIdempotencyToken(),
      if (description != null) 'description': description,
      if (tags != null) 'tags': tags,
    },
  );

  return AcceptConnectionProposalResponse.fromJson(jsonResponse.body);
}