rejectEnvironmentAccountConnection method

Future<RejectEnvironmentAccountConnectionOutput> rejectEnvironmentAccountConnection({
  1. required String id,
})

In a management account, reject an environment account connection from another environment account.

After you reject an environment account connection request, you can't accept or use the rejected environment account connection.

You can’t reject an environment account connection that's connected to an environment.

For more information, see Environment account connections in the Proton User guide.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter id : The ID of the environment account connection to reject.

Implementation

Future<RejectEnvironmentAccountConnectionOutput>
    rejectEnvironmentAccountConnection({
  required String id,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AwsProton20200720.RejectEnvironmentAccountConnection'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'id': id,
    },
  );

  return RejectEnvironmentAccountConnectionOutput.fromJson(jsonResponse.body);
}