Container for the parameters to the DescribeVault operation. This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created, the number of archives it contains, and the total size of all the archives in the vault. The number of archives and their total size are as of the last inventory generation. This means that if you add or remove an archive from a vault, and then immediately use Describe Vault, the change in contents will not be immediately reflected. If you want to retrieve the latest inventory of the vault, use InitiateJob. Amazon Glacier generates vault inventories approximately daily. For more information, see Downloading a Vault Inventory in Amazon Glacier.

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, see Retrieving Vault Metadata in Amazon Glacier and Describe Vault in the Amazon Glacier Developer Guide.

Inheritance: AmazonGlacierRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Glacier.Model.DescribeVaultRequest();

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

            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);
        }
Example #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeVault operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeVault 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<DescribeVaultResponse> DescribeVaultAsync(DescribeVaultRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeVaultRequestMarshaller();
            var unmarshaller = DescribeVaultResponseUnmarshaller.Instance;

            return InvokeAsync<DescribeVaultRequest,DescribeVaultResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
Example #3
0
        internal DescribeVaultResponse DescribeVault(DescribeVaultRequest request)
        {
            var marshaller = new DescribeVaultRequestMarshaller();
            var unmarshaller = DescribeVaultResponseUnmarshaller.Instance;

            return Invoke<DescribeVaultRequest,DescribeVaultResponse>(request, marshaller, unmarshaller);
        }
Example #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeVault operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeVault 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 EndDescribeVault
        ///         operation.</returns>
        public IAsyncResult BeginDescribeVault(DescribeVaultRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DescribeVaultRequestMarshaller();
            var unmarshaller = DescribeVaultResponseUnmarshaller.Instance;

            return BeginInvoke<DescribeVaultRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeVault operation.
        /// <seealso cref="Amazon.Glacier.IAmazonGlacier.DescribeVault"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeVault 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<DescribeVaultResponse> DescribeVaultAsync(DescribeVaultRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeVaultRequestMarshaller();
            var unmarshaller = DescribeVaultResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DescribeVaultRequest, DescribeVaultResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// <para>This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created,
        /// the number of archives it contains, and the total size of all the archives in the vault. The number of archives and their total size are as
        /// of the last inventory generation. This means that if you add or remove an archive from a vault, and then immediately use Describe Vault, the
        /// change in contents will not be immediately reflected. If you want to retrieve the latest inventory of the vault, use InitiateJob. Amazon
        /// Glacier generates vault inventories approximately daily. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html">Downloading a Vault Inventory in Amazon Glacier</a> .
        /// </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-vault-get.html">Describe Vault </a> in the <i>Amazon Glacier Developer
        /// Guide</i> .
        /// </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeVault service method on
        /// AmazonGlacier.</param>
        /// 
        /// <returns>The response from the DescribeVault 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 DescribeVaultResponse DescribeVault(DescribeVaultRequest request)
        {
            var task = DescribeVaultAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
 /// <summary>
 /// <para>This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created,
 /// the number of archives it contains, and the total size of all the archives in the vault. The number of archives and their total size are as
 /// of the last inventory generation. This means that if you add or remove an archive from a vault, and then immediately use Describe Vault, the
 /// change in contents will not be immediately reflected. If you want to retrieve the latest inventory of the vault, use InitiateJob. Amazon
 /// Glacier generates vault inventories approximately daily. For more information, see Downloading a Vault Inventory in Amazon Glacier. </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 Describe Vault in the <i>Amazon Glacier Developer Guide</i> .
 /// </para>
 /// </summary>
 /// 
 /// <param name="describeVaultRequest">Container for the necessary parameters to execute the DescribeVault service method on
 ///          AmazonGlacier.</param>
 /// 
 /// <returns>The response from the DescribeVault service method, as returned by AmazonGlacier.</returns>
 /// 
 /// <exception cref="ResourceNotFoundException"/>
 /// <exception cref="MissingParameterValueException"/>
 /// <exception cref="ServiceUnavailableException"/>
 /// <exception cref="InvalidParameterValueException"/>
 public DescribeVaultResponse DescribeVault(DescribeVaultRequest describeVaultRequest)
 {
     IAsyncResult asyncResult = invokeDescribeVault(describeVaultRequest, null, null, true);
     return EndDescribeVault(asyncResult);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the DescribeVault operation.
 /// <seealso cref="Amazon.Glacier.AmazonGlacier.DescribeVault"/>
 /// </summary>
 /// 
 /// <param name="describeVaultRequest">Container for the necessary parameters to execute the DescribeVault 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 EndDescribeVault
 ///         operation.</returns>
 public IAsyncResult BeginDescribeVault(DescribeVaultRequest describeVaultRequest, AsyncCallback callback, object state)
 {
     return invokeDescribeVault(describeVaultRequest, callback, state, false);
 }
 IAsyncResult invokeDescribeVault(DescribeVaultRequest describeVaultRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DescribeVaultRequestMarshaller().Marshall(describeVaultRequest);
     var unmarshaller = DescribeVaultResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 private Amazon.Glacier.Model.DescribeVaultResponse CallAWSServiceOperation(IAmazonGlacier client, Amazon.Glacier.Model.DescribeVaultRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Glacier", "DescribeVault");
     try
     {
         #if DESKTOP
         return(client.DescribeVault(request));
         #elif CORECLR
         return(client.DescribeVaultAsync(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;
     }
 }
        /// <summary>
        /// <para>This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created,
        /// the number of archives it contains, and the total size of all the archives in the vault. The number of archives and their total size are as
        /// of the last inventory generation. This means that if you add or remove an archive from a vault, and then immediately use Describe Vault, the
        /// change in contents will not be immediately reflected. If you want to retrieve the latest inventory of the vault, use InitiateJob. Amazon
        /// Glacier generates vault inventories approximately daily. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html">Downloading a Vault Inventory in Amazon Glacier</a> .
        /// </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-vault-get.html">Describe Vault </a> in the <i>Amazon Glacier Developer
        /// Guide</i> .
        /// </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeVault service method on
        /// AmazonGlacier.</param>
        /// 
        /// <returns>The response from the DescribeVault 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 DescribeVaultResponse DescribeVault(DescribeVaultRequest request)
        {
            var task = DescribeVaultAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeVault operation.
        /// <seealso cref="Amazon.Glacier.IAmazonGlacier.DescribeVault"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeVault 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<DescribeVaultResponse> DescribeVaultAsync(DescribeVaultRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeVaultRequestMarshaller();
            var unmarshaller = DescribeVaultResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, DescribeVaultRequest, DescribeVaultResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
Example #13
0
        private void retrieveMetadata_Click(object sender, EventArgs e)
        {
            try
            {
                AmazonGlacierClient client = new AmazonGlacierClient(this.getRegionEndpoint());
                DescribeVaultRequest describeVaultRequest = new DescribeVaultRequest()
                {
                    VaultName = vaultName.Text
                };
                DescribeVaultResponse describeVaultResponse = client.DescribeVault(describeVaultRequest);
                DescribeVaultResult describeVaultResult = describeVaultResponse.DescribeVaultResult;

                String result =
                    "VaultName: " + describeVaultResult.VaultName +
                    "\nVaultARN: " + describeVaultResult.VaultARN +
                    "\nVaultCreationDate: " + describeVaultResult.CreationDate +
                    "\nNumberOfArchives: " + describeVaultResult.NumberOfArchives +
                    "\nSizeInBytes: " + describeVaultResult.SizeInBytes +
                    "\nLastInventoryDate:" + describeVaultResult.LastInventoryDate
                ;
                MessageBox.Show(result, "Vault description");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #14
0
        private DescribeVaultResult GetMetadata()
        {
            var client = new AmazonGlacierClient(RegionEndpoint);

            var describeVaultRequest = new DescribeVaultRequest()
            {
                VaultName = Name
            };

            var describeVaultResponse = client.DescribeVault(describeVaultRequest);
            return describeVaultResponse.DescribeVaultResult;
            //            Console.WriteLine("\nVault description...");
            //            Console.WriteLine(
            //                "\nVaultName: " + describeVaultResult.VaultName +
            //                "\nVaultARN: " + describeVaultResult.VaultARN +
            //                "\nVaultCreationDate: " + describeVaultResult.CreationDate +
            //                "\nNumberOfArchives: " + describeVaultResult.NumberOfArchives +
            //                "\nSizeInBytes: " + describeVaultResult.SizeInBytes +
            //                "\nLastInventoryDate: " + describeVaultResult.LastInventoryDate
            //                );
        }