DescribeDeductLogs

Updated at:
Copy as MD

Queries the deduction records of resource plans.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bss:DescribeFrDeductLogs

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Group

string

No

The resource dimension to query.

Valid values:

  • oss_arc :

    OSS region-independent reserved space.

  • cu :

    Storage capacity unit plan.

  • ecsRi :

    Reserved instance coupon.

  • oss_rc :

    OSS reserved space.

  • fr :

    Resource plan.

  • polardb :

    PolarDB compute plan.

oss_rc

BillingStartTime

integer

Yes

The start time of the billing cycle. The time is a UNIX timestamp in milliseconds.

1647446400000

BillingEndTime

integer

Yes

The end time of the billing cycle. The time is a UNIX timestamp in milliseconds.

1679068799999

InstanceId

string

No

The name of the instance.

OSSBAG-cn******

PageNum

integer

No

The current page number.

1

PageSize

integer

No

The number of entries per page.

20

BillingCommodityCode

string

No

The commodity code of the deducted item.

snapshot

CommodityCode

string

No

The commodity code.

ossbag

RelationAccountIds

array

No

The list of deduction accounts.

integer

No

The ID of the deduction account.

1990699401005016

EcIdAccountIds

array<object>

No

The list of enterprises and accounts. If this parameter is left empty, the current account is queried.

object

No

The list of enterprises and accounts. If this parameter is left empty, the current account is queried.

AccountIds

array

No

The list of accessed accounts. If this parameter is left empty, all accounts under the current entity ID are selected.

integer

No

The member accounts ID.

1990699401005016

EcId

string

Yes

The ID of the enterprise entity.

1004064243473974

Nbid

string

No

The ID of the level-1 marketplace. If this parameter is left empty, the ID of the marketplace to which the current user belongs is used by default.

2684201000001

BillInstanceId

string

No

The ID of the instance for which the billing is deducted.

ecs-******

Response elements

Element

Type

Description

Example

object

BssApiPageResult

CurrentPage

integer

The current page number.

1

Data

array<object>

The data list.

array<object>

The returned data.

AccountId

integer

The account ID.

1929817951466001

AccountName

string

The account name.

icloudtest

BillingCommodity

object

The offset commodity.

Code

string

The attribute code.

snapshot

Name

string

The attribute name.

ECS - Snapshot

BillingCommodityCode

string

The offset commodity code.

snapshot

BillingCommodityName

string

The offset commodity name.

ECS - Snapshot

BillingEndTime

integer

The expiration time. This value is a UNIX timestamp in milliseconds.

1679036400000

BillingInstanceId

string

The offset instance.

cn-beijing

BillingPriceField

object

The offset billable item.

Code

string

The attribute code.

Storage

Name

string

The attribute name.

Fully offset used capacity

BillingPriceFieldCode

string

The offset billable item code.

Storage

BillingPriceFieldName

string

The offset billable item name.

Fully offset used capacity

BillingStartTime

integer

The effective period. This value is a UNIX timestamp in milliseconds.

1679032800000

CapacityAfterDeductViewUnit

string

The display unit for capacity after offset.

GB

CapacityAfterDeductViewValue

string

The display value for capacity after offset.

23.896484

CapacityBeforeDeductViewUnit

string

The display unit for capacity before offset.

GB

CapacityBeforeDeductViewValue

string

The display value for capacity before offset.

40.000000

CapacityDeductedViewUnit

string

The display unit for offset capacity.

GB

CapacityDeductedViewValue

string

The display value for offset capacity.

16.103515

CapacityType

object

The capacity type.

Code

string

The attribute code.

absolute

Name

string

The attribute name.

Fixed total capacity

CapacityTypeCode

string

The capacity type code.

absolute

CapacityTypeName

string

The capacity type name.

Fixed total capacity

Commodity

object

The commodity.

Code

string

The attribute code.

ossbag

Name

string

The attribute name.

OSS resource plan (subscription)

CommodityCode

string

The commodity code.

ossbag

CommodityName

string

The commodity name.

OSS resource plan (subscription)

CycleType

object

The commitment period.

Code

string

The commitment period code.

hour

Name

string

The commitment period name.

Hour

CycleTypeCode

string

The commitment period code.

hour

CycleTypeName

string

The commitment period name.

Hour

DeductTime

integer

The offset time. This value is a UNIX timestamp in milliseconds.

1679039572000

Factor

string

The deduction factor.

1

InstanceBelongAccountId

integer

The ID of the account to which the instance belongs.

1990699401005016

InstanceBelongAccountName

string

The name of the account to which the instance belongs.

icloudtest

InstanceId

string

The name of the instance.

OSSBAG-cn-****s

MeasureAfterDeductViewUnit

string

The display unit of the usage after deduction.

Byte

MeasureAfterDeductViewValue

string

The display value of the usage after deduction.

0

MeasureBeforeDeductViewUnit

string

The display unit of the usage before deduction.

GB

MeasureBeforeDeductViewValue

string

The display value of the usage before deduction.

16.103515

MeasureDeductedViewUnit

string

The display unit of the deducted usage.

GB

MeasureDeductedViewValue

string

The display value of the deducted usage.

16.103515

Product

object

The product.

Code

string

The attribute code.

oss

Name

string

The attribute name.

Object Storage Service

ProductCode

string

The product code.

oss

ProductName

string

The product name.

Object Storage Service

RelationAccountId

integer

The ID of the deduction account.

1990699401005016

RelationAccountName

string

The name of the deduction account.

icloudtest

Template

object

The template.

Code

string

The attribute code.

FPT_ossbag********

Name

string

The attribute name.

Standard storage plan

TemplateCode

string

The template code.

FPT_ossbag********

TemplateName

string

The template name.

Standard storage plan

PageSize

integer

The number of entries per page.

20

RequestId

string

The request ID.

DF58589C-A06C-4224-8615-7797E6474FA3

TotalCount

integer

The total number of records.

8

Examples

Success response

JSON format

{
  "CurrentPage": 1,
  "Data": [
    {
      "AccountId": 1929817951466001,
      "AccountName": "icloudtest",
      "BillingCommodity": {
        "Code": "snapshot",
        "Name": "ECS - Snapshot"
      },
      "BillingCommodityCode": "snapshot",
      "BillingCommodityName": "ECS - Snapshot",
      "BillingEndTime": 1679036400000,
      "BillingInstanceId": "cn-beijing",
      "BillingPriceField": {
        "Code": "Storage",
        "Name": "Zero-discount used capacity"
      },
      "BillingPriceFieldCode": "Storage",
      "BillingPriceFieldName": "Zero-discount used capacity",
      "BillingStartTime": 1679032800000,
      "CapacityAfterDeductViewUnit": "GB",
      "CapacityAfterDeductViewValue": "23.896484",
      "CapacityBeforeDeductViewUnit": "GB",
      "CapacityBeforeDeductViewValue": "40.000000",
      "CapacityDeductedViewUnit": "GB",
      "CapacityDeductedViewValue": "16.103515",
      "CapacityType": {
        "Code": "absolute",
        "Name": "Fixed total capacity"
      },
      "CapacityTypeCode": "absolute",
      "CapacityTypeName": "Fixed total capacity",
      "Commodity": {
        "Code": "ossbag",
        "Name": "OSS resource plan (subscription)"
      },
      "CommodityCode": "ossbag",
      "CommodityName": "OSS resource plan (subscription)",
      "CycleType": {
        "Code": "hour",
        "Name": "Hour"
      },
      "CycleTypeCode": "hour",
      "CycleTypeName": "Hour",
      "DeductTime": 1679039572000,
      "Factor": "1",
      "InstanceBelongAccountId": 1990699401005016,
      "InstanceBelongAccountName": "icloudtest",
      "InstanceId": "OSSBAG-cn-****s",
      "MeasureAfterDeductViewUnit": "Byte",
      "MeasureAfterDeductViewValue": "0",
      "MeasureBeforeDeductViewUnit": "GB",
      "MeasureBeforeDeductViewValue": "16.103515",
      "MeasureDeductedViewUnit": "GB",
      "MeasureDeductedViewValue": "16.103515",
      "Product": {
        "Code": "oss",
        "Name": "Object Storage Service"
      },
      "ProductCode": "oss",
      "ProductName": "Object Storage Service",
      "RelationAccountId": 1990699401005016,
      "RelationAccountName": "icloudtest",
      "Template": {
        "Code": "FPT_ossbag********",
        "Name": "Standard storage plan"
      },
      "TemplateCode": "FPT_ossbag********",
      "TemplateName": "Standard storage plan"
    }
  ],
  "PageSize": 20,
  "RequestId": "DF58589C-A06C-4224-8615-7797E6474FA3",
  "TotalCount": 8
}

Error codes

HTTP status code

Error code

Error message

Description

400 NotAuthorized You are not authorized to call the API operation. Please check whether RAM user has the permission or check whether ownerId and callerId have been given the appropriate permission.
400 MissingParameter The specified request lacks essential parameters.
500 InternalError The request processing has failed due to some unknown error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.