Interface CodeGuruSecurityClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface CodeGuruSecurityClient extends AwsClient
Service client for accessing Amazon CodeGuru Security. This can be created using the staticbuilder()method.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
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default BatchGetFindingsResponsebatchGetFindings(Consumer<BatchGetFindingsRequest.Builder> batchGetFindingsRequest)Returns a list of all requested findings.default BatchGetFindingsResponsebatchGetFindings(BatchGetFindingsRequest batchGetFindingsRequest)Returns a list of all requested findings.static CodeGuruSecurityClientBuilderbuilder()Create a builder that can be used to configure and create aCodeGuruSecurityClient.static CodeGuruSecurityClientcreate()Create aCodeGuruSecurityClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateScanResponsecreateScan(Consumer<CreateScanRequest.Builder> createScanRequest)Use to create a scan using code uploaded to an S3 bucket.default CreateScanResponsecreateScan(CreateScanRequest createScanRequest)Use to create a scan using code uploaded to an S3 bucket.default CreateUploadUrlResponsecreateUploadUrl(Consumer<CreateUploadUrlRequest.Builder> createUploadUrlRequest)Generates a pre-signed URL and request headers used to upload a code resource.default CreateUploadUrlResponsecreateUploadUrl(CreateUploadUrlRequest createUploadUrlRequest)Generates a pre-signed URL and request headers used to upload a code resource.default GetAccountConfigurationResponsegetAccountConfiguration(Consumer<GetAccountConfigurationRequest.Builder> getAccountConfigurationRequest)Use to get account level configuration.default GetAccountConfigurationResponsegetAccountConfiguration(GetAccountConfigurationRequest getAccountConfigurationRequest)Use to get account level configuration.default GetFindingsResponsegetFindings(Consumer<GetFindingsRequest.Builder> getFindingsRequest)Returns a list of all findings generated by a particular scan.default GetFindingsResponsegetFindings(GetFindingsRequest getFindingsRequest)Returns a list of all findings generated by a particular scan.default GetFindingsIterablegetFindingsPaginator(Consumer<GetFindingsRequest.Builder> getFindingsRequest)This is a variant ofgetFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation.default GetFindingsIterablegetFindingsPaginator(GetFindingsRequest getFindingsRequest)This is a variant ofgetFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation.default GetMetricsSummaryResponsegetMetricsSummary(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.default GetMetricsSummaryResponsegetMetricsSummary(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 GetScanResponsegetScan(Consumer<GetScanRequest.Builder> getScanRequest)Returns details about a scan, including whether or not a scan has completed.default GetScanResponsegetScan(GetScanRequest getScanRequest)Returns details about a scan, including whether or not a scan has completed.default ListFindingsMetricsResponselistFindingsMetrics(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest)Returns metrics about all findings in an account within a specified time range.default ListFindingsMetricsResponselistFindingsMetrics(ListFindingsMetricsRequest listFindingsMetricsRequest)Returns metrics about all findings in an account within a specified time range.default ListFindingsMetricsIterablelistFindingsMetricsPaginator(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest)This is a variant oflistFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation.default ListFindingsMetricsIterablelistFindingsMetricsPaginator(ListFindingsMetricsRequest listFindingsMetricsRequest)This is a variant oflistFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation.default ListScansResponselistScans(Consumer<ListScansRequest.Builder> listScansRequest)Returns a list of all the standard scans in an account.default ListScansResponselistScans(ListScansRequest listScansRequest)Returns a list of all the standard scans in an account.default ListScansIterablelistScansPaginator(Consumer<ListScansRequest.Builder> listScansRequest)This is a variant oflistScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation.default ListScansIterablelistScansPaginator(ListScansRequest listScansRequest)This is a variant oflistScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)Returns a list of all tags associated with a scan.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)Returns a list of all tags associated with a scan.default CodeGuruSecurityServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)Use to add one or more tags to an existing scan.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest)Use to add one or more tags to an existing scan.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)Use to remove one or more tags from an existing scan.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest)Use to remove one or more tags from an existing scan.default UpdateAccountConfigurationResponseupdateAccountConfiguration(Consumer<UpdateAccountConfigurationRequest.Builder> updateAccountConfigurationRequest)Use to update account-level configuration with an encryption key.default UpdateAccountConfigurationResponseupdateAccountConfiguration(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 Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
batchGetFindings
default BatchGetFindingsResponse batchGetFindings(BatchGetFindingsRequest batchGetFindingsRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Returns a list of all requested findings.
- Parameters:
batchGetFindingsRequest-- Returns:
- Result of the BatchGetFindings operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
batchGetFindings
default BatchGetFindingsResponse batchGetFindings(Consumer<BatchGetFindingsRequest.Builder> batchGetFindingsRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Returns a list of all requested findings.
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:
- Result of the BatchGetFindings operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
createScan
default CreateScanResponse createScan(CreateScanRequest createScanRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to create a scan using code uploaded to an S3 bucket.
- Parameters:
createScanRequest-- Returns:
- Result of the CreateScan operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
createScan
default CreateScanResponse createScan(Consumer<CreateScanRequest.Builder> createScanRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to create a scan using code uploaded to an 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:
- Result of the CreateScan operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
createUploadUrl
default CreateUploadUrlResponse createUploadUrl(CreateUploadUrlRequest createUploadUrlRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the CreateUploadUrl operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
createUploadUrl
default CreateUploadUrlResponse createUploadUrl(Consumer<CreateUploadUrlRequest.Builder> createUploadUrlRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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.Builderavoiding the need to create one manually viaCreateUploadUrlRequest.builder()- Parameters:
createUploadUrlRequest- AConsumerthat will call methods onCreateUploadUrlRequest.Builderto create a request.- Returns:
- Result of the CreateUploadUrl operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getAccountConfiguration
default GetAccountConfigurationResponse getAccountConfiguration(GetAccountConfigurationRequest getAccountConfigurationRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to get account level configuration.
- Parameters:
getAccountConfigurationRequest-- Returns:
- Result of the GetAccountConfiguration operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getAccountConfiguration
default GetAccountConfigurationResponse getAccountConfiguration(Consumer<GetAccountConfigurationRequest.Builder> getAccountConfigurationRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to get account level configuration.
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:
- Result of the GetAccountConfiguration operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getFindings
default GetFindingsResponse getFindings(GetFindingsRequest getFindingsRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Returns a list of all findings generated by a particular scan.
- Parameters:
getFindingsRequest-- Returns:
- Result of the GetFindings operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getFindings
default GetFindingsResponse getFindings(Consumer<GetFindingsRequest.Builder> getFindingsRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the GetFindings operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getFindingsPaginator
default GetFindingsIterable getFindingsPaginator(GetFindingsRequest getFindingsRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
This is a variant of
getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client.getFindingsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client .getFindingsPaginator(request); for (software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client.getFindingsPaginator(request); responses.iterator().forEachRemaining(....);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 iterable that can be used to iterate through all the response pages.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getFindingsPaginator
default GetFindingsIterable getFindingsPaginator(Consumer<GetFindingsRequest.Builder> getFindingsRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
This is a variant of
getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client.getFindingsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client .getFindingsPaginator(request); for (software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client.getFindingsPaginator(request); responses.iterator().forEachRemaining(....);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 iterable that can be used to iterate through all the response pages.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getMetricsSummary
default GetMetricsSummaryResponse getMetricsSummary(GetMetricsSummaryRequest getMetricsSummaryRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the GetMetricsSummary operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getMetricsSummary
default GetMetricsSummaryResponse getMetricsSummary(Consumer<GetMetricsSummaryRequest.Builder> getMetricsSummaryRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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.Builderavoiding the need to create one manually viaGetMetricsSummaryRequest.builder()- Parameters:
getMetricsSummaryRequest- AConsumerthat will call methods onGetMetricsSummaryRequest.Builderto create a request.- Returns:
- Result of the GetMetricsSummary operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getScan
default GetScanResponse getScan(GetScanRequest getScanRequest) throws InternalServerException, ResourceNotFoundException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Returns details about a scan, including whether or not a scan has completed.
- Parameters:
getScanRequest-- Returns:
- Result of the GetScan operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getScan
default GetScanResponse getScan(Consumer<GetScanRequest.Builder> getScanRequest) throws InternalServerException, ResourceNotFoundException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the GetScan operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listFindingsMetrics
default ListFindingsMetricsResponse listFindingsMetrics(ListFindingsMetricsRequest listFindingsMetricsRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Returns metrics about all findings in an account within a specified time range.
- Parameters:
listFindingsMetricsRequest-- Returns:
- Result of the ListFindingsMetrics operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listFindingsMetrics
default ListFindingsMetricsResponse listFindingsMetrics(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the ListFindingsMetrics operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listFindingsMetricsPaginator
default ListFindingsMetricsIterable listFindingsMetricsPaginator(ListFindingsMetricsRequest listFindingsMetricsRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
This is a variant of
listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client.listFindingsMetricsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client .listFindingsMetricsPaginator(request); for (software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client.listFindingsMetricsPaginator(request); responses.iterator().forEachRemaining(....);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 iterable that can be used to iterate through all the response pages.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listFindingsMetricsPaginator
default ListFindingsMetricsIterable listFindingsMetricsPaginator(Consumer<ListFindingsMetricsRequest.Builder> listFindingsMetricsRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
This is a variant of
listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client.listFindingsMetricsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client .listFindingsMetricsPaginator(request); for (software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client.listFindingsMetricsPaginator(request); responses.iterator().forEachRemaining(....);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 iterable that can be used to iterate through all the response pages.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listScans
default ListScansResponse listScans(ListScansRequest listScansRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Returns a list of all the standard scans in an account. Does not return express scans.
- Parameters:
listScansRequest-- Returns:
- Result of the ListScans operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listScans
default ListScansResponse listScans(Consumer<ListScansRequest.Builder> listScansRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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.Builderavoiding the need to create one manually viaListScansRequest.builder()- Parameters:
listScansRequest- AConsumerthat will call methods onListScansRequest.Builderto create a request.- Returns:
- Result of the ListScans operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listScansPaginator
default ListScansIterable listScansPaginator(ListScansRequest listScansRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
This is a variant of
listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request); for (software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request); responses.iterator().forEachRemaining(....);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 iterable that can be used to iterate through all the response pages.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listScansPaginator
default ListScansIterable listScansPaginator(Consumer<ListScansRequest.Builder> listScansRequest) throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
This is a variant of
listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request); for (software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request); responses.iterator().forEachRemaining(....);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 iterable that can be used to iterate through all the response pages.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Returns a list of all tags associated with a scan.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to add one or more tags to an existing scan.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the TagResource operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to remove one or more tags from an existing scan.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
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:
- Result of the UntagResource operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
updateAccountConfiguration
default UpdateAccountConfigurationResponse updateAccountConfiguration(UpdateAccountConfigurationRequest updateAccountConfigurationRequest) throws InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to update account-level configuration with an encryption key.
- Parameters:
updateAccountConfigurationRequest-- Returns:
- Result of the UpdateAccountConfiguration operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
updateAccountConfiguration
default UpdateAccountConfigurationResponse updateAccountConfiguration(Consumer<UpdateAccountConfigurationRequest.Builder> updateAccountConfigurationRequest) throws InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException
Use to update account-level configuration with an encryption key.
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:
- Result of the UpdateAccountConfiguration operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
create
static CodeGuruSecurityClient create()
Create aCodeGuruSecurityClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static CodeGuruSecurityClientBuilder builder()
Create a builder that can be used to configure and create aCodeGuruSecurityClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default CodeGuruSecurityServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-