All Products
Search
Document Center

BSS OpenAPI:QueryBillToOSSSubscription

Last Updated:Mar 01, 2024

Queries the subscribed bills that are stored in Object Storage Service (OSS) bucket.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
bss:DescribeSubscribeToOSSREAD
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code returned.

Success
Messagestring

The message returned.

Successful!
RequestIdstring

The ID of the request.

9EEAE43F-1E4D-4734-AE93-5049878AC103
Successboolean

Indicates whether the request is successful.

true
Dataobject

The returned data.

AccountNamestring

The name of the account used to perform the query.

test@test.aliyunid.com
AccountIDstring

The ID of the account used to perform the query.

185xxxxx03489
Itemsobject []

The details of the subscribed bill.

BucketOwnerIdlong

The owner ID of the Object Storage Service (OSS) bucket.

1369168081849304
SubscribeTypestring

The type of the subscribed bill. Valid values:

  • BillingItemDetailForBillingPeriod: the bill of a billable item.
  • InstanceDetailForBillingPeriod: the bill of an instance.
BillingItemDetailForBillingPeriod
SubscribeBucketstring

The ID of the OSS bucket that stores the subscribed bill.

billingtestbucket
SubscribeTimestring

The time when the subscribed bill was stored in the OSS bucket. The time is displayed in the YYYY-MM-DD hh:mm:ss format.

2019-10-30 15:40:11
SubscribeLanguagestring

The code of the language.

Valid values:

  • en: English
  • zh: Chinese
zh
BucketPathstring

The path in the OSS bucket.

Billing/BillingItemDetailMonthly/
RowLimitPerFileinteger

The maximum number of data rows in a single file. If the number of data rows in a bill exceeds the upper limit, the bill is split into multiple files. Then, multiple files are merged and compressed into a package.

300000

Examples

Sample success responses

JSONformat

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "9EEAE43F-1E4D-4734-AE93-5049878AC103",
  "Success": true,
  "Data": {
    "AccountName": "test@test.aliyunid.com",
    "AccountID": "185xxxxx03489",
    "Items": {
      "Item": [
        {
          "BucketOwnerId": 1369168081849304,
          "SubscribeType": "BillingItemDetailForBillingPeriod",
          "SubscribeBucket": "billingtestbucket",
          "SubscribeTime": "2019-10-30 15:40:11",
          "SubscribeLanguage": "zh",
          "BucketPath": "Billing/BillingItemDetailMonthly/",
          "RowLimitPerFile": 300000
        }
      ]
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.