Update a dataset to replace its schema with a new or existing one. For more information, see Replacing a dataset's schema.
Parameters:
-
dataset_arn
(Arn)
–
The Amazon Resource Name (ARN) of the dataset that you want to update.
-
schema_arn
(Arn)
–
The Amazon Resource Name (ARN) of the new schema you want use.
Raises:
Source code in docs_src/capo_personalize/_services/personalize.py
| def update_dataset(
self,
dataset_arn: "capo_personalize.types.arn.Arn",
schema_arn: "capo_personalize.types.arn.Arn",
*,
config_overrides: Optional[PersonalizeClientConfig] = None,
) -> "capo_personalize.types.update_dataset_response.UpdateDatasetResponse":
"""<p>Update a dataset to replace its schema with a new or existing one. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/updating-dataset-schema.html">Replacing a dataset's schema</a>. </p>
Args:
dataset_arn: <p>The Amazon Resource Name (ARN) of the dataset that you want to update.</p>
schema_arn: <p>The Amazon Resource Name (ARN) of the new schema you want use.</p>
Raises:
capo_personalize.errors.invalid_input_exception.InvalidInputException: <p>Provide a valid value for the field or parameter.</p>
capo_personalize.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</p>
capo_personalize.errors.resource_not_found_exception.ResourceNotFoundException: <p>Could not find the specified resource.</p>
capo_personalize.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_personalize.types.update_dataset_request.UpdateDatasetRequest]",
) -> OperationResponse[
"capo_personalize.types.update_dataset_response.UpdateDatasetResponse"
]:
import capo_personalize._operations.amazon_personalize.update_dataset
output, http_response = (
capo_personalize._operations.amazon_personalize.update_dataset.update_dataset(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateDataset")
)
input_: capo_personalize.types.update_dataset_request.UpdateDatasetRequest = {
"dataset_arn": dataset_arn,
"schema_arn": schema_arn,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|