Returns information about a list of specified managed workgroups in your account.
Parameters:
-
source_arn
(Optional[SourceArn], default:
None
)
–
The Amazon Resource Name (ARN) for the managed workgroup in the Glue Data Catalog.
-
next_token
(Optional[PaginationToken], default:
None
)
–
If your initial ListManagedWorkgroups operation returns a nextToken, you can include the returned nextToken in following ListManagedWorkgroups operations, which returns results in the next page.
-
max_results
(Optional[int], default:
None
)
–
An optional parameter that specifies the maximum number of results to return. You can use nextToken to display the next page of results.
Raises:
Source code in docs_src/capo_redshift_serverless/_services/redshift_serverless.py
| def list_managed_workgroups(
self,
*,
config_overrides: Optional[RedshiftServerlessClientConfig] = None,
source_arn: Optional[
"capo_redshift_serverless.types.source_arn.SourceArn"
] = None,
next_token: Optional[
"capo_redshift_serverless.types.pagination_token.PaginationToken"
] = None,
max_results: Optional[int] = None,
) -> "capo_redshift_serverless.types.list_managed_workgroups_response.ListManagedWorkgroupsResponse":
"""<p>Returns information about a list of specified managed workgroups in your account.</p>
Args:
source_arn: <p>The Amazon Resource Name (ARN) for the managed workgroup in the Glue Data Catalog.</p>
next_token: <p>If your initial ListManagedWorkgroups operation returns a nextToken, you can include the returned nextToken in following ListManagedWorkgroups operations, which returns results in the next page.</p>
max_results: <p>An optional parameter that specifies the maximum number of results to return. You can use nextToken to display the next page of results.</p>
Raises:
capo_redshift_serverless.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_redshift_serverless.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_redshift_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift_serverless.types.list_managed_workgroups_request.ListManagedWorkgroupsRequest]",
) -> OperationResponse[
"capo_redshift_serverless.types.list_managed_workgroups_response.ListManagedWorkgroupsResponse"
]:
import capo_redshift_serverless._operations.redshift_serverless.list_managed_workgroups
output, http_response = (
capo_redshift_serverless._operations.redshift_serverless.list_managed_workgroups.list_managed_workgroups(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListManagedWorkgroups")
)
input_: capo_redshift_serverless.types.list_managed_workgroups_request.ListManagedWorkgroupsRequest = {}
if source_arn is not None:
input_["source_arn"] = source_arn
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|