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
Modifier and TypeFieldDescriptionstatic final String
Value 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 all requested findings.batchGetFindings
(BatchGetFindingsRequest batchGetFindingsRequest) Returns a list of all requested findings.builder()
Create a builder that can be used to configure and create aCodeGuruSecurityAsyncClient
.static CodeGuruSecurityAsyncClient
create()
Create aCodeGuruSecurityAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CompletableFuture
<CreateScanResponse> createScan
(Consumer<CreateScanRequest.Builder> createScanRequest) Use to create a scan using code uploaded to an S3 bucket.default CompletableFuture
<CreateScanResponse> createScan
(CreateScanRequest createScanRequest) Use to create a scan using code uploaded to an S3 bucket.default CompletableFuture
<CreateUploadUrlResponse> createUploadUrl
(Consumer<CreateUploadUrlRequest.Builder> createUploadUrlRequest) Generates a pre-signed URL and request headers used to upload a code resource.default CompletableFuture
<CreateUploadUrlResponse> createUploadUrl
(CreateUploadUrlRequest createUploadUrlRequest) Generates a pre-signed URL and request headers used to upload a code resource.getAccountConfiguration
(Consumer<GetAccountConfigurationRequest.Builder> getAccountConfigurationRequest) Use to get account level configuration.getAccountConfiguration
(GetAccountConfigurationRequest getAccountConfigurationRequest) Use to get account level configuration.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 GetFindingsPublisher
getFindingsPaginator
(Consumer<GetFindingsRequest.Builder> getFindingsRequest) This is a variant ofgetFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)
operation.default GetFindingsPublisher
getFindingsPaginator
(GetFindingsRequest getFindingsRequest) This is a variant ofgetFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)
operation.getMetricsSummary
(Consumer<GetMetricsSummaryRequest.Builder> getMetricsSummaryRequest) Returns top level metrics about 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 top level metrics about 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 ListFindingsMetricsPublisher
listFindingsMetricsPaginator
(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest) This is a variant oflistFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)
operation.default ListFindingsMetricsPublisher
listFindingsMetricsPaginator
(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 the standard scans in an account.default CompletableFuture
<ListScansResponse> listScans
(ListScansRequest listScansRequest) Returns a list of all the standard scans in an account.default ListScansPublisher
listScansPaginator
(Consumer<ListScansRequest.Builder> listScansRequest) This is a variant oflistScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)
operation.default ListScansPublisher
listScansPaginator
(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 account-level configuration with an encryption key.updateAccountConfiguration
(UpdateAccountConfigurationRequest updateAccountConfigurationRequest) Use to update account-level configuration with an encryption key.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods 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 all requested findings.
- 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 all requested findings.
This is a convenience which creates an instance of the
BatchGetFindingsRequest.Builder
avoiding the need to create one manually viaBatchGetFindingsRequest.builder()
- Parameters:
batchGetFindingsRequest
- AConsumer
that will call methods onBatchGetFindingsRequest.Builder
to 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 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 S3 bucket.
This is a convenience which creates an instance of the
CreateScanRequest.Builder
avoiding the need to create one manually viaCreateScanRequest.builder()
- Parameters:
createScanRequest
- AConsumer
that will call methods onCreateScanRequest.Builder
to 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 and request headers used to upload a code resource.
You can upload your code resource to the URL and add 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 and request headers used to upload a code resource.
You can upload your code resource to the URL and add the request headers using any HTTP client.
This is a convenience which creates an instance of the
CreateUploadUrlRequest.Builder
avoiding the need to create one manually viaCreateUploadUrlRequest.builder()
- Parameters:
createUploadUrlRequest
- AConsumer
that will call methods onCreateUploadUrlRequest.Builder
to 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 account level configuration.
- 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 account level configuration.
This is a convenience which creates an instance of the
GetAccountConfigurationRequest.Builder
avoiding the need to create one manually viaGetAccountConfigurationRequest.builder()
- Parameters:
getAccountConfigurationRequest
- AConsumer
that will call methods onGetAccountConfigurationRequest.Builder
to 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.Builder
avoiding the need to create one manually viaGetFindingsRequest.builder()
- Parameters:
getFindingsRequest
- AConsumer
that will call methods onGetFindingsRequest.Builder
to 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 newSubscription
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 methodsoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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 newSubscription
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 methodsoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsPublisher publisher = client.getFindingsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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.Builder
avoiding the need to create one manually viaGetFindingsRequest.builder()
- Parameters:
getFindingsRequest
- AConsumer
that will call methods onGetFindingsRequest.Builder
to 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 top level metrics about 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 top level metrics about 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.Builder
avoiding the need to create one manually viaGetMetricsSummaryRequest.builder()
- Parameters:
getMetricsSummaryRequest
- AConsumer
that will call methods onGetMetricsSummaryRequest.Builder
to 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.
- 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.Builder
avoiding the need to create one manually viaGetScanRequest.builder()
- Parameters:
getScanRequest
- AConsumer
that will call methods onGetScanRequest.Builder
to 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.
- 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.Builder
avoiding the need to create one manually viaListFindingsMetricsRequest.builder()
- Parameters:
listFindingsMetricsRequest
- AConsumer
that will call methods onListFindingsMetricsRequest.Builder
to 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 newSubscription
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 methodsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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 newSubscription
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 methodsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsPublisher publisher = client.listFindingsMetricsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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.Builder
avoiding the need to create one manually viaListFindingsMetricsRequest.builder()
- Parameters:
listFindingsMetricsRequest
- AConsumer
that will call methods onListFindingsMetricsRequest.Builder
to 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 the standard scans in an account. Does not return express scans.
- 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 the standard scans in an account. Does not return express scans.
This is a convenience which creates an instance of the
ListScansRequest.Builder
avoiding the need to create one manually viaListScansRequest.builder()
- Parameters:
listScansRequest
- AConsumer
that will call methods onListScansRequest.Builder
to 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 newSubscription
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 methodsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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 newSubscription
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 methodsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansPublisher publisher = client.listScansPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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.Builder
avoiding the need to create one manually viaListScansRequest.builder()
- Parameters:
listScansRequest
- AConsumer
that will call methods onListScansRequest.Builder
to 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.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to 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.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to 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.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to 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 account-level configuration with an encryption key.
- 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 account-level configuration with an encryption key.
This is a convenience which creates an instance of the
UpdateAccountConfigurationRequest.Builder
avoiding the need to create one manually viaUpdateAccountConfigurationRequest.builder()
- Parameters:
updateAccountConfigurationRequest
- AConsumer
that will call methods onUpdateAccountConfigurationRequest.Builder
to 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:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aCodeGuruSecurityAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aCodeGuruSecurityAsyncClient
.
-