Example #1
0
        internal CreateHostedZoneResponse CreateHostedZone(CreateHostedZoneRequest request)
        {
            var marshaller   = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance;

            return(Invoke <CreateHostedZoneRequest, CreateHostedZoneResponse>(request, marshaller, unmarshaller));
        }
        /// <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));
        }
        public void CreateHostedZoneMarshallTest()
        {
            var operation = service_model.FindOperation("CreateHostedZone");

            var request    = InstantiateClassGenerator.Execute <CreateHostedZoneRequest>();
            var marshaller = new CreateHostedZoneRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);

            RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model);

            var webResponse = new WebResponseData
            {
                Headers =
                {
                    { "Location",         "Location_Value"          },
                    { "x-amzn-RequestId", Guid.NewGuid().ToString() },
                    { "x-amz-crc32",      "0"                       }
                }
            };

            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context         = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse);
            ResponseUnmarshaller unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance;
            var response = unmarshaller.Unmarshall(context)
                           as CreateHostedZoneResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
Example #4
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));
        }
        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);
        }
        /// <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="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="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" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<CreateHostedZoneResponse> CreateHostedZoneAsync(CreateHostedZoneRequest createHostedZoneRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, CreateHostedZoneRequest, CreateHostedZoneResponse>(createHostedZoneRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <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-12-12/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="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="T:Amazon.Route53.Model.HostedZoneAlreadyExistsException" />
        /// <exception cref="T:Amazon.Route53.Model.InvalidInputException" />
        /// <exception cref="T:Amazon.Route53.Model.InvalidDomainNameException" />
        /// <exception cref="T:Amazon.Route53.Model.TooManyHostedZonesException" />
        /// <exception cref="T:Amazon.Route53.Model.DelegationSetNotAvailableException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<CreateHostedZoneResponse> CreateHostedZoneAsync(CreateHostedZoneRequest createHostedZoneRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, CreateHostedZoneRequest, CreateHostedZoneResponse>(createHostedZoneRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHostedZone operation.
        /// </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);
        }
        /// <summary>
        /// This action creates a new hosted zone.
        /// 
        ///  
        /// <para>
        /// To create a new hosted zone, send a <code>POST</code> request to the <code>2013-04-01/hostedzone</code>
        /// resource. The request body must include an XML document with a <code>CreateHostedZoneRequest</code>
        /// element. The response returns the <code>CreateHostedZoneResponse</code> 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 <code>PENDING</code>. This means that
        /// it is not yet available on all DNS servers. The status of the zone changes to <code>INSYNC</code>
        /// when the NS and SOA records are available on all Route 53 DNS servers. 
        /// </para>
        ///  
        /// <para>
        /// When trying to create a hosted zone using a reusable delegation set, you could specify
        /// an optional DelegationSetId, and Route53 would assign those 4 NS records for the zone,
        /// instead of alloting a new one.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CreateHostedZone service method.</param>
        /// 
        /// <returns>The response from the CreateHostedZone service method, as returned by Route53.</returns>
        /// <exception cref="Amazon.Route53.Model.ConflictingDomainExistsException">
        /// 
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.DelegationSetNotAvailableException">
        /// Route 53 allows some duplicate domain names, but there is a maximum number of duplicate
        /// names. This error indicates that you have reached that maximum. If you want to create
        /// another hosted zone with the same name and Route 53 generates this error, you can
        /// request an increase to the limit on the <a href="http://aws.amazon.com/route53-request/">Contact
        /// Us</a> page.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.DelegationSetNotReusableException">
        /// The specified delegation set has not been marked as reusable.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.HostedZoneAlreadyExistsException">
        /// The hosted zone you are trying to create already exists. Route 53 returns this error
        /// when a hosted zone has already been created with the specified <code>CallerReference</code>.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.InvalidDomainNameException">
        /// This error indicates that the specified domain name is not valid.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.InvalidInputException">
        /// Some value specified in the request is invalid or the XML document is malformed.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.InvalidVPCIdException">
        /// The hosted zone you are trying to create for your VPC_ID does not belong to you. Route
        /// 53 returns this error when the VPC specified by <code>VPCId</code> does not belong
        /// to you.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.NoSuchDelegationSetException">
        /// The specified delegation set does not exist.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.TooManyHostedZonesException">
        /// This error indicates that you've reached the maximum number of hosted zones that can
        /// be created for the current AWS account. You can request an increase to the limit on
        /// the <a href="http://aws.amazon.com/route53-request/">Contact Us</a> page.
        /// </exception>
        public CreateHostedZoneResponse CreateHostedZone(CreateHostedZoneRequest request)
        {
            var marshaller = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance;

            return Invoke<CreateHostedZoneRequest,CreateHostedZoneResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHostedZone operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateHostedZone operation on AmazonRoute53Client.</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 request, AsyncCallback callback, object state)
        {
            var marshaller = new CreateHostedZoneRequestMarshaller();
            var unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance;

            return BeginInvoke<CreateHostedZoneRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 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;
 }
        public void CreateHostedZoneMarshallTest()
        {
            var operation = service_model.FindOperation("CreateHostedZone");

            var request = InstantiateClassGenerator.Execute<CreateHostedZoneRequest>();
            var marshaller = new CreateHostedZoneRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model);            

            var webResponse = new WebResponseData
            {
                Headers = {
                    {"Location","Location_Value"},
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"}
                }
            };
            
            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();            
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse);
            ResponseUnmarshaller unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance;
            var response = unmarshaller.Unmarshall(context)
                as CreateHostedZoneResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }