/*
* 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 macie-2017-12-19.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.Macie.Model;
using Amazon.Macie.Model.Internal.MarshallTransformations;
using Amazon.Macie.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.Macie
{
///
/// Implementation for accessing Macie
///
/// Amazon Macie Classic
///
/// Amazon Macie Classic has been discontinued and is no longer available.
///
///
///
/// A new Amazon Macie is now available with significant design improvements and additional
/// features, at a lower price and in most Amazon Web Services Regions. We encourage you
/// to take advantage of the new and improved features, and benefit from the reduced cost.
/// To learn about features and pricing for the new Macie, see Amazon
/// Macie. To learn how to use the new Macie, see the Amazon
/// Macie User Guide.
///
///
public partial class AmazonMacieClient : AmazonServiceClient, IAmazonMacie
{
private static IServiceMetadata serviceMetadata = new AmazonMacieMetadata();
#region Constructors
///
/// Constructs AmazonMacieClient 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 AmazonMacieClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonMacieConfig()) { }
///
/// Constructs AmazonMacieClient 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 AmazonMacieClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonMacieConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonMacieClient 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 AmazonMacieClient Configuration Object
public AmazonMacieClient(AmazonMacieConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonMacieClient with AWS Credentials
///
/// AWS Credentials
public AmazonMacieClient(AWSCredentials credentials)
: this(credentials, new AmazonMacieConfig())
{
}
///
/// Constructs AmazonMacieClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonMacieClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonMacieConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonMacieClient with AWS Credentials and an
/// AmazonMacieClient Configuration object.
///
/// AWS Credentials
/// The AmazonMacieClient Configuration Object
public AmazonMacieClient(AWSCredentials credentials, AmazonMacieConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonMacieClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonMacieClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonMacieConfig())
{
}
///
/// Constructs AmazonMacieClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonMacieClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonMacieConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonMacieClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonMacieClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonMacieClient Configuration Object
public AmazonMacieClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonMacieConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonMacieClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonMacieClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonMacieConfig())
{
}
///
/// Constructs AmazonMacieClient 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 AmazonMacieClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonMacieConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonMacieClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonMacieClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonMacieClient Configuration Object
public AmazonMacieClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonMacieConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#if AWS_ASYNC_ENUMERABLES_API
private IMaciePaginatorFactory _paginators;
///
/// Paginators for the service
///
public IMaciePaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new MaciePaginatorFactory(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 AmazonMacieEndpointResolver());
}
///
/// 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 AssociateMemberAccount
internal virtual AssociateMemberAccountResponse AssociateMemberAccount(AssociateMemberAccountRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateMemberAccountRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateMemberAccountResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// (Discontinued) Associates a specified Amazon Web Services account with Amazon Macie
/// Classic as a member account.
///
/// Container for the necessary parameters to execute the AssociateMemberAccount service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the AssociateMemberAccount service method, as returned by Macie.
///
/// (Discontinued) Internal server error.
///
///
/// (Discontinued) The request was rejected because an invalid or out-of-range value was
/// supplied for an input parameter.
///
///
/// (Discontinued) The request was rejected because it attempted to create resources beyond
/// the current Amazon Web Services account quotas. The error code describes the quota
/// exceeded.
///
/// REST API Reference for AssociateMemberAccount Operation
public virtual Task AssociateMemberAccountAsync(AssociateMemberAccountRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateMemberAccountRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateMemberAccountResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region AssociateS3Resources
internal virtual AssociateS3ResourcesResponse AssociateS3Resources(AssociateS3ResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateS3ResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// (Discontinued) Associates specified S3 resources with Amazon Macie Classic for monitoring
/// and data classification. If memberAccountId
isn't specified, the action
/// associates specified S3 resources with Macie Classic for the current Macie Classic
/// administrator account. If memberAccountId
is specified, the action associates
/// specified S3 resources with Macie Classic for the specified member account.
///
/// Container for the necessary parameters to execute the AssociateS3Resources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the AssociateS3Resources service method, as returned by Macie.
///
/// (Discontinued) You do not have required permissions to access the requested resource.
///
///
/// (Discontinued) Internal server error.
///
///
/// (Discontinued) The request was rejected because an invalid or out-of-range value was
/// supplied for an input parameter.
///
///
/// (Discontinued) The request was rejected because it attempted to create resources beyond
/// the current Amazon Web Services account quotas. The error code describes the quota
/// exceeded.
///
/// REST API Reference for AssociateS3Resources Operation
public virtual Task AssociateS3ResourcesAsync(AssociateS3ResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateS3ResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DisassociateMemberAccount
internal virtual DisassociateMemberAccountResponse DisassociateMemberAccount(DisassociateMemberAccountRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateMemberAccountRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateMemberAccountResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// (Discontinued) Removes the specified member account from Amazon Macie Classic.
///
/// Container for the necessary parameters to execute the DisassociateMemberAccount service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DisassociateMemberAccount service method, as returned by Macie.
///
/// (Discontinued) Internal server error.
///
///
/// (Discontinued) The request was rejected because an invalid or out-of-range value was
/// supplied for an input parameter.
///
/// REST API Reference for DisassociateMemberAccount Operation
public virtual Task DisassociateMemberAccountAsync(DisassociateMemberAccountRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateMemberAccountRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateMemberAccountResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DisassociateS3Resources
internal virtual DisassociateS3ResourcesResponse DisassociateS3Resources(DisassociateS3ResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateS3ResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// (Discontinued) Removes specified S3 resources from being monitored by Amazon Macie
/// Classic. If memberAccountId
isn't specified, the action removes specified
/// S3 resources from Macie Classic for the current Macie Classic administrator account.
/// If memberAccountId
is specified, the action removes specified S3 resources
/// from Macie Classic for the specified member account.
///
/// Container for the necessary parameters to execute the DisassociateS3Resources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DisassociateS3Resources service method, as returned by Macie.
///
/// (Discontinued) You do not have required permissions to access the requested resource.
///
///
/// (Discontinued) Internal server error.
///
///
/// (Discontinued) The request was rejected because an invalid or out-of-range value was
/// supplied for an input parameter.
///
/// REST API Reference for DisassociateS3Resources Operation
public virtual Task DisassociateS3ResourcesAsync(DisassociateS3ResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateS3ResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListMemberAccounts
internal virtual ListMemberAccountsResponse ListMemberAccounts(ListMemberAccountsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListMemberAccountsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListMemberAccountsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// (Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie
/// Classic administrator account.
///
/// Container for the necessary parameters to execute the ListMemberAccounts service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListMemberAccounts service method, as returned by Macie.
///
/// (Discontinued) Internal server error.
///
///
/// (Discontinued) The request was rejected because an invalid or out-of-range value was
/// supplied for an input parameter.
///
/// REST API Reference for ListMemberAccounts Operation
public virtual Task ListMemberAccountsAsync(ListMemberAccountsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListMemberAccountsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListMemberAccountsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListS3Resources
internal virtual ListS3ResourcesResponse ListS3Resources(ListS3ResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListS3ResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// (Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. If
/// memberAccountId
isn't specified, the action lists the S3 resources associated
/// with Macie Classic for the current Macie Classic administrator account. If memberAccountId
/// is specified, the action lists the S3 resources associated with Macie Classic for
/// the specified member account.
///
/// Container for the necessary parameters to execute the ListS3Resources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListS3Resources service method, as returned by Macie.
///
/// (Discontinued) You do not have required permissions to access the requested resource.
///
///
/// (Discontinued) Internal server error.
///
///
/// (Discontinued) The request was rejected because an invalid or out-of-range value was
/// supplied for an input parameter.
///
/// REST API Reference for ListS3Resources Operation
public virtual Task ListS3ResourcesAsync(ListS3ResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListS3ResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UpdateS3Resources
internal virtual UpdateS3ResourcesResponse UpdateS3Resources(UpdateS3ResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateS3ResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// (Discontinued) Updates the classification types for the specified S3 resources. If
/// memberAccountId
isn't specified, the action updates the classification
/// types of the S3 resources associated with Amazon Macie Classic for the current Macie
/// Classic administrator account. If memberAccountId
is specified, the action
/// updates the classification types of the S3 resources associated with Macie Classic
/// for the specified member account.
///
/// Container for the necessary parameters to execute the UpdateS3Resources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateS3Resources service method, as returned by Macie.
///
/// (Discontinued) You do not have required permissions to access the requested resource.
///
///
/// (Discontinued) Internal server error.
///
///
/// (Discontinued) The request was rejected because an invalid or out-of-range value was
/// supplied for an input parameter.
///
/// REST API Reference for UpdateS3Resources Operation
public virtual Task UpdateS3ResourcesAsync(UpdateS3ResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateS3ResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateS3ResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}