/*
* 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model;
using Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations;
using Amazon.AccessAnalyzer.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.AccessAnalyzer
{
///
/// Implementation for accessing AccessAnalyzer
///
/// Identity and Access Management Access Analyzer helps identify potential resource-access
/// risks by enabling you to identify any policies that grant access to an external principal.
/// It does this by using logic-based reasoning to analyze resource-based policies in
/// your Amazon Web Services environment. An external principal can be another Amazon
/// Web Services account, a root user, an IAM user or role, a federated user, an Amazon
/// Web Services service, or an anonymous user. You can also use IAM Access Analyzer to
/// preview and validate public and cross-account access to your resources before deploying
/// permissions changes. This guide describes the Identity and Access Management Access
/// Analyzer operations that you can call programmatically. For general information about
/// IAM Access Analyzer, see Identity
/// and Access Management Access Analyzer in the IAM User Guide.
///
///
///
/// To start using IAM Access Analyzer, you first need to create an analyzer.
///
///
public partial class AmazonAccessAnalyzerClient : AmazonServiceClient, IAmazonAccessAnalyzer
{
private static IServiceMetadata serviceMetadata = new AmazonAccessAnalyzerMetadata();
#region Constructors
///
/// Constructs AmazonAccessAnalyzerClient 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 AmazonAccessAnalyzerClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonAccessAnalyzerConfig()) { }
///
/// Constructs AmazonAccessAnalyzerClient 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 AmazonAccessAnalyzerClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonAccessAnalyzerConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonAccessAnalyzerClient 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 AmazonAccessAnalyzerClient Configuration Object
public AmazonAccessAnalyzerClient(AmazonAccessAnalyzerConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Credentials
///
/// AWS Credentials
public AmazonAccessAnalyzerClient(AWSCredentials credentials)
: this(credentials, new AmazonAccessAnalyzerConfig())
{
}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonAccessAnalyzerClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonAccessAnalyzerConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Credentials and an
/// AmazonAccessAnalyzerClient Configuration object.
///
/// AWS Credentials
/// The AmazonAccessAnalyzerClient Configuration Object
public AmazonAccessAnalyzerClient(AWSCredentials credentials, AmazonAccessAnalyzerConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonAccessAnalyzerClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonAccessAnalyzerConfig())
{
}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonAccessAnalyzerClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonAccessAnalyzerConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonAccessAnalyzerClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonAccessAnalyzerClient Configuration Object
public AmazonAccessAnalyzerClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonAccessAnalyzerConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonAccessAnalyzerClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAccessAnalyzerConfig())
{
}
///
/// Constructs AmazonAccessAnalyzerClient 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 AmazonAccessAnalyzerClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAccessAnalyzerConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonAccessAnalyzerClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonAccessAnalyzerClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonAccessAnalyzerClient Configuration Object
public AmazonAccessAnalyzerClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonAccessAnalyzerConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#if AWS_ASYNC_ENUMERABLES_API
private IAccessAnalyzerPaginatorFactory _paginators;
///
/// Paginators for the service
///
public IAccessAnalyzerPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new AccessAnalyzerPaginatorFactory(this);
}
return this._paginators;
}
}
#endif
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customizes the runtime pipeline.
///
/// Runtime pipeline for the current client.
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler();
pipeline.AddHandlerAfter(new AmazonAccessAnalyzerEndpointResolver());
}
///
/// 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 ApplyArchiveRule
internal virtual ApplyArchiveRuleResponse ApplyArchiveRule(ApplyArchiveRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ApplyArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = ApplyArchiveRuleResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retroactively applies the archive rule to existing findings that meet the archive
/// rule criteria.
///
/// Container for the necessary parameters to execute the ApplyArchiveRule service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ApplyArchiveRule service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ApplyArchiveRule Operation
public virtual Task ApplyArchiveRuleAsync(ApplyArchiveRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ApplyArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = ApplyArchiveRuleResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CancelPolicyGeneration
internal virtual CancelPolicyGenerationResponse CancelPolicyGeneration(CancelPolicyGenerationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelPolicyGenerationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelPolicyGenerationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Cancels the requested policy generation.
///
/// Container for the necessary parameters to execute the CancelPolicyGeneration service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CancelPolicyGeneration service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for CancelPolicyGeneration Operation
public virtual Task CancelPolicyGenerationAsync(CancelPolicyGenerationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelPolicyGenerationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelPolicyGenerationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CreateAccessPreview
internal virtual CreateAccessPreviewResponse CreateAccessPreview(CreateAccessPreviewRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateAccessPreviewRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateAccessPreviewResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Creates an access preview that allows you to preview IAM Access Analyzer findings
/// for your resource before deploying resource permissions.
///
/// Container for the necessary parameters to execute the CreateAccessPreview service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateAccessPreview service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// A conflict exception error.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Service quote met error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for CreateAccessPreview Operation
public virtual Task CreateAccessPreviewAsync(CreateAccessPreviewRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateAccessPreviewRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateAccessPreviewResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CreateAnalyzer
internal virtual CreateAnalyzerResponse CreateAnalyzer(CreateAnalyzerRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateAnalyzerRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateAnalyzerResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Creates an analyzer for your account.
///
/// Container for the necessary parameters to execute the CreateAnalyzer service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateAnalyzer service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// A conflict exception error.
///
///
/// Internal server error.
///
///
/// Service quote met error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for CreateAnalyzer Operation
public virtual Task CreateAnalyzerAsync(CreateAnalyzerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateAnalyzerRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateAnalyzerResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CreateArchiveRule
internal virtual CreateArchiveRuleResponse CreateArchiveRule(CreateArchiveRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateArchiveRuleResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Creates an archive rule for the specified analyzer. Archive rules automatically archive
/// new findings that meet the criteria you define when you create the rule.
///
///
///
/// To learn about filter keys that you can use to create an archive rule, see IAM
/// Access Analyzer filter keys in the IAM User Guide.
///
///
/// Container for the necessary parameters to execute the CreateArchiveRule service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateArchiveRule service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// A conflict exception error.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Service quote met error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for CreateArchiveRule Operation
public virtual Task CreateArchiveRuleAsync(CreateArchiveRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateArchiveRuleResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteAnalyzer
internal virtual DeleteAnalyzerResponse DeleteAnalyzer(DeleteAnalyzerRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteAnalyzerRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteAnalyzerResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is
/// disabled for the account or organization in the current or specific Region. All findings
/// that were generated by the analyzer are deleted. You cannot undo this action.
///
/// Container for the necessary parameters to execute the DeleteAnalyzer service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteAnalyzer service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for DeleteAnalyzer Operation
public virtual Task DeleteAnalyzerAsync(DeleteAnalyzerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteAnalyzerRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteAnalyzerResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteArchiveRule
internal virtual DeleteArchiveRuleResponse DeleteArchiveRule(DeleteArchiveRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteArchiveRuleResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes the specified archive rule.
///
/// Container for the necessary parameters to execute the DeleteArchiveRule service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteArchiveRule service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for DeleteArchiveRule Operation
public virtual Task DeleteArchiveRuleAsync(DeleteArchiveRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteArchiveRuleResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetAccessPreview
internal virtual GetAccessPreviewResponse GetAccessPreview(GetAccessPreviewRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAccessPreviewRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAccessPreviewResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves information about an access preview for the specified analyzer.
///
/// Container for the necessary parameters to execute the GetAccessPreview service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetAccessPreview service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for GetAccessPreview Operation
public virtual Task GetAccessPreviewAsync(GetAccessPreviewRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAccessPreviewRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAccessPreviewResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetAnalyzedResource
internal virtual GetAnalyzedResourceResponse GetAnalyzedResource(GetAnalyzedResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAnalyzedResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAnalyzedResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves information about a resource that was analyzed.
///
/// Container for the necessary parameters to execute the GetAnalyzedResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetAnalyzedResource service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for GetAnalyzedResource Operation
public virtual Task GetAnalyzedResourceAsync(GetAnalyzedResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAnalyzedResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAnalyzedResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetAnalyzer
internal virtual GetAnalyzerResponse GetAnalyzer(GetAnalyzerRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAnalyzerRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAnalyzerResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves information about the specified analyzer.
///
/// Container for the necessary parameters to execute the GetAnalyzer service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetAnalyzer service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for GetAnalyzer Operation
public virtual Task GetAnalyzerAsync(GetAnalyzerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAnalyzerRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAnalyzerResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetArchiveRule
internal virtual GetArchiveRuleResponse GetArchiveRule(GetArchiveRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetArchiveRuleResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves information about an archive rule.
///
///
///
/// To learn about filter keys that you can use to create an archive rule, see IAM
/// Access Analyzer filter keys in the IAM User Guide.
///
///
/// Container for the necessary parameters to execute the GetArchiveRule service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetArchiveRule service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for GetArchiveRule Operation
public virtual Task GetArchiveRuleAsync(GetArchiveRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetArchiveRuleResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetFinding
internal virtual GetFindingResponse GetFinding(GetFindingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetFindingRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetFindingResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves information about the specified finding.
///
/// Container for the necessary parameters to execute the GetFinding service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetFinding service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for GetFinding Operation
public virtual Task GetFindingAsync(GetFindingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetFindingRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetFindingResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetGeneratedPolicy
internal virtual GetGeneratedPolicyResponse GetGeneratedPolicy(GetGeneratedPolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGeneratedPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGeneratedPolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves the policy that was generated using StartPolicyGeneration
.
///
/// Container for the necessary parameters to execute the GetGeneratedPolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetGeneratedPolicy service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for GetGeneratedPolicy Operation
public virtual Task GetGeneratedPolicyAsync(GetGeneratedPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGeneratedPolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGeneratedPolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListAccessPreviewFindings
internal virtual ListAccessPreviewFindingsResponse ListAccessPreviewFindings(ListAccessPreviewFindingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAccessPreviewFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAccessPreviewFindingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves a list of access preview findings generated by the specified access preview.
///
/// Container for the necessary parameters to execute the ListAccessPreviewFindings service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListAccessPreviewFindings service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// A conflict exception error.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ListAccessPreviewFindings Operation
public virtual Task ListAccessPreviewFindingsAsync(ListAccessPreviewFindingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAccessPreviewFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAccessPreviewFindingsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListAccessPreviews
internal virtual ListAccessPreviewsResponse ListAccessPreviews(ListAccessPreviewsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAccessPreviewsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAccessPreviewsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves a list of access previews for the specified analyzer.
///
/// Container for the necessary parameters to execute the ListAccessPreviews service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListAccessPreviews service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ListAccessPreviews Operation
public virtual Task ListAccessPreviewsAsync(ListAccessPreviewsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAccessPreviewsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAccessPreviewsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListAnalyzedResources
internal virtual ListAnalyzedResourcesResponse ListAnalyzedResources(ListAnalyzedResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAnalyzedResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAnalyzedResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves a list of resources of the specified type that have been analyzed by the
/// specified analyzer..
///
/// Container for the necessary parameters to execute the ListAnalyzedResources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListAnalyzedResources service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ListAnalyzedResources Operation
public virtual Task ListAnalyzedResourcesAsync(ListAnalyzedResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAnalyzedResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAnalyzedResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListAnalyzers
internal virtual ListAnalyzersResponse ListAnalyzers(ListAnalyzersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAnalyzersRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAnalyzersResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves a list of analyzers.
///
/// Container for the necessary parameters to execute the ListAnalyzers service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListAnalyzers service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ListAnalyzers Operation
public virtual Task ListAnalyzersAsync(ListAnalyzersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAnalyzersRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAnalyzersResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListArchiveRules
internal virtual ListArchiveRulesResponse ListArchiveRules(ListArchiveRulesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListArchiveRulesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListArchiveRulesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves a list of archive rules created for the specified analyzer.
///
/// Container for the necessary parameters to execute the ListArchiveRules service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListArchiveRules service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ListArchiveRules Operation
public virtual Task ListArchiveRulesAsync(ListArchiveRulesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListArchiveRulesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListArchiveRulesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListFindings
internal virtual ListFindingsResponse ListFindings(ListFindingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListFindingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves a list of findings generated by the specified analyzer.
///
///
///
/// To learn about filter keys that you can use to retrieve a list of findings, see IAM
/// Access Analyzer filter keys in the IAM User Guide.
///
///
/// Container for the necessary parameters to execute the ListFindings service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListFindings service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ListFindings Operation
public virtual Task ListFindingsAsync(ListFindingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListFindingsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListPolicyGenerations
internal virtual ListPolicyGenerationsResponse ListPolicyGenerations(ListPolicyGenerationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPolicyGenerationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPolicyGenerationsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Lists all of the policy generations requested in the last seven days.
///
/// Container for the necessary parameters to execute the ListPolicyGenerations service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListPolicyGenerations service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ListPolicyGenerations Operation
public virtual Task ListPolicyGenerationsAsync(ListPolicyGenerationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPolicyGenerationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPolicyGenerationsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListTagsForResource
internal virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves a list of tags applied to the specified resource.
///
/// 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 AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// 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 StartPolicyGeneration
internal virtual StartPolicyGenerationResponse StartPolicyGeneration(StartPolicyGenerationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartPolicyGenerationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartPolicyGenerationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Starts the policy generation request.
///
/// Container for the necessary parameters to execute the StartPolicyGeneration service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the StartPolicyGeneration service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// A conflict exception error.
///
///
/// Internal server error.
///
///
/// Service quote met error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for StartPolicyGeneration Operation
public virtual Task StartPolicyGenerationAsync(StartPolicyGenerationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartPolicyGenerationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartPolicyGenerationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region StartResourceScan
internal virtual StartResourceScanResponse StartResourceScan(StartResourceScanRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartResourceScanRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartResourceScanResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Immediately starts a scan of the policies applied to the specified resource.
///
/// Container for the necessary parameters to execute the StartResourceScan service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the StartResourceScan service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for StartResourceScan Operation
public virtual Task StartResourceScanAsync(StartResourceScanRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartResourceScanRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartResourceScanResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region TagResource
internal virtual TagResourceResponse TagResource(TagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Adds a tag to the specified resource.
///
/// 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 AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// 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
internal virtual UntagResourceResponse UntagResource(UntagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Removes a tag from the specified resource.
///
/// 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 AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// 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 UpdateArchiveRule
internal virtual UpdateArchiveRuleResponse UpdateArchiveRule(UpdateArchiveRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateArchiveRuleResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Updates the criteria and values for the specified archive rule.
///
/// Container for the necessary parameters to execute the UpdateArchiveRule service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateArchiveRule service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for UpdateArchiveRule Operation
public virtual Task UpdateArchiveRuleAsync(UpdateArchiveRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateArchiveRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateArchiveRuleResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UpdateFindings
internal virtual UpdateFindingsResponse UpdateFindings(UpdateFindingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateFindingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Updates the status for the specified findings.
///
/// Container for the necessary parameters to execute the UpdateFindings service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateFindings service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// The specified resource could not be found.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for UpdateFindings Operation
public virtual Task UpdateFindingsAsync(UpdateFindingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateFindingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateFindingsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ValidatePolicy
internal virtual ValidatePolicyResponse ValidatePolicy(ValidatePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ValidatePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = ValidatePolicyResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Requests the validation of a policy and returns a list of findings. The findings help
/// you identify issues and provide actionable recommendations to resolve the issue and
/// enable you to author functional policies that meet security best practices.
///
/// Container for the necessary parameters to execute the ValidatePolicy service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ValidatePolicy service method, as returned by AccessAnalyzer.
///
/// You do not have sufficient access to perform this action.
///
///
/// Internal server error.
///
///
/// Throttling limit exceeded error.
///
///
/// Validation exception error.
///
/// REST API Reference for ValidatePolicy Operation
public virtual Task ValidatePolicyAsync(ValidatePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ValidatePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = ValidatePolicyResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}