/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.qldb; import javax.annotation.Generated; import com.amazonaws.*; import com.amazonaws.regions.*; import com.amazonaws.services.qldb.model.*; /** * Interface for accessing QLDB. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.qldb.AbstractAmazonQLDB} instead. *

*

*

* The resource management API for Amazon QLDB *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonQLDB { /** * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata * (such as supported regions) of the service. * * @see RegionUtils#getRegionsForService(String) */ String ENDPOINT_PREFIX = "qldb"; /** *

* Ends a given Amazon QLDB journal stream. Before a stream can be canceled, its current status must be * ACTIVE. *

*

* You can't restart a stream after you cancel it. Canceled QLDB stream resources are subject to a 7-day retention * period, so they are automatically deleted after this limit expires. *

* * @param cancelJournalKinesisStreamRequest * @return Result of the CancelJournalKinesisStream operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.CancelJournalKinesisStream * @see AWS API Documentation */ CancelJournalKinesisStreamResult cancelJournalKinesisStream(CancelJournalKinesisStreamRequest cancelJournalKinesisStreamRequest); /** *

* Creates a new ledger in your Amazon Web Services account in the current Region. *

* * @param createLedgerRequest * @return Result of the CreateLedger operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceAlreadyExistsException * The specified resource already exists. * @throws LimitExceededException * You have reached the limit on the maximum number of resources allowed. * @throws ResourceInUseException * The specified resource can't be modified at this time. * @sample AmazonQLDB.CreateLedger * @see AWS API * Documentation */ CreateLedgerResult createLedger(CreateLedgerRequest createLedgerRequest); /** *

* Deletes a ledger and all of its contents. This action is irreversible. *

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it * by calling the UpdateLedger operation to set this parameter to false. *

* * @param deleteLedgerRequest * @return Result of the DeleteLedger operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourceInUseException * The specified resource can't be modified at this time. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.DeleteLedger * @see AWS API * Documentation */ DeleteLedgerResult deleteLedger(DeleteLedgerRequest deleteLedgerRequest); /** *

* Returns detailed information about a given Amazon QLDB journal stream. The output includes the Amazon Resource * Name (ARN), stream name, current status, creation time, and the parameters of the original stream creation * request. *

*

* This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide. *

* * @param describeJournalKinesisStreamRequest * @return Result of the DescribeJournalKinesisStream operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.DescribeJournalKinesisStream * @see AWS API Documentation */ DescribeJournalKinesisStreamResult describeJournalKinesisStream(DescribeJournalKinesisStreamRequest describeJournalKinesisStreamRequest); /** *

* Returns information about a journal export job, including the ledger name, export ID, creation time, current * status, and the parameters of the original export creation request. *

*

* This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide. *

*

* If the export job with the given ExportId doesn't exist, then throws * ResourceNotFoundException. *

*

* If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException. *

* * @param describeJournalS3ExportRequest * @return Result of the DescribeJournalS3Export operation returned by the service. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @sample AmazonQLDB.DescribeJournalS3Export * @see AWS * API Documentation */ DescribeJournalS3ExportResult describeJournalS3Export(DescribeJournalS3ExportRequest describeJournalS3ExportRequest); /** *

* Returns information about a ledger, including its state, permissions mode, encryption at rest settings, and when * it was created. *

* * @param describeLedgerRequest * @return Result of the DescribeLedger operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @sample AmazonQLDB.DescribeLedger * @see AWS API * Documentation */ DescribeLedgerResult describeLedger(DescribeLedgerRequest describeLedgerRequest); /** *

* Exports journal contents within a date and time range from a ledger into a specified Amazon Simple Storage * Service (Amazon S3) bucket. A journal export job can write the data objects in either the text or binary * representation of Amazon Ion format, or in JSON Lines text format. *

*

* If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException. *

*

* If the ledger with the given Name is in CREATING status, then throws * ResourcePreconditionNotMetException. *

*

* You can initiate up to two concurrent journal export requests for each ledger. Beyond this limit, journal export * requests throw LimitExceededException. *

* * @param exportJournalToS3Request * @return Result of the ExportJournalToS3 operation returned by the service. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.ExportJournalToS3 * @see AWS API * Documentation */ ExportJournalToS3Result exportJournalToS3(ExportJournalToS3Request exportJournalToS3Request); /** *

* Returns a block object at a specified address in a journal. Also returns a proof of the specified block for * verification if DigestTipAddress is provided. *

*

* For information about the data contents in a block, see Journal contents in the * Amazon QLDB Developer Guide. *

*

* If the specified ledger doesn't exist or is in DELETING status, then throws * ResourceNotFoundException. *

*

* If the specified ledger is in CREATING status, then throws * ResourcePreconditionNotMetException. *

*

* If no block exists with the specified address, then throws InvalidParameterException. *

* * @param getBlockRequest * @return Result of the GetBlock operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.GetBlock * @see AWS API * Documentation */ GetBlockResult getBlock(GetBlockRequest getBlockRequest); /** *

* Returns the digest of a ledger at the latest committed block in the journal. The response includes a 256-bit hash * value and a block address. *

* * @param getDigestRequest * @return Result of the GetDigest operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.GetDigest * @see AWS API * Documentation */ GetDigestResult getDigest(GetDigestRequest getDigestRequest); /** *

* Returns a revision data object for a specified document ID and block address. Also returns a proof of the * specified revision for verification if DigestTipAddress is provided. *

* * @param getRevisionRequest * @return Result of the GetRevision operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.GetRevision * @see AWS API * Documentation */ GetRevisionResult getRevision(GetRevisionRequest getRevisionRequest); /** *

* Returns all Amazon QLDB journal streams for a given ledger. *

*

* This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide. *

*

* This action returns a maximum of MaxResults items. It is paginated so that you can retrieve all the * items by calling ListJournalKinesisStreamsForLedger multiple times. *

* * @param listJournalKinesisStreamsForLedgerRequest * @return Result of the ListJournalKinesisStreamsForLedger operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.ListJournalKinesisStreamsForLedger * @see AWS API Documentation */ ListJournalKinesisStreamsForLedgerResult listJournalKinesisStreamsForLedger( ListJournalKinesisStreamsForLedgerRequest listJournalKinesisStreamsForLedgerRequest); /** *

* Returns all journal export jobs for all ledgers that are associated with the current Amazon Web Services account * and Region. *

*

* This action returns a maximum of MaxResults items, and is paginated so that you can retrieve all the * items by calling ListJournalS3Exports multiple times. *

*

* This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide. *

* * @param listJournalS3ExportsRequest * @return Result of the ListJournalS3Exports operation returned by the service. * @sample AmazonQLDB.ListJournalS3Exports * @see AWS API * Documentation */ ListJournalS3ExportsResult listJournalS3Exports(ListJournalS3ExportsRequest listJournalS3ExportsRequest); /** *

* Returns all journal export jobs for a specified ledger. *

*

* This action returns a maximum of MaxResults items, and is paginated so that you can retrieve all the * items by calling ListJournalS3ExportsForLedger multiple times. *

*

* This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide. *

* * @param listJournalS3ExportsForLedgerRequest * @return Result of the ListJournalS3ExportsForLedger operation returned by the service. * @sample AmazonQLDB.ListJournalS3ExportsForLedger * @see AWS API Documentation */ ListJournalS3ExportsForLedgerResult listJournalS3ExportsForLedger(ListJournalS3ExportsForLedgerRequest listJournalS3ExportsForLedgerRequest); /** *

* Returns all ledgers that are associated with the current Amazon Web Services account and Region. *

*

* This action returns a maximum of MaxResults items and is paginated so that you can retrieve all the * items by calling ListLedgers multiple times. *

* * @param listLedgersRequest * @return Result of the ListLedgers operation returned by the service. * @sample AmazonQLDB.ListLedgers * @see AWS API * Documentation */ ListLedgersResult listLedgers(ListLedgersRequest listLedgersRequest); /** *

* Returns all tags for a specified Amazon QLDB resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @sample AmazonQLDB.ListTagsForResource * @see AWS API * Documentation */ ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest); /** *

* Creates a journal stream for a given Amazon QLDB ledger. The stream captures every document revision that is * committed to the ledger's journal and delivers the data to a specified Amazon Kinesis Data Streams resource. *

* * @param streamJournalToKinesisRequest * @return Result of the StreamJournalToKinesis operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @throws ResourcePreconditionNotMetException * The operation failed because a condition wasn't satisfied in advance. * @sample AmazonQLDB.StreamJournalToKinesis * @see AWS * API Documentation */ StreamJournalToKinesisResult streamJournalToKinesis(StreamJournalToKinesisRequest streamJournalToKinesisRequest); /** *

* Adds one or more tags to a specified Amazon QLDB resource. *

*

* A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, your request fails and * returns an error. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @sample AmazonQLDB.TagResource * @see AWS API * Documentation */ TagResourceResult tagResource(TagResourceRequest tagResourceRequest); /** *

* Removes one or more tags from a specified Amazon QLDB resource. You can specify up to 50 tag keys to remove. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @sample AmazonQLDB.UntagResource * @see AWS API * Documentation */ UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest); /** *

* Updates properties on a ledger. *

* * @param updateLedgerRequest * @return Result of the UpdateLedger operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @sample AmazonQLDB.UpdateLedger * @see AWS API * Documentation */ UpdateLedgerResult updateLedger(UpdateLedgerRequest updateLedgerRequest); /** *

* Updates the permissions mode of a ledger. *

* *

* Before you switch to the STANDARD permissions mode, you must first create all required IAM policies * and table tags to avoid disruption to your users. To learn more, see Migrating to the standard permissions mode in the Amazon QLDB Developer Guide. *

*
* * @param updateLedgerPermissionsModeRequest * @return Result of the UpdateLedgerPermissionsMode operation returned by the service. * @throws InvalidParameterException * One or more parameters in the request aren't valid. * @throws ResourceNotFoundException * The specified resource doesn't exist. * @sample AmazonQLDB.UpdateLedgerPermissionsMode * @see AWS API Documentation */ UpdateLedgerPermissionsModeResult updateLedgerPermissionsMode(UpdateLedgerPermissionsModeRequest updateLedgerPermissionsModeRequest); /** * Shuts down this client object, releasing any resources that might be held open. This is an optional method, and * callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client * has been shutdown, it should not be used to make any more requests. */ void shutdown(); /** * Returns additional metadata for a previously executed successful request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing a request. * * @param request * The originally executed request. * * @return The response metadata for the specified request, or null if none is available. */ ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request); }