associateConnectionAlias method

Future<AssociateConnectionAliasResult> associateConnectionAlias({
  1. required String aliasId,
  2. required String resourceId,
})

Associates the specified connection alias with the specified directory to enable cross-Region redirection. For more information, see Cross-Region Redirection for Amazon WorkSpaces.

May throw AccessDeniedException. May throw InvalidParameterValuesException. May throw InvalidResourceStateException. May throw OperationNotSupportedException. May throw ResourceAssociatedException. May throw ResourceNotFoundException.

Parameter aliasId : The identifier of the connection alias.

Parameter resourceId : The identifier of the directory to associate the connection alias with.

Implementation

Future<AssociateConnectionAliasResult> associateConnectionAlias({
  required String aliasId,
  required String resourceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.AssociateConnectionAlias'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AliasId': aliasId,
      'ResourceId': resourceId,
    },
  );

  return AssociateConnectionAliasResult.fromJson(jsonResponse.body);
}