Documentation
¶
Overview ¶
新建授权策略
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateStatement ¶
type CreateStatement struct {
Actions CreateActions // 授权策略规则的操作集合,action 查询参考 action 接口,格式为 service/action_alias
Resources CreateResources // 授权策略规则的资源集合,格式为 qrn:product:region:uid:[resource-type/]resource-id ;可以简写为 qrn:product:::resource-id
Effect string // 授权策略规则的生效类型,允许访问或拒绝访问
}
授权策略规则
func (*CreateStatement) MarshalJSON ¶
func (j *CreateStatement) MarshalJSON() ([]byte, error)
func (*CreateStatement) UnmarshalJSON ¶
func (j *CreateStatement) UnmarshalJSON(data []byte) error
type CreatedStatement ¶
type CreatedStatement struct {
Actions CreatedActions // 授权策略规则的操作集合
Resources CreatedResources // 授权策略规则的资源集合
Effect string // 授权策略规则的生效类型,允许访问或拒绝访问
}
授权策略规则
func (*CreatedStatement) MarshalJSON ¶
func (j *CreatedStatement) MarshalJSON() ([]byte, error)
func (*CreatedStatement) UnmarshalJSON ¶
func (j *CreatedStatement) UnmarshalJSON(data []byte) error
type Data ¶
type Data struct {
Id string // 记录 ID
RootUid int64 // 根用户 uid
Alias string // 授权策略别名
Description string // 授权策略描述
Enabled bool // 授权策略是否启用
CreatedAt string // 授权策略创建时间
UpdatedAt string // 授权策略上次更新时间
Statement CreatedStatements // 授权策略规则集合
}
授权策略信息
func (*Data) MarshalJSON ¶
func (*Data) UnmarshalJSON ¶
type Request ¶
type Request struct {
Credentials credentials.CredentialsProvider // 鉴权参数,用于生成鉴权凭证,如果为空,则使用 HTTPClientOptions 中的 CredentialsProvider
Alias string // 授权策略别名,由 `A-Za-z0-9` 组成
EditType int64 // 1:是通过自定义 JSON 编辑的策略 2:是通过 UI 编辑的策略
Description string // 授权策略描述
Statement CreateStatements // 授权策略规则集合
}
调用 API 所用的请求
func (*Request) MarshalJSON ¶
func (*Request) UnmarshalJSON ¶
type Response ¶
type Response struct {
Data CreatedPolicyData // 授权策略信息
}
获取 API 所用的响应
func (*Response) MarshalJSON ¶
func (*Response) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.