EN
本內容沒有您的語言版本,但有英文版本。
1 人當中有 0 人評分為有幫助- 為這個主題評分

Set Queue Service Properties

Updated: September 13, 2011

The Set Queue Service Properties operation sets the properties of a storage account’s Queue service, including Windows Azure Storage Analytics.

Request

The Set Queue Service Properties request may be specified as follows. HTTPS is recommended. Replace <account-name> with the name of your storage account:

 

Method Request URI HTTP Version

PUT

https://<account-name>.queue.core.windows.net/?restype=service&comp=properties

HTTP/1.1

Note that the URI must always include the forward slash (/) to separate the host name from the path and query portions of the URI. In the case of this operation, the path portion of the URI is empty.

URI Parameters

 

Parameter Description

restype=service&comp=properties

Required. The combination of both query strings is required to set the storage service properties.

timeout

Optional. The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations.

Request Headers

The following table describes required and optional request headers.

 

Request Header Description

Authorization

Required. Specifies the authentication scheme, storage account name, and signature. For more information, see Authentication for the Windows Azure Storage Services.

Date or x-ms-date

Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authentication for the Windows Azure Storage Services.

x-ms-version

Required for all authenticated requests. Specifies the version of the operation to use for this request. For more information, see Versioning for the Blob, Queue, and Table services in Windows Azure.

Request Body

The format of the request 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>

The following table describes the elements of the request body:

 

Element Name Description

Version

Required. The version of Storage Analytics to configure.

Delete

Required. Applies only to logging configuration. Indicates whether all delete requests should be logged.

Read

Required. Applies only to logging configuration. Indicates whether all read requests should be logged.

Write

Required. Applies only to logging configuration. Indicates whether all write requests should be logged.

Enabled

Required. Indicates whether metrics is enabled for the storage service.

IncludeAPIs

Required only if metrics is enabled. Applies only to metrics configuration. Indicates whether metrics should generate summary statistics for called API operations.

RetentionPolicy/Enabled

Required. Indicates whether a retention policy is enabled for the storage service.

RetentionPolicy/Days

Required only if a retention policy is enabled. Indicates the number of days that metrics or logging data should be retained. All data older than this value will be deleted. The minimum value you can specify is 1; the largest value is 365 (one year).

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 202 (Accepted).

For information about status codes, see Service Management Status and Error Codes.

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

A value that 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 Blob, Queue, and Table services in Windows Azure.

Response Body

None.

Authorization

Only the account owner may call this operation.

Sample Request and Response

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

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

The request is sent with the following headers:

x-ms-version: 2011-08-18
x-ms-date: Tue, 30 Aug 2011 04:28:19 GMT
Authorization: SharedKey
myaccount:Z1lTLDwtq5o1UYQluucdsXk6/iB7YxEu0m6VofAEkUE=
Host: myaccount.queue.core.windows.net

The request is sent with the following XML body:

<?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>
    <Metrics>
        <Version>1.0</Version>
        <Enabled>true</Enabled>
        <IncludeAPIs>false</IncludeAPIs>
        <RetentionPolicy>
            <Enabled>true</Enabled>
            <Days>7</Days>
        </RetentionPolicy>
    </Metrics>
</StorageServiceProperties>

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

HTTP/1.1 202 Accepted
Connection: Keep-Alive
Transfer-Encoding: chunked
Date: Tue, 30 Aug 2011 04:28:20 GMT
Server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: cb939a31-0cc6-49bb-9fe5-3327691f2a30
x-ms-version: 2011-08-18

本文對您有任何幫助嗎?
(剩餘 1500 個字元)
© 2013 Microsoft. 著作權所有,並保留一切權利。
facebook page visit twitter rss feed newsletter