Skip to content

create_graph_snapshot

create_graph_snapshot(
    graph_identifier: GraphIdentifier,
    snapshot_name: SnapshotName,
    *,
    config_overrides: Optional[NeptuneGraphClientConfig] = None,
    tags: Optional[TagMap] = None,
) -> CreateGraphSnapshotOutput

Creates a snapshot of the specific graph.

Parameters:

  • graph_identifier (GraphIdentifier) –

    The unique identifier of the Neptune Analytics graph.

  • snapshot_name (SnapshotName) –

    The snapshot name. For example: my-snapshot-1.

    The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.

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

    Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.

Raises:

Source code in docs_src/capo_neptune_graph/_services/neptune_graph.py
def create_graph_snapshot(
    self,
    graph_identifier: "capo_neptune_graph.types.graph_identifier.GraphIdentifier",
    snapshot_name: "capo_neptune_graph.types.snapshot_name.SnapshotName",
    *,
    config_overrides: Optional[NeptuneGraphClientConfig] = None,
    tags: Optional["capo_neptune_graph.types.tag_map.TagMap"] = None,
) -> "capo_neptune_graph.types.create_graph_snapshot_output.CreateGraphSnapshotOutput":
    """<p>Creates a snapshot of the specific graph.</p>

    Args:
        graph_identifier: <p>The unique identifier of the Neptune Analytics graph.</p>
        snapshot_name: <p>The snapshot name. For example: <code>my-snapshot-1</code>.</p> <p>The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.</p>
        tags: <p>Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded.</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.create_graph_snapshot_input.CreateGraphSnapshotInput]",
    ) -> OperationResponse[
        "capo_neptune_graph.types.create_graph_snapshot_output.CreateGraphSnapshotOutput"
    ]:
        import capo_neptune_graph._operations.amazon_neptune_graph.create_graph_snapshot

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateGraphSnapshot")
    )
    input_: capo_neptune_graph.types.create_graph_snapshot_input.CreateGraphSnapshotInput = {
        "graph_identifier": graph_identifier,
        "snapshot_name": snapshot_name,
    }
    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