/* * 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.managedblockchain; import org.w3c.dom.*; import java.net.*; import java.util.*; import javax.annotation.Generated; import org.apache.commons.logging.*; import com.amazonaws.*; import com.amazonaws.annotation.SdkInternalApi; import com.amazonaws.auth.*; import com.amazonaws.handlers.*; import com.amazonaws.http.*; import com.amazonaws.internal.*; import com.amazonaws.internal.auth.*; import com.amazonaws.metrics.*; import com.amazonaws.regions.*; import com.amazonaws.transform.*; import com.amazonaws.util.*; import com.amazonaws.protocol.json.*; import com.amazonaws.util.AWSRequestMetrics.Field; import com.amazonaws.annotation.ThreadSafe; import com.amazonaws.client.AwsSyncClientParams; import com.amazonaws.client.builder.AdvancedConfig; import com.amazonaws.services.managedblockchain.AmazonManagedBlockchainClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.managedblockchain.model.*; import com.amazonaws.services.managedblockchain.model.transform.*; /** * Client for accessing ManagedBlockchain. All service calls made using this client are blocking, and will not return * until the service call completes. *
*
** Amazon Managed Blockchain is a fully managed service for creating and managing blockchain networks using open-source * frameworks. Blockchain allows you to build applications where multiple parties can securely and transparently run * transactions and share data without the need for a trusted, central authority. *
*
* Managed Blockchain supports the Hyperledger Fabric and Ethereum open-source frameworks. Because of fundamental
* differences between the frameworks, some API actions or data types may only apply in the context of one framework and
* not the other. For example, actions related to Hyperledger Fabric network members such as CreateMember
* and DeleteMember
don't apply to Ethereum.
*
* The description for each action indicates the framework or frameworks to which it applies. Data types and properties * that apply only in the context of a particular framework are similarly indicated. *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonManagedBlockchainClient extends AmazonWebServiceClient implements AmazonManagedBlockchain { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonManagedBlockchain.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "managedblockchain"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.InvalidRequestExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotReadyException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.ResourceNotReadyExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("IllegalActionException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.IllegalActionExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("TooManyTagsException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.TooManyTagsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServiceErrorException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.InternalServiceErrorExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistsException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.ResourceAlreadyExistsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceLimitExceededException").withExceptionUnmarshaller( com.amazonaws.services.managedblockchain.model.transform.ResourceLimitExceededExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.managedblockchain.model.AmazonManagedBlockchainException.class)); public static AmazonManagedBlockchainClientBuilder builder() { return AmazonManagedBlockchainClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on ManagedBlockchain using the specified parameters. * ** All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonManagedBlockchainClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on ManagedBlockchain using the specified parameters. * *
* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonManagedBlockchainClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("managedblockchain.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/managedblockchain/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/managedblockchain/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *
* Creates a new accessor for use with Managed Blockchain Ethereum nodes. An accessor contains information required * for token based access to your Ethereum nodes. *
* * @param createAccessorRequest * @return Result of the CreateAccessor operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceAlreadyExistsException * A resource request is issued for a resource that already exists. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws ResourceLimitExceededException * The maximum number of resources of that type already exist. Ensure the resources requested are within the * boundaries of the service edition and your account limits. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws TooManyTagsException * @sample AmazonManagedBlockchain.CreateAccessor * @see AWS API Documentation */ @Override public CreateAccessorResult createAccessor(CreateAccessorRequest request) { request = beforeClientExecution(request); return executeCreateAccessor(request); } @SdkInternalApi final CreateAccessorResult executeCreateAccessor(CreateAccessorRequest createAccessorRequest) { ExecutionContext executionContext = createExecutionContext(createAccessorRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates a member within a Managed Blockchain network. *
** Applies only to Hyperledger Fabric. *
* * @param createMemberRequest * @return Result of the CreateMember operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ResourceAlreadyExistsException * A resource request is issued for a resource that already exists. * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws ResourceLimitExceededException * The maximum number of resources of that type already exist. Ensure the resources requested are within the * boundaries of the service edition and your account limits. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws TooManyTagsException * @sample AmazonManagedBlockchain.CreateMember * @see AWS * API Documentation */ @Override public CreateMemberResult createMember(CreateMemberRequest request) { request = beforeClientExecution(request); return executeCreateMember(request); } @SdkInternalApi final CreateMemberResult executeCreateMember(CreateMemberRequest createMemberRequest) { ExecutionContext executionContext = createExecutionContext(createMemberRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates a new blockchain network using Amazon Managed Blockchain. *
** Applies only to Hyperledger Fabric. *
* * @param createNetworkRequest * @return Result of the CreateNetwork operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceAlreadyExistsException * A resource request is issued for a resource that already exists. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws ResourceLimitExceededException * The maximum number of resources of that type already exist. Ensure the resources requested are within the * boundaries of the service edition and your account limits. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws TooManyTagsException * @sample AmazonManagedBlockchain.CreateNetwork * @see AWS API Documentation */ @Override public CreateNetworkResult createNetwork(CreateNetworkRequest request) { request = beforeClientExecution(request); return executeCreateNetwork(request); } @SdkInternalApi final CreateNetworkResult executeCreateNetwork(CreateNetworkRequest createNetworkRequest) { ExecutionContext executionContext = createExecutionContext(createNetworkRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates a node on the specified blockchain network. *
** Applies to Hyperledger Fabric and Ethereum. *
* * @param createNodeRequest * @return Result of the CreateNode operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ResourceAlreadyExistsException * A resource request is issued for a resource that already exists. * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws ResourceLimitExceededException * The maximum number of resources of that type already exist. Ensure the resources requested are within the * boundaries of the service edition and your account limits. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws TooManyTagsException * @sample AmazonManagedBlockchain.CreateNode * @see AWS * API Documentation */ @Override public CreateNodeResult createNode(CreateNodeRequest request) { request = beforeClientExecution(request); return executeCreateNode(request); } @SdkInternalApi final CreateNodeResult executeCreateNode(CreateNodeRequest createNodeRequest) { ExecutionContext executionContext = createExecutionContext(createNodeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates a proposal for a change to the network that other members of the network can vote on, for example, a * proposal to add a new member to the network. Any member can create a proposal. *
** Applies only to Hyperledger Fabric. *
* * @param createProposalRequest * @return Result of the CreateProposal operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws TooManyTagsException * @sample AmazonManagedBlockchain.CreateProposal * @see AWS API Documentation */ @Override public CreateProposalResult createProposal(CreateProposalRequest request) { request = beforeClientExecution(request); return executeCreateProposal(request); } @SdkInternalApi final CreateProposalResult executeCreateProposal(CreateProposalRequest createProposalRequest) { ExecutionContext executionContext = createExecutionContext(createProposalRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Deletes an accessor that your Amazon Web Services account owns. An accessor object is a container that has the
* information required for token based access to your Ethereum nodes including, the BILLING_TOKEN
.
* After an accessor is deleted, the status of the accessor changes from AVAILABLE
to
* PENDING_DELETION
. An accessor in the PENDING_DELETION
state can’t be used for new
* WebSocket requests or HTTP requests. However, WebSocket connections that were initiated while the accessor was in
* the AVAILABLE
state remain open until they expire (up to 2 hours).
*
* Deletes a member. Deleting a member removes the member and all associated resources from the network.
* DeleteMember
can only be called for a specified MemberId
if the principal performing
* the action is associated with the Amazon Web Services account that owns the member. In all other cases, the
* DeleteMember
action is carried out as the result of an approved proposal to remove a member. If
* MemberId
is the last member in a network specified by the last Amazon Web Services account, the
* network is deleted also.
*
* Applies only to Hyperledger Fabric. *
* * @param deleteMemberRequest * @return Result of the DeleteMember operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.DeleteMember * @see AWS * API Documentation */ @Override public DeleteMemberResult deleteMember(DeleteMemberRequest request) { request = beforeClientExecution(request); return executeDeleteMember(request); } @SdkInternalApi final DeleteMemberResult executeDeleteMember(DeleteMemberRequest deleteMemberRequest) { ExecutionContext executionContext = createExecutionContext(deleteMemberRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Deletes a node that your Amazon Web Services account owns. All data on the node is lost and cannot be recovered. *
** Applies to Hyperledger Fabric and Ethereum. *
* * @param deleteNodeRequest * @return Result of the DeleteNode operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.DeleteNode * @see AWS * API Documentation */ @Override public DeleteNodeResult deleteNode(DeleteNodeRequest request) { request = beforeClientExecution(request); return executeDeleteNode(request); } @SdkInternalApi final DeleteNodeResult executeDeleteNode(DeleteNodeRequest deleteNodeRequest) { ExecutionContext executionContext = createExecutionContext(deleteNodeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns detailed information about an accessor. An accessor object is a container that has the information * required for token based access to your Ethereum nodes. *
* * @param getAccessorRequest * @return Result of the GetAccessor operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.GetAccessor * @see AWS * API Documentation */ @Override public GetAccessorResult getAccessor(GetAccessorRequest request) { request = beforeClientExecution(request); return executeGetAccessor(request); } @SdkInternalApi final GetAccessorResult executeGetAccessor(GetAccessorRequest getAccessorRequest) { ExecutionContext executionContext = createExecutionContext(getAccessorRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns detailed information about a member. *
** Applies only to Hyperledger Fabric. *
* * @param getMemberRequest * @return Result of the GetMember operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.GetMember * @see AWS * API Documentation */ @Override public GetMemberResult getMember(GetMemberRequest request) { request = beforeClientExecution(request); return executeGetMember(request); } @SdkInternalApi final GetMemberResult executeGetMember(GetMemberRequest getMemberRequest) { ExecutionContext executionContext = createExecutionContext(getMemberRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns detailed information about a network. *
** Applies to Hyperledger Fabric and Ethereum. *
* * @param getNetworkRequest * @return Result of the GetNetwork operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.GetNetwork * @see AWS * API Documentation */ @Override public GetNetworkResult getNetwork(GetNetworkRequest request) { request = beforeClientExecution(request); return executeGetNetwork(request); } @SdkInternalApi final GetNetworkResult executeGetNetwork(GetNetworkRequest getNetworkRequest) { ExecutionContext executionContext = createExecutionContext(getNetworkRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns detailed information about a node. *
** Applies to Hyperledger Fabric and Ethereum. *
* * @param getNodeRequest * @return Result of the GetNode operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.GetNode * @see AWS API * Documentation */ @Override public GetNodeResult getNode(GetNodeRequest request) { request = beforeClientExecution(request); return executeGetNode(request); } @SdkInternalApi final GetNodeResult executeGetNode(GetNodeRequest getNodeRequest) { ExecutionContext executionContext = createExecutionContext(getNodeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns detailed information about a proposal. *
** Applies only to Hyperledger Fabric. *
* * @param getProposalRequest * @return Result of the GetProposal operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.GetProposal * @see AWS * API Documentation */ @Override public GetProposalResult getProposal(GetProposalRequest request) { request = beforeClientExecution(request); return executeGetProposal(request); } @SdkInternalApi final GetProposalResult executeGetProposal(GetProposalRequest getProposalRequest) { ExecutionContext executionContext = createExecutionContext(getProposalRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns a list of the accessors and their properties. Accessor objects are containers that have the information * required for token based access to your Ethereum nodes. *
* * @param listAccessorsRequest * @return Result of the ListAccessors operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.ListAccessors * @see AWS API Documentation */ @Override public ListAccessorsResult listAccessors(ListAccessorsRequest request) { request = beforeClientExecution(request); return executeListAccessors(request); } @SdkInternalApi final ListAccessorsResult executeListAccessors(ListAccessorsRequest listAccessorsRequest) { ExecutionContext executionContext = createExecutionContext(listAccessorsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns a list of all invitations for the current Amazon Web Services account. *
** Applies only to Hyperledger Fabric. *
* * @param listInvitationsRequest * @return Result of the ListInvitations operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws ResourceLimitExceededException * The maximum number of resources of that type already exist. Ensure the resources requested are within the * boundaries of the service edition and your account limits. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.ListInvitations * @see AWS API Documentation */ @Override public ListInvitationsResult listInvitations(ListInvitationsRequest request) { request = beforeClientExecution(request); return executeListInvitations(request); } @SdkInternalApi final ListInvitationsResult executeListInvitations(ListInvitationsRequest listInvitationsRequest) { ExecutionContext executionContext = createExecutionContext(listInvitationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns a list of the members in a network and properties of their configurations. *
** Applies only to Hyperledger Fabric. *
* * @param listMembersRequest * @return Result of the ListMembers operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.ListMembers * @see AWS * API Documentation */ @Override public ListMembersResult listMembers(ListMembersRequest request) { request = beforeClientExecution(request); return executeListMembers(request); } @SdkInternalApi final ListMembersResult executeListMembers(ListMembersRequest listMembersRequest) { ExecutionContext executionContext = createExecutionContext(listMembersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns information about the networks in which the current Amazon Web Services account participates. *
** Applies to Hyperledger Fabric and Ethereum. *
* * @param listNetworksRequest * @return Result of the ListNetworks operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.ListNetworks * @see AWS * API Documentation */ @Override public ListNetworksResult listNetworks(ListNetworksRequest request) { request = beforeClientExecution(request); return executeListNetworks(request); } @SdkInternalApi final ListNetworksResult executeListNetworks(ListNetworksRequest listNetworksRequest) { ExecutionContext executionContext = createExecutionContext(listNetworksRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns information about the nodes within a network. *
** Applies to Hyperledger Fabric and Ethereum. *
* * @param listNodesRequest * @return Result of the ListNodes operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.ListNodes * @see AWS * API Documentation */ @Override public ListNodesResult listNodes(ListNodesRequest request) { request = beforeClientExecution(request); return executeListNodes(request); } @SdkInternalApi final ListNodesResult executeListNodes(ListNodesRequest listNodesRequest) { ExecutionContext executionContext = createExecutionContext(listNodesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns the list of votes for a specified proposal, including the value of each vote and the unique identifier of * the member that cast the vote. *
** Applies only to Hyperledger Fabric. *
* * @param listProposalVotesRequest * @return Result of the ListProposalVotes operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.ListProposalVotes * @see AWS API Documentation */ @Override public ListProposalVotesResult listProposalVotes(ListProposalVotesRequest request) { request = beforeClientExecution(request); return executeListProposalVotes(request); } @SdkInternalApi final ListProposalVotesResult executeListProposalVotes(ListProposalVotesRequest listProposalVotesRequest) { ExecutionContext executionContext = createExecutionContext(listProposalVotesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns a list of proposals for the network. *
** Applies only to Hyperledger Fabric. *
* * @param listProposalsRequest * @return Result of the ListProposals operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.ListProposals * @see AWS API Documentation */ @Override public ListProposalsResult listProposals(ListProposalsRequest request) { request = beforeClientExecution(request); return executeListProposals(request); } @SdkInternalApi final ListProposalsResult executeListProposals(ListProposalsRequest listProposalsRequest) { ExecutionContext executionContext = createExecutionContext(listProposalsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns a list of tags for the specified resource. Each tag consists of a key and optional value. *
** For more information about tags, see Tagging * Resources in the Amazon Managed Blockchain Ethereum Developer Guide, or Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide. *
* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @sample AmazonManagedBlockchain.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Rejects an invitation to join a network. This action can be called by a principal in an Amazon Web Services * account that has received an invitation to create a member and join a network. *
** Applies only to Hyperledger Fabric. *
* * @param rejectInvitationRequest * @return Result of the RejectInvitation operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws IllegalActionException * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.RejectInvitation * @see AWS API Documentation */ @Override public RejectInvitationResult rejectInvitation(RejectInvitationRequest request) { request = beforeClientExecution(request); return executeRejectInvitation(request); } @SdkInternalApi final RejectInvitationResult executeRejectInvitation(RejectInvitationRequest rejectInvitationRequest) { ExecutionContext executionContext = createExecutionContext(rejectInvitationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Adds or overwrites the specified tags for the specified Amazon Managed Blockchain resource. Each tag consists of * a key and optional value. *
*
* When you specify a tag key that already exists, the tag value is overwritten with the new value. Use
* UntagResource
to remove tag keys.
*
* 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. *
** For more information about tags, see Tagging * Resources in the Amazon Managed Blockchain Ethereum Developer Guide, or Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide. *
* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws TooManyTagsException * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @sample AmazonManagedBlockchain.TagResource * @see AWS * API Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Removes the specified tags from the Amazon Managed Blockchain resource. *
** For more information about tags, see Tagging * Resources in the Amazon Managed Blockchain Ethereum Developer Guide, or Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide. *
* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ResourceNotReadyException * The requested resource exists but isn't in a status that can complete the operation. * @sample AmazonManagedBlockchain.UntagResource * @see AWS API Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Updates a member configuration with new parameters. *
** Applies only to Hyperledger Fabric. *
* * @param updateMemberRequest * @return Result of the UpdateMember operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.UpdateMember * @see AWS * API Documentation */ @Override public UpdateMemberResult updateMember(UpdateMemberRequest request) { request = beforeClientExecution(request); return executeUpdateMember(request); } @SdkInternalApi final UpdateMemberResult executeUpdateMember(UpdateMemberRequest updateMemberRequest) { ExecutionContext executionContext = createExecutionContext(updateMemberRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Updates a node configuration with new parameters. *
** Applies only to Hyperledger Fabric. *
* * @param updateNodeRequest * @return Result of the UpdateNode operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.UpdateNode * @see AWS * API Documentation */ @Override public UpdateNodeResult updateNode(UpdateNodeRequest request) { request = beforeClientExecution(request); return executeUpdateNode(request); } @SdkInternalApi final UpdateNodeResult executeUpdateNode(UpdateNodeRequest updateNodeRequest) { ExecutionContext executionContext = createExecutionContext(updateNodeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Casts a vote for a specified ProposalId
on behalf of a member. The member to vote as, specified by
* VoterMemberId
, must be in the same Amazon Web Services account as the principal that calls the
* action.
*
* Applies only to Hyperledger Fabric. *
* * @param voteOnProposalRequest * @return Result of the VoteOnProposal operation returned by the service. * @throws InvalidRequestException * The action or operation requested is invalid. Verify that the action is typed correctly. * @throws IllegalActionException * @throws AccessDeniedException * You don't have sufficient access to perform this action. * @throws ResourceNotFoundException * A requested resource doesn't exist. It may have been deleted or referenced incorrectly. * @throws ThrottlingException * The request or operation couldn't be performed because a service is throttling requests. The most common * source of throttling errors is creating resources that exceed your service limit for this resource type. * Request a limit increase or delete unused resources if possible. * @throws InternalServiceErrorException * The request processing has failed because of an unknown error, exception or failure. * @sample AmazonManagedBlockchain.VoteOnProposal * @see AWS API Documentation */ @Override public VoteOnProposalResult voteOnProposal(VoteOnProposalRequest request) { request = beforeClientExecution(request); return executeVoteOnProposal(request); } @SdkInternalApi final VoteOnProposalResult executeVoteOnProposal(VoteOnProposalRequest voteOnProposalRequest) { ExecutionContext executionContext = createExecutionContext(voteOnProposalRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* 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 the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private