associateWorkspace method

Future<AssociateWorkspaceResponse> associateWorkspace({
  1. required String instanceId,
  2. required List<String> resourceArns,
  3. required String workspaceId,
})

Associates a workspace with one or more users or routing profiles, allowing them to access the workspace's configured views and pages.

May throw AccessDeniedException. May throw DuplicateResourceException. May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter instanceId : The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter resourceArns : The Amazon Resource Names (ARNs) of the resources to associate with the workspace. Valid resource types are users and routing profiles.

Parameter workspaceId : The identifier of the workspace.

Implementation

Future<AssociateWorkspaceResponse> associateWorkspace({
  required String instanceId,
  required List<String> resourceArns,
  required String workspaceId,
}) async {
  final $payload = <String, dynamic>{
    'ResourceArns': resourceArns,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/workspaces/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(workspaceId)}/associate',
    exceptionFnMap: _exceptionFns,
  );
  return AssociateWorkspaceResponse.fromJson(response);
}