All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.apigatewaymanagementapi.ApiGatewayManagementApiAsyncClient Maven / Gradle / Ivy

/*
 * Copyright 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 software.amazon.awssdk.services.apigatewaymanagementapi;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.services.apigatewaymanagementapi.model.DeleteConnectionRequest;
import software.amazon.awssdk.services.apigatewaymanagementapi.model.DeleteConnectionResponse;
import software.amazon.awssdk.services.apigatewaymanagementapi.model.GetConnectionRequest;
import software.amazon.awssdk.services.apigatewaymanagementapi.model.GetConnectionResponse;
import software.amazon.awssdk.services.apigatewaymanagementapi.model.PostToConnectionRequest;
import software.amazon.awssdk.services.apigatewaymanagementapi.model.PostToConnectionResponse;

/**
 * Service client for accessing AmazonApiGatewayManagementApi asynchronously. This can be created using the static
 * {@link #builder()} method.
 *
 * 

* The Amazon API Gateway Management API allows you to directly manage runtime aspects of your deployed APIs. To use it, * you must explicitly set the SDK's endpoint to point to the endpoint of your deployed API. The endpoint will be of the * form https://{api-id}.execute-api.{region}.amazonaws.com/{stage}, or will be the endpoint corresponding to your API's * custom domain and base path, if applicable. *

*/ @Generated("software.amazon.awssdk:codegen") public interface ApiGatewayManagementApiAsyncClient extends SdkClient { String SERVICE_NAME = "execute-api"; /** * Create a {@link ApiGatewayManagementApiAsyncClient} with the region loaded from the * {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the * {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}. */ static ApiGatewayManagementApiAsyncClient create() { return builder().build(); } /** * Create a builder that can be used to configure and create a {@link ApiGatewayManagementApiAsyncClient}. */ static ApiGatewayManagementApiAsyncClientBuilder builder() { return new DefaultApiGatewayManagementApiAsyncClientBuilder(); } /** *

* Delete the connection with the provided id. *

* * @param deleteConnectionRequest * @return A Java Future containing the result of the DeleteConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • GoneException The connection with the provided id no longer exists.
  • *
  • LimitExceededException The client is sending more than the allowed number of requests per unit of * time or the WebSocket client side buffer is full.
  • *
  • ForbiddenException The caller is not authorized to invoke this operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ApiGatewayManagementApiException Base class for all service exceptions. Unknown exceptions will be * thrown as an instance of this type.
  • *
* @sample ApiGatewayManagementApiAsyncClient.DeleteConnection * @see AWS API Documentation */ default CompletableFuture deleteConnection(DeleteConnectionRequest deleteConnectionRequest) { throw new UnsupportedOperationException(); } /** *

* Delete the connection with the provided id. *

*
*

* This is a convenience which creates an instance of the {@link DeleteConnectionRequest.Builder} avoiding the need * to create one manually via {@link DeleteConnectionRequest#builder()} *

* * @param deleteConnectionRequest * A {@link Consumer} that will call methods on {@link DeleteConnectionRequest.Builder} to create a request. * @return A Java Future containing the result of the DeleteConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • GoneException The connection with the provided id no longer exists.
  • *
  • LimitExceededException The client is sending more than the allowed number of requests per unit of * time or the WebSocket client side buffer is full.
  • *
  • ForbiddenException The caller is not authorized to invoke this operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ApiGatewayManagementApiException Base class for all service exceptions. Unknown exceptions will be * thrown as an instance of this type.
  • *
* @sample ApiGatewayManagementApiAsyncClient.DeleteConnection * @see AWS API Documentation */ default CompletableFuture deleteConnection( Consumer deleteConnectionRequest) { return deleteConnection(DeleteConnectionRequest.builder().applyMutation(deleteConnectionRequest).build()); } /** *

* Get information about the connection with the provided id. *

* * @param getConnectionRequest * @return A Java Future containing the result of the GetConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • GoneException The connection with the provided id no longer exists.
  • *
  • LimitExceededException The client is sending more than the allowed number of requests per unit of * time or the WebSocket client side buffer is full.
  • *
  • ForbiddenException The caller is not authorized to invoke this operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ApiGatewayManagementApiException Base class for all service exceptions. Unknown exceptions will be * thrown as an instance of this type.
  • *
* @sample ApiGatewayManagementApiAsyncClient.GetConnection * @see AWS API Documentation */ default CompletableFuture getConnection(GetConnectionRequest getConnectionRequest) { throw new UnsupportedOperationException(); } /** *

* Get information about the connection with the provided id. *

*
*

* This is a convenience which creates an instance of the {@link GetConnectionRequest.Builder} avoiding the need to * create one manually via {@link GetConnectionRequest#builder()} *

* * @param getConnectionRequest * A {@link Consumer} that will call methods on {@link GetConnectionRequest.Builder} to create a request. * @return A Java Future containing the result of the GetConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • GoneException The connection with the provided id no longer exists.
  • *
  • LimitExceededException The client is sending more than the allowed number of requests per unit of * time or the WebSocket client side buffer is full.
  • *
  • ForbiddenException The caller is not authorized to invoke this operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ApiGatewayManagementApiException Base class for all service exceptions. Unknown exceptions will be * thrown as an instance of this type.
  • *
* @sample ApiGatewayManagementApiAsyncClient.GetConnection * @see AWS API Documentation */ default CompletableFuture getConnection(Consumer getConnectionRequest) { return getConnection(GetConnectionRequest.builder().applyMutation(getConnectionRequest).build()); } /** *

* Sends the provided data to the specified connection. *

* * @param postToConnectionRequest * @return A Java Future containing the result of the PostToConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • GoneException The connection with the provided id no longer exists.
  • *
  • LimitExceededException The client is sending more than the allowed number of requests per unit of * time or the WebSocket client side buffer is full.
  • *
  • PayloadTooLargeException The data has exceeded the maximum size allowed.
  • *
  • ForbiddenException The caller is not authorized to invoke this operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ApiGatewayManagementApiException Base class for all service exceptions. Unknown exceptions will be * thrown as an instance of this type.
  • *
* @sample ApiGatewayManagementApiAsyncClient.PostToConnection * @see AWS API Documentation */ default CompletableFuture postToConnection(PostToConnectionRequest postToConnectionRequest) { throw new UnsupportedOperationException(); } /** *

* Sends the provided data to the specified connection. *

*
*

* This is a convenience which creates an instance of the {@link PostToConnectionRequest.Builder} avoiding the need * to create one manually via {@link PostToConnectionRequest#builder()} *

* * @param postToConnectionRequest * A {@link Consumer} that will call methods on {@link PostToConnectionRequest.Builder} to create a request. * @return A Java Future containing the result of the PostToConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • GoneException The connection with the provided id no longer exists.
  • *
  • LimitExceededException The client is sending more than the allowed number of requests per unit of * time or the WebSocket client side buffer is full.
  • *
  • PayloadTooLargeException The data has exceeded the maximum size allowed.
  • *
  • ForbiddenException The caller is not authorized to invoke this operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • ApiGatewayManagementApiException Base class for all service exceptions. Unknown exceptions will be * thrown as an instance of this type.
  • *
* @sample ApiGatewayManagementApiAsyncClient.PostToConnection * @see AWS API Documentation */ default CompletableFuture postToConnection( Consumer postToConnectionRequest) { return postToConnection(PostToConnectionRequest.builder().applyMutation(postToConnectionRequest).build()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy