DescribeVault() private method

private DescribeVault ( DescribeVaultRequest request ) : DescribeVaultResponse
request Amazon.Glacier.Model.DescribeVaultRequest
return Amazon.Glacier.Model.DescribeVaultResponse
Esempio n. 1
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);
            }
        }
Esempio n. 2
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
            //                );
        }