associateWorkspaceApplication method

Future<AssociateWorkspaceApplicationResult> associateWorkspaceApplication({
  1. required String applicationId,
  2. required String workspaceId,
})

Associates the specified application to the specified WorkSpace.

May throw AccessDeniedException. May throw ApplicationNotSupportedException. May throw ComputeNotCompatibleException. May throw IncompatibleApplicationsException. May throw InvalidParameterValuesException. May throw OperatingSystemNotCompatibleException. May throw OperationNotSupportedException. May throw ResourceAlreadyExistsException. May throw ResourceInUseException. May throw ResourceNotFoundException.

Parameter applicationId : The identifier of the application.

Parameter workspaceId : The identifier of the WorkSpace.

Implementation

Future<AssociateWorkspaceApplicationResult> associateWorkspaceApplication({
  required String applicationId,
  required String workspaceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.AssociateWorkspaceApplication'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationId': applicationId,
      'WorkspaceId': workspaceId,
    },
  );

  return AssociateWorkspaceApplicationResult.fromJson(jsonResponse.body);
}