Ejemplo n.º 1
0
        /// <summary>
        /// Returns all tag values for the specified key in the specified region for the AWS account.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetTagValues service method.</param>
        ///
        /// <returns>The response from the GetTagValues 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.PaginationTokenExpiredException">
        /// A <code>PaginationToken</code> is valid for a maximum of 15 minutes. Your request
        /// was denied because the specified <code>PaginationToken</code> has expired.
        /// </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/GetTagValues">REST API Reference for GetTagValues Operation</seealso>
        public virtual GetTagValuesResponse GetTagValues(GetTagValuesRequest request)
        {
            var marshaller   = new GetTagValuesRequestMarshaller();
            var unmarshaller = GetTagValuesResponseUnmarshaller.Instance;

            return(Invoke <GetTagValuesRequest, GetTagValuesResponse>(request, marshaller, unmarshaller));
        }
Ejemplo n.º 2
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonResourceGroupsTaggingAPIConfig config = new AmazonResourceGroupsTaggingAPIConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonResourceGroupsTaggingAPIClient client = new AmazonResourceGroupsTaggingAPIClient(creds, config);

            GetTagValuesResponse resp = new GetTagValuesResponse();

            do
            {
                GetTagValuesRequest req = new GetTagValuesRequest
                {
                    PaginationToken = resp.PaginationToken
                };

                resp = client.GetTagValues(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.TagValues)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.PaginationToken));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetTagValues operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetTagValues 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/GetTagValues">REST API Reference for GetTagValues Operation</seealso>
        public virtual Task <GetTagValuesResponse> GetTagValuesAsync(GetTagValuesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetTagValuesRequestMarshaller();
            var unmarshaller = GetTagValuesResponseUnmarshaller.Instance;

            return(InvokeAsync <GetTagValuesRequest, GetTagValuesResponse>(request, marshaller,
                                                                           unmarshaller, cancellationToken));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetTagValues operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetTagValues 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 EndGetTagValues
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues">REST API Reference for GetTagValues Operation</seealso>
        public IAsyncResult BeginGetTagValues(GetTagValuesRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new GetTagValuesRequestMarshaller();
            var unmarshaller = GetTagValuesResponseUnmarshaller.Instance;

            return(BeginInvoke <GetTagValuesRequest>(request, marshaller, unmarshaller,
                                                     callback, state));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns all tag values for the specified key in the specified region for the AWS account.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetTagValues service method.</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 GetTagValues 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.PaginationTokenExpiredException">
        /// A <code>PaginationToken</code> is valid for a maximum of 15 minutes. Your request
        /// was denied because the specified <code>PaginationToken</code> has expired.
        /// </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/GetTagValues">REST API Reference for GetTagValues Operation</seealso>
        public virtual Task <GetTagValuesResponse> GetTagValuesAsync(GetTagValuesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetTagValuesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetTagValuesResponseUnmarshaller.Instance;

            return(InvokeAsync <GetTagValuesResponse>(request, options, cancellationToken));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Returns all tag values for the specified key in the specified region for the AWS account.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetTagValues service method.</param>
        ///
        /// <returns>The response from the GetTagValues 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.PaginationTokenExpiredException">
        /// A <code>PaginationToken</code> is valid for a maximum of 15 minutes. Your request
        /// was denied because the specified <code>PaginationToken</code> has expired.
        /// </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/GetTagValues">REST API Reference for GetTagValues Operation</seealso>
        public virtual GetTagValuesResponse GetTagValues(GetTagValuesRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetTagValuesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetTagValuesResponseUnmarshaller.Instance;

            return(Invoke <GetTagValuesResponse>(request, options));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetTagValues operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetTagValues 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 EndGetTagValues
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues">REST API Reference for GetTagValues Operation</seealso>
        public virtual IAsyncResult BeginGetTagValues(GetTagValuesRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetTagValuesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetTagValuesResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }