Connect Tencent Cloud
The Tencent Cloud integration imports your account's bills into Cloud Intelligence™. Use Cloud Analytics to analyze Tencent Cloud spend by account, service, product, component, region, and hour, next to your other clouds.
Tencent Cloud writes a daily bill in the FinOps FOCUS format to a Cloud Object Storage (COS) bucket in your account. DoiT reads that bucket with a read-only user.
Prerequisites
- A Tencent Cloud international account (tencentcloud.com) that has completed real-name authentication.
- Permission to create COS buckets, CAM users and policies, and to change billing settings.
- A DoiT account with the Billing Profiles Admin permission.
Create a bucket for bills
- Sign in to the Tencent Cloud console and open Cloud Object Storage > Bucket List. If prompted, activate COS and accept its terms of use.
- Select Create Bucket. Choose a region, for example Hong Kong (China), and keep the access permission Private Read/Write.
- Note the full bucket name, including the APPID suffix (for example
my-bills-1250000000), and its region code (for exampleap-hongkong).
Turn on bill storage
- Open Billing Center > Bills > Bill Overview, and turn on the Bill storage switch.
- Under Authorize Service Role, select Authorize and confirm. This creates the
Billing_QCSRoleservice role that lets Tencent Cloud write bills to your bucket. You may be asked for a verification code. - Under Add Storage Configuration, choose Standard bill (FOCUS) - daily details and your bucket.
- Turn on Enable Bill Storage and select Save.
Tencent Cloud delivers the first daily file the next day. Organization admin accounts can also store the bills of member accounts in the same bucket.
Create a read-only user
-
Open Cloud Access Management > Policies and select Create Custom Policy > Create by Policy Syntax. Use this policy, replacing the region, APPID and bucket name:
{"version": "2.0","statement": [{"effect": "allow","action": ["name/cos:GetBucket", "name/cos:HeadBucket", "name/cos:GetObject", "name/cos:HeadObject"],"resource": ["qcs::cos:ap-hongkong:uid/1250000000:my-bills-1250000000/*"]}]} -
Open Users > User List and select Create User > Custom Creation. Choose Access resources and receive messages, allow Programming access only, and attach the policy you created.
-
Copy the user's SecretId and SecretKey. Tencent Cloud shows the SecretKey only once.
Do not use your root account's API key.
Connect your account
- Sign in to Cloud Intelligence.
- Open Data ingestion and integrations > Integrations and find Tencent Cloud.
- Select Connect +.
- Enter the Account ID (UIN) from Account Center > Account Information, the SecretId, the SecretKey, the COS bucket name, and the COS region. Leave Folder inside the bucket blank.
- Select Test connection, then Save after the test succeeds.
What is imported
| Reporting dimension | Tencent Cloud value |
|---|---|
| Provider | Tencent Cloud |
| Billing account | Payer account |
| Project | Account that owns the resource (member account for organizations) |
| Service | Service, such as Cloud Virtual Machine (CVM) |
| SKU | Billable component, such as CPU SA5 |
| Region and zone | Region code, for example ap-hongkong, and availability zone |
| Date | Charge hour (UTC) |
Labels include Product, Component, Region name, Charge frequency, and Account name. Resource tags from the bill, including the Tencent Cloud project, are imported as labels.
Costs
Costs are the billed amounts after discounts, in the account's billing currency (US dollars for international accounts). The list price before discounts is available as the list cost. Each daily file covers one calendar day in Tencent Cloud's UTC+8 billing time zone, and charges keep their UTC hours.
Refresh
DoiT checks the bucket every six hours and reloads the current and previous month. Tencent Cloud delivers each day's bill the next day between 03:00 and 22:00 (UTC+8), so the most recent day's cost appears one to two days later. The month-final bill is available from the 3rd of the following month.
Troubleshooting
- Test connection fails with access denied: The user's policy does not cover the bucket. Check the region, APPID and bucket name in the policy resource.
- No costs after two days: Check that bill storage is enabled for Standard bill (FOCUS) - daily details and that files named like
<UIN>-<YYYYMMDD>-by_used_time-FOCUS-Bill Details.zipappear in the bucket root. - Bill storage turned itself off: Tencent Cloud disables it if the
Billing_QCSRoleservice role loses its permissions or the bucket is deleted. Authorize the role again and save.
If you need assistance, open an expert inquiry.