describeWorkspaceAssociations method

Future<DescribeWorkspaceAssociationsResult> describeWorkspaceAssociations({
  1. required List<WorkSpaceAssociatedResourceType> associatedResourceTypes,
  2. required String workspaceId,
})

Describes the associations betweens applications and the specified WorkSpace.

May throw AccessDeniedException. May throw InvalidParameterValuesException. May throw OperationNotSupportedException. May throw ResourceNotFoundException.

Parameter associatedResourceTypes : The resource types of the associated resources.

Parameter workspaceId : The identifier of the WorkSpace.

Implementation

Future<DescribeWorkspaceAssociationsResult> describeWorkspaceAssociations({
  required List<WorkSpaceAssociatedResourceType> associatedResourceTypes,
  required String workspaceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.DescribeWorkspaceAssociations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AssociatedResourceTypes':
          associatedResourceTypes.map((e) => e.value).toList(),
      'WorkspaceId': workspaceId,
    },
  );

  return DescribeWorkspaceAssociationsResult.fromJson(jsonResponse.body);
}