Returns a list of dataset groups created using the CreateDatasetGroup operation. For each dataset group, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the dataset group ARN with the DescribeDatasetGroup operation.
Parameters:
-
next_token
(Optional[NextToken], default:
None
)
–
If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
-
max_results
(Optional[MaxResults], default:
None
)
–
The number of items to return in the response.
Raises:
Source code in docs_src/capo_forecast/_services/async_forecast.py
| async def list_dataset_groups(
self,
*,
config_overrides: Optional[AsyncforecastClientConfig] = None,
next_token: Optional["capo_forecast.types.next_token.NextToken"] = None,
max_results: Optional["capo_forecast.types.max_results.MaxResults"] = None,
) -> "capo_forecast.types.list_dataset_groups_response.ListDatasetGroupsResponse":
"""<p>Returns a list of dataset groups created using the <a href="https://docs.aws.amazon.com/forecast/latest/dg/API_CreateDatasetGroup.html">CreateDatasetGroup</a> operation. For each dataset group, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the dataset group ARN with the <a href="https://docs.aws.amazon.com/forecast/latest/dg/API_DescribeDatasetGroup.html">DescribeDatasetGroup</a> operation.</p>
Args:
next_token: <p>If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.</p>
max_results: <p>The number of items to return in the response.</p>
Raises:
capo_forecast.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The token is not valid. Tokens expire after 24 hours.</p>
capo_forecast.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_forecast.types.list_dataset_groups_request.ListDatasetGroupsRequest]",
) -> AsyncOperationResponse[
"capo_forecast.types.list_dataset_groups_response.ListDatasetGroupsResponse"
]:
import capo_forecast._operations.amazon_forecast.list_dataset_groups
(
output,
http_response,
) = await capo_forecast._operations.amazon_forecast.list_dataset_groups.async_list_dataset_groups(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDatasetGroups")
)
input_: capo_forecast.types.list_dataset_groups_request.ListDatasetGroupsRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|