/*
* 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.
*/
/*
* Do not modify this file. This file is generated from the codeguru-security-2018-05-10.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.CodeGuruSecurity.Model;
using Amazon.CodeGuruSecurity.Model.Internal.MarshallTransformations;
using Amazon.CodeGuruSecurity.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CodeGuruSecurity
{
///
/// Implementation for accessing 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.
///
///
public partial class AmazonCodeGuruSecurityClient : AmazonServiceClient, IAmazonCodeGuruSecurity
{
private static IServiceMetadata serviceMetadata = new AmazonCodeGuruSecurityMetadata();
private ICodeGuruSecurityPaginatorFactory _paginators;
///
/// Paginators for the service
///
public ICodeGuruSecurityPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new CodeGuruSecurityPaginatorFactory(this);
}
return this._paginators;
}
}
#region Constructors
///
/// Constructs AmazonCodeGuruSecurityClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
public AmazonCodeGuruSecurityClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCodeGuruSecurityConfig()) { }
///
/// Constructs AmazonCodeGuruSecurityClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The region to connect.
public AmazonCodeGuruSecurityClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCodeGuruSecurityConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonCodeGuruSecurityClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The AmazonCodeGuruSecurityClient Configuration Object
public AmazonCodeGuruSecurityClient(AmazonCodeGuruSecurityConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Credentials
///
/// AWS Credentials
public AmazonCodeGuruSecurityClient(AWSCredentials credentials)
: this(credentials, new AmazonCodeGuruSecurityConfig())
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonCodeGuruSecurityClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCodeGuruSecurityConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Credentials and an
/// AmazonCodeGuruSecurityClient Configuration object.
///
/// AWS Credentials
/// The AmazonCodeGuruSecurityClient Configuration Object
public AmazonCodeGuruSecurityClient(AWSCredentials credentials, AmazonCodeGuruSecurityConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonCodeGuruSecurityClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCodeGuruSecurityConfig())
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonCodeGuruSecurityClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCodeGuruSecurityConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCodeGuruSecurityClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonCodeGuruSecurityClient Configuration Object
public AmazonCodeGuruSecurityClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCodeGuruSecurityConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonCodeGuruSecurityClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCodeGuruSecurityConfig())
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The region to connect.
public AmazonCodeGuruSecurityClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCodeGuruSecurityConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonCodeGuruSecurityClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCodeGuruSecurityClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonCodeGuruSecurityClient Configuration Object
public AmazonCodeGuruSecurityClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCodeGuruSecurityConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customize the pipeline
///
///
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler();
pipeline.AddHandlerAfter(new AmazonCodeGuruSecurityEndpointResolver());
}
///
/// Capture metadata for the service.
///
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
///
/// Disposes the service client.
///
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region BatchGetFindings
///
/// Returns a list of all requested findings.
///
/// Container for the necessary parameters to execute the BatchGetFindings service method.
///
/// The response from the BatchGetFindings service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for BatchGetFindings Operation
public virtual BatchGetFindingsResponse BatchGetFindings(BatchGetFindingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = BatchGetFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = BatchGetFindingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns a list of all requested findings.
///
/// Container for the necessary parameters to execute the BatchGetFindings service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the BatchGetFindings service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for BatchGetFindings Operation
public virtual Task BatchGetFindingsAsync(BatchGetFindingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = BatchGetFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = BatchGetFindingsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CreateScan
///
/// Use to create a scan using code uploaded to an S3 bucket.
///
/// Container for the necessary parameters to execute the CreateScan service method.
///
/// The response from the CreateScan service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for CreateScan Operation
public virtual CreateScanResponse CreateScan(CreateScanRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateScanRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateScanResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Use to create a scan using code uploaded to an S3 bucket.
///
/// Container for the necessary parameters to execute the CreateScan service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateScan service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for CreateScan Operation
public virtual Task CreateScanAsync(CreateScanRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateScanRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateScanResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CreateUploadUrl
///
/// 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.
///
///
/// Container for the necessary parameters to execute the CreateUploadUrl service method.
///
/// The response from the CreateUploadUrl service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for CreateUploadUrl Operation
public virtual CreateUploadUrlResponse CreateUploadUrl(CreateUploadUrlRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateUploadUrlRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateUploadUrlResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
///
/// Container for the necessary parameters to execute the CreateUploadUrl service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateUploadUrl service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for CreateUploadUrl Operation
public virtual Task CreateUploadUrlAsync(CreateUploadUrlRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateUploadUrlRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateUploadUrlResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetAccountConfiguration
///
/// Use to get account level configuration.
///
/// Container for the necessary parameters to execute the GetAccountConfiguration service method.
///
/// The response from the GetAccountConfiguration service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for GetAccountConfiguration Operation
public virtual GetAccountConfigurationResponse GetAccountConfiguration(GetAccountConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAccountConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAccountConfigurationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Use to get account level configuration.
///
/// Container for the necessary parameters to execute the GetAccountConfiguration service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetAccountConfiguration service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for GetAccountConfiguration Operation
public virtual Task GetAccountConfigurationAsync(GetAccountConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAccountConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAccountConfigurationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetFindings
///
/// Returns a list of all findings generated by a particular scan.
///
/// Container for the necessary parameters to execute the GetFindings service method.
///
/// The response from the GetFindings service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for GetFindings Operation
public virtual GetFindingsResponse GetFindings(GetFindingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetFindingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns a list of all findings generated by a particular scan.
///
/// Container for the necessary parameters to execute the GetFindings service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetFindings service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for GetFindings Operation
public virtual Task GetFindingsAsync(GetFindingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetFindingsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetMetricsSummary
///
/// 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.
///
/// Container for the necessary parameters to execute the GetMetricsSummary service method.
///
/// The response from the GetMetricsSummary service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for GetMetricsSummary Operation
public virtual GetMetricsSummaryResponse GetMetricsSummary(GetMetricsSummaryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetMetricsSummaryRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetMetricsSummaryResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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.
///
/// Container for the necessary parameters to execute the GetMetricsSummary service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetMetricsSummary service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for GetMetricsSummary Operation
public virtual Task GetMetricsSummaryAsync(GetMetricsSummaryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetMetricsSummaryRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetMetricsSummaryResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetScan
///
/// Returns details about a scan, including whether or not a scan has completed.
///
/// Container for the necessary parameters to execute the GetScan service method.
///
/// The response from the GetScan service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
/// REST API Reference for GetScan Operation
public virtual GetScanResponse GetScan(GetScanRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetScanRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetScanResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns details about a scan, including whether or not a scan has completed.
///
/// Container for the necessary parameters to execute the GetScan service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetScan service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
/// REST API Reference for GetScan Operation
public virtual Task GetScanAsync(GetScanRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetScanRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetScanResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListFindingsMetrics
///
/// Returns metrics about all findings in an account within a specified time range.
///
/// Container for the necessary parameters to execute the ListFindingsMetrics service method.
///
/// The response from the ListFindingsMetrics service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for ListFindingsMetrics Operation
public virtual ListFindingsMetricsResponse ListFindingsMetrics(ListFindingsMetricsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListFindingsMetricsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListFindingsMetricsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns metrics about all findings in an account within a specified time range.
///
/// Container for the necessary parameters to execute the ListFindingsMetrics service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListFindingsMetrics service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for ListFindingsMetrics Operation
public virtual Task ListFindingsMetricsAsync(ListFindingsMetricsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListFindingsMetricsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListFindingsMetricsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListScans
///
/// Returns a list of all the standard scans in an account. Does not return express scans.
///
/// Container for the necessary parameters to execute the ListScans service method.
///
/// The response from the ListScans service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for ListScans Operation
public virtual ListScansResponse ListScans(ListScansRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListScansRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListScansResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns a list of all the standard scans in an account. Does not return express scans.
///
/// Container for the necessary parameters to execute the ListScans service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListScans service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for ListScans Operation
public virtual Task ListScansAsync(ListScansRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListScansRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListScansResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListTagsForResource
///
/// Returns a list of all tags associated with a scan.
///
/// Container for the necessary parameters to execute the ListTagsForResource service method.
///
/// The response from the ListTagsForResource service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for ListTagsForResource Operation
public virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns a list of all tags associated with a scan.
///
/// Container for the necessary parameters to execute the ListTagsForResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListTagsForResource service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for ListTagsForResource Operation
public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region TagResource
///
/// Use to add one or more tags to an existing scan.
///
/// Container for the necessary parameters to execute the TagResource service method.
///
/// The response from the TagResource service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for TagResource Operation
public virtual TagResourceResponse TagResource(TagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Use to add one or more tags to an existing scan.
///
/// Container for the necessary parameters to execute the TagResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the TagResource service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for TagResource Operation
public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UntagResource
///
/// Use to remove one or more tags from an existing scan.
///
/// Container for the necessary parameters to execute the UntagResource service method.
///
/// The response from the UntagResource service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for UntagResource Operation
public virtual UntagResourceResponse UntagResource(UntagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Use to remove one or more tags from an existing scan.
///
/// Container for the necessary parameters to execute the UntagResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UntagResource service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// 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.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for UntagResource Operation
public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UpdateAccountConfiguration
///
/// Use to update account-level configuration with an encryption key.
///
/// Container for the necessary parameters to execute the UpdateAccountConfiguration service method.
///
/// The response from the UpdateAccountConfiguration service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for UpdateAccountConfiguration Operation
public virtual UpdateAccountConfigurationResponse UpdateAccountConfiguration(UpdateAccountConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateAccountConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateAccountConfigurationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Use to update account-level configuration with an encryption key.
///
/// Container for the necessary parameters to execute the UpdateAccountConfiguration service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateAccountConfiguration service method, as returned by CodeGuruSecurity.
///
/// You do not have sufficient access to perform this action.
///
///
/// The server encountered an internal error and is unable to complete the request.
///
///
/// The resource specified in the request was not found.
///
///
/// The request was denied due to request throttling.
///
///
/// The input fails to satisfy the specified constraints.
///
/// REST API Reference for UpdateAccountConfiguration Operation
public virtual Task UpdateAccountConfigurationAsync(UpdateAccountConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateAccountConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateAccountConfigurationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}