예제 #1
0
        public void UntagResourcesMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <UntagResourcesRequest>();
            var marshaller = new UntagResourcesRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <UntagResourcesRequest>(request, jsonRequest);

            var webResponse = new WebResponseData
            {
                Headers =
                {
                    { "x-amzn-RequestId", Guid.NewGuid().ToString() },
                    { "x-amz-crc32",      "0"                       }
                }
            };
            var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("UntagResources").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = UntagResourcesResponseUnmarshaller.Instance.Unmarshall(context)
                           as UntagResourcesResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
예제 #2
0
        /// <summary>
        /// Removes the specified tags from the specified resources. When you specify a tag key,
        /// the action removes both that key and its associated value. The operation succeeds
        /// even if you attempt to remove tags from a resource that were already removed. Note
        /// the following:
        ///
        ///  <ul> <li>
        /// <para>
        /// To remove tags from a resource, you need the necessary permissions for the service
        /// that the resource belongs to as well as permissions for removing tags. For more information,
        /// see <a href="http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-tagging.html">Obtaining
        /// Permissions for Tagging</a> in the <i>AWS Resource Groups and Tag Editor User Guide</i>.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// You can only tag resources that are located in the specified region for the AWS account.
        /// </para>
        ///  </li> </ul>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the UntagResources service method.</param>
        ///
        /// <returns>The response from the UntagResources service method, as returned by ResourceGroupsTaggingAPI.</returns>
        /// <exception cref="Amazon.ResourceGroupsTaggingAPI.Model.InternalServiceException">
        /// The request processing failed because of an unknown error, exception, or failure.
        /// You can retry the request.
        /// </exception>
        /// <exception cref="Amazon.ResourceGroupsTaggingAPI.Model.InvalidParameterException">
        /// A parameter is missing or a malformed string or invalid or out-of-range value was
        /// supplied for the request parameter.
        /// </exception>
        /// <exception cref="Amazon.ResourceGroupsTaggingAPI.Model.ThrottledException">
        /// The request was denied to limit the frequency of submitted requests.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources">REST API Reference for UntagResources Operation</seealso>
        public virtual UntagResourcesResponse UntagResources(UntagResourcesRequest request)
        {
            var marshaller   = new UntagResourcesRequestMarshaller();
            var unmarshaller = UntagResourcesResponseUnmarshaller.Instance;

            return(Invoke <UntagResourcesRequest, UntagResourcesResponse>(request, marshaller, unmarshaller));
        }
예제 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the UntagResources operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UntagResources 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>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources">REST API Reference for UntagResources Operation</seealso>
        public virtual Task <UntagResourcesResponse> UntagResourcesAsync(UntagResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new UntagResourcesRequestMarshaller();
            var unmarshaller = UntagResourcesResponseUnmarshaller.Instance;

            return(InvokeAsync <UntagResourcesRequest, UntagResourcesResponse>(request, marshaller,
                                                                               unmarshaller, cancellationToken));
        }
예제 #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the UntagResources operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UntagResources operation on AmazonResourceGroupsTaggingAPIClient.</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 EndUntagResources
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources">REST API Reference for UntagResources Operation</seealso>
        public IAsyncResult BeginUntagResources(UntagResourcesRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new UntagResourcesRequestMarshaller();
            var unmarshaller = UntagResourcesResponseUnmarshaller.Instance;

            return(BeginInvoke <UntagResourcesRequest>(request, marshaller, unmarshaller,
                                                       callback, state));
        }