示例#1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Route53Domains.Model.ListTagsForDomainRequest();

            if (cmdletContext.DomainName != null)
            {
                request.DomainName = cmdletContext.DomainName;
            }

            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);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListTagsForDomain operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListTagsForDomain 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<ListTagsForDomainResponse> ListTagsForDomainAsync(ListTagsForDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListTagsForDomainRequestMarshaller();
            var unmarshaller = ListTagsForDomainResponseUnmarshaller.Instance;

            return InvokeAsync<ListTagsForDomainRequest,ListTagsForDomainResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// This operation returns all of the tags that are associated with the specified domain.
 /// 
 ///  
 /// <para>
 /// All tag operations are eventually consistent; subsequent operations may not immediately
 /// represent all issued operations.
 /// </para>
 /// </summary>
 /// <param name="domainName">The domain for which you want to get a list of tags.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the ListTagsForDomain service method, as returned by Route53Domains.</returns>
 /// <exception cref="Amazon.Route53Domains.Model.InvalidInputException">
 /// The requested item is not acceptable. For example, for an OperationId it may refer
 /// to the ID of an operation that is already completed. For a domain name, it may not
 /// be a valid domain name or belong to the requester account.
 /// </exception>
 /// <exception cref="Amazon.Route53Domains.Model.OperationLimitExceededException">
 /// The number of operations or jobs running exceeded the allowed threshold for the account.
 /// </exception>
 /// <exception cref="Amazon.Route53Domains.Model.UnsupportedTLDException">
 /// Amazon Route 53 does not support this top-level domain.
 /// </exception>
 public Task<ListTagsForDomainResponse> ListTagsForDomainAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new ListTagsForDomainRequest();
     request.DomainName = domainName;
     return ListTagsForDomainAsync(request, cancellationToken);
 }
        internal ListTagsForDomainResponse ListTagsForDomain(ListTagsForDomainRequest request)
        {
            var marshaller = new ListTagsForDomainRequestMarshaller();
            var unmarshaller = ListTagsForDomainResponseUnmarshaller.Instance;

            return Invoke<ListTagsForDomainRequest,ListTagsForDomainResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListTagsForDomain operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListTagsForDomain 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 EndListTagsForDomain
        ///         operation.</returns>
        public IAsyncResult BeginListTagsForDomain(ListTagsForDomainRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ListTagsForDomainRequestMarshaller();
            var unmarshaller = ListTagsForDomainResponseUnmarshaller.Instance;

            return BeginInvoke<ListTagsForDomainRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// This operation returns all of the tags that are associated with the specified domain.
 /// 
 ///  
 /// <para>
 /// All tag operations are eventually consistent; subsequent operations may not immediately
 /// represent all issued operations.
 /// </para>
 /// </summary>
 /// <param name="domainName">The domain for which you want to get a list of tags.</param>
 /// 
 /// <returns>The response from the ListTagsForDomain service method, as returned by Route53Domains.</returns>
 /// <exception cref="Amazon.Route53Domains.Model.InvalidInputException">
 /// The requested item is not acceptable. For example, for an OperationId it may refer
 /// to the ID of an operation that is already completed. For a domain name, it may not
 /// be a valid domain name or belong to the requester account.
 /// </exception>
 /// <exception cref="Amazon.Route53Domains.Model.OperationLimitExceededException">
 /// The number of operations or jobs running exceeded the allowed threshold for the account.
 /// </exception>
 /// <exception cref="Amazon.Route53Domains.Model.UnsupportedTLDException">
 /// Amazon Route 53 does not support this top-level domain.
 /// </exception>
 public ListTagsForDomainResponse ListTagsForDomain(string domainName)
 {
     var request = new ListTagsForDomainRequest();
     request.DomainName = domainName;
     return ListTagsForDomain(request);
 }
示例#7
0
 private Amazon.Route53Domains.Model.ListTagsForDomainResponse CallAWSServiceOperation(IAmazonRoute53Domains client, Amazon.Route53Domains.Model.ListTagsForDomainRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Route 53 Domains", "ListTagsForDomain");
     try
     {
         #if DESKTOP
         return(client.ListTagsForDomain(request));
         #elif CORECLR
         return(client.ListTagsForDomainAsync(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;
     }
 }