Documentation
¶
Index ¶
- Constants
- type AddCustomRuleRequest
- type AddCustomRuleResponse
- type Client
- func (c *Client) AddCustomRule(request *AddCustomRuleRequest) (response *AddCustomRuleResponse, err error)
- func (c *Client) CreateAttackDownloadTask(request *CreateAttackDownloadTaskRequest) (response *CreateAttackDownloadTaskResponse, err error)
- func (c *Client) DeleteAttackDownloadRecord(request *DeleteAttackDownloadRecordRequest) (response *DeleteAttackDownloadRecordResponse, err error)
- func (c *Client) DeleteDownloadRecord(request *DeleteDownloadRecordRequest) (response *DeleteDownloadRecordResponse, err error)
- func (c *Client) DeleteSession(request *DeleteSessionRequest) (response *DeleteSessionResponse, err error)
- func (c *Client) DescribeCustomRules(request *DescribeCustomRulesRequest) (response *DescribeCustomRulesResponse, err error)
- func (c *Client) DescribeUserClbWafRegions(request *DescribeUserClbWafRegionsRequest) (response *DescribeUserClbWafRegionsResponse, err error)
- func (c *Client) ModifyCustomRuleStatus(request *ModifyCustomRuleStatusRequest) (response *ModifyCustomRuleStatusResponse, err error)
- type CreateAttackDownloadTaskRequest
- type CreateAttackDownloadTaskResponse
- type DeleteAttackDownloadRecordRequest
- type DeleteAttackDownloadRecordResponse
- type DeleteDownloadRecordRequest
- type DeleteDownloadRecordResponse
- type DeleteSessionRequest
- type DeleteSessionResponse
- type DescribeCustomRulesPagingInfo
- type DescribeCustomRulesRequest
- type DescribeCustomRulesResponse
- type DescribeCustomRulesRspRuleListItem
- type DescribeUserClbWafRegionsRequest
- type DescribeUserClbWafRegionsResponse
- type ModifyCustomRuleStatusRequest
- type ModifyCustomRuleStatusResponse
- type ResponseCode
- type Strategy
Constants ¶
const APIVersion = "2018-01-25"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCustomRuleRequest ¶
type AddCustomRuleRequest struct {
*tchttp.BaseRequest
// 规则名称
Name *string `json:"Name,omitempty" name:"Name"`
// 优先级
SortId *string `json:"SortId,omitempty" name:"SortId"`
// 过期时间
ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"`
// 策略详情
Strategies []*Strategy `json:"Strategies,omitempty" name:"Strategies" list`
// 需要添加策略的域名
Domain *string `json:"Domain,omitempty" name:"Domain"`
// 动作类型
ActionType *string `json:"ActionType,omitempty" name:"ActionType"`
// 如果动作是重定向,则表示重定向的地址;其他情况可以为空
Redirect *string `json:"Redirect,omitempty" name:"Redirect"`
// "clb-waf"或者"sparta-waf"
Edition *string `json:"Edition,omitempty" name:"Edition"`
// 放行的详情
Bypass *string `json:"Bypass,omitempty" name:"Bypass"`
}
func NewAddCustomRuleRequest ¶
func NewAddCustomRuleRequest() (request *AddCustomRuleRequest)
func (*AddCustomRuleRequest) FromJsonString ¶
func (r *AddCustomRuleRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*AddCustomRuleRequest) ToJsonString ¶
func (r *AddCustomRuleRequest) ToJsonString() string
type AddCustomRuleResponse ¶
type AddCustomRuleResponse struct {
*tchttp.BaseResponse
Response *struct {
// 操作的状态码,如果所有的资源操作成功则返回的是成功的状态码,如果有资源操作失败则需要解析Message的内容来查看哪个资源失败
Success *ResponseCode `json:"Success,omitempty" name:"Success"`
// 添加成功的规则ID
// 注意:此字段可能返回 null,表示取不到有效值。
RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewAddCustomRuleResponse ¶
func NewAddCustomRuleResponse() (response *AddCustomRuleResponse)
func (*AddCustomRuleResponse) FromJsonString ¶
func (r *AddCustomRuleResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*AddCustomRuleResponse) ToJsonString ¶
func (r *AddCustomRuleResponse) ToJsonString() string
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) AddCustomRule ¶
func (c *Client) AddCustomRule(request *AddCustomRuleRequest) (response *AddCustomRuleResponse, err error)
增加自定义策略
func (*Client) CreateAttackDownloadTask ¶
func (c *Client) CreateAttackDownloadTask(request *CreateAttackDownloadTaskRequest) (response *CreateAttackDownloadTaskResponse, err error)
创建攻击日志下载任务
func (*Client) DeleteAttackDownloadRecord ¶
func (c *Client) DeleteAttackDownloadRecord(request *DeleteAttackDownloadRecordRequest) (response *DeleteAttackDownloadRecordResponse, err error)
删除攻击日志下载任务记录
func (*Client) DeleteDownloadRecord ¶
func (c *Client) DeleteDownloadRecord(request *DeleteDownloadRecordRequest) (response *DeleteDownloadRecordResponse, err error)
删除访问日志下载记录
func (*Client) DeleteSession ¶
func (c *Client) DeleteSession(request *DeleteSessionRequest) (response *DeleteSessionResponse, err error)
删除CC攻击的session设置
func (*Client) DescribeCustomRules ¶
func (c *Client) DescribeCustomRules(request *DescribeCustomRulesRequest) (response *DescribeCustomRulesResponse, err error)
获取防护配置中的自定义策略列表
func (*Client) DescribeUserClbWafRegions ¶
func (c *Client) DescribeUserClbWafRegions(request *DescribeUserClbWafRegionsRequest) (response *DescribeUserClbWafRegionsResponse, err error)
在负载均衡型WAF的添加、编辑域名配置的时候,需要展示负载均衡型WAF(clb-waf)支持的地域列表,通过DescribeUserClbWafRegions既可以获得当前对客户已经开放的地域列表
func (*Client) ModifyCustomRuleStatus ¶
func (c *Client) ModifyCustomRuleStatus(request *ModifyCustomRuleStatusRequest) (response *ModifyCustomRuleStatusResponse, err error)
开启或禁用自定义策略
type CreateAttackDownloadTaskRequest ¶
type CreateAttackDownloadTaskRequest struct {
*tchttp.BaseRequest
// 域名,所有域名填写all
Domain *string `json:"Domain,omitempty" name:"Domain"`
// 查询起始时间
FromTime *string `json:"FromTime,omitempty" name:"FromTime"`
// 查询结束时间
ToTime *string `json:"ToTime,omitempty" name:"ToTime"`
// 下载任务名字
Name *string `json:"Name,omitempty" name:"Name"`
// 风险等级
RiskLevel *uint64 `json:"RiskLevel,omitempty" name:"RiskLevel"`
// 拦截状态
Status *uint64 `json:"Status,omitempty" name:"Status"`
// 自定义策略ID
RuleId *uint64 `json:"RuleId,omitempty" name:"RuleId"`
// 攻击者IP
AttackIp *string `json:"AttackIp,omitempty" name:"AttackIp"`
// 攻击类型
AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
}
func NewCreateAttackDownloadTaskRequest ¶
func NewCreateAttackDownloadTaskRequest() (request *CreateAttackDownloadTaskRequest)
func (*CreateAttackDownloadTaskRequest) FromJsonString ¶
func (r *CreateAttackDownloadTaskRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*CreateAttackDownloadTaskRequest) ToJsonString ¶
func (r *CreateAttackDownloadTaskRequest) ToJsonString() string
type CreateAttackDownloadTaskResponse ¶
type CreateAttackDownloadTaskResponse struct {
*tchttp.BaseResponse
Response *struct {
// 任务ID
Flow *string `json:"Flow,omitempty" name:"Flow"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewCreateAttackDownloadTaskResponse ¶
func NewCreateAttackDownloadTaskResponse() (response *CreateAttackDownloadTaskResponse)
func (*CreateAttackDownloadTaskResponse) FromJsonString ¶
func (r *CreateAttackDownloadTaskResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*CreateAttackDownloadTaskResponse) ToJsonString ¶
func (r *CreateAttackDownloadTaskResponse) ToJsonString() string
type DeleteAttackDownloadRecordRequest ¶
type DeleteAttackDownloadRecordRequest struct {
*tchttp.BaseRequest
// 下载任务记录唯一标记
Id *uint64 `json:"Id,omitempty" name:"Id"`
}
func NewDeleteAttackDownloadRecordRequest ¶
func NewDeleteAttackDownloadRecordRequest() (request *DeleteAttackDownloadRecordRequest)
func (*DeleteAttackDownloadRecordRequest) FromJsonString ¶
func (r *DeleteAttackDownloadRecordRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteAttackDownloadRecordRequest) ToJsonString ¶
func (r *DeleteAttackDownloadRecordRequest) ToJsonString() string
type DeleteAttackDownloadRecordResponse ¶
type DeleteAttackDownloadRecordResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDeleteAttackDownloadRecordResponse ¶
func NewDeleteAttackDownloadRecordResponse() (response *DeleteAttackDownloadRecordResponse)
func (*DeleteAttackDownloadRecordResponse) FromJsonString ¶
func (r *DeleteAttackDownloadRecordResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteAttackDownloadRecordResponse) ToJsonString ¶
func (r *DeleteAttackDownloadRecordResponse) ToJsonString() string
type DeleteDownloadRecordRequest ¶
type DeleteDownloadRecordRequest struct {
*tchttp.BaseRequest
// 记录id
Flow *string `json:"Flow,omitempty" name:"Flow"`
}
func NewDeleteDownloadRecordRequest ¶
func NewDeleteDownloadRecordRequest() (request *DeleteDownloadRecordRequest)
func (*DeleteDownloadRecordRequest) FromJsonString ¶
func (r *DeleteDownloadRecordRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteDownloadRecordRequest) ToJsonString ¶
func (r *DeleteDownloadRecordRequest) ToJsonString() string
type DeleteDownloadRecordResponse ¶
type DeleteDownloadRecordResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDeleteDownloadRecordResponse ¶
func NewDeleteDownloadRecordResponse() (response *DeleteDownloadRecordResponse)
func (*DeleteDownloadRecordResponse) FromJsonString ¶
func (r *DeleteDownloadRecordResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteDownloadRecordResponse) ToJsonString ¶
func (r *DeleteDownloadRecordResponse) ToJsonString() string
type DeleteSessionRequest ¶
type DeleteSessionRequest struct {
*tchttp.BaseRequest
// 域名
Domain *string `json:"Domain,omitempty" name:"Domain"`
// clb-waf 或者 sprta-waf
Edition *string `json:"Edition,omitempty" name:"Edition"`
}
func NewDeleteSessionRequest ¶
func NewDeleteSessionRequest() (request *DeleteSessionRequest)
func (*DeleteSessionRequest) FromJsonString ¶
func (r *DeleteSessionRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteSessionRequest) ToJsonString ¶
func (r *DeleteSessionRequest) ToJsonString() string
type DeleteSessionResponse ¶
type DeleteSessionResponse struct {
*tchttp.BaseResponse
Response *struct {
// 结果
// 注意:此字段可能返回 null,表示取不到有效值。
Data *string `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDeleteSessionResponse ¶
func NewDeleteSessionResponse() (response *DeleteSessionResponse)
func (*DeleteSessionResponse) FromJsonString ¶
func (r *DeleteSessionResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DeleteSessionResponse) ToJsonString ¶
func (r *DeleteSessionResponse) ToJsonString() string
type DescribeCustomRulesRequest ¶
type DescribeCustomRulesRequest struct {
*tchttp.BaseRequest
// 域名
Domain *string `json:"Domain,omitempty" name:"Domain"`
// 分页参数
Paging *DescribeCustomRulesPagingInfo `json:"Paging,omitempty" name:"Paging"`
// clb-waf或者sparta-waf
Edition *string `json:"Edition,omitempty" name:"Edition"`
// 过滤参数:动作类型:0放行,1阻断,2人机识别,3观察,4重定向
ActionType *string `json:"ActionType,omitempty" name:"ActionType"`
// 过滤参数:规则名称过滤条件
Search *string `json:"Search,omitempty" name:"Search"`
}
func NewDescribeCustomRulesRequest ¶
func NewDescribeCustomRulesRequest() (request *DescribeCustomRulesRequest)
func (*DescribeCustomRulesRequest) FromJsonString ¶
func (r *DescribeCustomRulesRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeCustomRulesRequest) ToJsonString ¶
func (r *DescribeCustomRulesRequest) ToJsonString() string
type DescribeCustomRulesResponse ¶
type DescribeCustomRulesResponse struct {
*tchttp.BaseResponse
Response *struct {
// 规则详情
RuleList []*DescribeCustomRulesRspRuleListItem `json:"RuleList,omitempty" name:"RuleList" list`
// 规则条数
TotalCount *string `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDescribeCustomRulesResponse ¶
func NewDescribeCustomRulesResponse() (response *DescribeCustomRulesResponse)
func (*DescribeCustomRulesResponse) FromJsonString ¶
func (r *DescribeCustomRulesResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeCustomRulesResponse) ToJsonString ¶
func (r *DescribeCustomRulesResponse) ToJsonString() string
type DescribeCustomRulesRspRuleListItem ¶
type DescribeCustomRulesRspRuleListItem struct {
// 动作类型
ActionType *string `json:"ActionType,omitempty" name:"ActionType"`
// 跳过的策略
Bypass *string `json:"Bypass,omitempty" name:"Bypass"`
// 创建时间
CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"`
// 过期时间
ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"`
// 策略名称
Name *string `json:"Name,omitempty" name:"Name"`
// 重定向地址
Redirect *string `json:"Redirect,omitempty" name:"Redirect"`
// 策略ID
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
// 优先级
SortId *string `json:"SortId,omitempty" name:"SortId"`
// 状态
Status *string `json:"Status,omitempty" name:"Status"`
// 策略详情
Strategies []*Strategy `json:"Strategies,omitempty" name:"Strategies" list`
}
type DescribeUserClbWafRegionsRequest ¶
type DescribeUserClbWafRegionsRequest struct {
*tchttp.BaseRequest
}
func NewDescribeUserClbWafRegionsRequest ¶
func NewDescribeUserClbWafRegionsRequest() (request *DescribeUserClbWafRegionsRequest)
func (*DescribeUserClbWafRegionsRequest) FromJsonString ¶
func (r *DescribeUserClbWafRegionsRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeUserClbWafRegionsRequest) ToJsonString ¶
func (r *DescribeUserClbWafRegionsRequest) ToJsonString() string
type DescribeUserClbWafRegionsResponse ¶
type DescribeUserClbWafRegionsResponse struct {
*tchttp.BaseResponse
Response *struct {
// 地域(标准的ap-格式)列表
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*string `json:"Data,omitempty" name:"Data" list`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDescribeUserClbWafRegionsResponse ¶
func NewDescribeUserClbWafRegionsResponse() (response *DescribeUserClbWafRegionsResponse)
func (*DescribeUserClbWafRegionsResponse) FromJsonString ¶
func (r *DescribeUserClbWafRegionsResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeUserClbWafRegionsResponse) ToJsonString ¶
func (r *DescribeUserClbWafRegionsResponse) ToJsonString() string
type ModifyCustomRuleStatusRequest ¶
type ModifyCustomRuleStatusRequest struct {
*tchttp.BaseRequest
// 域名
Domain *string `json:"Domain,omitempty" name:"Domain"`
// 规则ID
RuleId *uint64 `json:"RuleId,omitempty" name:"RuleId"`
// 开关的状态,1是开启、0是关闭
Status *uint64 `json:"Status,omitempty" name:"Status"`
// WAF的版本,clb-waf代表负载均衡WAF、sparta-waf代表SaaS WAF,默认是sparta-waf。
Edition *string `json:"Edition,omitempty" name:"Edition"`
}
func NewModifyCustomRuleStatusRequest ¶
func NewModifyCustomRuleStatusRequest() (request *ModifyCustomRuleStatusRequest)
func (*ModifyCustomRuleStatusRequest) FromJsonString ¶
func (r *ModifyCustomRuleStatusRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*ModifyCustomRuleStatusRequest) ToJsonString ¶
func (r *ModifyCustomRuleStatusRequest) ToJsonString() string
type ModifyCustomRuleStatusResponse ¶
type ModifyCustomRuleStatusResponse struct {
*tchttp.BaseResponse
Response *struct {
// 操作的状态码,如果所有的资源操作成功则返回的是成功的状态码,如果有资源操作失败则需要解析Message的内容来查看哪个资源失败
Success *ResponseCode `json:"Success,omitempty" name:"Success"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewModifyCustomRuleStatusResponse ¶
func NewModifyCustomRuleStatusResponse() (response *ModifyCustomRuleStatusResponse)
func (*ModifyCustomRuleStatusResponse) FromJsonString ¶
func (r *ModifyCustomRuleStatusResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*ModifyCustomRuleStatusResponse) ToJsonString ¶
func (r *ModifyCustomRuleStatusResponse) ToJsonString() string