diff --git a/ChangeLog.txt b/ChangeLog.txt index 101d62ebba..4794349bc9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-05-14 Version: v1.62.735 +- Generated 2019-09-10 for `waf-openapi`. +- Upgrade SDK. + 2024-05-11 Version: v1.62.734 - Generated 2016-11-01 for `live`. - Update to support new apis. diff --git a/services/waf-openapi/create_certificate.go b/services/waf-openapi/create_certificate.go index 1f4517dab6..f8066bc3bd 100644 --- a/services/waf-openapi/create_certificate.go +++ b/services/waf-openapi/create_certificate.go @@ -73,6 +73,7 @@ type CreateCertificateRequest struct { *requests.RpcRequest Certificate string `position:"Query" name:"Certificate"` PrivateKey string `position:"Query" name:"PrivateKey"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` SourceIp string `position:"Query" name:"SourceIp"` Lang string `position:"Query" name:"Lang"` InstanceId string `position:"Query" name:"InstanceId"` diff --git a/services/waf-openapi/create_certificate_by_certificate_id.go b/services/waf-openapi/create_certificate_by_certificate_id.go index adddc7cfd1..19085f37f4 100644 --- a/services/waf-openapi/create_certificate_by_certificate_id.go +++ b/services/waf-openapi/create_certificate_by_certificate_id.go @@ -71,11 +71,12 @@ func (client *Client) CreateCertificateByCertificateIdWithCallback(request *Crea // CreateCertificateByCertificateIdRequest is the request struct for api CreateCertificateByCertificateId type CreateCertificateByCertificateIdRequest struct { *requests.RpcRequest - SourceIp string `position:"Query" name:"SourceIp"` - Lang string `position:"Query" name:"Lang"` - CertificateId requests.Integer `position:"Query" name:"CertificateId"` - InstanceId string `position:"Query" name:"InstanceId"` - Domain string `position:"Query" name:"Domain"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + CertificateId requests.Integer `position:"Query" name:"CertificateId"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // CreateCertificateByCertificateIdResponse is the response struct for api CreateCertificateByCertificateId diff --git a/services/waf-openapi/create_protection_module_rule.go b/services/waf-openapi/create_protection_module_rule.go index 4bef191d2f..d6e05d2455 100644 --- a/services/waf-openapi/create_protection_module_rule.go +++ b/services/waf-openapi/create_protection_module_rule.go @@ -71,12 +71,13 @@ func (client *Client) CreateProtectionModuleRuleWithCallback(request *CreateProt // CreateProtectionModuleRuleRequest is the request struct for api CreateProtectionModuleRule type CreateProtectionModuleRuleRequest struct { *requests.RpcRequest - DefenseType string `position:"Query" name:"DefenseType"` - Rule string `position:"Query" name:"Rule"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + Rule string `position:"Query" name:"Rule"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // CreateProtectionModuleRuleResponse is the response struct for api CreateProtectionModuleRule diff --git a/services/waf-openapi/delete_domain.go b/services/waf-openapi/delete_domain.go index b7b6fc120a..5249cd8388 100644 --- a/services/waf-openapi/delete_domain.go +++ b/services/waf-openapi/delete_domain.go @@ -71,10 +71,11 @@ func (client *Client) DeleteDomainWithCallback(request *DeleteDomainRequest, cal // DeleteDomainRequest is the request struct for api DeleteDomain type DeleteDomainRequest struct { *requests.RpcRequest - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // DeleteDomainResponse is the response struct for api DeleteDomain diff --git a/services/waf-openapi/delete_instance.go b/services/waf-openapi/delete_instance.go index 825564a1fb..6408888227 100644 --- a/services/waf-openapi/delete_instance.go +++ b/services/waf-openapi/delete_instance.go @@ -72,9 +72,9 @@ func (client *Client) DeleteInstanceWithCallback(request *DeleteInstanceRequest, type DeleteInstanceRequest struct { *requests.RpcRequest ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - InstanceId string `position:"Query" name:"InstanceId"` SourceIp string `position:"Query" name:"SourceIp"` Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` } // DeleteInstanceResponse is the response struct for api DeleteInstance diff --git a/services/waf-openapi/delete_protection_module_rule.go b/services/waf-openapi/delete_protection_module_rule.go index cac42f0c6d..6929a0317e 100644 --- a/services/waf-openapi/delete_protection_module_rule.go +++ b/services/waf-openapi/delete_protection_module_rule.go @@ -71,12 +71,13 @@ func (client *Client) DeleteProtectionModuleRuleWithCallback(request *DeleteProt // DeleteProtectionModuleRuleRequest is the request struct for api DeleteProtectionModuleRule type DeleteProtectionModuleRuleRequest struct { *requests.RpcRequest - DefenseType string `position:"Query" name:"DefenseType"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` - RuleId requests.Integer `position:"Query" name:"RuleId"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` + RuleId requests.Integer `position:"Query" name:"RuleId"` } // DeleteProtectionModuleRuleResponse is the response struct for api DeleteProtectionModuleRule diff --git a/services/waf-openapi/describe_cert_match_status.go b/services/waf-openapi/describe_cert_match_status.go index 3b8bafa0ea..c0f3589a2c 100644 --- a/services/waf-openapi/describe_cert_match_status.go +++ b/services/waf-openapi/describe_cert_match_status.go @@ -71,12 +71,13 @@ func (client *Client) DescribeCertMatchStatusWithCallback(request *DescribeCertM // DescribeCertMatchStatusRequest is the request struct for api DescribeCertMatchStatus type DescribeCertMatchStatusRequest struct { *requests.RpcRequest - Certificate string `position:"Query" name:"Certificate"` - PrivateKey string `position:"Query" name:"PrivateKey"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + Certificate string `position:"Query" name:"Certificate"` + PrivateKey string `position:"Query" name:"PrivateKey"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // DescribeCertMatchStatusResponse is the response struct for api DescribeCertMatchStatus diff --git a/services/waf-openapi/describe_certificates.go b/services/waf-openapi/describe_certificates.go index d144fe7a62..c442ec1f28 100644 --- a/services/waf-openapi/describe_certificates.go +++ b/services/waf-openapi/describe_certificates.go @@ -71,10 +71,11 @@ func (client *Client) DescribeCertificatesWithCallback(request *DescribeCertific // DescribeCertificatesRequest is the request struct for api DescribeCertificates type DescribeCertificatesRequest struct { *requests.RpcRequest - SourceIp string `position:"Query" name:"SourceIp"` - Lang string `position:"Query" name:"Lang"` - InstanceId string `position:"Query" name:"InstanceId"` - Domain string `position:"Query" name:"Domain"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // DescribeCertificatesResponse is the response struct for api DescribeCertificates diff --git a/services/waf-openapi/describe_domain.go b/services/waf-openapi/describe_domain.go index 85c1d6bc4f..38d394ecb2 100644 --- a/services/waf-openapi/describe_domain.go +++ b/services/waf-openapi/describe_domain.go @@ -71,10 +71,11 @@ func (client *Client) DescribeDomainWithCallback(request *DescribeDomainRequest, // DescribeDomainRequest is the request struct for api DescribeDomain type DescribeDomainRequest struct { *requests.RpcRequest - SourceIp string `position:"Query" name:"SourceIp"` - Lang string `position:"Query" name:"Lang"` - InstanceId string `position:"Query" name:"InstanceId"` - Domain string `position:"Query" name:"Domain"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // DescribeDomainResponse is the response struct for api DescribeDomain diff --git a/services/waf-openapi/describe_domain_advance_configs.go b/services/waf-openapi/describe_domain_advance_configs.go index 3d91410272..b1c796f2e2 100644 --- a/services/waf-openapi/describe_domain_advance_configs.go +++ b/services/waf-openapi/describe_domain_advance_configs.go @@ -73,9 +73,9 @@ type DescribeDomainAdvanceConfigsRequest struct { *requests.RpcRequest DomainList string `position:"Query" name:"DomainList"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - InstanceId string `position:"Query" name:"InstanceId"` SourceIp string `position:"Query" name:"SourceIp"` Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeDomainAdvanceConfigsResponse is the response struct for api DescribeDomainAdvanceConfigs diff --git a/services/waf-openapi/describe_domain_names.go b/services/waf-openapi/describe_domain_names.go index e7b7b9c5a6..43a6ee84ac 100644 --- a/services/waf-openapi/describe_domain_names.go +++ b/services/waf-openapi/describe_domain_names.go @@ -72,9 +72,9 @@ func (client *Client) DescribeDomainNamesWithCallback(request *DescribeDomainNam type DescribeDomainNamesRequest struct { *requests.RpcRequest ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - InstanceId string `position:"Query" name:"InstanceId"` SourceIp string `position:"Query" name:"SourceIp"` Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` CallSource string `position:"Query" name:"CallSource"` } diff --git a/services/waf-openapi/describe_domain_rule_group.go b/services/waf-openapi/describe_domain_rule_group.go index 06e23697d0..f642dc04c2 100644 --- a/services/waf-openapi/describe_domain_rule_group.go +++ b/services/waf-openapi/describe_domain_rule_group.go @@ -71,10 +71,11 @@ func (client *Client) DescribeDomainRuleGroupWithCallback(request *DescribeDomai // DescribeDomainRuleGroupRequest is the request struct for api DescribeDomainRuleGroup type DescribeDomainRuleGroupRequest struct { *requests.RpcRequest - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // DescribeDomainRuleGroupResponse is the response struct for api DescribeDomainRuleGroup diff --git a/services/waf-openapi/describe_instance_info.go b/services/waf-openapi/describe_instance_info.go index 90995cecaa..28e39fd190 100644 --- a/services/waf-openapi/describe_instance_info.go +++ b/services/waf-openapi/describe_instance_info.go @@ -72,10 +72,10 @@ func (client *Client) DescribeInstanceInfoWithCallback(request *DescribeInstance type DescribeInstanceInfoRequest struct { *requests.RpcRequest ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - InstanceId string `position:"Query" name:"InstanceId"` SourceIp string `position:"Query" name:"SourceIp"` InstanceSource string `position:"Query" name:"InstanceSource"` Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeInstanceInfoResponse is the response struct for api DescribeInstanceInfo diff --git a/services/waf-openapi/describe_instance_spec_info.go b/services/waf-openapi/describe_instance_spec_info.go index 1de65d2a62..3c4eb00641 100644 --- a/services/waf-openapi/describe_instance_spec_info.go +++ b/services/waf-openapi/describe_instance_spec_info.go @@ -72,9 +72,9 @@ func (client *Client) DescribeInstanceSpecInfoWithCallback(request *DescribeInst type DescribeInstanceSpecInfoRequest struct { *requests.RpcRequest ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - InstanceId string `position:"Query" name:"InstanceId"` SourceIp string `position:"Query" name:"SourceIp"` Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeInstanceSpecInfoResponse is the response struct for api DescribeInstanceSpecInfo diff --git a/services/waf-openapi/describe_protection_module_mode.go b/services/waf-openapi/describe_protection_module_mode.go new file mode 100644 index 0000000000..2b52f47f14 --- /dev/null +++ b/services/waf-openapi/describe_protection_module_mode.go @@ -0,0 +1,106 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeProtectionModuleMode invokes the waf_openapi.DescribeProtectionModuleMode API synchronously +func (client *Client) DescribeProtectionModuleMode(request *DescribeProtectionModuleModeRequest) (response *DescribeProtectionModuleModeResponse, err error) { + response = CreateDescribeProtectionModuleModeResponse() + err = client.DoAction(request, response) + return +} + +// DescribeProtectionModuleModeWithChan invokes the waf_openapi.DescribeProtectionModuleMode API asynchronously +func (client *Client) DescribeProtectionModuleModeWithChan(request *DescribeProtectionModuleModeRequest) (<-chan *DescribeProtectionModuleModeResponse, <-chan error) { + responseChan := make(chan *DescribeProtectionModuleModeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeProtectionModuleMode(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeProtectionModuleModeWithCallback invokes the waf_openapi.DescribeProtectionModuleMode API asynchronously +func (client *Client) DescribeProtectionModuleModeWithCallback(request *DescribeProtectionModuleModeRequest, callback func(response *DescribeProtectionModuleModeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeProtectionModuleModeResponse + var err error + defer close(result) + response, err = client.DescribeProtectionModuleMode(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeProtectionModuleModeRequest is the request struct for api DescribeProtectionModuleMode +type DescribeProtectionModuleModeRequest struct { + *requests.RpcRequest + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` +} + +// DescribeProtectionModuleModeResponse is the response struct for api DescribeProtectionModuleMode +type DescribeProtectionModuleModeResponse struct { + *responses.BaseResponse + LearnStatus int `json:"LearnStatus" xml:"LearnStatus"` + RequestId string `json:"RequestId" xml:"RequestId"` + Mode int `json:"Mode" xml:"Mode"` +} + +// CreateDescribeProtectionModuleModeRequest creates a request to invoke DescribeProtectionModuleMode API +func CreateDescribeProtectionModuleModeRequest() (request *DescribeProtectionModuleModeRequest) { + request = &DescribeProtectionModuleModeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("waf-openapi", "2019-09-10", "DescribeProtectionModuleMode", "waf", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeProtectionModuleModeResponse creates a response to parse from DescribeProtectionModuleMode response +func CreateDescribeProtectionModuleModeResponse() (response *DescribeProtectionModuleModeResponse) { + response = &DescribeProtectionModuleModeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/waf-openapi/describe_protection_module_status.go b/services/waf-openapi/describe_protection_module_status.go index c321c739ed..d78d86aa92 100644 --- a/services/waf-openapi/describe_protection_module_status.go +++ b/services/waf-openapi/describe_protection_module_status.go @@ -71,11 +71,12 @@ func (client *Client) DescribeProtectionModuleStatusWithCallback(request *Descri // DescribeProtectionModuleStatusRequest is the request struct for api DescribeProtectionModuleStatus type DescribeProtectionModuleStatusRequest struct { *requests.RpcRequest - DefenseType string `position:"Query" name:"DefenseType"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // DescribeProtectionModuleStatusResponse is the response struct for api DescribeProtectionModuleStatus diff --git a/services/waf-openapi/describe_rule_groups.go b/services/waf-openapi/describe_rule_groups.go new file mode 100644 index 0000000000..1d05575629 --- /dev/null +++ b/services/waf-openapi/describe_rule_groups.go @@ -0,0 +1,112 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeRuleGroups invokes the waf_openapi.DescribeRuleGroups API synchronously +func (client *Client) DescribeRuleGroups(request *DescribeRuleGroupsRequest) (response *DescribeRuleGroupsResponse, err error) { + response = CreateDescribeRuleGroupsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeRuleGroupsWithChan invokes the waf_openapi.DescribeRuleGroups API asynchronously +func (client *Client) DescribeRuleGroupsWithChan(request *DescribeRuleGroupsRequest) (<-chan *DescribeRuleGroupsResponse, <-chan error) { + responseChan := make(chan *DescribeRuleGroupsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeRuleGroups(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeRuleGroupsWithCallback invokes the waf_openapi.DescribeRuleGroups API asynchronously +func (client *Client) DescribeRuleGroupsWithCallback(request *DescribeRuleGroupsRequest, callback func(response *DescribeRuleGroupsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeRuleGroupsResponse + var err error + defer close(result) + response, err = client.DescribeRuleGroups(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeRuleGroupsRequest is the request struct for api DescribeRuleGroups +type DescribeRuleGroupsRequest struct { + *requests.RpcRequest + Type requests.Integer `position:"Query" name:"Type"` + WafLang string `position:"Query" name:"WafLang"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + PolicyId requests.Integer `position:"Query" name:"PolicyId"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + Lang string `position:"Query" name:"Lang"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + InstanceId string `position:"Query" name:"InstanceId"` + Region string `position:"Query" name:"Region"` +} + +// DescribeRuleGroupsResponse is the response struct for api DescribeRuleGroups +type DescribeRuleGroupsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TaskStatus int `json:"TaskStatus" xml:"TaskStatus"` + Total int `json:"Total" xml:"Total"` + WafTaskId string `json:"WafTaskId" xml:"WafTaskId"` + RuleGroups []RuleGroupsItem `json:"RuleGroups" xml:"RuleGroups"` +} + +// CreateDescribeRuleGroupsRequest creates a request to invoke DescribeRuleGroups API +func CreateDescribeRuleGroupsRequest() (request *DescribeRuleGroupsRequest) { + request = &DescribeRuleGroupsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("waf-openapi", "2019-09-10", "DescribeRuleGroups", "waf", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeRuleGroupsResponse creates a response to parse from DescribeRuleGroups response +func CreateDescribeRuleGroupsResponse() (response *DescribeRuleGroupsResponse) { + response = &DescribeRuleGroupsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/waf-openapi/describe_rules.go b/services/waf-openapi/describe_rules.go new file mode 100644 index 0000000000..33877b082b --- /dev/null +++ b/services/waf-openapi/describe_rules.go @@ -0,0 +1,117 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeRules invokes the waf_openapi.DescribeRules API synchronously +func (client *Client) DescribeRules(request *DescribeRulesRequest) (response *DescribeRulesResponse, err error) { + response = CreateDescribeRulesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeRulesWithChan invokes the waf_openapi.DescribeRules API asynchronously +func (client *Client) DescribeRulesWithChan(request *DescribeRulesRequest) (<-chan *DescribeRulesResponse, <-chan error) { + responseChan := make(chan *DescribeRulesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeRules(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeRulesWithCallback invokes the waf_openapi.DescribeRules API asynchronously +func (client *Client) DescribeRulesWithCallback(request *DescribeRulesRequest, callback func(response *DescribeRulesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeRulesResponse + var err error + defer close(result) + response, err = client.DescribeRules(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeRulesRequest is the request struct for api DescribeRules +type DescribeRulesRequest struct { + *requests.RpcRequest + RuleGroupId requests.Integer `position:"Query" name:"RuleGroupId"` + ProtectionType requests.Integer `position:"Query" name:"ProtectionType"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + CveIdKey string `position:"Query" name:"CveIdKey"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + Lang string `position:"Query" name:"Lang"` + RiskLevel requests.Integer `position:"Query" name:"RiskLevel"` + InstanceId string `position:"Query" name:"InstanceId"` + RuleIdKey string `position:"Query" name:"RuleIdKey"` + Region string `position:"Query" name:"Region"` + ApplicationType requests.Integer `position:"Query" name:"ApplicationType"` +} + +// DescribeRulesResponse is the response struct for api DescribeRules +type DescribeRulesResponse struct { + *responses.BaseResponse + RuleGroupTemplateId string `json:"RuleGroupTemplateId" xml:"RuleGroupTemplateId"` + RuleGroupName string `json:"RuleGroupName" xml:"RuleGroupName"` + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + RuleGroupTemplateName string `json:"RuleGroupTemplateName" xml:"RuleGroupTemplateName"` + IsSubscribe int64 `json:"IsSubscribe" xml:"IsSubscribe"` + Rules []RulesItem `json:"Rules" xml:"Rules"` +} + +// CreateDescribeRulesRequest creates a request to invoke DescribeRules API +func CreateDescribeRulesRequest() (request *DescribeRulesRequest) { + request = &DescribeRulesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("waf-openapi", "2019-09-10", "DescribeRules", "waf", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeRulesResponse creates a response to parse from DescribeRules response +func CreateDescribeRulesResponse() (response *DescribeRulesResponse) { + response = &DescribeRulesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/waf-openapi/describe_waf_source_ip_segment.go b/services/waf-openapi/describe_waf_source_ip_segment.go index 470d5de43d..104fdfe103 100644 --- a/services/waf-openapi/describe_waf_source_ip_segment.go +++ b/services/waf-openapi/describe_waf_source_ip_segment.go @@ -72,9 +72,9 @@ func (client *Client) DescribeWafSourceIpSegmentWithCallback(request *DescribeWa type DescribeWafSourceIpSegmentRequest struct { *requests.RpcRequest ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - InstanceId string `position:"Query" name:"InstanceId"` SourceIp string `position:"Query" name:"SourceIp"` Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeWafSourceIpSegmentResponse is the response struct for api DescribeWafSourceIpSegment diff --git a/services/waf-openapi/modify_domain.go b/services/waf-openapi/modify_domain.go index 7f23e6826a..989b718033 100644 --- a/services/waf-openapi/modify_domain.go +++ b/services/waf-openapi/modify_domain.go @@ -74,6 +74,7 @@ type ModifyDomainRequest struct { IpFollowStatus requests.Integer `position:"Query" name:"IpFollowStatus"` Keepalive requests.Boolean `position:"Query" name:"Keepalive"` SniHost string `position:"Query" name:"SniHost"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` HybridCloudType requests.Integer `position:"Query" name:"HybridCloudType"` SourceIp string `position:"Query" name:"SourceIp"` HttpPort string `position:"Query" name:"HttpPort"` diff --git a/services/waf-openapi/modify_domain_ipv6_status.go b/services/waf-openapi/modify_domain_ipv6_status.go index 9cf1067282..5e677572fe 100644 --- a/services/waf-openapi/modify_domain_ipv6_status.go +++ b/services/waf-openapi/modify_domain_ipv6_status.go @@ -71,12 +71,13 @@ func (client *Client) ModifyDomainIpv6StatusWithCallback(request *ModifyDomainIp // ModifyDomainIpv6StatusRequest is the request struct for api ModifyDomainIpv6Status type ModifyDomainIpv6StatusRequest struct { *requests.RpcRequest - WafVersion string `position:"Query" name:"WafVersion"` - Enabled string `position:"Query" name:"Enabled"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + WafVersion string `position:"Query" name:"WafVersion"` + Enabled string `position:"Query" name:"Enabled"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // ModifyDomainIpv6StatusResponse is the response struct for api ModifyDomainIpv6Status diff --git a/services/waf-openapi/modify_log_retrieval_status.go b/services/waf-openapi/modify_log_retrieval_status.go index fd15c6ed70..7e0dd6752f 100644 --- a/services/waf-openapi/modify_log_retrieval_status.go +++ b/services/waf-openapi/modify_log_retrieval_status.go @@ -71,11 +71,12 @@ func (client *Client) ModifyLogRetrievalStatusWithCallback(request *ModifyLogRet // ModifyLogRetrievalStatusRequest is the request struct for api ModifyLogRetrievalStatus type ModifyLogRetrievalStatusRequest struct { *requests.RpcRequest - Enabled requests.Integer `position:"Query" name:"Enabled"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + Enabled requests.Integer `position:"Query" name:"Enabled"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // ModifyLogRetrievalStatusResponse is the response struct for api ModifyLogRetrievalStatus diff --git a/services/waf-openapi/modify_log_service_status.go b/services/waf-openapi/modify_log_service_status.go index 2398a626fa..2fa5167d6c 100644 --- a/services/waf-openapi/modify_log_service_status.go +++ b/services/waf-openapi/modify_log_service_status.go @@ -71,11 +71,12 @@ func (client *Client) ModifyLogServiceStatusWithCallback(request *ModifyLogServi // ModifyLogServiceStatusRequest is the request struct for api ModifyLogServiceStatus type ModifyLogServiceStatusRequest struct { *requests.RpcRequest - Enabled requests.Integer `position:"Query" name:"Enabled"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + Enabled requests.Integer `position:"Query" name:"Enabled"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // ModifyLogServiceStatusResponse is the response struct for api ModifyLogServiceStatus diff --git a/services/waf-openapi/modify_protection_module_mode.go b/services/waf-openapi/modify_protection_module_mode.go index 07ee3009fa..7590be7fc5 100644 --- a/services/waf-openapi/modify_protection_module_mode.go +++ b/services/waf-openapi/modify_protection_module_mode.go @@ -71,12 +71,13 @@ func (client *Client) ModifyProtectionModuleModeWithCallback(request *ModifyProt // ModifyProtectionModuleModeRequest is the request struct for api ModifyProtectionModuleMode type ModifyProtectionModuleModeRequest struct { *requests.RpcRequest - DefenseType string `position:"Query" name:"DefenseType"` - Mode requests.Integer `position:"Query" name:"Mode"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` + Mode requests.Integer `position:"Query" name:"Mode"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` } // ModifyProtectionModuleModeResponse is the response struct for api ModifyProtectionModuleMode diff --git a/services/waf-openapi/modify_protection_module_rule.go b/services/waf-openapi/modify_protection_module_rule.go index f5630aa5b8..2c5624a58f 100644 --- a/services/waf-openapi/modify_protection_module_rule.go +++ b/services/waf-openapi/modify_protection_module_rule.go @@ -71,14 +71,15 @@ func (client *Client) ModifyProtectionModuleRuleWithCallback(request *ModifyProt // ModifyProtectionModuleRuleRequest is the request struct for api ModifyProtectionModuleRule type ModifyProtectionModuleRuleRequest struct { *requests.RpcRequest - Rule string `position:"Query" name:"Rule"` - LockVersion requests.Integer `position:"Query" name:"LockVersion"` - SourceIp string `position:"Query" name:"SourceIp"` - Lang string `position:"Query" name:"Lang"` - DefenseType string `position:"Query" name:"DefenseType"` - InstanceId string `position:"Query" name:"InstanceId"` - Domain string `position:"Query" name:"Domain"` - RuleId requests.Integer `position:"Query" name:"RuleId"` + Rule string `position:"Query" name:"Rule"` + LockVersion requests.Integer `position:"Query" name:"LockVersion"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` + RuleId requests.Integer `position:"Query" name:"RuleId"` } // ModifyProtectionModuleRuleResponse is the response struct for api ModifyProtectionModuleRule diff --git a/services/waf-openapi/modify_protection_module_status.go b/services/waf-openapi/modify_protection_module_status.go index f76e6fd9c1..f998b0e3f4 100644 --- a/services/waf-openapi/modify_protection_module_status.go +++ b/services/waf-openapi/modify_protection_module_status.go @@ -71,12 +71,13 @@ func (client *Client) ModifyProtectionModuleStatusWithCallback(request *ModifyPr // ModifyProtectionModuleStatusRequest is the request struct for api ModifyProtectionModuleStatus type ModifyProtectionModuleStatusRequest struct { *requests.RpcRequest - DefenseType string `position:"Query" name:"DefenseType"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - ModuleStatus requests.Integer `position:"Query" name:"ModuleStatus"` - Lang string `position:"Query" name:"Lang"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` + ModuleStatus requests.Integer `position:"Query" name:"ModuleStatus"` } // ModifyProtectionModuleStatusResponse is the response struct for api ModifyProtectionModuleStatus diff --git a/services/waf-openapi/modify_protection_rule_cache_status.go b/services/waf-openapi/modify_protection_rule_cache_status.go index a6075bbc6c..089a8a167f 100644 --- a/services/waf-openapi/modify_protection_rule_cache_status.go +++ b/services/waf-openapi/modify_protection_rule_cache_status.go @@ -71,12 +71,13 @@ func (client *Client) ModifyProtectionRuleCacheStatusWithCallback(request *Modif // ModifyProtectionRuleCacheStatusRequest is the request struct for api ModifyProtectionRuleCacheStatus type ModifyProtectionRuleCacheStatusRequest struct { *requests.RpcRequest - DefenseType string `position:"Query" name:"DefenseType"` - InstanceId string `position:"Query" name:"InstanceId"` - SourceIp string `position:"Query" name:"SourceIp"` - Domain string `position:"Query" name:"Domain"` - Lang string `position:"Query" name:"Lang"` - RuleId requests.Integer `position:"Query" name:"RuleId"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` + RuleId requests.Integer `position:"Query" name:"RuleId"` } // ModifyProtectionRuleCacheStatusResponse is the response struct for api ModifyProtectionRuleCacheStatus diff --git a/services/waf-openapi/modify_protection_rule_status.go b/services/waf-openapi/modify_protection_rule_status.go index ae826652d3..ebeeec5137 100644 --- a/services/waf-openapi/modify_protection_rule_status.go +++ b/services/waf-openapi/modify_protection_rule_status.go @@ -71,14 +71,15 @@ func (client *Client) ModifyProtectionRuleStatusWithCallback(request *ModifyProt // ModifyProtectionRuleStatusRequest is the request struct for api ModifyProtectionRuleStatus type ModifyProtectionRuleStatusRequest struct { *requests.RpcRequest - LockVersion requests.Integer `position:"Query" name:"LockVersion"` - SourceIp string `position:"Query" name:"SourceIp"` - Lang string `position:"Query" name:"Lang"` - DefenseType string `position:"Query" name:"DefenseType"` - RuleStatus requests.Integer `position:"Query" name:"RuleStatus"` - InstanceId string `position:"Query" name:"InstanceId"` - Domain string `position:"Query" name:"Domain"` - RuleId requests.Integer `position:"Query" name:"RuleId"` + LockVersion requests.Integer `position:"Query" name:"LockVersion"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + SourceIp string `position:"Query" name:"SourceIp"` + Lang string `position:"Query" name:"Lang"` + DefenseType string `position:"Query" name:"DefenseType"` + RuleStatus requests.Integer `position:"Query" name:"RuleStatus"` + InstanceId string `position:"Query" name:"InstanceId"` + Domain string `position:"Query" name:"Domain"` + RuleId requests.Integer `position:"Query" name:"RuleId"` } // ModifyProtectionRuleStatusResponse is the response struct for api ModifyProtectionRuleStatus diff --git a/services/waf-openapi/struct_domain_list.go b/services/waf-openapi/struct_domain_list.go new file mode 100644 index 0000000000..e172c8f15f --- /dev/null +++ b/services/waf-openapi/struct_domain_list.go @@ -0,0 +1,21 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DomainList is a nested struct in waf_openapi response +type DomainList struct { + Domain []string `json:"Domain" xml:"Domain"` +} diff --git a/services/waf-openapi/struct_rule_groups.go b/services/waf-openapi/struct_rule_groups.go new file mode 100644 index 0000000000..1d674ed4bc --- /dev/null +++ b/services/waf-openapi/struct_rule_groups.go @@ -0,0 +1,21 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RuleGroups is a nested struct in waf_openapi response +type RuleGroups struct { + RuleGroupsItem []RuleGroupsItem `json:"RuleGroups" xml:"RuleGroups"` +} diff --git a/services/waf-openapi/struct_rule_groups_item.go b/services/waf-openapi/struct_rule_groups_item.go new file mode 100644 index 0000000000..f687c635c5 --- /dev/null +++ b/services/waf-openapi/struct_rule_groups_item.go @@ -0,0 +1,30 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RuleGroupsItem is a nested struct in waf_openapi response +type RuleGroupsItem struct { + Type int `json:"Type" xml:"Type"` + RuleCnt int `json:"RuleCnt" xml:"RuleCnt"` + RuleGroupUpdateTime int64 `json:"RuleGroupUpdateTime" xml:"RuleGroupUpdateTime"` + PolicyId int64 `json:"PolicyId" xml:"PolicyId"` + Name string `json:"Name" xml:"Name"` + TemplatePolicyId int64 `json:"TemplatePolicyId" xml:"TemplatePolicyId"` + RuleGroupTemplateName string `json:"RuleGroupTemplateName" xml:"RuleGroupTemplateName"` + Desc string `json:"Desc" xml:"Desc"` + WafVersion int64 `json:"WafVersion" xml:"WafVersion"` + DomainList []string `json:"DomainList" xml:"DomainList"` +} diff --git a/services/waf-openapi/struct_rules.go b/services/waf-openapi/struct_rules_in_describe_protection_module_rules.go similarity index 84% rename from services/waf-openapi/struct_rules.go rename to services/waf-openapi/struct_rules_in_describe_protection_module_rules.go index d6048b9448..91a15466d5 100644 --- a/services/waf-openapi/struct_rules.go +++ b/services/waf-openapi/struct_rules_in_describe_protection_module_rules.go @@ -15,7 +15,7 @@ package waf_openapi // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Rules is a nested struct in waf_openapi response -type Rules struct { +// RulesInDescribeProtectionModuleRules is a nested struct in waf_openapi response +type RulesInDescribeProtectionModuleRules struct { Rule []Rule `json:"Rule" xml:"Rule"` } diff --git a/services/waf-openapi/struct_rules_in_describe_rules.go b/services/waf-openapi/struct_rules_in_describe_rules.go new file mode 100644 index 0000000000..ef67113c95 --- /dev/null +++ b/services/waf-openapi/struct_rules_in_describe_rules.go @@ -0,0 +1,21 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RulesInDescribeRules is a nested struct in waf_openapi response +type RulesInDescribeRules struct { + RulesItem []RulesItem `json:"Rules" xml:"Rules"` +} diff --git a/services/waf-openapi/struct_rules_item.go b/services/waf-openapi/struct_rules_item.go new file mode 100644 index 0000000000..9107195f3a --- /dev/null +++ b/services/waf-openapi/struct_rules_item.go @@ -0,0 +1,29 @@ +package waf_openapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RulesItem is a nested struct in waf_openapi response +type RulesItem struct { + RiskLevel int `json:"RiskLevel" xml:"RiskLevel"` + UpdateTime int64 `json:"UpdateTime" xml:"UpdateTime"` + Description string `json:"Description" xml:"Description"` + CveUrl string `json:"CveUrl" xml:"CveUrl"` + ApplicationType int `json:"ApplicationType" xml:"ApplicationType"` + CveId string `json:"CveId" xml:"CveId"` + ProtectionType int `json:"ProtectionType" xml:"ProtectionType"` + RuleName string `json:"RuleName" xml:"RuleName"` + RuleId int64 `json:"RuleId" xml:"RuleId"` +}