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

software.amazon.awssdk.services.codegurusecurity.CodeGuruSecurityAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Code Guru Security module holds the client classes that are used for communicating with Code Guru Security.

There is a newer version: 2.29.15
Show newest version
/*
 * 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.codegurusecurity;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.awscore.AwsClient;
import software.amazon.awssdk.services.codegurusecurity.model.BatchGetFindingsRequest;
import software.amazon.awssdk.services.codegurusecurity.model.BatchGetFindingsResponse;
import software.amazon.awssdk.services.codegurusecurity.model.CreateScanRequest;
import software.amazon.awssdk.services.codegurusecurity.model.CreateScanResponse;
import software.amazon.awssdk.services.codegurusecurity.model.CreateUploadUrlRequest;
import software.amazon.awssdk.services.codegurusecurity.model.CreateUploadUrlResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetAccountConfigurationRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetAccountConfigurationResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetMetricsSummaryRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetMetricsSummaryResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetScanRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetScanResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest;
import software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest;
import software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.codegurusecurity.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.codegurusecurity.model.TagResourceRequest;
import software.amazon.awssdk.services.codegurusecurity.model.TagResourceResponse;
import software.amazon.awssdk.services.codegurusecurity.model.UntagResourceRequest;
import software.amazon.awssdk.services.codegurusecurity.model.UntagResourceResponse;
import software.amazon.awssdk.services.codegurusecurity.model.UpdateAccountConfigurationRequest;
import software.amazon.awssdk.services.codegurusecurity.model.UpdateAccountConfigurationResponse;
import software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher;
import software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher;
import software.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher;

/**
 * Service client for accessing Amazon CodeGuru Security asynchronously. This can be created using the static
 * {@link #builder()} method.The asynchronous client performs non-blocking I/O when configured with any
 * {@code SdkAsyncHttpClient} supported in the SDK. However, full non-blocking is not guaranteed as the async client may
 * perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
 * call.
 *
 * 
 * 

* Amazon CodeGuru Security is in preview release and is subject to change. *

*
*

* This section provides documentation for the Amazon CodeGuru Security API operations. CodeGuru Security is a service * that uses program analysis and machine learning to detect security policy violations and vulnerabilities, and * recommends ways to address these security risks. *

*

* By proactively detecting and providing recommendations for addressing security risks, CodeGuru Security improves the * overall security of your application code. For more information about CodeGuru Security, see the Amazon CodeGuru * Security User Guide. *

*/ @Generated("software.amazon.awssdk:codegen") @SdkPublicApi @ThreadSafe public interface CodeGuruSecurityAsyncClient extends AwsClient { String SERVICE_NAME = "codeguru-security"; /** * Value for looking up the service's metadata from the * {@link software.amazon.awssdk.regions.ServiceMetadataProvider}. */ String SERVICE_METADATA_ID = "codeguru-security"; /** *

* Returns a list of requested findings from standard scans. *

* * @param batchGetFindingsRequest * @return A Java Future containing the result of the BatchGetFindings operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.BatchGetFindings * @see AWS API Documentation */ default CompletableFuture batchGetFindings(BatchGetFindingsRequest batchGetFindingsRequest) { throw new UnsupportedOperationException(); } /** *

* Returns a list of requested findings from standard scans. *

*
*

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

* * @param batchGetFindingsRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.BatchGetFindingsRequest.Builder} to create a * request. * @return A Java Future containing the result of the BatchGetFindings operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.BatchGetFindings * @see AWS API Documentation */ default CompletableFuture batchGetFindings( Consumer batchGetFindingsRequest) { return batchGetFindings(BatchGetFindingsRequest.builder().applyMutation(batchGetFindingsRequest).build()); } /** *

* Use to create a scan using code uploaded to an Amazon S3 bucket. *

* * @param createScanRequest * @return A Java Future containing the result of the CreateScan operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.CreateScan * @see AWS * API Documentation */ default CompletableFuture createScan(CreateScanRequest createScanRequest) { throw new UnsupportedOperationException(); } /** *

* Use to create a scan using code uploaded to an Amazon S3 bucket. *

*
*

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

* * @param createScanRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.CreateScanRequest.Builder} to create a * request. * @return A Java Future containing the result of the CreateScan operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.CreateScan * @see AWS * API Documentation */ default CompletableFuture createScan(Consumer createScanRequest) { return createScan(CreateScanRequest.builder().applyMutation(createScanRequest).build()); } /** *

* Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the * uploaded resource. *

*

* You can upload your code resource to the URL with the request headers using any HTTP client. *

* * @param createUploadUrlRequest * @return A Java Future containing the result of the CreateUploadUrl operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.CreateUploadUrl * @see AWS API Documentation */ default CompletableFuture createUploadUrl(CreateUploadUrlRequest createUploadUrlRequest) { throw new UnsupportedOperationException(); } /** *

* Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the * uploaded resource. *

*

* You can upload your code resource to the URL with the request headers using any HTTP client. *

*
*

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

* * @param createUploadUrlRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.CreateUploadUrlRequest.Builder} to create a * request. * @return A Java Future containing the result of the CreateUploadUrl operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.CreateUploadUrl * @see AWS API Documentation */ default CompletableFuture createUploadUrl( Consumer createUploadUrlRequest) { return createUploadUrl(CreateUploadUrlRequest.builder().applyMutation(createUploadUrlRequest).build()); } /** *

* Use to get the encryption configuration for an account. *

* * @param getAccountConfigurationRequest * @return A Java Future containing the result of the GetAccountConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetAccountConfiguration * @see AWS API Documentation */ default CompletableFuture getAccountConfiguration( GetAccountConfigurationRequest getAccountConfigurationRequest) { throw new UnsupportedOperationException(); } /** *

* Use to get the encryption configuration for an account. *

*
*

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

* * @param getAccountConfigurationRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.GetAccountConfigurationRequest.Builder} to * create a request. * @return A Java Future containing the result of the GetAccountConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetAccountConfiguration * @see AWS API Documentation */ default CompletableFuture getAccountConfiguration( Consumer getAccountConfigurationRequest) { return getAccountConfiguration(GetAccountConfigurationRequest.builder().applyMutation(getAccountConfigurationRequest) .build()); } /** *

* Returns a list of all findings generated by a particular scan. *

* * @param getFindingsRequest * @return A Java Future containing the result of the GetFindings operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetFindings * @see AWS * API Documentation */ default CompletableFuture getFindings(GetFindingsRequest getFindingsRequest) { throw new UnsupportedOperationException(); } /** *

* Returns a list of all findings generated by a particular scan. *

*
*

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

* * @param getFindingsRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest.Builder} to create a * request. * @return A Java Future containing the result of the GetFindings operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetFindings * @see AWS * API Documentation */ default CompletableFuture getFindings(Consumer getFindingsRequest) { return getFindings(GetFindingsRequest.builder().applyMutation(getFindingsRequest).build()); } /** *

* This is a variant of * {@link #getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)} operation. *

* * @param getFindingsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetFindings * @see AWS * API Documentation */ default GetFindingsPublisher getFindingsPaginator(GetFindingsRequest getFindingsRequest) { return new GetFindingsPublisher(this, getFindingsRequest); } /** *

* This is a variant of * {@link #getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)} operation. *

*
*

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

* * @param getFindingsRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest.Builder} to create a * request. * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetFindings * @see AWS * API Documentation */ default GetFindingsPublisher getFindingsPaginator(Consumer getFindingsRequest) { return getFindingsPaginator(GetFindingsRequest.builder().applyMutation(getFindingsRequest).build()); } /** *

* Returns a summary of metrics for an account from a specified date, including number of open findings, the * categories with most findings, the scans with most open findings, and scans with most open critical findings. *

* * @param getMetricsSummaryRequest * @return A Java Future containing the result of the GetMetricsSummary operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetMetricsSummary * @see AWS API Documentation */ default CompletableFuture getMetricsSummary(GetMetricsSummaryRequest getMetricsSummaryRequest) { throw new UnsupportedOperationException(); } /** *

* Returns a summary of metrics for an account from a specified date, including number of open findings, the * categories with most findings, the scans with most open findings, and scans with most open critical findings. *

*
*

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

* * @param getMetricsSummaryRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.GetMetricsSummaryRequest.Builder} to create * a request. * @return A Java Future containing the result of the GetMetricsSummary operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetMetricsSummary * @see AWS API Documentation */ default CompletableFuture getMetricsSummary( Consumer getMetricsSummaryRequest) { return getMetricsSummary(GetMetricsSummaryRequest.builder().applyMutation(getMetricsSummaryRequest).build()); } /** *

* Returns details about a scan, including whether or not a scan has completed. *

* * @param getScanRequest * @return A Java Future containing the result of the GetScan operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetScan * @see AWS API * Documentation */ default CompletableFuture getScan(GetScanRequest getScanRequest) { throw new UnsupportedOperationException(); } /** *

* Returns details about a scan, including whether or not a scan has completed. *

*
*

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

* * @param getScanRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.GetScanRequest.Builder} to create a request. * @return A Java Future containing the result of the GetScan operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.GetScan * @see AWS API * Documentation */ default CompletableFuture getScan(Consumer getScanRequest) { return getScan(GetScanRequest.builder().applyMutation(getScanRequest).build()); } /** *

* Returns metrics about all findings in an account within a specified time range. *

* * @param listFindingsMetricsRequest * @return A Java Future containing the result of the ListFindingsMetrics operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListFindingsMetrics * @see AWS API Documentation */ default CompletableFuture listFindingsMetrics( ListFindingsMetricsRequest listFindingsMetricsRequest) { throw new UnsupportedOperationException(); } /** *

* Returns metrics about all findings in an account within a specified time range. *

*
*

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

* * @param listFindingsMetricsRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest.Builder} to * create a request. * @return A Java Future containing the result of the ListFindingsMetrics operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListFindingsMetrics * @see AWS API Documentation */ default CompletableFuture listFindingsMetrics( Consumer listFindingsMetricsRequest) { return listFindingsMetrics(ListFindingsMetricsRequest.builder().applyMutation(listFindingsMetricsRequest).build()); } /** *

* This is a variant of * {@link #listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)} * operation. *

* * @param listFindingsMetricsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListFindingsMetrics * @see AWS API Documentation */ default ListFindingsMetricsPublisher listFindingsMetricsPaginator(ListFindingsMetricsRequest listFindingsMetricsRequest) { return new ListFindingsMetricsPublisher(this, listFindingsMetricsRequest); } /** *

* This is a variant of * {@link #listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)} * operation. *

*
*

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

* * @param listFindingsMetricsRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest.Builder} to * create a request. * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListFindingsMetrics * @see AWS API Documentation */ default ListFindingsMetricsPublisher listFindingsMetricsPaginator( Consumer listFindingsMetricsRequest) { return listFindingsMetricsPaginator(ListFindingsMetricsRequest.builder().applyMutation(listFindingsMetricsRequest) .build()); } /** *

* Returns a list of all scans in an account. Does not return EXPRESS scans. *

* * @param listScansRequest * @return A Java Future containing the result of the ListScans operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListScans * @see AWS * API Documentation */ default CompletableFuture listScans(ListScansRequest listScansRequest) { throw new UnsupportedOperationException(); } /** *

* Returns a list of all scans in an account. Does not return EXPRESS scans. *

*
*

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

* * @param listScansRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest.Builder} to create a * request. * @return A Java Future containing the result of the ListScans operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListScans * @see AWS * API Documentation */ default CompletableFuture listScans(Consumer listScansRequest) { return listScans(ListScansRequest.builder().applyMutation(listScansRequest).build()); } /** *

* This is a variant of {@link #listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)} operation. *

* * @param listScansRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListScans * @see AWS * API Documentation */ default ListScansPublisher listScansPaginator(ListScansRequest listScansRequest) { return new ListScansPublisher(this, listScansRequest); } /** *

* This is a variant of {@link #listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)} operation. *

*
*

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

* * @param listScansRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest.Builder} to create a * request. * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListScans * @see AWS * API Documentation */ default ListScansPublisher listScansPaginator(Consumer listScansRequest) { return listScansPaginator(ListScansRequest.builder().applyMutation(listScansRequest).build()); } /** *

* Returns a list of all tags associated with a scan. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListTagsForResource * @see AWS API Documentation */ default CompletableFuture listTagsForResource( ListTagsForResourceRequest listTagsForResourceRequest) { throw new UnsupportedOperationException(); } /** *

* Returns a list of all tags associated with a scan. *

*
*

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

* * @param listTagsForResourceRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.ListTagsForResourceRequest.Builder} to * create a request. * @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.ListTagsForResource * @see AWS API Documentation */ default CompletableFuture listTagsForResource( Consumer listTagsForResourceRequest) { return listTagsForResource(ListTagsForResourceRequest.builder().applyMutation(listTagsForResourceRequest).build()); } /** *

* Use to add one or more tags to an existing scan. *

* * @param tagResourceRequest * @return A Java Future containing the result of the TagResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.TagResource * @see AWS * API Documentation */ default CompletableFuture tagResource(TagResourceRequest tagResourceRequest) { throw new UnsupportedOperationException(); } /** *

* Use to add one or more tags to an existing scan. *

*
*

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

* * @param tagResourceRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.TagResourceRequest.Builder} to create a * request. * @return A Java Future containing the result of the TagResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.TagResource * @see AWS * API Documentation */ default CompletableFuture tagResource(Consumer tagResourceRequest) { return tagResource(TagResourceRequest.builder().applyMutation(tagResourceRequest).build()); } /** *

* Use to remove one or more tags from an existing scan. *

* * @param untagResourceRequest * @return A Java Future containing the result of the UntagResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.UntagResource * @see AWS API Documentation */ default CompletableFuture untagResource(UntagResourceRequest untagResourceRequest) { throw new UnsupportedOperationException(); } /** *

* Use to remove one or more tags from an existing scan. *

*
*

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

* * @param untagResourceRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.UntagResourceRequest.Builder} to create a * request. * @return A Java Future containing the result of the UntagResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ConflictException The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.UntagResource * @see AWS API Documentation */ default CompletableFuture untagResource(Consumer untagResourceRequest) { return untagResource(UntagResourceRequest.builder().applyMutation(untagResourceRequest).build()); } /** *

* Use to update the encryption configuration for an account. *

* * @param updateAccountConfigurationRequest * @return A Java Future containing the result of the UpdateAccountConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.UpdateAccountConfiguration * @see AWS API Documentation */ default CompletableFuture updateAccountConfiguration( UpdateAccountConfigurationRequest updateAccountConfigurationRequest) { throw new UnsupportedOperationException(); } /** *

* Use to update the encryption configuration for an account. *

*
*

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

* * @param updateAccountConfigurationRequest * A {@link Consumer} that will call methods on * {@link software.amazon.awssdk.services.codegurusecurity.model.UpdateAccountConfigurationRequest.Builder} * to create a request. * @return A Java Future containing the result of the UpdateAccountConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InternalServerException The server encountered an internal error and is unable to complete the * request.
  • *
  • ResourceNotFoundException The resource specified in the request was not found.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the specified constraints.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • CodeGuruSecurityException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample CodeGuruSecurityAsyncClient.UpdateAccountConfiguration * @see AWS API Documentation */ default CompletableFuture updateAccountConfiguration( Consumer updateAccountConfigurationRequest) { return updateAccountConfiguration(UpdateAccountConfigurationRequest.builder() .applyMutation(updateAccountConfigurationRequest).build()); } @Override default CodeGuruSecurityServiceClientConfiguration serviceClientConfiguration() { throw new UnsupportedOperationException(); } /** * Create a {@link CodeGuruSecurityAsyncClient} 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 CodeGuruSecurityAsyncClient create() { return builder().build(); } /** * Create a builder that can be used to configure and create a {@link CodeGuruSecurityAsyncClient}. */ static CodeGuruSecurityAsyncClientBuilder builder() { return new DefaultCodeGuruSecurityAsyncClientBuilder(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy