AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Namespace: Amazon.SQS.Model
Assembly: AWSSDK.dll
Version: (assembly version)
public class GetQueueAttributesResult : AmazonWebServiceResponse
The GetQueueAttributesResult type exposes the following members
Name | Description | |
---|---|---|
GetQueueAttributesResult() |
Name | Type | Description | |
---|---|---|---|
ApproximateNumberOfMessages | System.Int32 | Gets the approximate number of messages from the Attributes collection. | |
ApproximateNumberOfMessagesDelayed | System.Int32 | Gets the approximate number of messages delayed from the Attributes collection. | |
ApproximateNumberOfMessagesNotVisible | System.Int32 | Gets the approximate number of messages not visible from the Attributes collection. | |
Attributes | System.Collections.Generic.Dictionary<System.String, System.String> |
Gets and sets the property Attributes.
A map of attributes to the respective values. |
|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
CreatedTimestamp | System.DateTime | Gets the created timestamp from the Attributes collection. | |
DelaySeconds | System.Int32 | Gets the delay in seconds from the Attributes collection. | |
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
LastModifiedTimestamp | System.DateTime | Gets the last modified timestamp from the Attributes collection. | |
MaximumMessageSize | System.Int32 | Gets the maximum message size from the Attributes collection. | |
MessageRetentionPeriod | System.Int32 | Returns the message retention period from the Attributes collection. | |
Policy | System.String | Gets the queue access policy from the Attributes collection. | |
QueueARN | System.String | Gets the queue arn from the Attributes collection. | |
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
VisibilityTimeout | System.Int32 | Gets the visibility timeout from the Attributes collection. |
This example shows how to get queue attributes.
var client = new AmazonSQSClient(); var request = new GetQueueAttributesRequest { QueueUrl = "https://sqs.us-east-1.amazonaws.com/80398EXAMPLE/MyTestQueue", AttributeNames = new List<string>() { "All" } }; var response = client.GetQueueAttributes(request); Console.WriteLine("Attributes for queue ARN '" + response.QueueARN + "':"); Console.WriteLine(" Approximate number of messages:" + response.ApproximateNumberOfMessages); Console.WriteLine(" Approximate number of messages delayed: " + response.ApproximateNumberOfMessagesDelayed); Console.WriteLine(" Approximate number of messages not visible: " + response.ApproximateNumberOfMessagesNotVisible); Console.WriteLine(" Queue created on: " + response.CreatedTimestamp); Console.WriteLine(" Delay seconds: " + response.DelaySeconds); Console.WriteLine(" Queue last modified on: " + response.LastModifiedTimestamp); Console.WriteLine(" Maximum message size: " + response.MaximumMessageSize); Console.WriteLine(" Message retention period: " + response.MessageRetentionPeriod); Console.WriteLine(" Visibility timeout: " + response.VisibilityTimeout); Console.WriteLine(" Policy: " + response.Policy); Console.WriteLine(" Attributes:"); foreach (var attr in response.Attributes) { Console.WriteLine(" " + attr.Key + ": " + attr.Value); }
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8
.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8