/* * 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.managedblockchainquery; import javax.annotation.Generated; import com.amazonaws.*; import com.amazonaws.regions.*; import com.amazonaws.services.managedblockchainquery.model.*; /** * Interface for accessing Amazon Managed Blockchain Query. *

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

*

*

* Amazon Managed Blockchain (AMB) Query provides you with convenient access to multi-blockchain network data, which * makes it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to read data * from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can also get information such as * the current and historical balances of addresses, or you can get a list of blockchain transactions for a given time * period. Additionally, you can get details of a given transaction, such as transaction events, which you can further * analyze or use in business logic for your applications. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonManagedBlockchainQuery { /** * 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 = "managedblockchain-query"; /** *

* Gets the token balance for a batch of tokens by using the GetTokenBalance action for every token in * the request. *

* *

* Only the native tokens BTC,ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. *

*
* * @param batchGetTokenBalanceRequest * @return Result of the BatchGetTokenBalance operation returned by the service. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is when you create resources that exceed your service limit for this resource * type. Request a limit increase or delete unused resources, if possible. * @throws ValidationException * The resource passed is invalid. * @throws ResourceNotFoundException * The resource was not found. * @throws AccessDeniedException * The Amazon Web Services account doesn’t have access to this resource. * @throws InternalServerException * The request processing has failed because of an internal error in the service. * @throws ServiceQuotaExceededException * The service quota has been exceeded for this resource. * @sample AmazonManagedBlockchainQuery.BatchGetTokenBalance * @see AWS API Documentation */ BatchGetTokenBalanceResult batchGetTokenBalance(BatchGetTokenBalanceRequest batchGetTokenBalanceRequest); /** *

* Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the * blockchain. *

* *

* Only the native tokens BTC,ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported. *

*
* * @param getTokenBalanceRequest * @return Result of the GetTokenBalance operation returned by the service. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is when you create resources that exceed your service limit for this resource * type. Request a limit increase or delete unused resources, if possible. * @throws ValidationException * The resource passed is invalid. * @throws ResourceNotFoundException * The resource was not found. * @throws AccessDeniedException * The Amazon Web Services account doesn’t have access to this resource. * @throws InternalServerException * The request processing has failed because of an internal error in the service. * @throws ServiceQuotaExceededException * The service quota has been exceeded for this resource. * @sample AmazonManagedBlockchainQuery.GetTokenBalance * @see AWS API Documentation */ GetTokenBalanceResult getTokenBalance(GetTokenBalanceRequest getTokenBalanceRequest); /** *

* Get the details of a transaction. *

* * @param getTransactionRequest * @return Result of the GetTransaction operation returned by the service. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is when you create resources that exceed your service limit for this resource * type. Request a limit increase or delete unused resources, if possible. * @throws ValidationException * The resource passed is invalid. * @throws ResourceNotFoundException * The resource was not found. * @throws AccessDeniedException * The Amazon Web Services account doesn’t have access to this resource. * @throws InternalServerException * The request processing has failed because of an internal error in the service. * @throws ServiceQuotaExceededException * The service quota has been exceeded for this resource. * @sample AmazonManagedBlockchainQuery.GetTransaction * @see AWS API Documentation */ GetTransactionResult getTransaction(GetTransactionRequest getTransactionRequest); /** *

* This action returns the following for a given a blockchain network: *

* * *

* You must always specify the network property of the tokenFilter when using this operation. *

*
* * @param listTokenBalancesRequest * @return Result of the ListTokenBalances operation returned by the service. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is when you create resources that exceed your service limit for this resource * type. Request a limit increase or delete unused resources, if possible. * @throws ValidationException * The resource passed is invalid. * @throws AccessDeniedException * The Amazon Web Services account doesn’t have access to this resource. * @throws InternalServerException * The request processing has failed because of an internal error in the service. * @throws ServiceQuotaExceededException * The service quota has been exceeded for this resource. * @sample AmazonManagedBlockchainQuery.ListTokenBalances * @see AWS API Documentation */ ListTokenBalancesResult listTokenBalances(ListTokenBalancesRequest listTokenBalancesRequest); /** *

* An array of TransactionEvent objects. Each object contains details about the transaction event. *

* * @param listTransactionEventsRequest * @return Result of the ListTransactionEvents operation returned by the service. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is when you create resources that exceed your service limit for this resource * type. Request a limit increase or delete unused resources, if possible. * @throws ValidationException * The resource passed is invalid. * @throws AccessDeniedException * The Amazon Web Services account doesn’t have access to this resource. * @throws InternalServerException * The request processing has failed because of an internal error in the service. * @throws ServiceQuotaExceededException * The service quota has been exceeded for this resource. * @sample AmazonManagedBlockchainQuery.ListTransactionEvents * @see AWS API Documentation */ ListTransactionEventsResult listTransactionEvents(ListTransactionEventsRequest listTransactionEventsRequest); /** *

* Lists all of the transactions on a given wallet address or to a specific contract. *

* * @param listTransactionsRequest * @return Result of the ListTransactions operation returned by the service. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is when you create resources that exceed your service limit for this resource * type. Request a limit increase or delete unused resources, if possible. * @throws ValidationException * The resource passed is invalid. * @throws AccessDeniedException * The Amazon Web Services account doesn’t have access to this resource. * @throws InternalServerException * The request processing has failed because of an internal error in the service. * @throws ServiceQuotaExceededException * The service quota has been exceeded for this resource. * @sample AmazonManagedBlockchainQuery.ListTransactions * @see AWS API Documentation */ ListTransactionsResult listTransactions(ListTransactionsRequest listTransactionsRequest); /** * 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); }