Lists the Datasets in a Domain. You can list only the datasets of one type. The operation doesn't return datasets whose status is DELETED, and the order of the results isn't specified. We recommend using pagination to ensure that the operation returns quickly and successfully.
Datasets are in preview release and are subject to change.
Parameters:
-
domain_id
(DomainId)
–
The unique identifier of the parent Domain.
-
type
(Optional[DatasetType], default:
None
)
–
Returns only datasets of this type.
-
next_token
(Optional[str], default:
None
)
–
The token for the next page of results, from a previous ListDatasets response. If you don't specify a value, the operation returns the first page of results.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of datasets to return in one page. The default is 100.
Raises:
Source code in docs_src/capo_connecthealth/_services/connect_health.py
| def list_datasets(
self,
domain_id: "capo_connecthealth.types.domain_id.DomainId",
*,
config_overrides: Optional[ConnectHealthClientConfig] = None,
type: Optional["capo_connecthealth.types.dataset_type.DatasetType"] = None,
next_token: Optional[str] = None,
max_results: Optional[int] = None,
) -> "capo_connecthealth.types.list_datasets_output.ListDatasetsOutput":
"""<p>Lists the Datasets in a Domain. You can list only the datasets of one type. The operation doesn't return datasets whose status is DELETED, and the order of the results isn't specified. We recommend using pagination to ensure that the operation returns quickly and successfully.</p> <p>Datasets are in preview release and are subject to change.</p>
Args:
domain_id: <p>The unique identifier of the parent Domain.</p>
type: <p>Returns only datasets of this type.</p>
next_token: <p>The token for the next page of results, from a previous ListDatasets response. If you don't specify a value, the operation returns the first page of results.</p>
max_results: <p>The maximum number of datasets to return in one page. The default is 100.</p>
Raises:
capo_connecthealth.errors.access_denied_exception.AccessDeniedException: <p>This error is thrown when the client does not supply proper credentials to the API.</p>
capo_connecthealth.errors.internal_server_exception.InternalServerException: <p>This error is thrown when a transient error causes our API to fail.</p>
capo_connecthealth.errors.resource_not_found_exception.ResourceNotFoundException: <p>This error is thrown when the requested resource is not found.</p>
capo_connecthealth.errors.throttling_exception.ThrottlingException: <p>This error is thrown when the client exceeds the allowed request rate.</p>
capo_connecthealth.errors.validation_exception.ValidationException: <p>This error is thrown when the client supplies invalid input to the API.</p>
capo_connecthealth.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_connecthealth.types.list_datasets_input.ListDatasetsInput]",
) -> OperationResponse[
"capo_connecthealth.types.list_datasets_output.ListDatasetsOutput"
]:
import capo_connecthealth._operations.connect_health.list_datasets
output, http_response = (
capo_connecthealth._operations.connect_health.list_datasets.list_datasets(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDatasets")
)
input_: capo_connecthealth.types.list_datasets_input.ListDatasetsInput = {
"domain_id": domain_id
}
if type is not None:
input_["type"] = type
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
|