Container for the parameters to the RenewDomain operation. This operation renews a domain for the specified number of years. The cost of renewing your domain is billed to your AWS account.

We recommend that you renew your domain several weeks before the expiration date. Some TLD registries delete domains before the expiration date if you haven't renewed far enough in advance. For more information about renewing domain registration, see Renewing Registration for a Domain in the Amazon Route 53 documentation.

상속: AmazonRoute53DomainsRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Route53Domains.Model.RenewDomainRequest();

            if (cmdletContext.CurrentExpiryYear != null)
            {
                request.CurrentExpiryYear = cmdletContext.CurrentExpiryYear.Value;
            }
            if (cmdletContext.DomainName != null)
            {
                request.DomainName = cmdletContext.DomainName;
            }
            if (cmdletContext.DurationInYear != null)
            {
                request.DurationInYears = cmdletContext.DurationInYear.Value;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
예제 #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the RenewDomain operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the RenewDomain 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<RenewDomainResponse> RenewDomainAsync(RenewDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new RenewDomainRequestMarshaller();
            var unmarshaller = RenewDomainResponseUnmarshaller.Instance;

            return InvokeAsync<RenewDomainRequest,RenewDomainResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
예제 #3
0
        internal RenewDomainResponse RenewDomain(RenewDomainRequest request)
        {
            var marshaller = new RenewDomainRequestMarshaller();
            var unmarshaller = RenewDomainResponseUnmarshaller.Instance;

            return Invoke<RenewDomainRequest,RenewDomainResponse>(request, marshaller, unmarshaller);
        }
예제 #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the RenewDomain operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the RenewDomain operation on AmazonRoute53DomainsClient.</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 EndRenewDomain
        ///         operation.</returns>
        public IAsyncResult BeginRenewDomain(RenewDomainRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new RenewDomainRequestMarshaller();
            var unmarshaller = RenewDomainResponseUnmarshaller.Instance;

            return BeginInvoke<RenewDomainRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 private Amazon.Route53Domains.Model.RenewDomainResponse CallAWSServiceOperation(IAmazonRoute53Domains client, Amazon.Route53Domains.Model.RenewDomainRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Route 53 Domains", "RenewDomain");
     try
     {
         #if DESKTOP
         return(client.RenewDomain(request));
         #elif CORECLR
         return(client.RenewDomainAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }