Del via


Get Queue Service Properties

The Get Queue Service Properties operation gets the properties of an Azure Queue Storage account, including properties for Storage Analytics and cross-origin resource sharing (CORS) rules.

For more information about cross-origin resource sharing (CORS) rules and evaluation logic, see CORS support for the Azure Storage services.

Request

The Get Queue Service Properties request may be specified as follows. We recommend that you use HTTPS. Replace <account-name> with the name of your storage account:

Method Request URI HTTP version
GET https://<account-name>.queue.core.windows.net/?restype=service&comp=properties HTTP/1.1

Note

The URI must always include a slash character (/) to separate the hostname from the path and query portions of the URI. In this operation, the path portion of the URI is empty.

URI parameters

The following additional parameters may be specified on the request URI:

Parameter Description
restype=service&comp=properties Required. The combination of both query strings is required to get the storage service properties.
timeout Optional. The timeout parameter is expressed in seconds. For more information, see Set time-outs for Azure Queue Storage operations.

Request headers

The following table describes required and optional request headers.

Request header Description
Authorization Required. Specifies the authorization scheme, storage account name, and signature. For more information, see Authorize requests to Azure Storage.
Date or x-ms-date Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authorize requests to Azure Storage.
x-ms-version Required for all authorized requests. Specifies the version of the operation to use for this request. For more information, see Versioning for the Azure Storage services.
x-ms-client-request-id Optional. Provides a client-generated, opaque value with a 1-kibibyte (KiB) character limit that's recorded in the logs when logging is configured. We highly recommend that you use this header to correlate client-side activities with requests that the server receives. For more information, see Monitor Azure Queue Storage.

Request body

None.

Response

The response includes an HTTP status code, a set of response headers, and a response body.

Status code

A successful operation returns status code 200 (OK).

Response headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response header Description
x-ms-request-id Uniquely identifies a request made against the service.
x-ms-version Specifies the version of the operation used for the response. For more information, see Versioning for the Azure Storage services.
x-ms-client-request-id Can be used to troubleshoot requests and corresponding responses. The value of this header is equal to the value of the x-ms-client-request-id header if it's present in the request and the value contains no more than 1,024 visible ASCII characters. If the x-ms-client-request-id header isn't present in the request, it won't be present in the response.

Response body

For version 2012-02-12 and earlier, the format of the response body is as follows:

<?xml version="1.0" encoding="utf-8"?>  
<StorageServiceProperties>  
    <Logging>  
        <Version>version-number</Version>  
        <Delete>true|false</Delete>  
        <Read>true|false</Read>  
        <Write>true|false</Write>  
        <RetentionPolicy>  
            <Enabled>true|false</Enabled>  
            <Days>number-of-days</Days>  
        </RetentionPolicy>  
    </Logging>  
    <Metrics>  
        <Version>version-number</Version>  
        <Enabled>true|false</Enabled>  
        <IncludeAPIs>true|false</IncludeAPIs>  
        <RetentionPolicy>  
            <Enabled>true|false</Enabled>  
            <Days>number-of-days</Days>  
        </RetentionPolicy>  
    </Metrics>  
</StorageServiceProperties>  

As of version 2013-08-15, the format of the response body is as follows:

<?xml version="1.0" encoding="utf-8"?>  
<StorageServiceProperties>  
    <Logging>  
        <Version>version-number</Version>  
        <Delete>true|false</Delete>  
        <Read>true|false</Read>  
        <Write>true|false</Write>  
        <RetentionPolicy>  
            <Enabled>true|false</Enabled>  
            <Days>number-of-days</Days>  
        </RetentionPolicy>  
    </Logging>  
    <HourMetrics>  
        <Version>version-number</Version>  
        <Enabled>true|false</Enabled>  
        <IncludeAPIs>true|false</IncludeAPIs>  
        <RetentionPolicy>  
            <Enabled>true|false</Enabled>  
            <Days>number-of-days</Days>  
        </RetentionPolicy>  
    </HourMetrics>  
    <MinuteMetrics>  
        <Version>version-number</Version>  
        <Enabled>true|false</Enabled>  
        <IncludeAPIs>true|false</IncludeAPIs>  
        <RetentionPolicy>  
            <Enabled>true|false</Enabled>  
            <Days>number-of-days</Days>  
        </RetentionPolicy>  
    </MinuteMetrics>  
    <Cors>  
        <CorsRule>  
            <AllowedOrigins>comma-separated-list-of-allowed-origins</AllowedOrigins>  
            <AllowedMethods>comma-separated-list-of-HTTP-verb</AllowedMethods>  
            <MaxAgeInSeconds>max-caching-age-in-seconds</MaxAgeInSeconds>  
            <ExposedHeaders>comma-separated-list-of-response-headers</ExposedHeaders>  
            <AllowedHeaders> comma-separated-list-of-request-headers </AllowedHeaders>  
        </CorsRule>  
    </Cors>  
</StorageServiceProperties>  
  

The elements of the response body are described in the following table:

Element Name Description
Logging Groups the Storage Analytics Logging settings.
Metrics Groups the Storage Analytics Metrics settings. The Metrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues.
HourMetrics Groups the Storage Analytics HourMetrics settings. The HourMetrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues.
MinuteMetrics Groups the Storage Analytics MinuteMetrics* settings. The MinuteMetrics settings provide request statistics for each minute for queues.
Version The version of Storage Analytics that's currently in use.
Delete Applies only to the logging configuration. Indicates whether delete requests are being logged.
Read Applies only to the logging configuration. Indicates whether read requests are being logged.
Write Applies only to the logging configuration. Indicates whether write requests are being logged.
Enabled Indicates whether metrics are enabled for Azure Queue Storage.

If read-access geo-redundant replication is enabled, both primary and secondary metrics are collected. If read-access geo-redundant replication is not enabled, only primary metrics are collected.
IncludeAPIs Applies only to metrics configuration. Indicates whether metrics generate summary statistics for called API operations.
RetentionPolicy/Enabled Indicates whether a retention policy is enabled for the storage service.
RetentionPolicy/Days Indicates the number of days that metrics or logging data is retained. All data older than this value will be deleted.
Cors Groups all CORS rules.
CorsRule Groups settings for a CORS rule.
AllowedOrigins A comma-separated list of origin domains that are allowed via CORS, or an asterisk (*) if all domains are allowed.
ExposedHeaders A comma-separated list of response headers to expose to CORS clients.
MaxAgeInSeconds The number of seconds that the client or browser should cache a preflight response.
AllowedHeaders A comma-separated list of headers that are allowed to be part of the cross-origin request.
AllowedMethods A comma-separated list of HTTP methods that are allowed to be executed by the origin. For Azure Storage, permitted methods are DELETE, GET, HEAD, MERGE, POST, OPTIONS, or PUT.

Authorization

Only the storage account owner may call this operation.

Sample request and response

The following sample URI makes a request to get the Queue service properties for the fictional storage account named myaccount:

GET https://myaccount.queue.core.windows.net/?restype=service&comp=properties HTTP/1.1  

The request is sent with the following headers:

x-ms-version: 2013-08-15  
x-ms-date: Wed, 23 Oct 2013 04:49:03 GMT  
Authorization: SharedKey  
myaccount:Z1lTLDwtq5o1UYQluucdsXk6/iB7YxEu0m6VofAEkUE=  
Host: myaccount.queue.core.windows.net  

After the request has been sent, the following response is returned:

HTTP/1.1 200 OK  
Content-Length: 1020  
Content-Type: application/xml  
Date: Wed, 23 Oct 2013 04:49:04 GMT  
Server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0  
x-ms-request-id: cb939a31-0cc6-49bb-9fe5-3327691f2a30  
x-ms-version: 2013-08-15  
  

The response body is similar to the following:

<?xml version="1.0" encoding="utf-8"?>  
<StorageServiceProperties>  
    <Logging>  
        <Version>1.0</Version>  
        <Delete>true</Delete>  
        <Read>false</Read>  
        <Write>true</Write>  
        <RetentionPolicy>  
            <Enabled>true</Enabled>  
            <Days>7</Days>  
        </RetentionPolicy>  
    </Logging>  
    <HourMetrics>  
        <Version>1.0</Version>  
        <Enabled>true</Enabled>  
        <IncludeAPIs>false</IncludeAPIs>  
        <RetentionPolicy>  
            <Enabled>true</Enabled>  
            <Days>7</Days>  
        </RetentionPolicy>  
    </HourMetrics>  
        <MinuteMetrics>  
        <Version>1.0</Version>  
        <Enabled>true</Enabled>  
        <IncludeAPIs>true</IncludeAPIs>  
        <RetentionPolicy>  
            <Enabled>true</Enabled>  
            <Days>7</Days>  
        </RetentionPolicy>  
    </MinuteMetrics>  
    <Cors>  
        <CorsRule>  
            <AllowedOrigins> http://www.fabrikam.com,http://www.contoso.com</AllowedOrigins>  
            <AllowedMethods>GET,PUT</AllowedMethods>  
            <MaxAgeInSeconds>500</MaxAgeInSeconds>  
            <ExposedHeaders>x-ms-meta-data*,x-ms-meta-customheader</ExposedHeaders>  
            <AllowedHeaders>x-ms-meta-target*,x-ms-meta-customheader</AllowedHeaders>  
        </CorsRule>  
    </Cors>  
</StorageServiceProperties>  

See also

Storage Analytics
CORS support for the Azure Storage services
CORS HTTP specification