modify_policy

package
v7.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

修改授权策略

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Id          string             // 记录 ID
	RootUid     int64              // 根用户 uid
	Alias       string             // 授权策略别名
	Description string             // 授权策略描述
	Enabled     bool               // 授权策略是否启用
	CreatedAt   string             // 授权策略创建时间
	UpdatedAt   string             // 授权策略上次更新时间
	Statement   ModifiedStatements // 授权策略规则集合
}

授权策略信息

func (*Data) MarshalJSON

func (j *Data) MarshalJSON() ([]byte, error)

func (*Data) UnmarshalJSON

func (j *Data) UnmarshalJSON(data []byte) error

type ModifiedActions

type ModifiedActions = []string

授权策略规则的操作集合

type ModifiedPolicyData

type ModifiedPolicyData = Data

返回的授权策略信息

type ModifiedPolicyResp

type ModifiedPolicyResp = Response

返回的授权策略响应

type ModifiedResources

type ModifiedResources = []string

授权策略规则的资源集合

type ModifiedStatement

type ModifiedStatement struct {
	Actions   ModifiedActions   // 授权策略规则的操作集合
	Resources ModifiedResources // 授权策略规则的资源集合
	Effect    string            // 授权策略规则的生效类型,允许访问或拒绝访问
}

授权策略规则

func (*ModifiedStatement) MarshalJSON

func (j *ModifiedStatement) MarshalJSON() ([]byte, error)

func (*ModifiedStatement) UnmarshalJSON

func (j *ModifiedStatement) UnmarshalJSON(data []byte) error

type ModifiedStatements

type ModifiedStatements = []ModifiedStatement

授权策略规则集合

type ModifyActions

type ModifyActions = []string

授权策略规则的操作集合

type ModifyPolicyParam

type ModifyPolicyParam = Request

修改授权策略参数

type ModifyResources

type ModifyResources = []string

授权策略规则的资源集合

type ModifyStatement

type ModifyStatement struct {
	Actions   ModifyActions   // 授权策略规则的操作集合,action 查询参考 action 接口,格式为 service/action_alias
	Resources ModifyResources // 授权策略规则的资源集合,格式为 qrn:product:region:uid:[resource-type/]resource-id ;可以简写为 qrn:product:::resource-id
	Effect    string          // 授权策略规则的生效类型,允许访问或拒绝访问
}

授权策略规则

func (*ModifyStatement) MarshalJSON

func (j *ModifyStatement) MarshalJSON() ([]byte, error)

func (*ModifyStatement) UnmarshalJSON

func (j *ModifyStatement) UnmarshalJSON(data []byte) error

type ModifyStatements

type ModifyStatements = []ModifyStatement

授权策略规则集合

type Request

type Request struct {
	Alias       string                          // 授权策略别名
	Credentials credentials.CredentialsProvider // 鉴权参数,用于生成鉴权凭证,如果为空,则使用 HTTPClientOptions 中的 CredentialsProvider
	NewAlias    string                          // 授权策略别名,由 `A-Za-z0-9` 组成
	Description string                          // 授权策略描述
	Statement   ModifyStatements                // 授权策略规则集合
}

调用 API 所用的请求

func (*Request) MarshalJSON

func (j *Request) MarshalJSON() ([]byte, error)

func (*Request) UnmarshalJSON

func (j *Request) UnmarshalJSON(data []byte) error

type Response

type Response struct {
	Data ModifiedPolicyData // 授权策略信息
}

获取 API 所用的响应

func (*Response) MarshalJSON

func (j *Response) MarshalJSON() ([]byte, error)

func (*Response) UnmarshalJSON

func (j *Response) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL