Container for the parameters to the ListVaults operation.

This operation lists all vaults owned by the calling user's account. The list returned in the response is ASCII-sorted by vault name.

By default, this operation returns up to 1,000 items. If there are more vaults to list, the response marker field contains the vault Amazon Resource Name (ARN) at which to continue the list with a new List Vaults request; otherwise, the marker field is null . To return a list of vaults that begins at a specific vault, set the marker request parameter to the vault ARN you obtained from a previous List Vaults request. You can also limit the number of vaults returned in the response by specifying the limit parameter in the request.

An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM) .

For conceptual information and underlying REST API, go to Retrieving Vault Metadata in Amazon Glacier and List Vaults in the Amazon Glacier Developer Guide .

Inheritance: AmazonGlacierRequest
Esempio n. 1
0
        internal ListVaultsResponse ListVaults(ListVaultsRequest request)
        {
            var marshaller = new ListVaultsRequestMarshaller();
            var unmarshaller = ListVaultsResponseUnmarshaller.Instance;

            return Invoke<ListVaultsRequest,ListVaultsResponse>(request, marshaller, unmarshaller);
        }
Esempio n. 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListVaults operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVaults 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<ListVaultsResponse> ListVaultsAsync(ListVaultsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListVaultsRequestMarshaller();
            var unmarshaller = ListVaultsResponseUnmarshaller.Instance;

            return InvokeAsync<ListVaultsRequest,ListVaultsResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
Esempio n. 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListVaults operation.
        /// <seealso cref="Amazon.Glacier.IAmazonGlacier.ListVaults"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVaults 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<ListVaultsResponse> ListVaultsAsync(ListVaultsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListVaultsRequestMarshaller();
            var unmarshaller = ListVaultsResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, ListVaultsRequest, ListVaultsResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
Esempio n. 4
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListVaults operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVaults operation on AmazonGlacierClient.</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 EndListVaults
        ///         operation.</returns>
        public IAsyncResult BeginListVaults(ListVaultsRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ListVaultsRequestMarshaller();
            var unmarshaller = ListVaultsResponseUnmarshaller.Instance;

            return BeginInvoke<ListVaultsRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the ListVaults operation.
 /// <seealso cref="Amazon.Glacier.AmazonGlacier.ListVaults"/>
 /// </summary>
 /// 
 /// <param name="listVaultsRequest">Container for the necessary parameters to execute the ListVaults operation on AmazonGlacier.</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 EndListVaults
 ///         operation.</returns>
 public IAsyncResult BeginListVaults(ListVaultsRequest listVaultsRequest, AsyncCallback callback, object state)
 {
     return invokeListVaults(listVaultsRequest, callback, state, false);
 }
Esempio n. 6
0
        /// <summary>
        /// <para>This operation lists all vaults owned by the calling user's account. The list returned in the response is ASCII-sorted by vault name.
        /// </para> <para>By default, this operation returns up to 1,000 items. If there are more vaults to list, the response <c>marker</c> field
        /// contains the vault Amazon Resource Name (ARN) at which to continue the list with a new List Vaults request; otherwise, the <c>marker</c>
        /// field is <c>null</c> . To return a list of vaults that begins at a specific vault, set the <c>marker</c> request parameter to the vault ARN
        /// you obtained from a previous List Vaults request. You can also limit the number of vaults returned in the response by specifying the
        /// <c>limit</c> parameter in the request. </para> <para>An AWS account has full permission to perform all operations (actions). However, AWS
        /// Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform
        /// specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a> .</para> <para>For conceptual information and underlying REST API, go to
        /// <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html">Retrieving Vault Metadata in Amazon Glacier</a>
        /// and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html">List Vaults </a> in the <i>Amazon Glacier Developer
        /// Guide</i> .
        /// </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVaults service method on AmazonGlacier.</param>
        /// 
        /// <returns>The response from the ListVaults service method, as returned by AmazonGlacier.</returns>
        /// 
        /// <exception cref="T:Amazon.Glacier.Model.ResourceNotFoundException" />
        /// <exception cref="T:Amazon.Glacier.Model.MissingParameterValueException" />
        /// <exception cref="T:Amazon.Glacier.Model.ServiceUnavailableException" />
        /// <exception cref="T:Amazon.Glacier.Model.InvalidParameterValueException" />
		public ListVaultsResponse ListVaults(ListVaultsRequest request)
        {
            var task = ListVaultsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
 /// <summary>
 /// <para>This operation lists all vaults owned by the calling user's account. The list returned in the response is ASCII-sorted by vault name.
 /// </para> <para>By default, this operation returns up to 1,000 items. If there are more vaults to list, the response <c>marker</c> field
 /// contains the vault Amazon Resource Name (ARN) at which to continue the list with a new List Vaults request; otherwise, the <c>marker</c>
 /// field is <c>null</c> . To return a list of vaults that begins at a specific vault, set the <c>marker</c> request parameter to the vault ARN
 /// you obtained from a previous List Vaults request. You can also limit the number of vaults returned in the response by specifying the
 /// <c>limit</c> parameter in the request. </para> <para>An AWS account has full permission to perform all operations (actions). However, AWS
 /// Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform
 /// specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM).</para> <para>For conceptual
 /// information and underlying REST API, go to Retrieving Vault Metadata in Amazon Glacier and List Vaults in the <i>Amazon Glacier Developer
 /// Guide</i> .
 /// </para>
 /// </summary>
 /// 
 /// <param name="listVaultsRequest">Container for the necessary parameters to execute the ListVaults service method on AmazonGlacier.</param>
 /// 
 /// <returns>The response from the ListVaults service method, as returned by AmazonGlacier.</returns>
 /// 
 /// <exception cref="ResourceNotFoundException"/>
 /// <exception cref="MissingParameterValueException"/>
 /// <exception cref="ServiceUnavailableException"/>
 /// <exception cref="InvalidParameterValueException"/>
 public ListVaultsResponse ListVaults(ListVaultsRequest listVaultsRequest)
 {
     IAsyncResult asyncResult = invokeListVaults(listVaultsRequest, null, null, true);
     return EndListVaults(asyncResult);
 }
 IAsyncResult invokeListVaults(ListVaultsRequest listVaultsRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new ListVaultsRequestMarshaller().Marshall(listVaultsRequest);
     var unmarshaller = ListVaultsResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 private Amazon.Glacier.Model.ListVaultsResponse CallAWSServiceOperation(IAmazonGlacier client, Amazon.Glacier.Model.ListVaultsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Glacier", "ListVaults");
     try
     {
         #if DESKTOP
         return(client.ListVaults(request));
         #elif CORECLR
         return(client.ListVaultsAsync(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;
     }
 }
Esempio n. 10
0
 internal ListVaultsPaginator(IAmazonGlacier client, ListVaultsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext      = context as CmdletContext;
            var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent;

            // create request and set iteration invariants
            var request = new Amazon.Glacier.Model.ListVaultsRequest();

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

            // Initialize loop variants and commence piping
            System.String _nextToken      = null;
            int?          _emitLimit      = null;
            int           _retrievedSoFar = 0;

            if (AutoIterationHelpers.HasValue(cmdletContext.Marker))
            {
                _nextToken = cmdletContext.Marker;
            }
            if (cmdletContext.Limit.HasValue)
            {
                // The service has a maximum page size of 50. If the user has
                // asked for more items than page max, and there is no page size
                // configured, we rely on the service ignoring the set maximum
                // and giving us 50 items back. If a page size is set, that will
                // be used to configure the pagination.
                // We'll make further calls to satisfy the user's request.
                _emitLimit = cmdletContext.Limit;
            }
            var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.Marker));

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

            do
            {
                request.Marker = _nextToken;
                if (_emitLimit.HasValue)
                {
                    int correctPageSize = Math.Min(50, _emitLimit.Value);
                    request.Limit = AutoIterationHelpers.ConvertEmitLimitToInt32(correctPageSize);
                }
                else if (!ParameterWasBound(nameof(this.Limit)))
                {
                    request.Limit = AutoIterationHelpers.ConvertEmitLimitToInt32(50);
                }

                CmdletOutput output;

                try
                {
                    var    response       = CallAWSServiceOperation(client, request);
                    object pipelineOutput = null;
                    if (!useParameterSelect)
                    {
                        pipelineOutput = cmdletContext.Select(response, this);
                    }
                    output = new CmdletOutput
                    {
                        PipelineOutput  = pipelineOutput,
                        ServiceResponse = response
                    };
                    int _receivedThisCall = response.VaultList.Count;

                    _nextToken       = response.Marker;
                    _retrievedSoFar += _receivedThisCall;
                    if (_emitLimit.HasValue)
                    {
                        _emitLimit -= _receivedThisCall;
                    }
                }
                catch (Exception e)
                {
                    if (_retrievedSoFar == 0 || !_emitLimit.HasValue)
                    {
                        output = new CmdletOutput {
                            ErrorResponse = e
                        };
                    }
                    else
                    {
                        break;
                    }
                }

                ProcessOutput(output);
            } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken) && (!_emitLimit.HasValue || _emitLimit.Value >= 1));


            if (useParameterSelect)
            {
                WriteObject(cmdletContext.Select(null, this));
            }


            return(null);
        }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;

            #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute
            var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent;
            #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute

            // create request and set iteration invariants
            var request = new Amazon.Glacier.Model.ListVaultsRequest();

            if (cmdletContext.AccountId != null)
            {
                request.AccountId = cmdletContext.AccountId;
            }
            if (cmdletContext.Limit != null)
            {
                request.Limit = AutoIterationHelpers.ConvertEmitLimitToServiceTypeInt32(cmdletContext.Limit.Value);
            }

            // Initialize loop variant and commence piping
            var _nextToken             = cmdletContext.Marker;
            var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.Marker));

            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);
            do
            {
                request.Marker = _nextToken;

                CmdletOutput output;

                try
                {
                    var response = CallAWSServiceOperation(client, request);

                    object pipelineOutput = null;
                    if (!useParameterSelect)
                    {
                        pipelineOutput = cmdletContext.Select(response, this);
                    }
                    output = new CmdletOutput
                    {
                        PipelineOutput  = pipelineOutput,
                        ServiceResponse = response
                    };

                    _nextToken = response.Marker;
                }
                catch (Exception e)
                {
                    output = new CmdletOutput {
                        ErrorResponse = e
                    };
                }

                ProcessOutput(output);
            } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken));

            if (useParameterSelect)
            {
                WriteObject(cmdletContext.Select(null, this));
            }


            return(null);
        }
Esempio n. 13
0
        /// <summary>
        /// <para>This operation lists all vaults owned by the calling user's account. The list returned in the response is ASCII-sorted by vault name.
        /// </para> <para>By default, this operation returns up to 1,000 items. If there are more vaults to list, the response <c>marker</c> field
        /// contains the vault Amazon Resource Name (ARN) at which to continue the list with a new List Vaults request; otherwise, the <c>marker</c>
        /// field is <c>null</c> . To return a list of vaults that begins at a specific vault, set the <c>marker</c> request parameter to the vault ARN
        /// you obtained from a previous List Vaults request. You can also limit the number of vaults returned in the response by specifying the
        /// <c>limit</c> parameter in the request. </para> <para>An AWS account has full permission to perform all operations (actions). However, AWS
        /// Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform
        /// specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a> .</para> <para>For conceptual information and underlying REST API, go to
        /// <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html">Retrieving Vault Metadata in Amazon Glacier</a>
        /// and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html">List Vaults </a> in the <i>Amazon Glacier Developer
        /// Guide</i> .
        /// </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVaults service method on AmazonGlacier.</param>
        /// 
        /// <returns>The response from the ListVaults service method, as returned by AmazonGlacier.</returns>
        /// 
        /// <exception cref="T:Amazon.Glacier.Model.ResourceNotFoundException" />
        /// <exception cref="T:Amazon.Glacier.Model.MissingParameterValueException" />
        /// <exception cref="T:Amazon.Glacier.Model.ServiceUnavailableException" />
        /// <exception cref="T:Amazon.Glacier.Model.InvalidParameterValueException" />
		public ListVaultsResponse ListVaults(ListVaultsRequest request)
        {
            var task = ListVaultsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListVaults operation.
        /// <seealso cref="Amazon.Glacier.IAmazonGlacier.ListVaults"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVaults 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 async Task<ListVaultsResponse> ListVaultsAsync(ListVaultsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListVaultsRequestMarshaller();
            var unmarshaller = ListVaultsResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, ListVaultsRequest, ListVaultsResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
 /// <summary>
 /// Paginator for ListVaults operation
 ///</summary>
 public IListVaultsPaginator ListVaults(ListVaultsRequest request)
 {
     return(new ListVaultsPaginator(this.client, request));
 }