private DescribeVault ( |
||
request | ||
return |
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); } }
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 // ); }