Container for the parameters to the UpdateTagsForDomain operation. This operation adds or updates tags for a specified domain.

All tag operations are eventually consistent; subsequent operations may not immediately represent all issued operations.

Inheritance: AmazonRoute53DomainsRequest
コード例 #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Route53Domains.Model.UpdateTagsForDomainRequest();

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

            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 UpdateTagsForDomain operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateTagsForDomain 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<UpdateTagsForDomainResponse> UpdateTagsForDomainAsync(UpdateTagsForDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateTagsForDomainRequestMarshaller();
            var unmarshaller = UpdateTagsForDomainResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateTagsForDomainRequest,UpdateTagsForDomainResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
コード例 #3
0
 /// <summary>
 /// This operation adds or updates tags for a 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 add or update tags. The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they&apos;re surrounded by letters, numbers, or other hyphens. You can&apos;t specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode. Required: Yes</param>
 /// <param name="tagsToUpdate">A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced. Type: A complex type containing a list of tags Default: None Required: No'> Each tag includes the following elements: <ul> <li>Key The key (name) of a tag. Type: String Default: None Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@" Constraints: Each key can be 1-128 characters long. Required: Yes </li> <li>Value The value of a tag. Type: String Default: None Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@" Constraints: Each value can be 0-256 characters long. Required: Yes </li> </ul></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 UpdateTagsForDomain 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<UpdateTagsForDomainResponse> UpdateTagsForDomainAsync(string domainName, List<Tag> tagsToUpdate, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new UpdateTagsForDomainRequest();
     request.DomainName = domainName;
     request.TagsToUpdate = tagsToUpdate;
     return UpdateTagsForDomainAsync(request, cancellationToken);
 }
コード例 #4
0
        internal UpdateTagsForDomainResponse UpdateTagsForDomain(UpdateTagsForDomainRequest request)
        {
            var marshaller = new UpdateTagsForDomainRequestMarshaller();
            var unmarshaller = UpdateTagsForDomainResponseUnmarshaller.Instance;

            return Invoke<UpdateTagsForDomainRequest,UpdateTagsForDomainResponse>(request, marshaller, unmarshaller);
        }
コード例 #5
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateTagsForDomain operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateTagsForDomain 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 EndUpdateTagsForDomain
        ///         operation.</returns>
        public IAsyncResult BeginUpdateTagsForDomain(UpdateTagsForDomainRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateTagsForDomainRequestMarshaller();
            var unmarshaller = UpdateTagsForDomainResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateTagsForDomainRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
コード例 #6
0
 /// <summary>
 /// This operation adds or updates tags for a 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 add or update tags. The name of a domain. Type: String Default: None Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when theyaposre surrounded by letters, numbers, or other hyphens. You canapost specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode. Required: Yes</param>
 /// <param name="tagsToUpdate">A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced. Type: A complex type containing a list of tags Default: None Required: No'&gt; Each tag includes the following elements: <ul> <li> Key The key (name) of a tag. Type: String Default: None Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@" Constraints: Each key can be 1-128 characters long. Required: Yes </li> <li> Value The value of a tag. Type: String Default: None Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@" Constraints: Each value can be 0-256 characters long. Required: Yes </li> </ul></param>
 /// 
 /// <returns>The response from the UpdateTagsForDomain 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 UpdateTagsForDomainResponse UpdateTagsForDomain(string domainName, List<Tag> tagsToUpdate)
 {
     var request = new UpdateTagsForDomainRequest();
     request.DomainName = domainName;
     request.TagsToUpdate = tagsToUpdate;
     return UpdateTagsForDomain(request);
 }
コード例 #7
0
 private Amazon.Route53Domains.Model.UpdateTagsForDomainResponse CallAWSServiceOperation(IAmazonRoute53Domains client, Amazon.Route53Domains.Model.UpdateTagsForDomainRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Route 53 Domains", "UpdateTagsForDomain");
     try
     {
         #if DESKTOP
         return(client.UpdateTagsForDomain(request));
         #elif CORECLR
         return(client.UpdateTagsForDomainAsync(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;
     }
 }