コード例 #1
0
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHostedZone operation.
        /// <seealso cref="Amazon.Route53.IAmazonRoute53.CreateHostedZone"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateHostedZone operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <CreateHostedZoneResponse> CreateHostedZoneAsync(CreateHostedZoneRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, CreateHostedZoneRequest, CreateHostedZoneResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
コード例 #2
0
        internal CreateHostedZoneResponse CreateHostedZone(CreateHostedZoneRequest request)
        {
            var marshaller   = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance;

            return(Invoke <CreateHostedZoneRequest, CreateHostedZoneResponse>(request, marshaller, unmarshaller));
        }
コード例 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHostedZone operation.
        /// <seealso cref="Amazon.Route53.IAmazonRoute53"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateHostedZone operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <CreateHostedZoneResponse> CreateHostedZoneAsync(CreateHostedZoneRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance;

            return(InvokeAsync <CreateHostedZoneRequest, CreateHostedZoneResponse>(request, marshaller,
                                                                                   unmarshaller, cancellationToken));
        }
コード例 #4
0
        IAsyncResult invokeCreateHostedZone(CreateHostedZoneRequest createHostedZoneRequest, AsyncCallback callback, object state, bool synchronized)
        {
            IRequest    irequest     = new CreateHostedZoneRequestMarshaller().Marshall(createHostedZoneRequest);
            var         unmarshaller = CreateHostedZoneResponseUnmarshaller.GetInstance();
            AsyncResult result       = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);

            Invoke(result);
            return(result);
        }
コード例 #5
0
        /// <summary>
        /// <para> This action creates a new hosted zone.</para> <para>To create a new hosted zone, send a <c>POST</c> request to the
        /// <c>2013-04-01/hostedzone</c> resource. The request body must include an XML document with a <c>CreateHostedZoneRequest</c> element. The
        /// response returns the <c>CreateHostedZoneResponse</c> element that contains metadata about the hosted zone.</para> <para>Route 53
        /// automatically creates a default SOA record and four NS records for the zone. The NS records in the hosted zone are the name servers you give
        /// your registrar to delegate your domain to. For more information about SOA and NS records, see <a href="http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html">NS and SOA Records that Route 53 Creates for a Hosted
        /// Zone</a> in the <i>Amazon Route 53 Developer Guide</i> .</para> <para>When you create a zone, its initial status is <c>PENDING</c> . This
        /// means that it is not yet available on all DNS servers. The status of the zone changes to <c>INSYNC</c> when the NS and SOA records are
        /// available on all Route 53 DNS servers. </para>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateHostedZone service method on
        /// AmazonRoute53.</param>
        ///
        /// <returns>The response from the CreateHostedZone service method, as returned by AmazonRoute53.</returns>
        ///
        /// <exception cref="T:Amazon.Route53.Model.TooManyHostedZonesException" />
        /// <exception cref="T:Amazon.Route53.Model.DelegationSetNotAvailableException" />
        /// <exception cref="T:Amazon.Route53.Model.InvalidDomainNameException" />
        /// <exception cref="T:Amazon.Route53.Model.InvalidInputException" />
        /// <exception cref="T:Amazon.Route53.Model.HostedZoneAlreadyExistsException" />
        public CreateHostedZoneResponse CreateHostedZone(CreateHostedZoneRequest request)
        {
            var task = CreateHostedZoneAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }
コード例 #6
0
 /// <summary>
 /// Initiates the asynchronous execution of the CreateHostedZone operation.
 /// <seealso cref="Amazon.Route53.AmazonRoute53.CreateHostedZone"/>
 /// </summary>
 ///
 /// <param name="createHostedZoneRequest">Container for the necessary parameters to execute the CreateHostedZone operation on
 ///          AmazonRoute53.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 ///
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateHostedZone
 ///         operation.</returns>
 public IAsyncResult BeginCreateHostedZone(CreateHostedZoneRequest createHostedZoneRequest, AsyncCallback callback, object state)
 {
     return(invokeCreateHostedZone(createHostedZoneRequest, callback, state, false));
 }
コード例 #7
0
        /// <summary>
        /// <para> This action creates a new hosted zone.</para> <para>To create a new hosted zone, send a <c>POST</c> request to the
        /// <c>2012-02-29/hostedzone</c> resource. The request body must include an XML document with a <c>CreateHostedZoneRequest</c> element. The
        /// response returns the <c>CreateHostedZoneResponse</c> element that contains metadata about the hosted zone.</para> <para>Route 53
        /// automatically creates a default SOA record and four NS records for the zone. The NS records in the hosted zone are the name servers you give
        /// your registrar to delegate your domain to. For more information about SOA and NS records, see NS and SOA Records that Route 53 Creates for a
        /// Hosted Zone in the <i>Amazon Route 53 Developer Guide</i> .</para> <para>When you create a zone, its initial status is <c>PENDING</c> . This
        /// means that it is not yet available on all DNS servers. The status of the zone changes to <c>INSYNC</c> when the NS and SOA records are
        /// available on all Route 53 DNS servers. </para>
        /// </summary>
        ///
        /// <param name="createHostedZoneRequest">Container for the necessary parameters to execute the CreateHostedZone service method on
        ///          AmazonRoute53.</param>
        ///
        /// <returns>The response from the CreateHostedZone service method, as returned by AmazonRoute53.</returns>
        ///
        /// <exception cref="TooManyHostedZonesException"/>
        /// <exception cref="DelegationSetNotAvailableException"/>
        /// <exception cref="InvalidDomainNameException"/>
        /// <exception cref="HostedZoneAlreadyExistsException"/>
        /// <exception cref="InvalidInputException"/>
        public CreateHostedZoneResponse CreateHostedZone(CreateHostedZoneRequest createHostedZoneRequest)
        {
            IAsyncResult asyncResult = invokeCreateHostedZone(createHostedZoneRequest, null, null, true);

            return(EndCreateHostedZone(asyncResult));
        }