From f88d89ddfce37b7b6a9a793c7301e580b8768c3a Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 27 Dec 2023 01:38:29 +0000 Subject: [PATCH] Generated 2017-08-01 for polardb. --- ChangeLog.txt | 4 + services/polardb/create_account.go | 1 + services/polardb/describe_das_config.go | 105 ++++++++++++++++++ .../polardb/describe_db_cluster_attribute.go | 1 + services/polardb/describe_db_clusters.go | 1 + services/polardb/failover_db_cluster.go | 1 + services/polardb/struct_db_account.go | 1 + .../polardb/struct_db_cluster_endpoint.go | 7 +- services/polardb/struct_db_node.go | 2 + services/polardb/struct_rds_endpoint.go | 1 + 10 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 services/polardb/describe_das_config.go diff --git a/ChangeLog.txt b/ChangeLog.txt index d5c70efe53..3cb26a96e6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2023-12-27 Version: v1.62.646 +- Generated 2017-08-01 for `polardb`. +- Support new feature. + 2023-12-26 Version: v1.62.645 - Generated 2016-11-01 for `live`. - Update to support new apis. diff --git a/services/polardb/create_account.go b/services/polardb/create_account.go index 92525f90c6..cce40fdb26 100644 --- a/services/polardb/create_account.go +++ b/services/polardb/create_account.go @@ -77,6 +77,7 @@ type CreateAccountRequest struct { AccountDescription string `position:"Query" name:"AccountDescription"` AccountPrivilege string `position:"Query" name:"AccountPrivilege"` AccountName string `position:"Query" name:"AccountName"` + TairAccountPassword string `position:"Query" name:"TairAccountPassword"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` DBClusterId string `position:"Query" name:"DBClusterId"` OwnerAccount string `position:"Query" name:"OwnerAccount"` diff --git a/services/polardb/describe_das_config.go b/services/polardb/describe_das_config.go new file mode 100644 index 0000000000..0894e8bd99 --- /dev/null +++ b/services/polardb/describe_das_config.go @@ -0,0 +1,105 @@ +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" +) + +// DescribeDasConfig invokes the polardb.DescribeDasConfig API synchronously +func (client *Client) DescribeDasConfig(request *DescribeDasConfigRequest) (response *DescribeDasConfigResponse, err error) { + response = CreateDescribeDasConfigResponse() + err = client.DoAction(request, response) + return +} + +// DescribeDasConfigWithChan invokes the polardb.DescribeDasConfig API asynchronously +func (client *Client) DescribeDasConfigWithChan(request *DescribeDasConfigRequest) (<-chan *DescribeDasConfigResponse, <-chan error) { + responseChan := make(chan *DescribeDasConfigResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeDasConfig(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeDasConfigWithCallback invokes the polardb.DescribeDasConfig API asynchronously +func (client *Client) DescribeDasConfigWithCallback(request *DescribeDasConfigRequest, callback func(response *DescribeDasConfigResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeDasConfigResponse + var err error + defer close(result) + response, err = client.DescribeDasConfig(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeDasConfigRequest is the request struct for api DescribeDasConfig +type DescribeDasConfigRequest 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"` +} + +// DescribeDasConfigResponse is the response struct for api DescribeDasConfig +type DescribeDasConfigResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + StorageAutoScale string `json:"StorageAutoScale" xml:"StorageAutoScale"` + StorageUpperBound int64 `json:"StorageUpperBound" xml:"StorageUpperBound"` +} + +// CreateDescribeDasConfigRequest creates a request to invoke DescribeDasConfig API +func CreateDescribeDasConfigRequest() (request *DescribeDasConfigRequest) { + request = &DescribeDasConfigRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("polardb", "2017-08-01", "DescribeDasConfig", "polardb", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeDasConfigResponse creates a response to parse from DescribeDasConfig response +func CreateDescribeDasConfigResponse() (response *DescribeDasConfigResponse) { + response = &DescribeDasConfigResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/polardb/describe_db_cluster_attribute.go b/services/polardb/describe_db_cluster_attribute.go index 78d92cbc3b..5a3d9c87ed 100644 --- a/services/polardb/describe_db_cluster_attribute.go +++ b/services/polardb/describe_db_cluster_attribute.go @@ -137,6 +137,7 @@ type DescribeDBClusterAttributeResponse struct { Architecture string `json:"Architecture" xml:"Architecture"` AiType string `json:"AiType" xml:"AiType"` ProvisionedIops string `json:"ProvisionedIops" xml:"ProvisionedIops"` + HotStandbyHealthy bool `json:"HotStandbyHealthy" xml:"HotStandbyHealthy"` RelatedAPInstance RelatedAPInstance `json:"RelatedAPInstance" xml:"RelatedAPInstance"` DBNodes []DBNode `json:"DBNodes" xml:"DBNodes"` Tags []Tag `json:"Tags" xml:"Tags"` diff --git a/services/polardb/describe_db_clusters.go b/services/polardb/describe_db_clusters.go index 2298aab174..00cd3d868b 100644 --- a/services/polardb/describe_db_clusters.go +++ b/services/polardb/describe_db_clusters.go @@ -76,6 +76,7 @@ type DescribeDBClustersRequest struct { DBClusterStatus string `position:"Query" name:"DBClusterStatus"` ConnectionString string `position:"Query" name:"ConnectionString"` RecentExpirationInterval requests.Integer `position:"Query" name:"RecentExpirationInterval"` + DescribeType string `position:"Query" name:"DescribeType"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` DBNodeIds string `position:"Query" name:"DBNodeIds"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` diff --git a/services/polardb/failover_db_cluster.go b/services/polardb/failover_db_cluster.go index 71d068a375..07c17df8b6 100644 --- a/services/polardb/failover_db_cluster.go +++ b/services/polardb/failover_db_cluster.go @@ -73,6 +73,7 @@ type FailoverDBClusterRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ClientToken string `position:"Query" name:"ClientToken"` + RollBackForDisaster requests.Boolean `position:"Query" name:"RollBackForDisaster"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` DBClusterId string `position:"Query" name:"DBClusterId"` OwnerAccount string `position:"Query" name:"OwnerAccount"` diff --git a/services/polardb/struct_db_account.go b/services/polardb/struct_db_account.go index 1feb245fee..bc05b5770a 100644 --- a/services/polardb/struct_db_account.go +++ b/services/polardb/struct_db_account.go @@ -25,5 +25,6 @@ type DBAccount struct { AccountLockState string `json:"AccountLockState" xml:"AccountLockState"` AccountName string `json:"AccountName" xml:"AccountName"` AccountPassword string `json:"AccountPassword" xml:"AccountPassword"` + TairPasswordSetted string `json:"TairPasswordSetted" xml:"TairPasswordSetted"` DatabasePrivileges []DatabasePrivilege `json:"DatabasePrivileges" xml:"DatabasePrivileges"` } diff --git a/services/polardb/struct_db_cluster_endpoint.go b/services/polardb/struct_db_cluster_endpoint.go index f15cc4a577..2124a0866d 100644 --- a/services/polardb/struct_db_cluster_endpoint.go +++ b/services/polardb/struct_db_cluster_endpoint.go @@ -17,7 +17,8 @@ package polardb // DBClusterEndpoint is a nested struct in polardb response type DBClusterEndpoint struct { - DBEndpointId string `json:"DBEndpointId" xml:"DBEndpointId"` - EndpointType string `json:"EndpointType" xml:"EndpointType"` - AddressItems []Address `json:"AddressItems" xml:"AddressItems"` + DBEndpointId string `json:"DBEndpointId" xml:"DBEndpointId"` + EndpointType string `json:"EndpointType" xml:"EndpointType"` + ReadWriteMode string `json:"ReadWriteMode" xml:"ReadWriteMode"` + AddressItems []Address `json:"AddressItems" xml:"AddressItems"` } diff --git a/services/polardb/struct_db_node.go b/services/polardb/struct_db_node.go index 16e44c29d7..ea8c12b0f5 100644 --- a/services/polardb/struct_db_node.go +++ b/services/polardb/struct_db_node.go @@ -24,6 +24,7 @@ type DBNode struct { DBNodeStatus string `json:"DBNodeStatus" xml:"DBNodeStatus"` MasterId string `json:"MasterId" xml:"MasterId"` CpuCores string `json:"CpuCores" xml:"CpuCores"` + SubCluster string `json:"SubCluster" xml:"SubCluster"` CreationTime string `json:"CreationTime" xml:"CreationTime"` HotReplicaMode string `json:"HotReplicaMode" xml:"HotReplicaMode"` ServerlessType string `json:"ServerlessType" xml:"ServerlessType"` @@ -37,4 +38,5 @@ type DBNode struct { DBNodeId string `json:"DBNodeId" xml:"DBNodeId"` SccMode string `json:"SccMode" xml:"SccMode"` ImciSwitch string `json:"ImciSwitch" xml:"ImciSwitch"` + Tair string `json:"Tair" xml:"Tair"` } diff --git a/services/polardb/struct_rds_endpoint.go b/services/polardb/struct_rds_endpoint.go index fa59c07e4d..4c7d5ab391 100644 --- a/services/polardb/struct_rds_endpoint.go +++ b/services/polardb/struct_rds_endpoint.go @@ -19,5 +19,6 @@ package polardb type RdsEndpoint struct { DBEndpointId string `json:"DBEndpointId" xml:"DBEndpointId"` EndpointType string `json:"EndpointType" xml:"EndpointType"` + CustinsType string `json:"CustinsType" xml:"CustinsType"` AddressItems []Address `json:"AddressItems" xml:"AddressItems"` }