{"id":18248192,"url":"https://github.com/serverless-components/tencent-cls","last_synced_at":"2025-04-08T19:51:00.174Z","repository":{"id":48071051,"uuid":"316389171","full_name":"serverless-components/tencent-cls","owner":"serverless-components","description":"Tencent CLS component","archived":false,"fork":false,"pushed_at":"2021-10-22T11:35:18.000Z","size":44,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-14T15:36:36.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverless-components.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-27T03:17:53.000Z","updated_at":"2021-10-22T11:35:21.000Z","dependencies_parsed_at":"2022-08-12T18:00:32.236Z","dependency_job_id":null,"html_url":"https://github.com/serverless-components/tencent-cls","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-cls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-cls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-cls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-cls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-components","download_url":"https://codeload.github.com/serverless-components/tencent-cls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247918552,"owners_count":21018040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T09:36:12.075Z","updated_at":"2025-04-08T19:51:00.150Z","avatar_url":"https://github.com/serverless-components.png","language":"TypeScript","readme":"## 组件概述\n\n**腾讯云 cls 云函数组件**通过使用 [Tencent Serverless Framework](https://github.com/serverless/components/tree/cloud)，便捷极速管理您的 [日志服务](https://console.cloud.tencent.com/cls)。\n\n## 快速入门\n\n### 前提条件\n\n- 已安装 Serverless Framework（参考 [安装 Serverless Framework](https://cloud.tencent.com/document/product/1154/42990)）\n- 账号开通 Serverless 相关权限（参考 [账号和权限配置](https://cloud.tencent.com/document/product/1154/43006)）\n\n### 操作步骤\n\n#### 创建\n\n```bash\n$ mkdir cls-example \u0026\u0026 cd cls-example\n```\n\n#### 配置 serverless.yml\n\nCLS 相关参数需要通过项目目录下的 serverless.yml 文件指定：\n\n\u003e **说明**：配置详情请参考 [全量配置文档](https://github.com/serverless-components/tencent-cls/blob/master/docs/configure.md)。\n\n```\n# cls组件配置样例\n# 全量配置参考 https://github.com/serverless-components/tencent-cls/blob/master/docs/configure.md\n\n# 组件信息\ncomponent: cls # (必填) 引用 component 的名称，当前用到的是 tencent-cls 组件\nname: clsdemo # (必填) 创建的实例名称，请修改成您的实例名称\n\n# 组件参数\ninputs:\n  name: cls-test\n  topic: cls-topic-test\n  region: ap-guangzhou\n  period: 7\n```\n\n#### 部署\n\n在 `serverless.yml` 文件所在的项目根目录，运行以下指令，将会弹出二维码，直接扫码授权进行部署:\n\n```\n$ serverless deploy\n```\n\n\u003e **说明**：如果鉴权失败，请参考 [权限配置](https://cloud.tencent.com/document/product/1154/43006) 进行授权。\n\n#### 查看\n\n执行以下命令，查看您部署的项目信息：\n\n```\n$ serverless info\n```\n\n#### 移除\n\n执行以下命令，移除您已经部署的项目：\n\n```\n$ serverless remove\n```\n\n### 账号权限\n\n部署实例时需要账号授权去操作具体的云资源，目前可以通过两种方式进行授权：**扫码授权**和**密钥授权**。\n\n- **扫码授权**：能快速进行授权部署，但生成的凭证是临时凭证，过期后需要重新扫码。\n- **密钥授权**：能够获得永久授权，需要预先配置账号的 SecretId 和 SecretKey 。\n\n配置详情可参考 [权限配置](https://cloud.tencent.com/document/product/1154/43006)。\n\n### 应用管理\n\nServerless 部署一个组件实例实质是部署了一个单组件实例的应用。\n\n在应用项目开发过程中，一个应用下可能会存在多个组件实例，如何管理组件实例进行应用项目开发，请参考 [应用管理](https://cloud.tencent.com/document/product/1154/48261)。\n\n## License\n\nMIT License\n\nCopyright (c) 2020 Tencent Cloud, Inc.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ftencent-cls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-components%2Ftencent-cls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ftencent-cls/lists"}