History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
PUT /?logging HTTP 1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate:dateContent-Length: lengthContent-Type: application/xmlContent-MD5: MD5Authorization: Auth String
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com, <BucketName-APPID> is the bucket name followed by the APPID, such as examplebucket-1250000000 (see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).<BucketLoggingStatus><LoggingEnabled><TargetBucket>examplebucket-1250000000</TargetBucket><TargetPrefix>prefix</TargetPrefix></LoggingEnabled></BucketLoggingStatus>
Node Name (Keyword) | Parent Node | Description | Type | Required |
BucketLoggingStatus | None | Logging status. If there is no child node information, logging is disabled. | Container | Yes |
BucketLoggingStatus:Node Name (Keyword) | Parent Node | Description | Type | Required |
LoggingEnabled | BucketLoggingStatus | Specific logging configuration, mainly for the destination bucket | Container | No |
LoggingEnabled:Node Name (Keyword) | Parent Node | Description | Type | Required |
TargetBucket | LoggingEnabled | Destination bucket to store logs. It can be a bucket under the same account or in the same region as the source bucket, or the source bucket itself (not recommended). | String | No |
TargetPrefix | LoggingEnabled | Path in the destination bucket used to store logs | String | No |
TargetBucket/TargetPrefix{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz.PUT /?logging HTTP 1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Mar 2017 09:45:46 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKIDWtTCBYjM5OwLB9CAwA1Qb2ThTSUj****&q-sign-time=1484814927;32557710927&q-key-time=1484814927;32557710927&q-header-list=host&q-url-param-list=accelerate&q-signature=8b9f05dabce2578f3a79d732386e7cbade90****Content-Type: application/xmlContent-Length: 147<BucketLoggingStatus><LoggingEnabled><TargetBucket>examplebucket-1250000000</TargetBucket><TargetPrefix>prefix</TargetPrefix></LoggingEnabled></BucketLoggingStatus>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 0Connection: keep-aliveDate: Fri, 10 Mar 2017 09:45:46 GMTServer: tencent-cosx-cos-request-id: NTg4MDdiZWRfOWExZjRlXzQ2OWVf****
피드백