Skip to content

start_export_task

start_export_task(
    graph_identifier: GraphIdentifier,
    role_arn: RoleArn,
    format: ExportFormat,
    destination: str,
    kms_key_identifier: KmsKeyArn,
    *,
    config_overrides: Optional[NeptuneGraphClientConfig] = None,
    parquet_type: Optional[ParquetType] = None,
    export_filter: Optional[ExportFilter] = None,
    tags: Optional[TagMap] = None,
) -> StartExportTaskOutput

Export data from an existing Neptune Analytics graph to Amazon S3. The graph state should be AVAILABLE.

Parameters:

  • graph_identifier (GraphIdentifier) –

    The source graph identifier of the export task.

  • role_arn (RoleArn) –

    The ARN of the IAM role that will allow data to be exported to the destination.

  • format (ExportFormat) –

    The format of the export task.

  • destination (str) –

    The Amazon S3 URI where data will be exported to.

  • kms_key_identifier (KmsKeyArn) –

    The KMS key identifier of the export task.

  • parquet_type (Optional[ParquetType], default: None ) –

    The parquet type of the export task.

  • export_filter (Optional[ExportFilter], default: None ) –

    The export filter of the export task.

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

    Tags to be applied to the export task.

Raises:

Source code in docs_src/capo_neptune_graph/_services/neptune_graph.py
def start_export_task(
    self,
    graph_identifier: "capo_neptune_graph.types.graph_identifier.GraphIdentifier",
    role_arn: "capo_neptune_graph.types.role_arn.RoleArn",
    format: "capo_neptune_graph.types.export_format.ExportFormat",
    destination: str,
    kms_key_identifier: "capo_neptune_graph.types.kms_key_arn.KmsKeyArn",
    *,
    config_overrides: Optional[NeptuneGraphClientConfig] = None,
    parquet_type: Optional[
        "capo_neptune_graph.types.parquet_type.ParquetType"
    ] = None,
    export_filter: Optional[
        "capo_neptune_graph.types.export_filter.ExportFilter"
    ] = None,
    tags: Optional["capo_neptune_graph.types.tag_map.TagMap"] = None,
) -> "capo_neptune_graph.types.start_export_task_output.StartExportTaskOutput":
    """<p>Export data from an existing Neptune Analytics graph to Amazon S3. The graph state should be <code>AVAILABLE</code>.</p>

    Args:
        graph_identifier: <p>The source graph identifier of the export task.</p>
        role_arn: <p>The ARN of the IAM role that will allow data to be exported to the destination.</p>
        format: <p>The format of the export task.</p>
        destination: <p>The Amazon S3 URI where data will be exported to.</p>
        kms_key_identifier: <p>The KMS key identifier of the export task.</p>
        parquet_type: <p>The parquet type of the export task.</p>
        export_filter: <p>The export filter of the export task.</p>
        tags: <p>Tags to be applied to the export task.</p>

    Raises:
        capo_neptune_graph.errors.conflict_exception.ConflictException: <p>Raised when a conflict is encountered.</p>
        capo_neptune_graph.errors.internal_server_exception.InternalServerException: <p>A failure occurred on the server.</p>
        capo_neptune_graph.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource could not be located.</p>
        capo_neptune_graph.errors.throttling_exception.ThrottlingException: <p>The exception was interrupted by throttling.</p>
        capo_neptune_graph.errors.validation_exception.ValidationException: <p>A resource could not be validated.</p>
        capo_neptune_graph.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_neptune_graph.types.start_export_task_input.StartExportTaskInput]",
    ) -> OperationResponse[
        "capo_neptune_graph.types.start_export_task_output.StartExportTaskOutput"
    ]:
        import capo_neptune_graph._operations.amazon_neptune_graph.start_export_task

        output, http_response = (
            capo_neptune_graph._operations.amazon_neptune_graph.start_export_task.start_export_task(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartExportTask")
    )
    input_: capo_neptune_graph.types.start_export_task_input.StartExportTaskInput = {
        "graph_identifier": graph_identifier,
        "role_arn": role_arn,
        "format": format,
        "destination": destination,
        "kms_key_identifier": kms_key_identifier,
    }
    if parquet_type is not None:
        input_["parquet_type"] = parquet_type
    if export_filter is not None:
        input_["export_filter"] = export_filter
    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