/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace CodeGuruSecurity { /** *

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.

*/ class AWS_CODEGURUSECURITY_API CodeGuruSecurityClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { public: typedef Aws::Client::AWSJsonClient BASECLASS; static const char* SERVICE_NAME; static const char* ALLOCATION_TAG; typedef CodeGuruSecurityClientConfiguration ClientConfigurationType; typedef CodeGuruSecurityEndpointProvider EndpointProviderType; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ CodeGuruSecurityClient(const Aws::CodeGuruSecurity::CodeGuruSecurityClientConfiguration& clientConfiguration = Aws::CodeGuruSecurity::CodeGuruSecurityClientConfiguration(), std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG)); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ CodeGuruSecurityClient(const Aws::Auth::AWSCredentials& credentials, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::CodeGuruSecurity::CodeGuruSecurityClientConfiguration& clientConfiguration = Aws::CodeGuruSecurity::CodeGuruSecurityClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ CodeGuruSecurityClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::CodeGuruSecurity::CodeGuruSecurityClientConfiguration& clientConfiguration = Aws::CodeGuruSecurity::CodeGuruSecurityClientConfiguration()); /* Legacy constructors due deprecation */ /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ CodeGuruSecurityClient(const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ CodeGuruSecurityClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ CodeGuruSecurityClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration); /* End of legacy constructors due deprecation */ virtual ~CodeGuruSecurityClient(); /** *

Returns a list of all requested findings.

See Also:

AWS * API Reference

*/ virtual Model::BatchGetFindingsOutcome BatchGetFindings(const Model::BatchGetFindingsRequest& request) const; /** * A Callable wrapper for BatchGetFindings that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::BatchGetFindingsOutcomeCallable BatchGetFindingsCallable(const BatchGetFindingsRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::BatchGetFindings, request); } /** * An Async wrapper for BatchGetFindings that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void BatchGetFindingsAsync(const BatchGetFindingsRequestT& request, const BatchGetFindingsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::BatchGetFindings, request, handler, context); } /** *

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

See * Also:

AWS * API Reference

*/ virtual Model::CreateScanOutcome CreateScan(const Model::CreateScanRequest& request) const; /** * A Callable wrapper for CreateScan that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateScanOutcomeCallable CreateScanCallable(const CreateScanRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::CreateScan, request); } /** * An Async wrapper for CreateScan that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateScanAsync(const CreateScanRequestT& request, const CreateScanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::CreateScan, request, handler, context); } /** *

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.

See Also:

AWS * API Reference

*/ virtual Model::CreateUploadUrlOutcome CreateUploadUrl(const Model::CreateUploadUrlRequest& request) const; /** * A Callable wrapper for CreateUploadUrl that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateUploadUrlOutcomeCallable CreateUploadUrlCallable(const CreateUploadUrlRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::CreateUploadUrl, request); } /** * An Async wrapper for CreateUploadUrl that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateUploadUrlAsync(const CreateUploadUrlRequestT& request, const CreateUploadUrlResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::CreateUploadUrl, request, handler, context); } /** *

Use to get account level configuration.

See Also:

AWS * API Reference

*/ virtual Model::GetAccountConfigurationOutcome GetAccountConfiguration(const Model::GetAccountConfigurationRequest& request) const; /** * A Callable wrapper for GetAccountConfiguration that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetAccountConfigurationOutcomeCallable GetAccountConfigurationCallable(const GetAccountConfigurationRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::GetAccountConfiguration, request); } /** * An Async wrapper for GetAccountConfiguration that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetAccountConfigurationAsync(const GetAccountConfigurationRequestT& request, const GetAccountConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::GetAccountConfiguration, request, handler, context); } /** *

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

See * Also:

AWS * API Reference

*/ virtual Model::GetFindingsOutcome GetFindings(const Model::GetFindingsRequest& request) const; /** * A Callable wrapper for GetFindings that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetFindingsOutcomeCallable GetFindingsCallable(const GetFindingsRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::GetFindings, request); } /** * An Async wrapper for GetFindings that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetFindingsAsync(const GetFindingsRequestT& request, const GetFindingsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::GetFindings, request, handler, context); } /** *

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.

See * Also:

AWS * API Reference

*/ virtual Model::GetMetricsSummaryOutcome GetMetricsSummary(const Model::GetMetricsSummaryRequest& request) const; /** * A Callable wrapper for GetMetricsSummary that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetMetricsSummaryOutcomeCallable GetMetricsSummaryCallable(const GetMetricsSummaryRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::GetMetricsSummary, request); } /** * An Async wrapper for GetMetricsSummary that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetMetricsSummaryAsync(const GetMetricsSummaryRequestT& request, const GetMetricsSummaryResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::GetMetricsSummary, request, handler, context); } /** *

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

See Also:

AWS * API Reference

*/ virtual Model::GetScanOutcome GetScan(const Model::GetScanRequest& request) const; /** * A Callable wrapper for GetScan that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetScanOutcomeCallable GetScanCallable(const GetScanRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::GetScan, request); } /** * An Async wrapper for GetScan that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetScanAsync(const GetScanRequestT& request, const GetScanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::GetScan, request, handler, context); } /** *

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

See Also:

AWS * API Reference

*/ virtual Model::ListFindingsMetricsOutcome ListFindingsMetrics(const Model::ListFindingsMetricsRequest& request) const; /** * A Callable wrapper for ListFindingsMetrics that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListFindingsMetricsOutcomeCallable ListFindingsMetricsCallable(const ListFindingsMetricsRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::ListFindingsMetrics, request); } /** * An Async wrapper for ListFindingsMetrics that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListFindingsMetricsAsync(const ListFindingsMetricsRequestT& request, const ListFindingsMetricsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::ListFindingsMetrics, request, handler, context); } /** *

Returns a list of all the standard scans in an account. Does not return * express scans.

See Also:

AWS * API Reference

*/ virtual Model::ListScansOutcome ListScans(const Model::ListScansRequest& request) const; /** * A Callable wrapper for ListScans that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListScansOutcomeCallable ListScansCallable(const ListScansRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::ListScans, request); } /** * An Async wrapper for ListScans that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListScansAsync(const ListScansRequestT& request, const ListScansResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::ListScans, request, handler, context); } /** *

Returns a list of all tags associated with a scan.

See Also:

* AWS * API Reference

*/ virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const; /** * A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::ListTagsForResource, request); } /** * An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::ListTagsForResource, request, handler, context); } /** *

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

See Also:

* AWS * API Reference

*/ virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const; /** * A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::TagResource, request); } /** * An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::TagResource, request, handler, context); } /** *

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

See * Also:

AWS * API Reference

*/ virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const; /** * A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::UntagResource, request); } /** * An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::UntagResource, request, handler, context); } /** *

Use to update account-level configuration with an encryption * key.

See Also:

AWS * API Reference

*/ virtual Model::UpdateAccountConfigurationOutcome UpdateAccountConfiguration(const Model::UpdateAccountConfigurationRequest& request) const; /** * A Callable wrapper for UpdateAccountConfiguration that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateAccountConfigurationOutcomeCallable UpdateAccountConfigurationCallable(const UpdateAccountConfigurationRequestT& request) const { return SubmitCallable(&CodeGuruSecurityClient::UpdateAccountConfiguration, request); } /** * An Async wrapper for UpdateAccountConfiguration that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateAccountConfigurationAsync(const UpdateAccountConfigurationRequestT& request, const UpdateAccountConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruSecurityClient::UpdateAccountConfiguration, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const CodeGuruSecurityClientConfiguration& clientConfiguration); CodeGuruSecurityClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace CodeGuruSecurity } // namespace Aws