tencent cloud

云数据库 SQL Server

动态与公告
产品动态
产品公告
新手指引
产品简介
产品概述
产品架构
产品优势
应用场景
地域和可用区
大版本生命周期说明
功能概览及差异
实例类型
实例规格
存储类型
常用概念
网络环境
许可声明
购买指南
计费概述
产品价格
购买方式
续费说明
欠费说明
退费说明
按量转包年包月
调整实例费用说明
本地备份空间收费说明
跨地域备份收费说明
查看账单明细
快速入门
创建 SQL Server 实例
连接 SQL Server 实例
管理 SQL Server 实例
操作指南
约束与限制
使用规范与建议
维护管理实例
调整实例配置
只读实例
网络管理
账号管理
数据库管理
数据安全
参数配置
监控与告警
备份与回档
日志管理
发布订阅
数据集成服务(SSIS)
数据迁移(新版)
数据迁移(旧版)
数据同步(DTS)
实践教程
云数据库 SQL Server 定期维护方法
云数据库 SQL Server 慢 SQL 优化
如何更好地使用 Tempdb
跨账号备份恢复
为云数据库 SQL Server 创建 VPC
金蝶K/3 WISE 接入云数据库 SQL Server
账号权限和权限控制
变更数据捕获功能的开启和关闭
收缩数据库
API 文档
History
Introduction
API Category
Making API Requests
Sales and fee related APIs
Instance Management related APIs
Operation and maintenance management related APIs
Network management related APIs
Account management related APIs
Database management related APIs
Security group management related APIs
Data security encryption related APIs
Parameter configuration related APIs
Extended Event related APIs
Log management related APIs
Read only instance management related APIs
Publish and subscribe related APIs
Backup related APIs
Rollback related APIs
Data migration (cold standby migration) related APIs
SQL Server Integration Services (SSIS) related APIs
Data migration (DTS old version) related APIs
Data Types
Error Codes
常见问题
常见问题概览
选购咨询
计费与选购
连接与网络
账号与权限
备份与回档
数据迁移
发布订阅
只读实例
版本架构升级
磁盘扩缩容与规格升降级
监控与告警
日志相关
参数修改
功能特性相关
性能空间内存相关
相关协议
服务等级协议
服务条款
性能测试
性能测试报告
词汇表
联系我们
文档云数据库 SQL Server

Authorization Policy Syntax

聚焦模式
字号
最后更新时间: 2024-01-18 17:20:33

Policy Syntax

CAM policy:
{
"version":"2.0",
"statement":
[
{
"effect":"effect",
"action":["action"],
"resource":["resource"],
"condition": {"key":{"value"}}
}
]
}
version is required. Currently, only "2.0" is allowed.
statement describes the details of one or more permissions. This element contains a permission or permission set of other elements such as effect, action, resource, and condition. One policy has only one statement.
effect describes whether the result produced by the statement is "allowed" (allow) or "denied" (deny). This element is required.
action describes the allowed or denied action (operation). An operation can be an API (prefixed with "sqlserver:"). This element is required.
resource describes the details of authorization. A resource is described in a six-segment format. Detailed resource definitions vary by product. This element is required.
condition describes the condition for the policy to take effect. A condition consists of operator, action key, and action value. A condition value may contain information such as time and IP address. Some services allow you to specify additional values in a condition. This element is required.

Operations in TencentDB for SQL Server

In a TencentDB for SQL Server policy statement, you can specify any API operation from any service that supports TencentDB for SQL Server. APIs prefixed with sqlserver: should be used for TencentDB for SQL Server, such as sqlserver:DescribeDBInstances or sqlserver:CreateAccount.
To specify multiple operations in a single statement, separate them with commas, as shown below:
"action":["sqlserver:action1","sqlserver:action2"]
You can also specify multiple operations using a wildcard. For example, you can specify all operations beginning with "Describe" in name, as shown below:
"action":["sqlserver:Describe*"]
If you want to specify all operations in TencentDB for SQL Server, use a wildcard as shown below:
"action"["sqlserver:*"]

TencentDB for SQL Server Resources

Each CAM policy statement has its own resources. Resources are generally in the following format:
qcs:project_id:service_type:region:account:resource
project_id describes the project information, which is only used to enable compatibility with legacy CAM logic and can be left empty.
service_type describes the product abbreviation such as sqlserver.
region describes the region information, such as ap-guangzhou.
account is the root account of the resource owner, such as uin/653339763.
resource describes detailed resource information of each product, such as instance/instance_id1 or instance/*.
For example, you can specify a resource for a specific instance (mssql-m8oh024t) in a statement as shown below:
"resource":[ "qcs::sqlserver:ap-guangzhou:uin/653339763:instance/mssql-m8oh024t"]
You can also use the wildcard "*" to specify it for all instances that belong to a specific account as shown below:
"resource":[ "qcs::sqlserver:ap-guangzhou:uin/653339763:instance/*"]
If you want to specify all resources or a specific API operation does not support resource-level permission control, you can use the wildcard "*" in the "resource" element as shown below:
"resource": ["*"]
To specify multiple resources in a single command, separate them with commas. Below is an example where two resources are specified:
"resource":["resource1","resource2"]
The table below describes the resources that can be used by TencentDB for SQL Server and the corresponding resource description methods, where words prefixed with $ are placeholders, project refers to a project ID, region refers to a region, and account refers to an account ID.
Resource
Resource Description Method in Authorization Policy
Instance
``qcs::sqlserver:$region:$account:instance/$instanceId``
VPC
``qcs::vpc:$region:$account:vpc/$vpcId``
Security group
``qcs::cvm:$region:$account:sg/$sgId``


帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈