software.amazon.awssdk.services.codegurusecurity.CodeGuruSecurityClient Maven / Gradle / Ivy
Show all versions of codegurusecurity Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.codegurusecurity;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.awscore.AwsClient;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.regions.ServiceMetadata;
import software.amazon.awssdk.services.codegurusecurity.model.AccessDeniedException;
import software.amazon.awssdk.services.codegurusecurity.model.BatchGetFindingsRequest;
import software.amazon.awssdk.services.codegurusecurity.model.BatchGetFindingsResponse;
import software.amazon.awssdk.services.codegurusecurity.model.CodeGuruSecurityException;
import software.amazon.awssdk.services.codegurusecurity.model.ConflictException;
import software.amazon.awssdk.services.codegurusecurity.model.CreateScanRequest;
import software.amazon.awssdk.services.codegurusecurity.model.CreateScanResponse;
import software.amazon.awssdk.services.codegurusecurity.model.CreateUploadUrlRequest;
import software.amazon.awssdk.services.codegurusecurity.model.CreateUploadUrlResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetAccountConfigurationRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetAccountConfigurationResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetFindingsResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetMetricsSummaryRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetMetricsSummaryResponse;
import software.amazon.awssdk.services.codegurusecurity.model.GetScanRequest;
import software.amazon.awssdk.services.codegurusecurity.model.GetScanResponse;
import software.amazon.awssdk.services.codegurusecurity.model.InternalServerException;
import software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest;
import software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest;
import software.amazon.awssdk.services.codegurusecurity.model.ListScansResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.codegurusecurity.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ResourceNotFoundException;
import software.amazon.awssdk.services.codegurusecurity.model.TagResourceRequest;
import software.amazon.awssdk.services.codegurusecurity.model.TagResourceResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ThrottlingException;
import software.amazon.awssdk.services.codegurusecurity.model.UntagResourceRequest;
import software.amazon.awssdk.services.codegurusecurity.model.UntagResourceResponse;
import software.amazon.awssdk.services.codegurusecurity.model.UpdateAccountConfigurationRequest;
import software.amazon.awssdk.services.codegurusecurity.model.UpdateAccountConfigurationResponse;
import software.amazon.awssdk.services.codegurusecurity.model.ValidationException;
import software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable;
import software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable;
import software.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable;
/**
* Service client for accessing Amazon CodeGuru Security. This can be created using the static {@link #builder()}
* 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.
*
*/
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
public interface CodeGuruSecurityClient extends AwsClient {
String SERVICE_NAME = "codeguru-security";
/**
* Value for looking up the service's metadata from the
* {@link software.amazon.awssdk.regions.ServiceMetadataProvider}.
*/
String SERVICE_METADATA_ID = "codeguru-security";
/**
*
* Returns a list of requested findings from standard scans.
*
*
* @param batchGetFindingsRequest
* @return Result of the BatchGetFindings operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.BatchGetFindings
* @see AWS API Documentation
*/
default BatchGetFindingsResponse batchGetFindings(BatchGetFindingsRequest batchGetFindingsRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of requested findings from standard scans.
*
*
*
* This is a convenience which creates an instance of the {@link BatchGetFindingsRequest.Builder} avoiding the need
* to create one manually via {@link BatchGetFindingsRequest#builder()}
*
*
* @param batchGetFindingsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.BatchGetFindingsRequest.Builder} to create a
* request.
* @return Result of the BatchGetFindings operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.BatchGetFindings
* @see AWS API Documentation
*/
default BatchGetFindingsResponse batchGetFindings(Consumer batchGetFindingsRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
return batchGetFindings(BatchGetFindingsRequest.builder().applyMutation(batchGetFindingsRequest).build());
}
/**
*
* Use to create a scan using code uploaded to an Amazon S3 bucket.
*
*
* @param createScanRequest
* @return Result of the CreateScan operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.CreateScan
* @see AWS
* API Documentation
*/
default CreateScanResponse createScan(CreateScanRequest createScanRequest) throws InternalServerException, ConflictException,
ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Use to create a scan using code uploaded to an Amazon S3 bucket.
*
*
*
* This is a convenience which creates an instance of the {@link CreateScanRequest.Builder} avoiding the need to
* create one manually via {@link CreateScanRequest#builder()}
*
*
* @param createScanRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.CreateScanRequest.Builder} to create a
* request.
* @return Result of the CreateScan operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.CreateScan
* @see AWS
* API Documentation
*/
default CreateScanResponse createScan(Consumer createScanRequest) throws InternalServerException,
ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException,
AwsServiceException, SdkClientException, CodeGuruSecurityException {
return createScan(CreateScanRequest.builder().applyMutation(createScanRequest).build());
}
/**
*
* Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the
* uploaded resource.
*
*
* You can upload your code resource to the URL with the request headers using any HTTP client.
*
*
* @param createUploadUrlRequest
* @return Result of the CreateUploadUrl operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.CreateUploadUrl
* @see AWS API Documentation
*/
default CreateUploadUrlResponse createUploadUrl(CreateUploadUrlRequest createUploadUrlRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the
* uploaded resource.
*
*
* You can upload your code resource to the URL with the request headers using any HTTP client.
*
*
*
* This is a convenience which creates an instance of the {@link CreateUploadUrlRequest.Builder} avoiding the need
* to create one manually via {@link CreateUploadUrlRequest#builder()}
*
*
* @param createUploadUrlRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.CreateUploadUrlRequest.Builder} to create a
* request.
* @return Result of the CreateUploadUrl operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.CreateUploadUrl
* @see AWS API Documentation
*/
default CreateUploadUrlResponse createUploadUrl(Consumer createUploadUrlRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
return createUploadUrl(CreateUploadUrlRequest.builder().applyMutation(createUploadUrlRequest).build());
}
/**
*
* Use to get the encryption configuration for an account.
*
*
* @param getAccountConfigurationRequest
* @return Result of the GetAccountConfiguration operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetAccountConfiguration
* @see AWS API Documentation
*/
default GetAccountConfigurationResponse getAccountConfiguration(GetAccountConfigurationRequest getAccountConfigurationRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Use to get the encryption configuration for an account.
*
*
*
* This is a convenience which creates an instance of the {@link GetAccountConfigurationRequest.Builder} avoiding
* the need to create one manually via {@link GetAccountConfigurationRequest#builder()}
*
*
* @param getAccountConfigurationRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.GetAccountConfigurationRequest.Builder} to
* create a request.
* @return Result of the GetAccountConfiguration operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetAccountConfiguration
* @see AWS API Documentation
*/
default GetAccountConfigurationResponse getAccountConfiguration(
Consumer getAccountConfigurationRequest) throws InternalServerException,
ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException,
CodeGuruSecurityException {
return getAccountConfiguration(GetAccountConfigurationRequest.builder().applyMutation(getAccountConfigurationRequest)
.build());
}
/**
*
* Returns a list of all findings generated by a particular scan.
*
*
* @param getFindingsRequest
* @return Result of the GetFindings operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetFindings
* @see AWS
* API Documentation
*/
default GetFindingsResponse getFindings(GetFindingsRequest getFindingsRequest) throws InternalServerException,
ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException,
AwsServiceException, SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of all findings generated by a particular scan.
*
*
*
* This is a convenience which creates an instance of the {@link GetFindingsRequest.Builder} avoiding the need to
* create one manually via {@link GetFindingsRequest#builder()}
*
*
* @param getFindingsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest.Builder} to create a
* request.
* @return Result of the GetFindings operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetFindings
* @see AWS
* API Documentation
*/
default GetFindingsResponse getFindings(Consumer getFindingsRequest)
throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException,
ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException {
return getFindings(GetFindingsRequest.builder().applyMutation(getFindingsRequest).build());
}
/**
*
* This is a variant of
* {@link #getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)} operation. The
* return type is a custom 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
*
*
* {@code
* software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client.getFindingsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @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 directly
*
*
* {@code
* software.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
* {@link #getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)} operation.
*
*
* @param getFindingsRequest
* @return 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.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetFindings
* @see AWS
* API Documentation
*/
default GetFindingsIterable getFindingsPaginator(GetFindingsRequest getFindingsRequest) throws InternalServerException,
ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException,
AwsServiceException, SdkClientException, CodeGuruSecurityException {
return new GetFindingsIterable(this, getFindingsRequest);
}
/**
*
* This is a variant of
* {@link #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
*
*
* {@code
* software.amazon.awssdk.services.codegurusecurity.paginators.GetFindingsIterable responses = client.getFindingsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @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 directly
*
*
* {@code
* software.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
* {@link #getFindings(software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest)} operation.
*
*
*
* This is a convenience which creates an instance of the {@link GetFindingsRequest.Builder} avoiding the need to
* create one manually via {@link GetFindingsRequest#builder()}
*
*
* @param getFindingsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.GetFindingsRequest.Builder} to create a
* request.
* @return A custom 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.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetFindings
* @see AWS
* API Documentation
*/
default GetFindingsIterable getFindingsPaginator(Consumer getFindingsRequest)
throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException,
ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException {
return getFindingsPaginator(GetFindingsRequest.builder().applyMutation(getFindingsRequest).build());
}
/**
*
* Returns a summary of metrics for an account from a specified date, including number of open findings, the
* categories with most findings, the scans with most open findings, and scans with most open critical findings.
*
*
* @param getMetricsSummaryRequest
* @return Result of the GetMetricsSummary operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetMetricsSummary
* @see AWS API Documentation
*/
default GetMetricsSummaryResponse getMetricsSummary(GetMetricsSummaryRequest getMetricsSummaryRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Returns a summary of metrics for an account from a specified date, including number of open findings, the
* categories with most findings, the scans with most open findings, and scans with most open critical findings.
*
*
*
* This is a convenience which creates an instance of the {@link GetMetricsSummaryRequest.Builder} avoiding the need
* to create one manually via {@link GetMetricsSummaryRequest#builder()}
*
*
* @param getMetricsSummaryRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.GetMetricsSummaryRequest.Builder} to create
* a request.
* @return Result of the GetMetricsSummary operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetMetricsSummary
* @see AWS API Documentation
*/
default GetMetricsSummaryResponse getMetricsSummary(Consumer getMetricsSummaryRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
return getMetricsSummary(GetMetricsSummaryRequest.builder().applyMutation(getMetricsSummaryRequest).build());
}
/**
*
* Returns details about a scan, including whether or not a scan has completed.
*
*
* @param getScanRequest
* @return Result of the GetScan operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetScan
* @see AWS API
* Documentation
*/
default GetScanResponse getScan(GetScanRequest getScanRequest) throws InternalServerException, ResourceNotFoundException,
ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException,
CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Returns details about a scan, including whether or not a scan has completed.
*
*
*
* This is a convenience which creates an instance of the {@link GetScanRequest.Builder} avoiding the need to create
* one manually via {@link GetScanRequest#builder()}
*
*
* @param getScanRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.GetScanRequest.Builder} to create a request.
* @return Result of the GetScan operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.GetScan
* @see AWS API
* Documentation
*/
default GetScanResponse getScan(Consumer getScanRequest) throws InternalServerException,
ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
return getScan(GetScanRequest.builder().applyMutation(getScanRequest).build());
}
/**
*
* Returns metrics about all findings in an account within a specified time range.
*
*
* @param listFindingsMetricsRequest
* @return Result of the ListFindingsMetrics operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListFindingsMetrics
* @see AWS API Documentation
*/
default ListFindingsMetricsResponse listFindingsMetrics(ListFindingsMetricsRequest listFindingsMetricsRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Returns metrics about all findings in an account within a specified time range.
*
*
*
* This is a convenience which creates an instance of the {@link ListFindingsMetricsRequest.Builder} avoiding the
* need to create one manually via {@link ListFindingsMetricsRequest#builder()}
*
*
* @param listFindingsMetricsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest.Builder} to
* create a request.
* @return Result of the ListFindingsMetrics operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListFindingsMetrics
* @see AWS API Documentation
*/
default ListFindingsMetricsResponse listFindingsMetrics(
Consumer listFindingsMetricsRequest) throws InternalServerException,
ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException,
CodeGuruSecurityException {
return listFindingsMetrics(ListFindingsMetricsRequest.builder().applyMutation(listFindingsMetricsRequest).build());
}
/**
*
* This is a variant of
* {@link #listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)}
* operation. The return type is a custom 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
*
*
* {@code
* software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client.listFindingsMetricsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @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 directly
*
*
* {@code
* software.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
* {@link #listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)}
* operation.
*
*
* @param listFindingsMetricsRequest
* @return 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.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListFindingsMetrics
* @see AWS API Documentation
*/
default ListFindingsMetricsIterable listFindingsMetricsPaginator(ListFindingsMetricsRequest listFindingsMetricsRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
return new ListFindingsMetricsIterable(this, listFindingsMetricsRequest);
}
/**
*
* This is a variant of
* {@link #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
*
*
* {@code
* software.amazon.awssdk.services.codegurusecurity.paginators.ListFindingsMetricsIterable responses = client.listFindingsMetricsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @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 directly
*
*
* {@code
* software.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
* {@link #listFindingsMetrics(software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListFindingsMetricsRequest.Builder} avoiding the
* need to create one manually via {@link ListFindingsMetricsRequest#builder()}
*
*
* @param listFindingsMetricsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.ListFindingsMetricsRequest.Builder} to
* create a request.
* @return A custom 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.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListFindingsMetrics
* @see AWS API Documentation
*/
default ListFindingsMetricsIterable listFindingsMetricsPaginator(
Consumer listFindingsMetricsRequest) throws InternalServerException,
ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException,
CodeGuruSecurityException {
return listFindingsMetricsPaginator(ListFindingsMetricsRequest.builder().applyMutation(listFindingsMetricsRequest)
.build());
}
/**
*
* Returns a list of all scans in an account. Does not return EXPRESS
scans.
*
*
* @param listScansRequest
* @return Result of the ListScans operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListScans
* @see AWS
* API Documentation
*/
default ListScansResponse listScans(ListScansRequest listScansRequest) throws InternalServerException, ThrottlingException,
ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of all scans in an account. Does not return EXPRESS
scans.
*
*
*
* This is a convenience which creates an instance of the {@link ListScansRequest.Builder} avoiding the need to
* create one manually via {@link ListScansRequest#builder()}
*
*
* @param listScansRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest.Builder} to create a
* request.
* @return Result of the ListScans operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListScans
* @see AWS
* API Documentation
*/
default ListScansResponse listScans(Consumer listScansRequest) throws InternalServerException,
ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException,
CodeGuruSecurityException {
return listScans(ListScansRequest.builder().applyMutation(listScansRequest).build());
}
/**
*
* This is a variant of {@link #listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)}
* operation. The return type is a custom 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
*
*
* {@code
* software.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @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 directly
*
*
* {@code
* software.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
* {@link #listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)} operation.
*
*
* @param listScansRequest
* @return 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.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListScans
* @see AWS
* API Documentation
*/
default ListScansIterable listScansPaginator(ListScansRequest listScansRequest) throws InternalServerException,
ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException,
CodeGuruSecurityException {
return new ListScansIterable(this, listScansRequest);
}
/**
*
* This is a variant of {@link #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
*
*
* {@code
* software.amazon.awssdk.services.codegurusecurity.paginators.ListScansIterable responses = client.listScansPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @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 directly
*
*
* {@code
* software.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
* {@link #listScans(software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest)} operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListScansRequest.Builder} avoiding the need to
* create one manually via {@link ListScansRequest#builder()}
*
*
* @param listScansRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.ListScansRequest.Builder} to create a
* request.
* @return A custom 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.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListScans
* @see AWS
* API Documentation
*/
default ListScansIterable listScansPaginator(Consumer listScansRequest)
throws InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
return listScansPaginator(ListScansRequest.builder().applyMutation(listScansRequest).build());
}
/**
*
* Returns a list of all tags associated with a scan.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListTagsForResource
* @see AWS API Documentation
*/
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException,
ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Returns a list of all tags associated with a scan.
*
*
*
* This is a convenience which creates an instance of the {@link ListTagsForResourceRequest.Builder} avoiding the
* need to create one manually via {@link ListTagsForResourceRequest#builder()}
*
*
* @param listTagsForResourceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.ListTagsForResourceRequest.Builder} to
* create a request.
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.ListTagsForResource
* @see AWS API Documentation
*/
default ListTagsForResourceResponse listTagsForResource(
Consumer listTagsForResourceRequest) throws InternalServerException,
ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException,
AwsServiceException, SdkClientException, CodeGuruSecurityException {
return listTagsForResource(ListTagsForResourceRequest.builder().applyMutation(listTagsForResourceRequest).build());
}
/**
*
* Use to add one or more tags to an existing scan.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.TagResource
* @see AWS
* API Documentation
*/
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws InternalServerException,
ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException,
AwsServiceException, SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Use to add one or more tags to an existing scan.
*
*
*
* This is a convenience which creates an instance of the {@link TagResourceRequest.Builder} avoiding the need to
* create one manually via {@link TagResourceRequest#builder()}
*
*
* @param tagResourceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.TagResourceRequest.Builder} to create a
* request.
* @return Result of the TagResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.TagResource
* @see AWS
* API Documentation
*/
default TagResourceResponse tagResource(Consumer tagResourceRequest)
throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException,
ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException {
return tagResource(TagResourceRequest.builder().applyMutation(tagResourceRequest).build());
}
/**
*
* Use to remove one or more tags from an existing scan.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.UntagResource
* @see AWS API Documentation
*/
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws InternalServerException,
ConflictException, ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException,
AwsServiceException, SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Use to remove one or more tags from an existing scan.
*
*
*
* This is a convenience which creates an instance of the {@link UntagResourceRequest.Builder} avoiding the need to
* create one manually via {@link UntagResourceRequest#builder()}
*
*
* @param untagResourceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.UntagResourceRequest.Builder} to create a
* request.
* @return Result of the UntagResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws 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.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.UntagResource
* @see AWS API Documentation
*/
default UntagResourceResponse untagResource(Consumer untagResourceRequest)
throws InternalServerException, ConflictException, ResourceNotFoundException, ThrottlingException,
ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException {
return untagResource(UntagResourceRequest.builder().applyMutation(untagResourceRequest).build());
}
/**
*
* Use to update the encryption configuration for an account.
*
*
* @param updateAccountConfigurationRequest
* @return Result of the UpdateAccountConfiguration operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.UpdateAccountConfiguration
* @see AWS API Documentation
*/
default UpdateAccountConfigurationResponse updateAccountConfiguration(
UpdateAccountConfigurationRequest updateAccountConfigurationRequest) throws InternalServerException,
ResourceNotFoundException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException,
SdkClientException, CodeGuruSecurityException {
throw new UnsupportedOperationException();
}
/**
*
* Use to update the encryption configuration for an account.
*
*
*
* This is a convenience which creates an instance of the {@link UpdateAccountConfigurationRequest.Builder} avoiding
* the need to create one manually via {@link UpdateAccountConfigurationRequest#builder()}
*
*
* @param updateAccountConfigurationRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.codegurusecurity.model.UpdateAccountConfigurationRequest.Builder}
* to create a request.
* @return Result of the UpdateAccountConfiguration operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws CodeGuruSecurityException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample CodeGuruSecurityClient.UpdateAccountConfiguration
* @see AWS API Documentation
*/
default UpdateAccountConfigurationResponse updateAccountConfiguration(
Consumer updateAccountConfigurationRequest)
throws InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException,
AccessDeniedException, AwsServiceException, SdkClientException, CodeGuruSecurityException {
return updateAccountConfiguration(UpdateAccountConfigurationRequest.builder()
.applyMutation(updateAccountConfigurationRequest).build());
}
/**
* Create a {@link CodeGuruSecurityClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static CodeGuruSecurityClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link CodeGuruSecurityClient}.
*/
static CodeGuruSecurityClientBuilder builder() {
return new DefaultCodeGuruSecurityClientBuilder();
}
static ServiceMetadata serviceMetadata() {
return ServiceMetadata.of(SERVICE_METADATA_ID);
}
@Override
default CodeGuruSecurityServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
}