Skip to content

import_dataset

import_dataset(
    source_dataset_arn: DatasetArn,
    client_token: IdempotenceToken,
    *,
    config_overrides: Optional[LookoutEquipmentClientConfig] = None,
    dataset_name: Optional[DatasetName] = None,
    server_side_kms_key_id: Optional[NameOrArn] = None,
    tags: Optional[TagList] = None,
) -> ImportDatasetResponse

Imports a dataset.

Parameters:

  • source_dataset_arn (DatasetArn) –

    The Amazon Resource Name (ARN) of the dataset to import.

  • dataset_name (Optional[DatasetName], default: None ) –

    The name of the machine learning dataset to be created. If the dataset already exists, Amazon Lookout for Equipment overwrites the existing dataset. If you don't specify this field, it is filled with the name of the source dataset.

  • client_token (IdempotenceToken) –

    A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.

  • server_side_kms_key_id (Optional[NameOrArn], default: None ) –

    Provides the identifier of the KMS key key used to encrypt model data by Amazon Lookout for Equipment.

  • tags (Optional[TagList], default: None ) –

    Any tags associated with the dataset to be created.

Raises:

  • AccessDeniedException –

    The request could not be completed because you do not have access to the resource.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the target resource.

  • InternalServerException –

    Processing of the request has failed because of an unknown error, exception or failure.

  • ResourceNotFoundException –

    The resource requested could not be found. Verify the resource ID and retry your request.

  • ServiceQuotaExceededException –

    Resource limitations have been exceeded.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lookoutequipment/_services/lookout_equipment.py
def import_dataset(
    self,
    source_dataset_arn: "capo_lookoutequipment.types.dataset_arn.DatasetArn",
    client_token: "capo_lookoutequipment.types.idempotence_token.IdempotenceToken",
    *,
    config_overrides: Optional[LookoutEquipmentClientConfig] = None,
    dataset_name: Optional[
        "capo_lookoutequipment.types.dataset_name.DatasetName"
    ] = None,
    server_side_kms_key_id: Optional[
        "capo_lookoutequipment.types.name_or_arn.NameOrArn"
    ] = None,
    tags: Optional["capo_lookoutequipment.types.tag_list.TagList"] = None,
) -> "capo_lookoutequipment.types.import_dataset_response.ImportDatasetResponse":
    """<p>Imports a dataset.</p>

    Args:
        source_dataset_arn: <p>The Amazon Resource Name (ARN) of the dataset to import.</p>
        dataset_name: <p>The name of the machine learning dataset to be created. If the dataset already exists, Amazon Lookout for Equipment overwrites the existing dataset. If you don't specify this field, it is filled with the name of the source dataset.</p>
        client_token: <p>A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one. </p>
        server_side_kms_key_id: <p>Provides the identifier of the KMS key key used to encrypt model data by Amazon Lookout for Equipment. </p>
        tags: <p>Any tags associated with the dataset to be created.</p>

    Raises:
        capo_lookoutequipment.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have access to the resource. </p>
        capo_lookoutequipment.errors.conflict_exception.ConflictException: <p> The request could not be completed due to a conflict with the current state of the target resource. </p>
        capo_lookoutequipment.errors.internal_server_exception.InternalServerException: <p> Processing of the request has failed because of an unknown error, exception or failure. </p>
        capo_lookoutequipment.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource requested could not be found. Verify the resource ID and retry your request. </p>
        capo_lookoutequipment.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> Resource limitations have been exceeded. </p>
        capo_lookoutequipment.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_lookoutequipment.errors.validation_exception.ValidationException: <p> The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized. </p>
        capo_lookoutequipment.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lookoutequipment.types.import_dataset_request.ImportDatasetRequest]",
    ) -> OperationResponse[
        "capo_lookoutequipment.types.import_dataset_response.ImportDatasetResponse"
    ]:
        import capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.import_dataset

        output, http_response = (
            capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.import_dataset.import_dataset(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ImportDataset")
    )
    input_: capo_lookoutequipment.types.import_dataset_request.ImportDatasetRequest = {
        "source_dataset_arn": source_dataset_arn,
        "client_token": client_token,
    }
    if dataset_name is not None:
        input_["dataset_name"] = dataset_name
    if server_side_kms_key_id is not None:
        input_["server_side_kms_key_id"] = server_side_kms_key_id
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output