/*
* 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 account-2021-02-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.Account.Model;
using Amazon.Account.Model.Internal.MarshallTransformations;
using Amazon.Account.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.Account
{
///
/// Implementation for accessing Account
///
/// Operations for Amazon Web Services Account Management
///
public partial class AmazonAccountClient : AmazonServiceClient, IAmazonAccount
{
private static IServiceMetadata serviceMetadata = new AmazonAccountMetadata();
private IAccountPaginatorFactory _paginators;
///
/// Paginators for the service
///
public IAccountPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new AccountPaginatorFactory(this);
}
return this._paginators;
}
}
#region Constructors
///
/// Constructs AmazonAccountClient 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 AmazonAccountClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonAccountConfig()) { }
///
/// Constructs AmazonAccountClient 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 AmazonAccountClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonAccountConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonAccountClient 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 AmazonAccountClient Configuration Object
public AmazonAccountClient(AmazonAccountConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonAccountClient with AWS Credentials
///
/// AWS Credentials
public AmazonAccountClient(AWSCredentials credentials)
: this(credentials, new AmazonAccountConfig())
{
}
///
/// Constructs AmazonAccountClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonAccountClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonAccountConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonAccountClient with AWS Credentials and an
/// AmazonAccountClient Configuration object.
///
/// AWS Credentials
/// The AmazonAccountClient Configuration Object
public AmazonAccountClient(AWSCredentials credentials, AmazonAccountConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonAccountClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonAccountClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonAccountConfig())
{
}
///
/// Constructs AmazonAccountClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonAccountClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonAccountConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonAccountClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonAccountClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonAccountClient Configuration Object
public AmazonAccountClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonAccountConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonAccountClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonAccountClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAccountConfig())
{
}
///
/// Constructs AmazonAccountClient 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 AmazonAccountClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAccountConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonAccountClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonAccountClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonAccountClient Configuration Object
public AmazonAccountClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonAccountConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customize the pipeline
///
///
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler();
pipeline.AddHandlerAfter(new AmazonAccountEndpointResolver());
}
///
/// 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 DeleteAlternateContact
///
/// Deletes the specified alternate contact from an Amazon Web Services account.
///
///
///
/// For complete details about how to use the alternate contact operations, see Access
/// or updating the alternate contacts.
///
///
///
/// Before you can update the alternate contact information for an Amazon Web Services
/// account that is managed by Organizations, you must first enable integration between
/// Amazon Web Services Account Management and Organizations. For more information, see
/// Enabling
/// trusted access for Amazon Web Services Account Management.
///
///
///
/// Container for the necessary parameters to execute the DeleteAlternateContact service method.
///
/// The response from the DeleteAlternateContact service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it specified a resource that can't be found.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for DeleteAlternateContact Operation
public virtual DeleteAlternateContactResponse DeleteAlternateContact(DeleteAlternateContactRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteAlternateContactResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes the specified alternate contact from an Amazon Web Services account.
///
///
///
/// For complete details about how to use the alternate contact operations, see Access
/// or updating the alternate contacts.
///
///
///
/// Before you can update the alternate contact information for an Amazon Web Services
/// account that is managed by Organizations, you must first enable integration between
/// Amazon Web Services Account Management and Organizations. For more information, see
/// Enabling
/// trusted access for Amazon Web Services Account Management.
///
///
///
/// Container for the necessary parameters to execute the DeleteAlternateContact service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteAlternateContact service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it specified a resource that can't be found.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for DeleteAlternateContact Operation
public virtual Task DeleteAlternateContactAsync(DeleteAlternateContactRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteAlternateContactResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DisableRegion
///
/// Disables (opts-out) a particular Region for an account.
///
/// Container for the necessary parameters to execute the DisableRegion service method.
///
/// The response from the DisableRegion service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The request could not be processed because of a conflict in the current status of
/// the resource. For example, this happens if you try to enable a Region that is currently
/// being disabled (in a status of DISABLING).
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for DisableRegion Operation
public virtual DisableRegionResponse DisableRegion(DisableRegionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableRegionResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Disables (opts-out) a particular Region for an account.
///
/// Container for the necessary parameters to execute the DisableRegion service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DisableRegion service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The request could not be processed because of a conflict in the current status of
/// the resource. For example, this happens if you try to enable a Region that is currently
/// being disabled (in a status of DISABLING).
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for DisableRegion Operation
public virtual Task DisableRegionAsync(DisableRegionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableRegionResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region EnableRegion
///
/// Enables (opts-in) a particular Region for an account.
///
/// Container for the necessary parameters to execute the EnableRegion service method.
///
/// The response from the EnableRegion service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The request could not be processed because of a conflict in the current status of
/// the resource. For example, this happens if you try to enable a Region that is currently
/// being disabled (in a status of DISABLING).
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for EnableRegion Operation
public virtual EnableRegionResponse EnableRegion(EnableRegionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableRegionResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Enables (opts-in) a particular Region for an account.
///
/// Container for the necessary parameters to execute the EnableRegion service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the EnableRegion service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The request could not be processed because of a conflict in the current status of
/// the resource. For example, this happens if you try to enable a Region that is currently
/// being disabled (in a status of DISABLING).
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for EnableRegion Operation
public virtual Task EnableRegionAsync(EnableRegionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableRegionResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetAlternateContact
///
/// Retrieves the specified alternate contact attached to an Amazon Web Services account.
///
///
///
/// For complete details about how to use the alternate contact operations, see Access
/// or updating the alternate contacts.
///
///
///
/// Before you can update the alternate contact information for an Amazon Web Services
/// account that is managed by Organizations, you must first enable integration between
/// Amazon Web Services Account Management and Organizations. For more information, see
/// Enabling
/// trusted access for Amazon Web Services Account Management.
///
///
///
/// Container for the necessary parameters to execute the GetAlternateContact service method.
///
/// The response from the GetAlternateContact service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it specified a resource that can't be found.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for GetAlternateContact Operation
public virtual GetAlternateContactResponse GetAlternateContact(GetAlternateContactRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAlternateContactResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves the specified alternate contact attached to an Amazon Web Services account.
///
///
///
/// For complete details about how to use the alternate contact operations, see Access
/// or updating the alternate contacts.
///
///
///
/// Before you can update the alternate contact information for an Amazon Web Services
/// account that is managed by Organizations, you must first enable integration between
/// Amazon Web Services Account Management and Organizations. For more information, see
/// Enabling
/// trusted access for Amazon Web Services Account Management.
///
///
///
/// Container for the necessary parameters to execute the GetAlternateContact service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetAlternateContact service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it specified a resource that can't be found.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for GetAlternateContact Operation
public virtual Task GetAlternateContactAsync(GetAlternateContactRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAlternateContactResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetContactInformation
///
/// Retrieves the primary contact information of an Amazon Web Services account.
///
///
///
/// For complete details about how to use the primary contact operations, see Update
/// the primary and alternate contact information.
///
///
/// Container for the necessary parameters to execute the GetContactInformation service method.
///
/// The response from the GetContactInformation service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it specified a resource that can't be found.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for GetContactInformation Operation
public virtual GetContactInformationResponse GetContactInformation(GetContactInformationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetContactInformationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetContactInformationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves the primary contact information of an Amazon Web Services account.
///
///
///
/// For complete details about how to use the primary contact operations, see Update
/// the primary and alternate contact information.
///
///
/// Container for the necessary parameters to execute the GetContactInformation service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetContactInformation service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it specified a resource that can't be found.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for GetContactInformation Operation
public virtual Task GetContactInformationAsync(GetContactInformationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetContactInformationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetContactInformationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetRegionOptStatus
///
/// Retrieves the opt-in status of a particular Region.
///
/// Container for the necessary parameters to execute the GetRegionOptStatus service method.
///
/// The response from the GetRegionOptStatus service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for GetRegionOptStatus Operation
public virtual GetRegionOptStatusResponse GetRegionOptStatus(GetRegionOptStatusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetRegionOptStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetRegionOptStatusResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves the opt-in status of a particular Region.
///
/// Container for the necessary parameters to execute the GetRegionOptStatus service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetRegionOptStatus service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for GetRegionOptStatus Operation
public virtual Task GetRegionOptStatusAsync(GetRegionOptStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetRegionOptStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetRegionOptStatusResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListRegions
///
/// Lists all the Regions for a given account and their respective opt-in statuses. Optionally,
/// this list can be filtered by the region-opt-status-contains
parameter.
///
/// Container for the necessary parameters to execute the ListRegions service method.
///
/// The response from the ListRegions service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for ListRegions Operation
public virtual ListRegionsResponse ListRegions(ListRegionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListRegionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListRegionsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Lists all the Regions for a given account and their respective opt-in statuses. Optionally,
/// this list can be filtered by the region-opt-status-contains
parameter.
///
/// Container for the necessary parameters to execute the ListRegions service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListRegions service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for ListRegions Operation
public virtual Task ListRegionsAsync(ListRegionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListRegionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListRegionsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutAlternateContact
///
/// Modifies the specified alternate contact attached to an Amazon Web Services account.
///
///
///
/// For complete details about how to use the alternate contact operations, see Access
/// or updating the alternate contacts.
///
///
///
/// Before you can update the alternate contact information for an Amazon Web Services
/// account that is managed by Organizations, you must first enable integration between
/// Amazon Web Services Account Management and Organizations. For more information, see
/// Enabling
/// trusted access for Amazon Web Services Account Management.
///
///
///
/// Container for the necessary parameters to execute the PutAlternateContact service method.
///
/// The response from the PutAlternateContact service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for PutAlternateContact Operation
public virtual PutAlternateContactResponse PutAlternateContact(PutAlternateContactRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAlternateContactResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Modifies the specified alternate contact attached to an Amazon Web Services account.
///
///
///
/// For complete details about how to use the alternate contact operations, see Access
/// or updating the alternate contacts.
///
///
///
/// Before you can update the alternate contact information for an Amazon Web Services
/// account that is managed by Organizations, you must first enable integration between
/// Amazon Web Services Account Management and Organizations. For more information, see
/// Enabling
/// trusted access for Amazon Web Services Account Management.
///
///
///
/// Container for the necessary parameters to execute the PutAlternateContact service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutAlternateContact service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for PutAlternateContact Operation
public virtual Task PutAlternateContactAsync(PutAlternateContactRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAlternateContactResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutContactInformation
///
/// Updates the primary contact information of an Amazon Web Services account.
///
///
///
/// For complete details about how to use the primary contact operations, see Update
/// the primary and alternate contact information.
///
///
/// Container for the necessary parameters to execute the PutContactInformation service method.
///
/// The response from the PutContactInformation service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for PutContactInformation Operation
public virtual PutContactInformationResponse PutContactInformation(PutContactInformationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutContactInformationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutContactInformationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Updates the primary contact information of an Amazon Web Services account.
///
///
///
/// For complete details about how to use the primary contact operations, see Update
/// the primary and alternate contact information.
///
///
/// Container for the necessary parameters to execute the PutContactInformation service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutContactInformation service method, as returned by Account.
///
/// The operation failed because the calling identity doesn't have the minimum required
/// permissions.
///
///
/// The operation failed because of an error internal to Amazon Web Services. Try your
/// operation again later.
///
///
/// The operation failed because it was called too frequently and exceeded a throttle
/// limit.
///
///
/// The operation failed because one of the input parameters was invalid.
///
/// REST API Reference for PutContactInformation Operation
public virtual Task PutContactInformationAsync(PutContactInformationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutContactInformationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutContactInformationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}