Replaces the datasets in a dataset group with the specified datasets.
The Status of the dataset group must be ACTIVE before you can use the dataset group to create a predictor. Use the DescribeDatasetGroup operation to get the status.
Parameters:
-
dataset_group_arn
(Arn)
–
The ARN of the dataset group.
-
dataset_arns
(ArnList)
–
An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.
Raises:
Source code in docs_src/capo_forecast/_services/forecast.py
| def update_dataset_group(
self,
dataset_group_arn: "capo_forecast.types.arn.Arn",
dataset_arns: "capo_forecast.types.arn_list.ArnList",
*,
config_overrides: Optional[forecastClientConfig] = None,
) -> "capo_forecast.types.update_dataset_group_response.UpdateDatasetGroupResponse":
"""<p>Replaces the datasets in a dataset group with the specified datasets.</p> <note> <p>The <code>Status</code> of the dataset group must be <code>ACTIVE</code> before you can use the dataset group to create a predictor. Use the <a href="https://docs.aws.amazon.com/forecast/latest/dg/API_DescribeDatasetGroup.html">DescribeDatasetGroup</a> operation to get the status.</p> </note>
Args:
dataset_group_arn: <p>The ARN of the dataset group.</p>
dataset_arns: <p>An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.</p>
Raises:
capo_forecast.errors.invalid_input_exception.InvalidInputException: <p>We can't process the request because it includes an invalid value or a value that exceeds the valid range.</p>
capo_forecast.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</p>
capo_forecast.errors.resource_not_found_exception.ResourceNotFoundException: <p>We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.</p>
capo_forecast.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_forecast.types.update_dataset_group_request.UpdateDatasetGroupRequest]",
) -> OperationResponse[
"capo_forecast.types.update_dataset_group_response.UpdateDatasetGroupResponse"
]:
import capo_forecast._operations.amazon_forecast.update_dataset_group
output, http_response = (
capo_forecast._operations.amazon_forecast.update_dataset_group.update_dataset_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateDatasetGroup")
)
input_: capo_forecast.types.update_dataset_group_request.UpdateDatasetGroupRequest = {
"dataset_group_arn": dataset_group_arn,
"dataset_arns": dataset_arns,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|