/*
* 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.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();
#if BCL45 || AWS_ASYNC_ENUMERABLES_API
private IAccountPaginatorFactory _paginators;
///
/// Paginators for the service
///
public IAccountPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new AccountPaginatorFactory(this);
}
return this._paginators;
}
}
#endif
#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);
}
///
/// Initiates the asynchronous execution of the DeleteAlternateContact operation.
///
///
/// Container for the necessary parameters to execute the DeleteAlternateContact operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteAlternateContact
/// operation.
/// REST API Reference for DeleteAlternateContact Operation
public virtual IAsyncResult BeginDeleteAlternateContact(DeleteAlternateContactRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteAlternateContactResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DeleteAlternateContact operation.
///
///
/// The IAsyncResult returned by the call to BeginDeleteAlternateContact.
///
/// Returns a DeleteAlternateContactResult from Account.
/// REST API Reference for DeleteAlternateContact Operation
public virtual DeleteAlternateContactResponse EndDeleteAlternateContact(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the DisableRegion operation.
///
///
/// Container for the necessary parameters to execute the DisableRegion operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDisableRegion
/// operation.
/// REST API Reference for DisableRegion Operation
public virtual IAsyncResult BeginDisableRegion(DisableRegionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableRegionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DisableRegion operation.
///
///
/// The IAsyncResult returned by the call to BeginDisableRegion.
///
/// Returns a DisableRegionResult from Account.
/// REST API Reference for DisableRegion Operation
public virtual DisableRegionResponse EndDisableRegion(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the EnableRegion operation.
///
///
/// Container for the necessary parameters to execute the EnableRegion operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndEnableRegion
/// operation.
/// REST API Reference for EnableRegion Operation
public virtual IAsyncResult BeginEnableRegion(EnableRegionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableRegionRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableRegionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the EnableRegion operation.
///
///
/// The IAsyncResult returned by the call to BeginEnableRegion.
///
/// Returns a EnableRegionResult from Account.
/// REST API Reference for EnableRegion Operation
public virtual EnableRegionResponse EndEnableRegion(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the GetAlternateContact operation.
///
///
/// Container for the necessary parameters to execute the GetAlternateContact operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetAlternateContact
/// operation.
/// REST API Reference for GetAlternateContact Operation
public virtual IAsyncResult BeginGetAlternateContact(GetAlternateContactRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAlternateContactResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the GetAlternateContact operation.
///
///
/// The IAsyncResult returned by the call to BeginGetAlternateContact.
///
/// Returns a GetAlternateContactResult from Account.
/// REST API Reference for GetAlternateContact Operation
public virtual GetAlternateContactResponse EndGetAlternateContact(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the GetContactInformation operation.
///
///
/// Container for the necessary parameters to execute the GetContactInformation operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetContactInformation
/// operation.
/// REST API Reference for GetContactInformation Operation
public virtual IAsyncResult BeginGetContactInformation(GetContactInformationRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetContactInformationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetContactInformationResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the GetContactInformation operation.
///
///
/// The IAsyncResult returned by the call to BeginGetContactInformation.
///
/// Returns a GetContactInformationResult from Account.
/// REST API Reference for GetContactInformation Operation
public virtual GetContactInformationResponse EndGetContactInformation(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the GetRegionOptStatus operation.
///
///
/// Container for the necessary parameters to execute the GetRegionOptStatus operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetRegionOptStatus
/// operation.
/// REST API Reference for GetRegionOptStatus Operation
public virtual IAsyncResult BeginGetRegionOptStatus(GetRegionOptStatusRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetRegionOptStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetRegionOptStatusResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the GetRegionOptStatus operation.
///
///
/// The IAsyncResult returned by the call to BeginGetRegionOptStatus.
///
/// Returns a GetRegionOptStatusResult from Account.
/// REST API Reference for GetRegionOptStatus Operation
public virtual GetRegionOptStatusResponse EndGetRegionOptStatus(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the ListRegions operation.
///
///
/// Container for the necessary parameters to execute the ListRegions operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListRegions
/// operation.
/// REST API Reference for ListRegions Operation
public virtual IAsyncResult BeginListRegions(ListRegionsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListRegionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListRegionsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the ListRegions operation.
///
///
/// The IAsyncResult returned by the call to BeginListRegions.
///
/// Returns a ListRegionsResult from Account.
/// REST API Reference for ListRegions Operation
public virtual ListRegionsResponse EndListRegions(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the PutAlternateContact operation.
///
///
/// Container for the necessary parameters to execute the PutAlternateContact operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutAlternateContact
/// operation.
/// REST API Reference for PutAlternateContact Operation
public virtual IAsyncResult BeginPutAlternateContact(PutAlternateContactRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAlternateContactRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAlternateContactResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the PutAlternateContact operation.
///
///
/// The IAsyncResult returned by the call to BeginPutAlternateContact.
///
/// Returns a PutAlternateContactResult from Account.
/// REST API Reference for PutAlternateContact Operation
public virtual PutAlternateContactResponse EndPutAlternateContact(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#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);
}
///
/// Initiates the asynchronous execution of the PutContactInformation operation.
///
///
/// Container for the necessary parameters to execute the PutContactInformation operation on AmazonAccountClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutContactInformation
/// operation.
/// REST API Reference for PutContactInformation Operation
public virtual IAsyncResult BeginPutContactInformation(PutContactInformationRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutContactInformationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutContactInformationResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the PutContactInformation operation.
///
///
/// The IAsyncResult returned by the call to BeginPutContactInformation.
///
/// Returns a PutContactInformationResult from Account.
/// REST API Reference for PutContactInformation Operation
public virtual PutContactInformationResponse EndPutContactInformation(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
}
}