getDashboardUrl method

Future<GetDashboardUrlResponse> getDashboardUrl({
  1. required String resourceId,
  2. required GlueResourceType resourceType,
  3. String? requestOrigin,
})

Retrieves the URL for the Spark monitoring dashboard for a Glue resource.

May throw AccessDeniedException. May throw EntityNotFoundException. May throw InternalServiceException. May throw InvalidInputException. May throw OperationNotSupportedException.

Parameter resourceId : The unique identifier of the resource for which to retrieve the dashboard URL.

Parameter resourceType : The type of the resource. Valid values are SESSION and JOB.

Parameter requestOrigin : The origin of the request.

Implementation

Future<GetDashboardUrlResponse> getDashboardUrl({
  required String resourceId,
  required GlueResourceType resourceType,
  String? requestOrigin,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.GetDashboardUrl'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceId': resourceId,
      'ResourceType': resourceType.value,
      if (requestOrigin != null) 'RequestOrigin': requestOrigin,
    },
  );

  return GetDashboardUrlResponse.fromJson(jsonResponse.body);
}