/*
* 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 cloudhsmv2-2017-04-28.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.CloudHSMV2.Model;
using Amazon.CloudHSMV2.Model.Internal.MarshallTransformations;
using Amazon.CloudHSMV2.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudHSMV2
{
///
/// Implementation for accessing CloudHSMV2
///
/// For more information about AWS CloudHSM, see AWS
/// CloudHSM and the AWS
/// CloudHSM User Guide.
///
public partial class AmazonCloudHSMV2Client : AmazonServiceClient, IAmazonCloudHSMV2
{
private static IServiceMetadata serviceMetadata = new AmazonCloudHSMV2Metadata();
#region Constructors
///
/// Constructs AmazonCloudHSMV2Client 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 AmazonCloudHSMV2Client()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudHSMV2Config()) { }
///
/// Constructs AmazonCloudHSMV2Client 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 AmazonCloudHSMV2Client(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudHSMV2Config{RegionEndpoint = region}) { }
///
/// Constructs AmazonCloudHSMV2Client 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 AmazonCloudHSMV2Client Configuration Object
public AmazonCloudHSMV2Client(AmazonCloudHSMV2Config config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonCloudHSMV2Client with AWS Credentials
///
/// AWS Credentials
public AmazonCloudHSMV2Client(AWSCredentials credentials)
: this(credentials, new AmazonCloudHSMV2Config())
{
}
///
/// Constructs AmazonCloudHSMV2Client with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonCloudHSMV2Client(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudHSMV2Config{RegionEndpoint = region})
{
}
///
/// Constructs AmazonCloudHSMV2Client with AWS Credentials and an
/// AmazonCloudHSMV2Client Configuration object.
///
/// AWS Credentials
/// The AmazonCloudHSMV2Client Configuration Object
public AmazonCloudHSMV2Client(AWSCredentials credentials, AmazonCloudHSMV2Config clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonCloudHSMV2Client with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonCloudHSMV2Client(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudHSMV2Config())
{
}
///
/// Constructs AmazonCloudHSMV2Client with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonCloudHSMV2Client(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudHSMV2Config() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonCloudHSMV2Client with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudHSMV2Client Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonCloudHSMV2Client Configuration Object
public AmazonCloudHSMV2Client(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudHSMV2Config clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonCloudHSMV2Client with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonCloudHSMV2Client(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudHSMV2Config())
{
}
///
/// Constructs AmazonCloudHSMV2Client 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 AmazonCloudHSMV2Client(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudHSMV2Config{RegionEndpoint = region})
{
}
///
/// Constructs AmazonCloudHSMV2Client with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudHSMV2Client Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonCloudHSMV2Client Configuration Object
public AmazonCloudHSMV2Client(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudHSMV2Config clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#if AWS_ASYNC_ENUMERABLES_API
private ICloudHSMV2PaginatorFactory _paginators;
///
/// Paginators for the service
///
public ICloudHSMV2PaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new CloudHSMV2PaginatorFactory(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 AmazonCloudHSMV2EndpointResolver());
}
///
/// 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 CopyBackupToRegion
internal virtual CopyBackupToRegionResponse CopyBackupToRegion(CopyBackupToRegionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyBackupToRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyBackupToRegionResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Copy an AWS CloudHSM cluster backup to a different region.
///
/// Container for the necessary parameters to execute the CopyBackupToRegion service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CopyBackupToRegion service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// REST API Reference for CopyBackupToRegion Operation
public virtual Task CopyBackupToRegionAsync(CopyBackupToRegionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyBackupToRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyBackupToRegionResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CreateCluster
internal virtual CreateClusterResponse CreateCluster(CreateClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateClusterResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Creates a new AWS CloudHSM cluster.
///
/// Container for the necessary parameters to execute the CreateCluster service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateCluster service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// REST API Reference for CreateCluster Operation
public virtual Task CreateClusterAsync(CreateClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateClusterResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region CreateHsm
internal virtual CreateHsmResponse CreateHsm(CreateHsmRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateHsmRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateHsmResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.
///
/// Container for the necessary parameters to execute the CreateHsm service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateHsm service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
/// REST API Reference for CreateHsm Operation
public virtual Task CreateHsmAsync(CreateHsmRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateHsmRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateHsmResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteBackup
internal virtual DeleteBackupResponse DeleteBackup(DeleteBackupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteBackupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteBackupResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 days after
/// the DeleteBackup request is made. For more information on restoring a backup, see
/// RestoreBackup.
///
/// Container for the necessary parameters to execute the DeleteBackup service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteBackup service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
/// REST API Reference for DeleteBackup Operation
public virtual Task DeleteBackupAsync(DeleteBackupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteBackupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteBackupResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteCluster
internal virtual DeleteClusterResponse DeleteCluster(DeleteClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteClusterResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, you must
/// delete all HSMs in the cluster. To see if the cluster contains any HSMs, use DescribeClusters.
/// To delete an HSM, use DeleteHsm.
///
/// Container for the necessary parameters to execute the DeleteCluster service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteCluster service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// REST API Reference for DeleteCluster Operation
public virtual Task DeleteClusterAsync(DeleteClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteClusterResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteHsm
internal virtual DeleteHsmResponse DeleteHsm(DeleteHsmRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteHsmRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteHsmResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the
/// IP address of the HSM's elastic network interface (ENI), or the ID of the HSM's ENI.
/// You need to specify only one of these values. To find these values, use DescribeClusters.
///
/// Container for the necessary parameters to execute the DeleteHsm service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteHsm service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
/// REST API Reference for DeleteHsm Operation
public virtual Task DeleteHsmAsync(DeleteHsmRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteHsmRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteHsmResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DescribeBackups
internal virtual DescribeBackupsResponse DescribeBackups(DescribeBackupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeBackupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeBackupsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Gets information about backups of AWS CloudHSM clusters.
///
///
///
/// This is a paginated operation, which means that each response might contain only a
/// subset of all the backups. When the response contains only a subset of backups, it
/// includes a NextToken
value. Use this value in a subsequent DescribeBackups
/// request to get more backups. When you receive a response with no NextToken
/// (or an empty or null value), that means there are no more backups to get.
///
///
/// Container for the necessary parameters to execute the DescribeBackups service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DescribeBackups service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// REST API Reference for DescribeBackups Operation
public virtual Task DescribeBackupsAsync(DescribeBackupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeBackupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeBackupsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DescribeClusters
internal virtual DescribeClustersResponse DescribeClusters(DescribeClustersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClustersResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Gets information about AWS CloudHSM clusters.
///
///
///
/// This is a paginated operation, which means that each response might contain only a
/// subset of all the clusters. When the response contains only a subset of clusters,
/// it includes a NextToken
value. Use this value in a subsequent DescribeClusters
/// request to get more clusters. When you receive a response with no NextToken
/// (or an empty or null value), that means there are no more clusters to get.
///
///
/// Container for the necessary parameters to execute the DescribeClusters service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DescribeClusters service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// REST API Reference for DescribeClusters Operation
public virtual Task DescribeClustersAsync(DescribeClustersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClustersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClustersResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region InitializeCluster
internal virtual InitializeClusterResponse InitializeCluster(InitializeClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = InitializeClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = InitializeClusterResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your
/// issuing certificate authority (CA) and the CA's root certificate. Before you can claim
/// a cluster, you must sign the cluster's certificate signing request (CSR) with your
/// issuing CA. To get the cluster's CSR, use DescribeClusters.
///
/// Container for the necessary parameters to execute the InitializeCluster service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the InitializeCluster service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
/// REST API Reference for InitializeCluster Operation
public virtual Task InitializeClusterAsync(InitializeClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = InitializeClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = InitializeClusterResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListTags
internal virtual ListTagsResponse ListTags(ListTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Gets a list of tags for the specified AWS CloudHSM cluster.
///
///
///
/// This is a paginated operation, which means that each response might contain only a
/// subset of all the tags. When the response contains only a subset of tags, it includes
/// a NextToken
value. Use this value in a subsequent ListTags
/// request to get more tags. When you receive a response with no NextToken
/// (or an empty or null value), that means there are no more tags to get.
///
///
/// Container for the necessary parameters to execute the ListTags service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListTags service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// REST API Reference for ListTags Operation
public virtual Task ListTagsAsync(ListTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ModifyBackupAttributes
internal virtual ModifyBackupAttributesResponse ModifyBackupAttributes(ModifyBackupAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyBackupAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyBackupAttributesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Modifies attributes for AWS CloudHSM backup.
///
/// Container for the necessary parameters to execute the ModifyBackupAttributes service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ModifyBackupAttributes service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
/// REST API Reference for ModifyBackupAttributes Operation
public virtual Task ModifyBackupAttributesAsync(ModifyBackupAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyBackupAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyBackupAttributesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ModifyCluster
internal virtual ModifyClusterResponse ModifyCluster(ModifyClusterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyClusterResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Modifies AWS CloudHSM cluster.
///
/// Container for the necessary parameters to execute the ModifyCluster service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ModifyCluster service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
/// REST API Reference for ModifyCluster Operation
public virtual Task ModifyClusterAsync(ModifyClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyClusterRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyClusterResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region RestoreBackup
internal virtual RestoreBackupResponse RestoreBackup(RestoreBackupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreBackupRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreBackupResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION
/// state. For mor information on deleting a backup, see DeleteBackup.
///
/// Container for the necessary parameters to execute the RestoreBackup service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the RestoreBackup service method, as returned by CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
/// REST API Reference for RestoreBackup Operation
public virtual Task RestoreBackupAsync(RestoreBackupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreBackupRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreBackupResponseUnmarshaller.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 or overwrites one or more tags for the specified AWS CloudHSM cluster.
///
/// 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 CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// 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 the specified tag or tags from the specified AWS CloudHSM cluster.
///
/// 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 CloudHSMV2.
///
/// The request was rejected because the requester does not have permission to perform
/// the requested operation.
///
///
/// The request was rejected because of an AWS CloudHSM internal failure. The request
/// can be retried.
///
///
/// The request was rejected because it is not a valid request.
///
///
/// The request was rejected because it refers to a resource that cannot be found.
///
///
/// The request was rejected because an error occurred.
///
///
/// The request was rejected because of a tagging failure. Verify the tag conditions in
/// all applicable policies, and then retry the request.
///
/// 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
}
}