Interface CodeGuruSecurityAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder() method.The asynchronous client performs non-blocking I/O when configured with any
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionbatchGetFindings(Consumer<BatchGetFindingsRequest.Builder> batchGetFindingsRequest) Returns a list of requested findings from standard scans.batchGetFindings(BatchGetFindingsRequest batchGetFindingsRequest) Returns a list of requested findings from standard scans.builder()Create a builder that can be used to configure and create aCodeGuruSecurityAsyncClient.static CodeGuruSecurityAsyncClientcreate()Create aCodeGuruSecurityAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CompletableFuture<CreateScanResponse> createScan(Consumer<CreateScanRequest.Builder> createScanRequest) Use to create a scan using code uploaded to an Amazon S3 bucket.default CompletableFuture<CreateScanResponse> createScan(CreateScanRequest createScanRequest) Use to create a scan using code uploaded to an Amazon S3 bucket.default CompletableFuture<CreateUploadUrlResponse> createUploadUrl(Consumer<CreateUploadUrlRequest.Builder> createUploadUrlRequest) Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the uploaded resource.default CompletableFuture<CreateUploadUrlResponse> createUploadUrl(CreateUploadUrlRequest createUploadUrlRequest) Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the uploaded resource.getAccountConfiguration(Consumer<GetAccountConfigurationRequest.Builder> getAccountConfigurationRequest) Use to get the encryption configuration for an account.getAccountConfiguration(GetAccountConfigurationRequest getAccountConfigurationRequest) Use to get the encryption configuration for an account.default CompletableFuture<GetFindingsResponse> getFindings(Consumer<GetFindingsRequest.Builder> getFindingsRequest) Returns a list of all findings generated by a particular scan.default CompletableFuture<GetFindingsResponse> getFindings(GetFindingsRequest getFindingsRequest) Returns a list of all findings generated by a particular scan.default GetFindingsPublishergetFindingsPaginator(Consumer<GetFindingsRequest.Builder> getFindingsRequest) This is a variant ofgetFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation.default GetFindingsPublishergetFindingsPaginator(GetFindingsRequest getFindingsRequest) This is a variant ofgetFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation.getMetricsSummary(Consumer<GetMetricsSummaryRequest.Builder> getMetricsSummaryRequest) 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.getMetricsSummary(GetMetricsSummaryRequest getMetricsSummaryRequest) 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.default CompletableFuture<GetScanResponse> getScan(Consumer<GetScanRequest.Builder> getScanRequest) Returns details about a scan, including whether or not a scan has completed.default CompletableFuture<GetScanResponse> getScan(GetScanRequest getScanRequest) Returns details about a scan, including whether or not a scan has completed.listFindingsMetrics(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest) Returns metrics about all findings in an account within a specified time range.listFindingsMetrics(ListFindingsMetricsRequest listFindingsMetricsRequest) Returns metrics about all findings in an account within a specified time range.default ListFindingsMetricsPublisherlistFindingsMetricsPaginator(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest) This is a variant oflistFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation.default ListFindingsMetricsPublisherlistFindingsMetricsPaginator(ListFindingsMetricsRequest listFindingsMetricsRequest) This is a variant oflistFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation.default CompletableFuture<ListScansResponse> listScans(Consumer<ListScansRequest.Builder> listScansRequest) Returns a list of all scans in an account.default CompletableFuture<ListScansResponse> listScans(ListScansRequest listScansRequest) Returns a list of all scans in an account.default ListScansPublisherlistScansPaginator(Consumer<ListScansRequest.Builder> listScansRequest) This is a variant oflistScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation.default ListScansPublisherlistScansPaginator(ListScansRequest listScansRequest) This is a variant oflistScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Returns a list of all tags associated with a scan.listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Returns a list of all tags associated with a scan.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Use to add one or more tags to an existing scan.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) Use to add one or more tags to an existing scan.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Use to remove one or more tags from an existing scan.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Use to remove one or more tags from an existing scan.updateAccountConfiguration(Consumer<UpdateAccountConfigurationRequest.Builder> updateAccountConfigurationRequest) Use to update the encryption configuration for an account.updateAccountConfiguration(UpdateAccountConfigurationRequest updateAccountConfigurationRequest) Use to update the encryption configuration for an account.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
batchGetFindings
default CompletableFuture<BatchGetFindingsResponse> batchGetFindings(BatchGetFindingsRequest batchGetFindingsRequest) Returns a list of requested findings from standard scans.
- Parameters:
batchGetFindingsRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
batchGetFindings
default CompletableFuture<BatchGetFindingsResponse> batchGetFindings(Consumer<BatchGetFindingsRequest.Builder> batchGetFindingsRequest) Returns a list of requested findings from standard scans.
This is a convenience which creates an instance of the
BatchGetFindingsRequest.Builderavoiding the need to create one manually viaBatchGetFindingsRequest.builder()- Parameters:
batchGetFindingsRequest- AConsumerthat will call methods onBatchGetFindingsRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
createScan
Use to create a scan using code uploaded to an Amazon S3 bucket.
- Parameters:
createScanRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
createScan
default CompletableFuture<CreateScanResponse> createScan(Consumer<CreateScanRequest.Builder> createScanRequest) Use to create a scan using code uploaded to an Amazon S3 bucket.
This is a convenience which creates an instance of the
CreateScanRequest.Builderavoiding the need to create one manually viaCreateScanRequest.builder()- Parameters:
createScanRequest- AConsumerthat will call methods onCreateScanRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
createUploadUrl
default CompletableFuture<CreateUploadUrlResponse> createUploadUrl(CreateUploadUrlRequest createUploadUrlRequest) 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.
- Parameters:
createUploadUrlRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
createUploadUrl
default CompletableFuture<CreateUploadUrlResponse> createUploadUrl(Consumer<CreateUploadUrlRequest.Builder> createUploadUrlRequest) 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
CreateUploadUrlRequest.Builderavoiding the need to create one manually viaCreateUploadUrlRequest.builder()- Parameters:
createUploadUrlRequest- AConsumerthat will call methods onCreateUploadUrlRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getAccountConfiguration
default CompletableFuture<GetAccountConfigurationResponse> getAccountConfiguration(GetAccountConfigurationRequest getAccountConfigurationRequest) Use to get the encryption configuration for an account.
- Parameters:
getAccountConfigurationRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getAccountConfiguration
default CompletableFuture<GetAccountConfigurationResponse> getAccountConfiguration(Consumer<GetAccountConfigurationRequest.Builder> getAccountConfigurationRequest) Use to get the encryption configuration for an account.
This is a convenience which creates an instance of the
GetAccountConfigurationRequest.Builderavoiding the need to create one manually viaGetAccountConfigurationRequest.builder()- Parameters:
getAccountConfigurationRequest- AConsumerthat will call methods onGetAccountConfigurationRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getFindings
Returns a list of all findings generated by a particular scan.
- Parameters:
getFindingsRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getFindings
default CompletableFuture<GetFindingsResponse> getFindings(Consumer<GetFindingsRequest.Builder> getFindingsRequest) Returns a list of all findings generated by a particular scan.
This is a convenience which creates an instance of the
GetFindingsRequest.Builderavoiding the need to create one manually viaGetFindingsRequest.builder()- Parameters:
getFindingsRequest- AConsumerthat will call methods onGetFindingsRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getFindingsPaginator
This is a variant of
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
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse response) { //... }; });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
getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation.- Parameters:
getFindingsRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getFindingsPaginator
default GetFindingsPublisher getFindingsPaginator(Consumer<GetFindingsRequest.Builder> getFindingsRequest) This is a variant of
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
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse response) { //... }; });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
getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation.
This is a convenience which creates an instance of the
GetFindingsRequest.Builderavoiding the need to create one manually viaGetFindingsRequest.builder()- Parameters:
getFindingsRequest- AConsumerthat will call methods onGetFindingsRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getMetricsSummary
default CompletableFuture<GetMetricsSummaryResponse> getMetricsSummary(GetMetricsSummaryRequest getMetricsSummaryRequest) 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.
- Parameters:
getMetricsSummaryRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getMetricsSummary
default CompletableFuture<GetMetricsSummaryResponse> getMetricsSummary(Consumer<GetMetricsSummaryRequest.Builder> getMetricsSummaryRequest) 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
GetMetricsSummaryRequest.Builderavoiding the need to create one manually viaGetMetricsSummaryRequest.builder()- Parameters:
getMetricsSummaryRequest- AConsumerthat will call methods onGetMetricsSummaryRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getScan
Returns details about a scan, including whether or not a scan has completed.
- Parameters:
getScanRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
getScan
Returns details about a scan, including whether or not a scan has completed.
This is a convenience which creates an instance of the
GetScanRequest.Builderavoiding the need to create one manually viaGetScanRequest.builder()- Parameters:
getScanRequest- AConsumerthat will call methods onGetScanRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listFindingsMetrics
default CompletableFuture<ListFindingsMetricsResponse> listFindingsMetrics(ListFindingsMetricsRequest listFindingsMetricsRequest) Returns metrics about all findings in an account within a specified time range.
- Parameters:
listFindingsMetricsRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listFindingsMetrics
default CompletableFuture<ListFindingsMetricsResponse> listFindingsMetrics(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest) Returns metrics about all findings in an account within a specified time range.
This is a convenience which creates an instance of the
ListFindingsMetricsRequest.Builderavoiding the need to create one manually viaListFindingsMetricsRequest.builder()- Parameters:
listFindingsMetricsRequest- AConsumerthat will call methods onListFindingsMetricsRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listFindingsMetricsPaginator
default ListFindingsMetricsPublisher listFindingsMetricsPaginator(ListFindingsMetricsRequest listFindingsMetricsRequest) This is a variant of
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
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse response) { //... }; });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
listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation.- Parameters:
listFindingsMetricsRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listFindingsMetricsPaginator
default ListFindingsMetricsPublisher listFindingsMetricsPaginator(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest) This is a variant of
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
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse response) { //... }; });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
listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation.
This is a convenience which creates an instance of the
ListFindingsMetricsRequest.Builderavoiding the need to create one manually viaListFindingsMetricsRequest.builder()- Parameters:
listFindingsMetricsRequest- AConsumerthat will call methods onListFindingsMetricsRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listScans
Returns a list of all scans in an account. Does not return
EXPRESSscans.- Parameters:
listScansRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listScans
default CompletableFuture<ListScansResponse> listScans(Consumer<ListScansRequest.Builder> listScansRequest) Returns a list of all scans in an account. Does not return
EXPRESSscans.
This is a convenience which creates an instance of the
ListScansRequest.Builderavoiding the need to create one manually viaListScansRequest.builder()- Parameters:
listScansRequest- AConsumerthat will call methods onListScansRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listScansPaginator
This is a variant of
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
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse response) { //... }; });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
listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation.- Parameters:
listScansRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listScansPaginator
This is a variant of
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
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse response) { //... }; });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
listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation.
This is a convenience which creates an instance of the
ListScansRequest.Builderavoiding the need to create one manually viaListScansRequest.builder()- Parameters:
listScansRequest- AConsumerthat will call methods onListScansRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Returns a list of all tags associated with a scan.
- Parameters:
listTagsForResourceRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Returns a list of all tags associated with a scan.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
tagResource
Use to add one or more tags to an existing scan.
- Parameters:
tagResourceRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Use to add one or more tags to an existing scan.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Use to remove one or more tags from an existing scan.
- Parameters:
untagResourceRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Use to remove one or more tags from an existing scan.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
updateAccountConfiguration
default CompletableFuture<UpdateAccountConfigurationResponse> updateAccountConfiguration(UpdateAccountConfigurationRequest updateAccountConfigurationRequest) Use to update the encryption configuration for an account.
- Parameters:
updateAccountConfigurationRequest-- Returns:
- 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 invokeThrowable.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.
- See Also:
-
updateAccountConfiguration
default CompletableFuture<UpdateAccountConfigurationResponse> updateAccountConfiguration(Consumer<UpdateAccountConfigurationRequest.Builder> updateAccountConfigurationRequest) Use to update the encryption configuration for an account.
This is a convenience which creates an instance of the
UpdateAccountConfigurationRequest.Builderavoiding the need to create one manually viaUpdateAccountConfigurationRequest.builder()- Parameters:
updateAccountConfigurationRequest- AConsumerthat will call methods onUpdateAccountConfigurationRequest.Builderto create a request.- Returns:
- 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 invokeThrowable.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.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aCodeGuruSecurityAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aCodeGuruSecurityAsyncClient.
-