From 585451b2d70c36e46d2b766a1ca6afe0141fe9b3 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 30 Oct 2023 11:15:31 +0000 Subject: [PATCH] Generated 2017-08-01 for polardb. --- ChangeLog.txt | 4 + .../polardb/create_cold_storage_instance.go | 107 +++++++++++++++++ services/polardb/create_db_cluster.go | 1 + .../polardb/create_db_cluster_endpoint.go | 2 + .../polardb/describe_db_cluster_attribute.go | 2 + services/polardb/describe_meta_list.go | 1 + .../polardb/disable_db_cluster_serverless.go | 104 +++++++++++++++++ .../polardb/enable_db_cluster_serverless.go | 110 ++++++++++++++++++ .../polardb/modify_db_cluster_primary_zone.go | 1 + .../modify_db_cluster_serverless_conf.go | 3 + .../polardb/modify_db_endpoint_address.go | 2 + services/polardb/struct_db_node.go | 2 + 12 files changed, 339 insertions(+) create mode 100644 services/polardb/create_cold_storage_instance.go create mode 100644 services/polardb/disable_db_cluster_serverless.go create mode 100644 services/polardb/enable_db_cluster_serverless.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 3e680e2d4f..cc6c263430 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2023-10-30 Version: v1.62.593 +- Generated 2017-08-01 for `polardb`. +- Support new feature. + 2023-10-30 Version: v1.62.592 - Generated 2016-11-01 for `live`. - Update to support new apis. diff --git a/services/polardb/create_cold_storage_instance.go b/services/polardb/create_cold_storage_instance.go new file mode 100644 index 0000000000..7b7f8dceea --- /dev/null +++ b/services/polardb/create_cold_storage_instance.go @@ -0,0 +1,107 @@ +package polardb + +//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" +) + +// CreateColdStorageInstance invokes the polardb.CreateColdStorageInstance API synchronously +func (client *Client) CreateColdStorageInstance(request *CreateColdStorageInstanceRequest) (response *CreateColdStorageInstanceResponse, err error) { + response = CreateCreateColdStorageInstanceResponse() + err = client.DoAction(request, response) + return +} + +// CreateColdStorageInstanceWithChan invokes the polardb.CreateColdStorageInstance API asynchronously +func (client *Client) CreateColdStorageInstanceWithChan(request *CreateColdStorageInstanceRequest) (<-chan *CreateColdStorageInstanceResponse, <-chan error) { + responseChan := make(chan *CreateColdStorageInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateColdStorageInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateColdStorageInstanceWithCallback invokes the polardb.CreateColdStorageInstance API asynchronously +func (client *Client) CreateColdStorageInstanceWithCallback(request *CreateColdStorageInstanceRequest, callback func(response *CreateColdStorageInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateColdStorageInstanceResponse + var err error + defer close(result) + response, err = client.CreateColdStorageInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateColdStorageInstanceRequest is the request struct for api CreateColdStorageInstance +type CreateColdStorageInstanceRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + DBClusterId string `position:"Query" name:"DBClusterId"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + ColdStorageInstanceDescription string `position:"Query" name:"ColdStorageInstanceDescription"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// CreateColdStorageInstanceResponse is the response struct for api CreateColdStorageInstance +type CreateColdStorageInstanceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ColdStorageInstanceId string `json:"ColdStorageInstanceId" xml:"ColdStorageInstanceId"` +} + +// CreateCreateColdStorageInstanceRequest creates a request to invoke CreateColdStorageInstance API +func CreateCreateColdStorageInstanceRequest() (request *CreateColdStorageInstanceRequest) { + request = &CreateColdStorageInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("polardb", "2017-08-01", "CreateColdStorageInstance", "polardb", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateColdStorageInstanceResponse creates a response to parse from CreateColdStorageInstance response +func CreateCreateColdStorageInstanceResponse() (response *CreateColdStorageInstanceResponse) { + response = &CreateColdStorageInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/polardb/create_db_cluster.go b/services/polardb/create_db_cluster.go index 7aa197febf..bc6692b09e 100644 --- a/services/polardb/create_db_cluster.go +++ b/services/polardb/create_db_cluster.go @@ -90,6 +90,7 @@ type CreateDBClusterRequest struct { VSwitchId string `position:"Query" name:"VSwitchId"` SecurityIPList string `position:"Query" name:"SecurityIPList"` DBMinorVersion string `position:"Query" name:"DBMinorVersion"` + ProvisionedIops requests.Integer `position:"Query" name:"ProvisionedIops"` AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` HotStandbyCluster string `position:"Query" name:"HotStandbyCluster"` StoragePayType string `position:"Query" name:"StoragePayType"` diff --git a/services/polardb/create_db_cluster_endpoint.go b/services/polardb/create_db_cluster_endpoint.go index 1bfa15b4cb..08128f9ff1 100644 --- a/services/polardb/create_db_cluster_endpoint.go +++ b/services/polardb/create_db_cluster_endpoint.go @@ -82,7 +82,9 @@ type CreateDBClusterEndpointRequest struct { EndpointConfig string `position:"Query" name:"EndpointConfig"` DBEndpointDescription string `position:"Query" name:"DBEndpointDescription"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` Nodes string `position:"Query" name:"Nodes"` + VPCId string `position:"Query" name:"VPCId"` } // CreateDBClusterEndpointResponse is the response struct for api CreateDBClusterEndpoint diff --git a/services/polardb/describe_db_cluster_attribute.go b/services/polardb/describe_db_cluster_attribute.go index a37a355bd6..78d92cbc3b 100644 --- a/services/polardb/describe_db_cluster_attribute.go +++ b/services/polardb/describe_db_cluster_attribute.go @@ -91,6 +91,7 @@ type DescribeDBClusterAttributeResponse struct { DBClusterNetworkType string `json:"DBClusterNetworkType" xml:"DBClusterNetworkType"` IsLatestVersion bool `json:"IsLatestVersion" xml:"IsLatestVersion"` HasCompleteStandbyRes bool `json:"HasCompleteStandbyRes" xml:"HasCompleteStandbyRes"` + HotStandbyClusterStatus string `json:"HotStandbyClusterStatus" xml:"HotStandbyClusterStatus"` HotStandbyCluster string `json:"HotStandbyCluster" xml:"HotStandbyCluster"` DataSyncMode string `json:"DataSyncMode" xml:"DataSyncMode"` StandbyHAMode string `json:"StandbyHAMode" xml:"StandbyHAMode"` @@ -135,6 +136,7 @@ type DescribeDBClusterAttributeResponse struct { ProxyServerlessType string `json:"ProxyServerlessType" xml:"ProxyServerlessType"` Architecture string `json:"Architecture" xml:"Architecture"` AiType string `json:"AiType" xml:"AiType"` + ProvisionedIops string `json:"ProvisionedIops" xml:"ProvisionedIops"` RelatedAPInstance RelatedAPInstance `json:"RelatedAPInstance" xml:"RelatedAPInstance"` DBNodes []DBNode `json:"DBNodes" xml:"DBNodes"` Tags []Tag `json:"Tags" xml:"Tags"` diff --git a/services/polardb/describe_meta_list.go b/services/polardb/describe_meta_list.go index 9d401d3522..6efe9a297c 100644 --- a/services/polardb/describe_meta_list.go +++ b/services/polardb/describe_meta_list.go @@ -72,6 +72,7 @@ func (client *Client) DescribeMetaListWithCallback(request *DescribeMetaListRequ type DescribeMetaListRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + RegionCode string `position:"Query" name:"RegionCode"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` SecurityToken string `position:"Query" name:"SecurityToken"` PageSize requests.Integer `position:"Query" name:"PageSize"` diff --git a/services/polardb/disable_db_cluster_serverless.go b/services/polardb/disable_db_cluster_serverless.go new file mode 100644 index 0000000000..8356c6c8cd --- /dev/null +++ b/services/polardb/disable_db_cluster_serverless.go @@ -0,0 +1,104 @@ +package polardb + +//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" +) + +// DisableDBClusterServerless invokes the polardb.DisableDBClusterServerless API synchronously +func (client *Client) DisableDBClusterServerless(request *DisableDBClusterServerlessRequest) (response *DisableDBClusterServerlessResponse, err error) { + response = CreateDisableDBClusterServerlessResponse() + err = client.DoAction(request, response) + return +} + +// DisableDBClusterServerlessWithChan invokes the polardb.DisableDBClusterServerless API asynchronously +func (client *Client) DisableDBClusterServerlessWithChan(request *DisableDBClusterServerlessRequest) (<-chan *DisableDBClusterServerlessResponse, <-chan error) { + responseChan := make(chan *DisableDBClusterServerlessResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DisableDBClusterServerless(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DisableDBClusterServerlessWithCallback invokes the polardb.DisableDBClusterServerless API asynchronously +func (client *Client) DisableDBClusterServerlessWithCallback(request *DisableDBClusterServerlessRequest, callback func(response *DisableDBClusterServerlessResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DisableDBClusterServerlessResponse + var err error + defer close(result) + response, err = client.DisableDBClusterServerless(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DisableDBClusterServerlessRequest is the request struct for api DisableDBClusterServerless +type DisableDBClusterServerlessRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + DBClusterId string `position:"Query" name:"DBClusterId"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// DisableDBClusterServerlessResponse is the response struct for api DisableDBClusterServerless +type DisableDBClusterServerlessResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + DBClusterId string `json:"DBClusterId" xml:"DBClusterId"` +} + +// CreateDisableDBClusterServerlessRequest creates a request to invoke DisableDBClusterServerless API +func CreateDisableDBClusterServerlessRequest() (request *DisableDBClusterServerlessRequest) { + request = &DisableDBClusterServerlessRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("polardb", "2017-08-01", "DisableDBClusterServerless", "polardb", "openAPI") + request.Method = requests.POST + return +} + +// CreateDisableDBClusterServerlessResponse creates a response to parse from DisableDBClusterServerless response +func CreateDisableDBClusterServerlessResponse() (response *DisableDBClusterServerlessResponse) { + response = &DisableDBClusterServerlessResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/polardb/enable_db_cluster_serverless.go b/services/polardb/enable_db_cluster_serverless.go new file mode 100644 index 0000000000..3ed2234c67 --- /dev/null +++ b/services/polardb/enable_db_cluster_serverless.go @@ -0,0 +1,110 @@ +package polardb + +//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" +) + +// EnableDBClusterServerless invokes the polardb.EnableDBClusterServerless API synchronously +func (client *Client) EnableDBClusterServerless(request *EnableDBClusterServerlessRequest) (response *EnableDBClusterServerlessResponse, err error) { + response = CreateEnableDBClusterServerlessResponse() + err = client.DoAction(request, response) + return +} + +// EnableDBClusterServerlessWithChan invokes the polardb.EnableDBClusterServerless API asynchronously +func (client *Client) EnableDBClusterServerlessWithChan(request *EnableDBClusterServerlessRequest) (<-chan *EnableDBClusterServerlessResponse, <-chan error) { + responseChan := make(chan *EnableDBClusterServerlessResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.EnableDBClusterServerless(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// EnableDBClusterServerlessWithCallback invokes the polardb.EnableDBClusterServerless API asynchronously +func (client *Client) EnableDBClusterServerlessWithCallback(request *EnableDBClusterServerlessRequest, callback func(response *EnableDBClusterServerlessResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *EnableDBClusterServerlessResponse + var err error + defer close(result) + response, err = client.EnableDBClusterServerless(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// EnableDBClusterServerlessRequest is the request struct for api EnableDBClusterServerless +type EnableDBClusterServerlessRequest struct { + *requests.RpcRequest + ScaleRoNumMax string `position:"Query" name:"ScaleRoNumMax"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ScaleApRoNumMax string `position:"Query" name:"ScaleApRoNumMax"` + ScaleMax string `position:"Query" name:"ScaleMax"` + ScaleApRoNumMin string `position:"Query" name:"ScaleApRoNumMin"` + ScaleMin string `position:"Query" name:"ScaleMin"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + DBClusterId string `position:"Query" name:"DBClusterId"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ScaleRoNumMin string `position:"Query" name:"ScaleRoNumMin"` +} + +// EnableDBClusterServerlessResponse is the response struct for api EnableDBClusterServerless +type EnableDBClusterServerlessResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + DBClusterId string `json:"DBClusterId" xml:"DBClusterId"` +} + +// CreateEnableDBClusterServerlessRequest creates a request to invoke EnableDBClusterServerless API +func CreateEnableDBClusterServerlessRequest() (request *EnableDBClusterServerlessRequest) { + request = &EnableDBClusterServerlessRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("polardb", "2017-08-01", "EnableDBClusterServerless", "polardb", "openAPI") + request.Method = requests.POST + return +} + +// CreateEnableDBClusterServerlessResponse creates a response to parse from EnableDBClusterServerless response +func CreateEnableDBClusterServerlessResponse() (response *EnableDBClusterServerlessResponse) { + response = &EnableDBClusterServerlessResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/polardb/modify_db_cluster_primary_zone.go b/services/polardb/modify_db_cluster_primary_zone.go index b9c02e20e2..a420b9da5d 100644 --- a/services/polardb/modify_db_cluster_primary_zone.go +++ b/services/polardb/modify_db_cluster_primary_zone.go @@ -82,6 +82,7 @@ type ModifyDBClusterPrimaryZoneRequest struct { PlannedStartTime string `position:"Query" name:"PlannedStartTime"` VPCId string `position:"Query" name:"VPCId"` ZoneId string `position:"Query" name:"ZoneId"` + ZoneType string `position:"Query" name:"ZoneType"` FromTimeService requests.Boolean `position:"Query" name:"FromTimeService"` } diff --git a/services/polardb/modify_db_cluster_serverless_conf.go b/services/polardb/modify_db_cluster_serverless_conf.go index 395f8aeeed..74ed2fc271 100644 --- a/services/polardb/modify_db_cluster_serverless_conf.go +++ b/services/polardb/modify_db_cluster_serverless_conf.go @@ -75,6 +75,7 @@ type ModifyDBClusterServerlessConfRequest struct { ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ScaleApRoNumMax string `position:"Query" name:"ScaleApRoNumMax"` ScaleMax string `position:"Query" name:"ScaleMax"` + PlannedEndTime string `position:"Query" name:"PlannedEndTime"` SecondsUntilAutoPause string `position:"Query" name:"SecondsUntilAutoPause"` ScaleApRoNumMin string `position:"Query" name:"ScaleApRoNumMin"` ScaleMin string `position:"Query" name:"ScaleMin"` @@ -82,8 +83,10 @@ type ModifyDBClusterServerlessConfRequest struct { DBClusterId string `position:"Query" name:"DBClusterId"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PlannedStartTime string `position:"Query" name:"PlannedStartTime"` ScaleRoNumMin string `position:"Query" name:"ScaleRoNumMin"` AllowShutDown string `position:"Query" name:"AllowShutDown"` + FromTimeService requests.Boolean `position:"Query" name:"FromTimeService"` } // ModifyDBClusterServerlessConfResponse is the response struct for api ModifyDBClusterServerlessConf diff --git a/services/polardb/modify_db_endpoint_address.go b/services/polardb/modify_db_endpoint_address.go index 3a401873d9..f9a0724608 100644 --- a/services/polardb/modify_db_endpoint_address.go +++ b/services/polardb/modify_db_endpoint_address.go @@ -80,8 +80,10 @@ type ModifyDBEndpointAddressRequest struct { DBClusterId string `position:"Query" name:"DBClusterId"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` Port string `position:"Query" name:"Port"` NetType string `position:"Query" name:"NetType"` + VPCId string `position:"Query" name:"VPCId"` } // ModifyDBEndpointAddressResponse is the response struct for api ModifyDBEndpointAddress diff --git a/services/polardb/struct_db_node.go b/services/polardb/struct_db_node.go index 17e2631e78..16e44c29d7 100644 --- a/services/polardb/struct_db_node.go +++ b/services/polardb/struct_db_node.go @@ -23,6 +23,7 @@ type DBNode struct { DBNodeRole string `json:"DBNodeRole" xml:"DBNodeRole"` DBNodeStatus string `json:"DBNodeStatus" xml:"DBNodeStatus"` MasterId string `json:"MasterId" xml:"MasterId"` + CpuCores string `json:"CpuCores" xml:"CpuCores"` CreationTime string `json:"CreationTime" xml:"CreationTime"` HotReplicaMode string `json:"HotReplicaMode" xml:"HotReplicaMode"` ServerlessType string `json:"ServerlessType" xml:"ServerlessType"` @@ -32,6 +33,7 @@ type DBNode struct { RegionId string `json:"RegionId" xml:"RegionId"` ZoneId string `json:"ZoneId" xml:"ZoneId"` ServerWeight string `json:"ServerWeight" xml:"ServerWeight"` + MemorySize string `json:"MemorySize" xml:"MemorySize"` DBNodeId string `json:"DBNodeId" xml:"DBNodeId"` SccMode string `json:"SccMode" xml:"SccMode"` ImciSwitch string `json:"ImciSwitch" xml:"ImciSwitch"`