From 5f52ffd2ec82bdf1ce9a2c80cb75c25f5a498b38 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Thu, 12 Oct 2023 06:31:14 +0000 Subject: [PATCH] Generated 2019-09-01 for OceanBasePro. --- ChangeLog.txt | 4 + .../oceanbasepro/describe_instance_ssl.go | 100 ++++++++++++++++ .../oceanbasepro/describe_metrics_data.go | 108 ++++++++++++++++++ .../oceanbasepro/modify_tenant_encryption.go | 103 +++++++++++++++++ services/oceanbasepro/struct_instance_ssl.go | 27 +++++ .../oceanbasepro/struct_tenant_encryption.go | 23 ++++ 6 files changed, 365 insertions(+) create mode 100644 services/oceanbasepro/describe_instance_ssl.go create mode 100644 services/oceanbasepro/describe_metrics_data.go create mode 100644 services/oceanbasepro/modify_tenant_encryption.go create mode 100644 services/oceanbasepro/struct_instance_ssl.go create mode 100644 services/oceanbasepro/struct_tenant_encryption.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 4fd02f55af..21e2f14bdb 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2023-10-12 Version: v1.62.577 +- Generated 2019-09-01 for `OceanBasePro`. +undefined + 2023-10-11 Version: v1.62.576 - Generated 2020-06-01 for `SWAS-OPEN`. undefined diff --git a/services/oceanbasepro/describe_instance_ssl.go b/services/oceanbasepro/describe_instance_ssl.go new file mode 100644 index 0000000000..c6af7fb6c9 --- /dev/null +++ b/services/oceanbasepro/describe_instance_ssl.go @@ -0,0 +1,100 @@ +package oceanbasepro + +//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" +) + +// DescribeInstanceSSL invokes the oceanbasepro.DescribeInstanceSSL API synchronously +func (client *Client) DescribeInstanceSSL(request *DescribeInstanceSSLRequest) (response *DescribeInstanceSSLResponse, err error) { + response = CreateDescribeInstanceSSLResponse() + err = client.DoAction(request, response) + return +} + +// DescribeInstanceSSLWithChan invokes the oceanbasepro.DescribeInstanceSSL API asynchronously +func (client *Client) DescribeInstanceSSLWithChan(request *DescribeInstanceSSLRequest) (<-chan *DescribeInstanceSSLResponse, <-chan error) { + responseChan := make(chan *DescribeInstanceSSLResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeInstanceSSL(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeInstanceSSLWithCallback invokes the oceanbasepro.DescribeInstanceSSL API asynchronously +func (client *Client) DescribeInstanceSSLWithCallback(request *DescribeInstanceSSLRequest, callback func(response *DescribeInstanceSSLResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeInstanceSSLResponse + var err error + defer close(result) + response, err = client.DescribeInstanceSSL(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeInstanceSSLRequest is the request struct for api DescribeInstanceSSL +type DescribeInstanceSSLRequest struct { + *requests.RpcRequest + InstanceId string `position:"Body" name:"InstanceId"` +} + +// DescribeInstanceSSLResponse is the response struct for api DescribeInstanceSSL +type DescribeInstanceSSLResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceSSL InstanceSSL `json:"InstanceSSL" xml:"InstanceSSL"` +} + +// CreateDescribeInstanceSSLRequest creates a request to invoke DescribeInstanceSSL API +func CreateDescribeInstanceSSLRequest() (request *DescribeInstanceSSLRequest) { + request = &DescribeInstanceSSLRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("OceanBasePro", "2019-09-01", "DescribeInstanceSSL", "oceanbase", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeInstanceSSLResponse creates a response to parse from DescribeInstanceSSL response +func CreateDescribeInstanceSSLResponse() (response *DescribeInstanceSSLResponse) { + response = &DescribeInstanceSSLResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/oceanbasepro/describe_metrics_data.go b/services/oceanbasepro/describe_metrics_data.go new file mode 100644 index 0000000000..e4bbf68909 --- /dev/null +++ b/services/oceanbasepro/describe_metrics_data.go @@ -0,0 +1,108 @@ +package oceanbasepro + +//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" +) + +// DescribeMetricsData invokes the oceanbasepro.DescribeMetricsData API synchronously +func (client *Client) DescribeMetricsData(request *DescribeMetricsDataRequest) (response *DescribeMetricsDataResponse, err error) { + response = CreateDescribeMetricsDataResponse() + err = client.DoAction(request, response) + return +} + +// DescribeMetricsDataWithChan invokes the oceanbasepro.DescribeMetricsData API asynchronously +func (client *Client) DescribeMetricsDataWithChan(request *DescribeMetricsDataRequest) (<-chan *DescribeMetricsDataResponse, <-chan error) { + responseChan := make(chan *DescribeMetricsDataResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeMetricsData(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeMetricsDataWithCallback invokes the oceanbasepro.DescribeMetricsData API asynchronously +func (client *Client) DescribeMetricsDataWithCallback(request *DescribeMetricsDataRequest, callback func(response *DescribeMetricsDataResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeMetricsDataResponse + var err error + defer close(result) + response, err = client.DescribeMetricsData(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeMetricsDataRequest is the request struct for api DescribeMetricsData +type DescribeMetricsDataRequest struct { + *requests.RpcRequest + GroupByLabels string `position:"Query" name:"GroupByLabels"` + StartTime string `position:"Query" name:"StartTime"` + Limit string `position:"Query" name:"Limit"` + SortOrder string `position:"Query" name:"SortOrder"` + SortMetricKey string `position:"Query" name:"SortMetricKey"` + EndTime string `position:"Query" name:"EndTime"` + Labels string `position:"Query" name:"Labels"` + InstanceId string `position:"Query" name:"InstanceId"` + Metrics string `position:"Query" name:"Metrics"` +} + +// DescribeMetricsDataResponse is the response struct for api DescribeMetricsData +type DescribeMetricsDataResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` +} + +// CreateDescribeMetricsDataRequest creates a request to invoke DescribeMetricsData API +func CreateDescribeMetricsDataRequest() (request *DescribeMetricsDataRequest) { + request = &DescribeMetricsDataRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("OceanBasePro", "2019-09-01", "DescribeMetricsData", "oceanbase", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeMetricsDataResponse creates a response to parse from DescribeMetricsData response +func CreateDescribeMetricsDataResponse() (response *DescribeMetricsDataResponse) { + response = &DescribeMetricsDataResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/oceanbasepro/modify_tenant_encryption.go b/services/oceanbasepro/modify_tenant_encryption.go new file mode 100644 index 0000000000..1ec02f43e6 --- /dev/null +++ b/services/oceanbasepro/modify_tenant_encryption.go @@ -0,0 +1,103 @@ +package oceanbasepro + +//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" +) + +// ModifyTenantEncryption invokes the oceanbasepro.ModifyTenantEncryption API synchronously +func (client *Client) ModifyTenantEncryption(request *ModifyTenantEncryptionRequest) (response *ModifyTenantEncryptionResponse, err error) { + response = CreateModifyTenantEncryptionResponse() + err = client.DoAction(request, response) + return +} + +// ModifyTenantEncryptionWithChan invokes the oceanbasepro.ModifyTenantEncryption API asynchronously +func (client *Client) ModifyTenantEncryptionWithChan(request *ModifyTenantEncryptionRequest) (<-chan *ModifyTenantEncryptionResponse, <-chan error) { + responseChan := make(chan *ModifyTenantEncryptionResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyTenantEncryption(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyTenantEncryptionWithCallback invokes the oceanbasepro.ModifyTenantEncryption API asynchronously +func (client *Client) ModifyTenantEncryptionWithCallback(request *ModifyTenantEncryptionRequest, callback func(response *ModifyTenantEncryptionResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyTenantEncryptionResponse + var err error + defer close(result) + response, err = client.ModifyTenantEncryption(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyTenantEncryptionRequest is the request struct for api ModifyTenantEncryption +type ModifyTenantEncryptionRequest struct { + *requests.RpcRequest + EncryptionKeyId string `position:"Body" name:"EncryptionKeyId"` + InstanceId string `position:"Body" name:"InstanceId"` + TenantId string `position:"Body" name:"TenantId"` + EncryptionType string `position:"Body" name:"EncryptionType"` +} + +// ModifyTenantEncryptionResponse is the response struct for api ModifyTenantEncryption +type ModifyTenantEncryptionResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TenantEncryption TenantEncryption `json:"TenantEncryption" xml:"TenantEncryption"` +} + +// CreateModifyTenantEncryptionRequest creates a request to invoke ModifyTenantEncryption API +func CreateModifyTenantEncryptionRequest() (request *ModifyTenantEncryptionRequest) { + request = &ModifyTenantEncryptionRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("OceanBasePro", "2019-09-01", "ModifyTenantEncryption", "oceanbase", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyTenantEncryptionResponse creates a response to parse from ModifyTenantEncryption response +func CreateModifyTenantEncryptionResponse() (response *ModifyTenantEncryptionResponse) { + response = &ModifyTenantEncryptionResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/oceanbasepro/struct_instance_ssl.go b/services/oceanbasepro/struct_instance_ssl.go new file mode 100644 index 0000000000..0d47fb396c --- /dev/null +++ b/services/oceanbasepro/struct_instance_ssl.go @@ -0,0 +1,27 @@ +package oceanbasepro + +//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. + +// InstanceSSL is a nested struct in oceanbasepro response +type InstanceSSL struct { + InstanceId string `json:"InstanceId" xml:"InstanceId"` + EnableSSL string `json:"EnableSSL" xml:"EnableSSL"` + ValidPeriod string `json:"ValidPeriod" xml:"ValidPeriod"` + CaUrl string `json:"CaUrl" xml:"CaUrl"` + Status string `json:"Status" xml:"Status"` + ForceSSLSupport bool `json:"ForceSSLSupport" xml:"ForceSSLSupport"` + ForceSSL string `json:"ForceSSL" xml:"ForceSSL"` +} diff --git a/services/oceanbasepro/struct_tenant_encryption.go b/services/oceanbasepro/struct_tenant_encryption.go new file mode 100644 index 0000000000..411fb5cdbb --- /dev/null +++ b/services/oceanbasepro/struct_tenant_encryption.go @@ -0,0 +1,23 @@ +package oceanbasepro + +//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. + +// TenantEncryption is a nested struct in oceanbasepro response +type TenantEncryption struct { + InstanceId string `json:"InstanceId" xml:"InstanceId"` + TenantId string `json:"TenantId" xml:"TenantId"` + EncryptionType string `json:"EncryptionType" xml:"EncryptionType"` +}