From 52ade192481cae00cae4bdc9295fd40dc6c9dbf3 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 3 Apr 2024 08:43:56 +0000 Subject: [PATCH] Generated 2019-09-16 for alikafka. --- ChangeLog.txt | 4 + services/alikafka/change_resource_group.go | 2 +- services/alikafka/convert_post_pay_order.go | 2 +- services/alikafka/create_acl.go | 5 +- services/alikafka/create_consumer_group.go | 2 +- services/alikafka/create_post_pay_order.go | 2 +- services/alikafka/create_pre_pay_order.go | 49 ++++++-- services/alikafka/create_sasl_user.go | 3 +- services/alikafka/create_topic.go | 2 +- services/alikafka/delete_acl.go | 5 +- services/alikafka/delete_consumer_group.go | 2 +- services/alikafka/delete_instance.go | 2 +- services/alikafka/delete_sasl_user.go | 3 +- services/alikafka/delete_topic.go | 2 +- services/alikafka/describe_acls.go | 5 +- services/alikafka/describe_sasl_users.go | 2 +- .../alikafka/enable_auto_group_creation.go | 103 +++++++++++++++++ .../alikafka/enable_auto_topic_creation.go | 104 +++++++++++++++++ services/alikafka/get_all_instance_id_list.go | 2 +- services/alikafka/get_allowed_ip_list.go | 2 +- services/alikafka/get_consumer_list.go | 5 +- services/alikafka/get_consumer_progress.go | 2 +- services/alikafka/get_instance_list.go | 2 +- services/alikafka/get_quota_tip.go | 2 +- services/alikafka/get_topic_list.go | 2 +- services/alikafka/get_topic_status.go | 2 +- .../alikafka/get_topic_subscribe_status.go | 104 +++++++++++++++++ services/alikafka/list_tag_resources.go | 2 +- services/alikafka/modify_instance_name.go | 2 +- services/alikafka/modify_partition_num.go | 2 +- services/alikafka/modify_topic_remark.go | 4 +- services/alikafka/query_message.go | 108 ++++++++++++++++++ services/alikafka/release_instance.go | 2 +- services/alikafka/reopen_instance.go | 102 +++++++++++++++++ services/alikafka/start_instance.go | 3 +- services/alikafka/stop_instance.go | 102 +++++++++++++++++ services/alikafka/struct_confluent_config.go | 38 ++++++ services/alikafka/struct_consumer_groups.go | 21 ++++ services/alikafka/struct_consumer_progress.go | 7 +- services/alikafka/struct_instance_vo.go | 72 ++++++------ services/alikafka/struct_kafka_acl_vo.go | 1 + services/alikafka/struct_message_list.go | 21 ++++ services/alikafka/struct_message_vo.go | 34 ++++++ .../alikafka/struct_rebalance_info_list.go | 21 ++++ .../struct_rebalance_info_list_item.go | 26 +++++ services/alikafka/struct_sasl_user_vo.go | 7 +- .../alikafka/struct_topic_subscribe_status.go | 22 ++++ services/alikafka/tag_resources.go | 2 +- services/alikafka/untag_resources.go | 2 +- services/alikafka/update_allowed_ip.go | 2 +- services/alikafka/update_consumer_offset.go | 2 +- services/alikafka/update_instance_config.go | 2 +- services/alikafka/update_topic_config.go | 106 +++++++++++++++++ services/alikafka/upgrade_instance_version.go | 2 +- services/alikafka/upgrade_post_pay_order.go | 27 +++-- services/alikafka/upgrade_pre_pay_order.go | 44 +++++-- 56 files changed, 1101 insertions(+), 107 deletions(-) create mode 100644 services/alikafka/enable_auto_group_creation.go create mode 100644 services/alikafka/enable_auto_topic_creation.go create mode 100644 services/alikafka/get_topic_subscribe_status.go create mode 100644 services/alikafka/query_message.go create mode 100644 services/alikafka/reopen_instance.go create mode 100644 services/alikafka/stop_instance.go create mode 100644 services/alikafka/struct_confluent_config.go create mode 100644 services/alikafka/struct_consumer_groups.go create mode 100644 services/alikafka/struct_message_list.go create mode 100644 services/alikafka/struct_message_vo.go create mode 100644 services/alikafka/struct_rebalance_info_list.go create mode 100644 services/alikafka/struct_rebalance_info_list_item.go create mode 100644 services/alikafka/struct_topic_subscribe_status.go create mode 100644 services/alikafka/update_topic_config.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 02f3f6135a..7da97f4e5d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-04-03 Version: v1.62.711 +- Generated 2019-09-16 for `alikafka`. +- Supported use group by freedom + 2024-04-03 Version: v1.62.710 - Generated 2019-03-07 for `Cloudauth`. undefined diff --git a/services/alikafka/change_resource_group.go b/services/alikafka/change_resource_group.go index ef85e2d87e..a7b49bc302 100644 --- a/services/alikafka/change_resource_group.go +++ b/services/alikafka/change_resource_group.go @@ -90,7 +90,7 @@ func CreateChangeResourceGroupRequest() (request *ChangeResourceGroupRequest) { request = &ChangeResourceGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "ChangeResourceGroup", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "ChangeResourceGroup", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/convert_post_pay_order.go b/services/alikafka/convert_post_pay_order.go index 657414e798..70125df9f3 100644 --- a/services/alikafka/convert_post_pay_order.go +++ b/services/alikafka/convert_post_pay_order.go @@ -90,7 +90,7 @@ func CreateConvertPostPayOrderRequest() (request *ConvertPostPayOrderRequest) { request = &ConvertPostPayOrderRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "ConvertPostPayOrder", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "ConvertPostPayOrder", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/create_acl.go b/services/alikafka/create_acl.go index ba56c8d36d..088c97e1cf 100644 --- a/services/alikafka/create_acl.go +++ b/services/alikafka/create_acl.go @@ -73,9 +73,12 @@ type CreateAclRequest struct { *requests.RpcRequest AclResourcePatternType string `position:"Query" name:"AclResourcePatternType"` AclResourceType string `position:"Query" name:"AclResourceType"` + AclOperationTypes string `position:"Query" name:"AclOperationTypes"` AclOperationType string `position:"Query" name:"AclOperationType"` AclResourceName string `position:"Query" name:"AclResourceName"` InstanceId string `position:"Query" name:"InstanceId"` + Host string `position:"Query" name:"Host"` + AclPermissionType string `position:"Query" name:"AclPermissionType"` Username string `position:"Query" name:"Username"` } @@ -93,7 +96,7 @@ func CreateCreateAclRequest() (request *CreateAclRequest) { request = &CreateAclRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "CreateAcl", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "CreateAcl", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/create_consumer_group.go b/services/alikafka/create_consumer_group.go index 5f9912bd8c..efc13e4f3e 100644 --- a/services/alikafka/create_consumer_group.go +++ b/services/alikafka/create_consumer_group.go @@ -97,7 +97,7 @@ func CreateCreateConsumerGroupRequest() (request *CreateConsumerGroupRequest) { request = &CreateConsumerGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "CreateConsumerGroup", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "CreateConsumerGroup", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/create_post_pay_order.go b/services/alikafka/create_post_pay_order.go index f05b696246..e7220f52cb 100644 --- a/services/alikafka/create_post_pay_order.go +++ b/services/alikafka/create_post_pay_order.go @@ -106,7 +106,7 @@ func CreateCreatePostPayOrderRequest() (request *CreatePostPayOrderRequest) { request = &CreatePostPayOrderRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "CreatePostPayOrder", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "CreatePostPayOrder", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/create_pre_pay_order.go b/services/alikafka/create_pre_pay_order.go index aed8ee04ef..89b6162382 100644 --- a/services/alikafka/create_pre_pay_order.go +++ b/services/alikafka/create_pre_pay_order.go @@ -71,17 +71,42 @@ func (client *Client) CreatePrePayOrderWithCallback(request *CreatePrePayOrderRe // CreatePrePayOrderRequest is the request struct for api CreatePrePayOrder type CreatePrePayOrderRequest struct { *requests.RpcRequest - IoMax requests.Integer `position:"Query" name:"IoMax"` - EipMax requests.Integer `position:"Query" name:"EipMax"` - SpecType string `position:"Query" name:"SpecType"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - Tag *[]CreatePrePayOrderTag `position:"Query" name:"Tag" type:"Repeated"` - PartitionNum requests.Integer `position:"Query" name:"PartitionNum"` - DiskSize requests.Integer `position:"Query" name:"DiskSize"` - IoMaxSpec string `position:"Query" name:"IoMaxSpec"` - DiskType string `position:"Query" name:"DiskType"` - TopicQuota requests.Integer `position:"Query" name:"TopicQuota"` - DeployType requests.Integer `position:"Query" name:"DeployType"` + IoMax requests.Integer `position:"Query" name:"IoMax"` + EipMax requests.Integer `position:"Query" name:"EipMax"` + Duration requests.Integer `position:"Query" name:"Duration"` + SpecType string `position:"Query" name:"SpecType"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + ConfluentConfig CreatePrePayOrderConfluentConfig `position:"Query" name:"ConfluentConfig" type:"Struct"` + Tag *[]CreatePrePayOrderTag `position:"Query" name:"Tag" type:"Repeated"` + PartitionNum requests.Integer `position:"Query" name:"PartitionNum"` + PaidType requests.Integer `position:"Query" name:"PaidType"` + DiskSize requests.Integer `position:"Query" name:"DiskSize"` + IoMaxSpec string `position:"Query" name:"IoMaxSpec"` + DiskType string `position:"Query" name:"DiskType"` + TopicQuota requests.Integer `position:"Query" name:"TopicQuota"` + DeployType requests.Integer `position:"Query" name:"DeployType"` +} + +// CreatePrePayOrderConfluentConfig is a repeated param struct in CreatePrePayOrderRequest +type CreatePrePayOrderConfluentConfig struct { + KsqlStorage string `name:"KsqlStorage"` + ControlCenterStorage string `name:"ControlCenterStorage"` + KafkaRestProxyReplica string `name:"KafkaRestProxyReplica"` + ZooKeeperReplica string `name:"ZooKeeperReplica"` + ConnectCU string `name:"ConnectCU"` + KafkaReplica string `name:"KafkaReplica"` + SchemaRegistryReplica string `name:"SchemaRegistryReplica"` + KafkaCU string `name:"KafkaCU"` + ConnectReplica string `name:"ConnectReplica"` + ControlCenterCU string `name:"ControlCenterCU"` + KsqlReplica string `name:"KsqlReplica"` + ControlCenterReplica string `name:"ControlCenterReplica"` + KafkaStorage string `name:"KafkaStorage"` + ZooKeeperStorage string `name:"ZooKeeperStorage"` + KsqlCU string `name:"KsqlCU"` + SchemaRegistryCU string `name:"SchemaRegistryCU"` + ZooKeeperCU string `name:"ZooKeeperCU"` + KafkaRestProxyCU string `name:"KafkaRestProxyCU"` } // CreatePrePayOrderTag is a repeated param struct in CreatePrePayOrderRequest @@ -105,7 +130,7 @@ func CreateCreatePrePayOrderRequest() (request *CreatePrePayOrderRequest) { request = &CreatePrePayOrderRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "CreatePrePayOrder", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "CreatePrePayOrder", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/create_sasl_user.go b/services/alikafka/create_sasl_user.go index 84a1cad357..77f6a117ba 100644 --- a/services/alikafka/create_sasl_user.go +++ b/services/alikafka/create_sasl_user.go @@ -74,6 +74,7 @@ type CreateSaslUserRequest struct { Type string `position:"Query" name:"Type"` Password string `position:"Query" name:"Password"` InstanceId string `position:"Query" name:"InstanceId"` + Mechanism string `position:"Query" name:"Mechanism"` Username string `position:"Query" name:"Username"` } @@ -91,7 +92,7 @@ func CreateCreateSaslUserRequest() (request *CreateSaslUserRequest) { request = &CreateSaslUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "CreateSaslUser", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "CreateSaslUser", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/create_topic.go b/services/alikafka/create_topic.go index 18ee5ae5a6..5bd080bb7b 100644 --- a/services/alikafka/create_topic.go +++ b/services/alikafka/create_topic.go @@ -103,7 +103,7 @@ func CreateCreateTopicRequest() (request *CreateTopicRequest) { request = &CreateTopicRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "CreateTopic", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "CreateTopic", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/delete_acl.go b/services/alikafka/delete_acl.go index 3e2bb6bf7b..e43ca7a4cf 100644 --- a/services/alikafka/delete_acl.go +++ b/services/alikafka/delete_acl.go @@ -73,9 +73,12 @@ type DeleteAclRequest struct { *requests.RpcRequest AclResourcePatternType string `position:"Query" name:"AclResourcePatternType"` AclResourceType string `position:"Query" name:"AclResourceType"` + AclOperationTypes string `position:"Query" name:"AclOperationTypes"` AclOperationType string `position:"Query" name:"AclOperationType"` AclResourceName string `position:"Query" name:"AclResourceName"` InstanceId string `position:"Query" name:"InstanceId"` + Host string `position:"Query" name:"Host"` + AclPermissionType string `position:"Query" name:"AclPermissionType"` Username string `position:"Query" name:"Username"` } @@ -93,7 +96,7 @@ func CreateDeleteAclRequest() (request *DeleteAclRequest) { request = &DeleteAclRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteAcl", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteAcl", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/delete_consumer_group.go b/services/alikafka/delete_consumer_group.go index 720978f7c9..7b86f0cdfd 100644 --- a/services/alikafka/delete_consumer_group.go +++ b/services/alikafka/delete_consumer_group.go @@ -89,7 +89,7 @@ func CreateDeleteConsumerGroupRequest() (request *DeleteConsumerGroupRequest) { request = &DeleteConsumerGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteConsumerGroup", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteConsumerGroup", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/delete_instance.go b/services/alikafka/delete_instance.go index d4ea7399a2..31f19b696e 100644 --- a/services/alikafka/delete_instance.go +++ b/services/alikafka/delete_instance.go @@ -88,7 +88,7 @@ func CreateDeleteInstanceRequest() (request *DeleteInstanceRequest) { request = &DeleteInstanceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteInstance", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteInstance", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/delete_sasl_user.go b/services/alikafka/delete_sasl_user.go index 4c9e57dad7..8d7372a9c6 100644 --- a/services/alikafka/delete_sasl_user.go +++ b/services/alikafka/delete_sasl_user.go @@ -73,6 +73,7 @@ type DeleteSaslUserRequest struct { *requests.RpcRequest Type string `position:"Query" name:"Type"` InstanceId string `position:"Query" name:"InstanceId"` + Mechanism string `position:"Query" name:"Mechanism"` Username string `position:"Query" name:"Username"` } @@ -90,7 +91,7 @@ func CreateDeleteSaslUserRequest() (request *DeleteSaslUserRequest) { request = &DeleteSaslUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteSaslUser", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteSaslUser", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/delete_topic.go b/services/alikafka/delete_topic.go index bac4154c9f..cd6b2f299d 100644 --- a/services/alikafka/delete_topic.go +++ b/services/alikafka/delete_topic.go @@ -89,7 +89,7 @@ func CreateDeleteTopicRequest() (request *DeleteTopicRequest) { request = &DeleteTopicRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteTopic", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "DeleteTopic", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/describe_acls.go b/services/alikafka/describe_acls.go index 6d9c5aa3f2..8f8a9cbe15 100644 --- a/services/alikafka/describe_acls.go +++ b/services/alikafka/describe_acls.go @@ -73,8 +73,11 @@ type DescribeAclsRequest struct { *requests.RpcRequest AclResourcePatternType string `position:"Query" name:"AclResourcePatternType"` AclResourceType string `position:"Query" name:"AclResourceType"` + AclOperationType string `position:"Query" name:"AclOperationType"` AclResourceName string `position:"Query" name:"AclResourceName"` InstanceId string `position:"Query" name:"InstanceId"` + Host string `position:"Query" name:"Host"` + AclPermissionType string `position:"Query" name:"AclPermissionType"` Username string `position:"Query" name:"Username"` } @@ -93,7 +96,7 @@ func CreateDescribeAclsRequest() (request *DescribeAclsRequest) { request = &DescribeAclsRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "DescribeAcls", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "DescribeAcls", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/describe_sasl_users.go b/services/alikafka/describe_sasl_users.go index bca9ab7646..9e35fc9e78 100644 --- a/services/alikafka/describe_sasl_users.go +++ b/services/alikafka/describe_sasl_users.go @@ -89,7 +89,7 @@ func CreateDescribeSaslUsersRequest() (request *DescribeSaslUsersRequest) { request = &DescribeSaslUsersRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "DescribeSaslUsers", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "DescribeSaslUsers", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/enable_auto_group_creation.go b/services/alikafka/enable_auto_group_creation.go new file mode 100644 index 0000000000..16f51b91a4 --- /dev/null +++ b/services/alikafka/enable_auto_group_creation.go @@ -0,0 +1,103 @@ +package alikafka + +//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" +) + +// EnableAutoGroupCreation invokes the alikafka.EnableAutoGroupCreation API synchronously +func (client *Client) EnableAutoGroupCreation(request *EnableAutoGroupCreationRequest) (response *EnableAutoGroupCreationResponse, err error) { + response = CreateEnableAutoGroupCreationResponse() + err = client.DoAction(request, response) + return +} + +// EnableAutoGroupCreationWithChan invokes the alikafka.EnableAutoGroupCreation API asynchronously +func (client *Client) EnableAutoGroupCreationWithChan(request *EnableAutoGroupCreationRequest) (<-chan *EnableAutoGroupCreationResponse, <-chan error) { + responseChan := make(chan *EnableAutoGroupCreationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.EnableAutoGroupCreation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// EnableAutoGroupCreationWithCallback invokes the alikafka.EnableAutoGroupCreation API asynchronously +func (client *Client) EnableAutoGroupCreationWithCallback(request *EnableAutoGroupCreationRequest, callback func(response *EnableAutoGroupCreationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *EnableAutoGroupCreationResponse + var err error + defer close(result) + response, err = client.EnableAutoGroupCreation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// EnableAutoGroupCreationRequest is the request struct for api EnableAutoGroupCreation +type EnableAutoGroupCreationRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` + Enable requests.Boolean `position:"Query" name:"Enable"` +} + +// EnableAutoGroupCreationResponse is the response struct for api EnableAutoGroupCreation +type EnableAutoGroupCreationResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateEnableAutoGroupCreationRequest creates a request to invoke EnableAutoGroupCreation API +func CreateEnableAutoGroupCreationRequest() (request *EnableAutoGroupCreationRequest) { + request = &EnableAutoGroupCreationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("alikafka", "2019-09-16", "EnableAutoGroupCreation", "alikafka", "openAPI") + request.Method = requests.POST + return +} + +// CreateEnableAutoGroupCreationResponse creates a response to parse from EnableAutoGroupCreation response +func CreateEnableAutoGroupCreationResponse() (response *EnableAutoGroupCreationResponse) { + response = &EnableAutoGroupCreationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/alikafka/enable_auto_topic_creation.go b/services/alikafka/enable_auto_topic_creation.go new file mode 100644 index 0000000000..65b25c91bc --- /dev/null +++ b/services/alikafka/enable_auto_topic_creation.go @@ -0,0 +1,104 @@ +package alikafka + +//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" +) + +// EnableAutoTopicCreation invokes the alikafka.EnableAutoTopicCreation API synchronously +func (client *Client) EnableAutoTopicCreation(request *EnableAutoTopicCreationRequest) (response *EnableAutoTopicCreationResponse, err error) { + response = CreateEnableAutoTopicCreationResponse() + err = client.DoAction(request, response) + return +} + +// EnableAutoTopicCreationWithChan invokes the alikafka.EnableAutoTopicCreation API asynchronously +func (client *Client) EnableAutoTopicCreationWithChan(request *EnableAutoTopicCreationRequest) (<-chan *EnableAutoTopicCreationResponse, <-chan error) { + responseChan := make(chan *EnableAutoTopicCreationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.EnableAutoTopicCreation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// EnableAutoTopicCreationWithCallback invokes the alikafka.EnableAutoTopicCreation API asynchronously +func (client *Client) EnableAutoTopicCreationWithCallback(request *EnableAutoTopicCreationRequest, callback func(response *EnableAutoTopicCreationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *EnableAutoTopicCreationResponse + var err error + defer close(result) + response, err = client.EnableAutoTopicCreation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// EnableAutoTopicCreationRequest is the request struct for api EnableAutoTopicCreation +type EnableAutoTopicCreationRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` + Operate string `position:"Query" name:"Operate"` + PartitionNum requests.Integer `position:"Query" name:"PartitionNum"` +} + +// EnableAutoTopicCreationResponse is the response struct for api EnableAutoTopicCreation +type EnableAutoTopicCreationResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateEnableAutoTopicCreationRequest creates a request to invoke EnableAutoTopicCreation API +func CreateEnableAutoTopicCreationRequest() (request *EnableAutoTopicCreationRequest) { + request = &EnableAutoTopicCreationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("alikafka", "2019-09-16", "EnableAutoTopicCreation", "alikafka", "openAPI") + request.Method = requests.POST + return +} + +// CreateEnableAutoTopicCreationResponse creates a response to parse from EnableAutoTopicCreation response +func CreateEnableAutoTopicCreationResponse() (response *EnableAutoTopicCreationResponse) { + response = &EnableAutoTopicCreationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/alikafka/get_all_instance_id_list.go b/services/alikafka/get_all_instance_id_list.go index 4a31f41133..91dd882108 100644 --- a/services/alikafka/get_all_instance_id_list.go +++ b/services/alikafka/get_all_instance_id_list.go @@ -88,7 +88,7 @@ func CreateGetAllInstanceIdListRequest() (request *GetAllInstanceIdListRequest) request = &GetAllInstanceIdListRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetAllInstanceIdList", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetAllInstanceIdList", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_allowed_ip_list.go b/services/alikafka/get_allowed_ip_list.go index e91d134bdb..f7bc4b275b 100644 --- a/services/alikafka/get_allowed_ip_list.go +++ b/services/alikafka/get_allowed_ip_list.go @@ -89,7 +89,7 @@ func CreateGetAllowedIpListRequest() (request *GetAllowedIpListRequest) { request = &GetAllowedIpListRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetAllowedIpList", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetAllowedIpList", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_consumer_list.go b/services/alikafka/get_consumer_list.go index aab438457d..b15a5a79d5 100644 --- a/services/alikafka/get_consumer_list.go +++ b/services/alikafka/get_consumer_list.go @@ -84,6 +84,9 @@ type GetConsumerListResponse struct { Message string `json:"Message" xml:"Message"` RequestId string `json:"RequestId" xml:"RequestId"` Success bool `json:"Success" xml:"Success"` + Total int64 `json:"Total" xml:"Total"` + PageSize int `json:"PageSize" xml:"PageSize"` + CurrentPage int `json:"CurrentPage" xml:"CurrentPage"` ConsumerList ConsumerList `json:"ConsumerList" xml:"ConsumerList"` } @@ -92,7 +95,7 @@ func CreateGetConsumerListRequest() (request *GetConsumerListRequest) { request = &GetConsumerListRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetConsumerList", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetConsumerList", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_consumer_progress.go b/services/alikafka/get_consumer_progress.go index 397964053f..f52fe3dd16 100644 --- a/services/alikafka/get_consumer_progress.go +++ b/services/alikafka/get_consumer_progress.go @@ -90,7 +90,7 @@ func CreateGetConsumerProgressRequest() (request *GetConsumerProgressRequest) { request = &GetConsumerProgressRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetConsumerProgress", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetConsumerProgress", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_instance_list.go b/services/alikafka/get_instance_list.go index ec152e6028..880b53645e 100644 --- a/services/alikafka/get_instance_list.go +++ b/services/alikafka/get_instance_list.go @@ -98,7 +98,7 @@ func CreateGetInstanceListRequest() (request *GetInstanceListRequest) { request = &GetInstanceListRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetInstanceList", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetInstanceList", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_quota_tip.go b/services/alikafka/get_quota_tip.go index 1a696620af..6cff7e5f9e 100644 --- a/services/alikafka/get_quota_tip.go +++ b/services/alikafka/get_quota_tip.go @@ -89,7 +89,7 @@ func CreateGetQuotaTipRequest() (request *GetQuotaTipRequest) { request = &GetQuotaTipRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetQuotaTip", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetQuotaTip", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_topic_list.go b/services/alikafka/get_topic_list.go index c0c874b6c1..c33d78336f 100644 --- a/services/alikafka/get_topic_list.go +++ b/services/alikafka/get_topic_list.go @@ -95,7 +95,7 @@ func CreateGetTopicListRequest() (request *GetTopicListRequest) { request = &GetTopicListRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetTopicList", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetTopicList", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_topic_status.go b/services/alikafka/get_topic_status.go index 95fdde3aa6..45677f1cbd 100644 --- a/services/alikafka/get_topic_status.go +++ b/services/alikafka/get_topic_status.go @@ -90,7 +90,7 @@ func CreateGetTopicStatusRequest() (request *GetTopicStatusRequest) { request = &GetTopicStatusRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "GetTopicStatus", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "GetTopicStatus", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/get_topic_subscribe_status.go b/services/alikafka/get_topic_subscribe_status.go new file mode 100644 index 0000000000..de1c7fc384 --- /dev/null +++ b/services/alikafka/get_topic_subscribe_status.go @@ -0,0 +1,104 @@ +package alikafka + +//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" +) + +// GetTopicSubscribeStatus invokes the alikafka.GetTopicSubscribeStatus API synchronously +func (client *Client) GetTopicSubscribeStatus(request *GetTopicSubscribeStatusRequest) (response *GetTopicSubscribeStatusResponse, err error) { + response = CreateGetTopicSubscribeStatusResponse() + err = client.DoAction(request, response) + return +} + +// GetTopicSubscribeStatusWithChan invokes the alikafka.GetTopicSubscribeStatus API asynchronously +func (client *Client) GetTopicSubscribeStatusWithChan(request *GetTopicSubscribeStatusRequest) (<-chan *GetTopicSubscribeStatusResponse, <-chan error) { + responseChan := make(chan *GetTopicSubscribeStatusResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetTopicSubscribeStatus(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetTopicSubscribeStatusWithCallback invokes the alikafka.GetTopicSubscribeStatus API asynchronously +func (client *Client) GetTopicSubscribeStatusWithCallback(request *GetTopicSubscribeStatusRequest, callback func(response *GetTopicSubscribeStatusResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetTopicSubscribeStatusResponse + var err error + defer close(result) + response, err = client.GetTopicSubscribeStatus(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetTopicSubscribeStatusRequest is the request struct for api GetTopicSubscribeStatus +type GetTopicSubscribeStatusRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` + Topic string `position:"Query" name:"Topic"` +} + +// GetTopicSubscribeStatusResponse is the response struct for api GetTopicSubscribeStatus +type GetTopicSubscribeStatusResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + Message string `json:"Message" xml:"Message"` + TopicSubscribeStatus TopicSubscribeStatus `json:"TopicSubscribeStatus" xml:"TopicSubscribeStatus"` +} + +// CreateGetTopicSubscribeStatusRequest creates a request to invoke GetTopicSubscribeStatus API +func CreateGetTopicSubscribeStatusRequest() (request *GetTopicSubscribeStatusRequest) { + request = &GetTopicSubscribeStatusRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("alikafka", "2019-09-16", "GetTopicSubscribeStatus", "alikafka", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetTopicSubscribeStatusResponse creates a response to parse from GetTopicSubscribeStatus response +func CreateGetTopicSubscribeStatusResponse() (response *GetTopicSubscribeStatusResponse) { + response = &GetTopicSubscribeStatusResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/alikafka/list_tag_resources.go b/services/alikafka/list_tag_resources.go index 340c1676a9..1fddeb53d5 100644 --- a/services/alikafka/list_tag_resources.go +++ b/services/alikafka/list_tag_resources.go @@ -96,7 +96,7 @@ func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) { request = &ListTagResourcesRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "ListTagResources", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "ListTagResources", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/modify_instance_name.go b/services/alikafka/modify_instance_name.go index 4a262ba70e..933d691420 100644 --- a/services/alikafka/modify_instance_name.go +++ b/services/alikafka/modify_instance_name.go @@ -89,7 +89,7 @@ func CreateModifyInstanceNameRequest() (request *ModifyInstanceNameRequest) { request = &ModifyInstanceNameRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "ModifyInstanceName", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "ModifyInstanceName", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/modify_partition_num.go b/services/alikafka/modify_partition_num.go index f22c4b4276..36edf2fbc3 100644 --- a/services/alikafka/modify_partition_num.go +++ b/services/alikafka/modify_partition_num.go @@ -90,7 +90,7 @@ func CreateModifyPartitionNumRequest() (request *ModifyPartitionNumRequest) { request = &ModifyPartitionNumRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "ModifyPartitionNum", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "ModifyPartitionNum", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/modify_topic_remark.go b/services/alikafka/modify_topic_remark.go index 70afd1fb50..91c3825421 100644 --- a/services/alikafka/modify_topic_remark.go +++ b/services/alikafka/modify_topic_remark.go @@ -71,9 +71,9 @@ func (client *Client) ModifyTopicRemarkWithCallback(request *ModifyTopicRemarkRe // ModifyTopicRemarkRequest is the request struct for api ModifyTopicRemark type ModifyTopicRemarkRequest struct { *requests.RpcRequest + Remark string `position:"Query" name:"Remark"` InstanceId string `position:"Query" name:"InstanceId"` Topic string `position:"Query" name:"Topic"` - Remark string `position:"Query" name:"Remark"` } // ModifyTopicRemarkResponse is the response struct for api ModifyTopicRemark @@ -90,7 +90,7 @@ func CreateModifyTopicRemarkRequest() (request *ModifyTopicRemarkRequest) { request = &ModifyTopicRemarkRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "ModifyTopicRemark", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "ModifyTopicRemark", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/query_message.go b/services/alikafka/query_message.go new file mode 100644 index 0000000000..62a58dc3a5 --- /dev/null +++ b/services/alikafka/query_message.go @@ -0,0 +1,108 @@ +package alikafka + +//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" +) + +// QueryMessage invokes the alikafka.QueryMessage API synchronously +func (client *Client) QueryMessage(request *QueryMessageRequest) (response *QueryMessageResponse, err error) { + response = CreateQueryMessageResponse() + err = client.DoAction(request, response) + return +} + +// QueryMessageWithChan invokes the alikafka.QueryMessage API asynchronously +func (client *Client) QueryMessageWithChan(request *QueryMessageRequest) (<-chan *QueryMessageResponse, <-chan error) { + responseChan := make(chan *QueryMessageResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryMessage(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryMessageWithCallback invokes the alikafka.QueryMessage API asynchronously +func (client *Client) QueryMessageWithCallback(request *QueryMessageRequest, callback func(response *QueryMessageResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryMessageResponse + var err error + defer close(result) + response, err = client.QueryMessage(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryMessageRequest is the request struct for api QueryMessage +type QueryMessageRequest struct { + *requests.RpcRequest + Offset string `position:"Query" name:"Offset"` + BeginTime requests.Integer `position:"Query" name:"BeginTime"` + InstanceId string `position:"Query" name:"InstanceId"` + Partition string `position:"Query" name:"Partition"` + Topic string `position:"Query" name:"Topic"` + QueryType string `position:"Query" name:"QueryType"` +} + +// QueryMessageResponse is the response struct for api QueryMessage +type QueryMessageResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + MessageList []MessageVO `json:"MessageList" xml:"MessageList"` +} + +// CreateQueryMessageRequest creates a request to invoke QueryMessage API +func CreateQueryMessageRequest() (request *QueryMessageRequest) { + request = &QueryMessageRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("alikafka", "2019-09-16", "QueryMessage", "alikafka", "openAPI") + request.Method = requests.GET + return +} + +// CreateQueryMessageResponse creates a response to parse from QueryMessage response +func CreateQueryMessageResponse() (response *QueryMessageResponse) { + response = &QueryMessageResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/alikafka/release_instance.go b/services/alikafka/release_instance.go index 2af8dda2ed..b4e01753aa 100644 --- a/services/alikafka/release_instance.go +++ b/services/alikafka/release_instance.go @@ -90,7 +90,7 @@ func CreateReleaseInstanceRequest() (request *ReleaseInstanceRequest) { request = &ReleaseInstanceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "ReleaseInstance", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "ReleaseInstance", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/reopen_instance.go b/services/alikafka/reopen_instance.go new file mode 100644 index 0000000000..e2f28868ce --- /dev/null +++ b/services/alikafka/reopen_instance.go @@ -0,0 +1,102 @@ +package alikafka + +//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" +) + +// ReopenInstance invokes the alikafka.ReopenInstance API synchronously +func (client *Client) ReopenInstance(request *ReopenInstanceRequest) (response *ReopenInstanceResponse, err error) { + response = CreateReopenInstanceResponse() + err = client.DoAction(request, response) + return +} + +// ReopenInstanceWithChan invokes the alikafka.ReopenInstance API asynchronously +func (client *Client) ReopenInstanceWithChan(request *ReopenInstanceRequest) (<-chan *ReopenInstanceResponse, <-chan error) { + responseChan := make(chan *ReopenInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ReopenInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ReopenInstanceWithCallback invokes the alikafka.ReopenInstance API asynchronously +func (client *Client) ReopenInstanceWithCallback(request *ReopenInstanceRequest, callback func(response *ReopenInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ReopenInstanceResponse + var err error + defer close(result) + response, err = client.ReopenInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ReopenInstanceRequest is the request struct for api ReopenInstance +type ReopenInstanceRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` +} + +// ReopenInstanceResponse is the response struct for api ReopenInstance +type ReopenInstanceResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Message string `json:"Message" xml:"Message"` +} + +// CreateReopenInstanceRequest creates a request to invoke ReopenInstance API +func CreateReopenInstanceRequest() (request *ReopenInstanceRequest) { + request = &ReopenInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("alikafka", "2019-09-16", "ReopenInstance", "alikafka", "openAPI") + request.Method = requests.POST + return +} + +// CreateReopenInstanceResponse creates a response to parse from ReopenInstance response +func CreateReopenInstanceResponse() (response *ReopenInstanceResponse) { + response = &ReopenInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/alikafka/start_instance.go b/services/alikafka/start_instance.go index ab2d3c9fab..fb31c792c5 100644 --- a/services/alikafka/start_instance.go +++ b/services/alikafka/start_instance.go @@ -71,6 +71,7 @@ func (client *Client) StartInstanceWithCallback(request *StartInstanceRequest, c // StartInstanceRequest is the request struct for api StartInstance type StartInstanceRequest struct { *requests.RpcRequest + VSwitchIds *[]string `position:"Query" name:"VSwitchIds" type:"Repeated"` SelectedZones string `position:"Query" name:"SelectedZones"` IsEipInner requests.Boolean `position:"Query" name:"IsEipInner"` SecurityGroup string `position:"Query" name:"SecurityGroup"` @@ -106,7 +107,7 @@ func CreateStartInstanceRequest() (request *StartInstanceRequest) { request = &StartInstanceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "StartInstance", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "StartInstance", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/stop_instance.go b/services/alikafka/stop_instance.go new file mode 100644 index 0000000000..3976e60ed0 --- /dev/null +++ b/services/alikafka/stop_instance.go @@ -0,0 +1,102 @@ +package alikafka + +//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" +) + +// StopInstance invokes the alikafka.StopInstance API synchronously +func (client *Client) StopInstance(request *StopInstanceRequest) (response *StopInstanceResponse, err error) { + response = CreateStopInstanceResponse() + err = client.DoAction(request, response) + return +} + +// StopInstanceWithChan invokes the alikafka.StopInstance API asynchronously +func (client *Client) StopInstanceWithChan(request *StopInstanceRequest) (<-chan *StopInstanceResponse, <-chan error) { + responseChan := make(chan *StopInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StopInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StopInstanceWithCallback invokes the alikafka.StopInstance API asynchronously +func (client *Client) StopInstanceWithCallback(request *StopInstanceRequest, callback func(response *StopInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StopInstanceResponse + var err error + defer close(result) + response, err = client.StopInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StopInstanceRequest is the request struct for api StopInstance +type StopInstanceRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` +} + +// StopInstanceResponse is the response struct for api StopInstance +type StopInstanceResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateStopInstanceRequest creates a request to invoke StopInstance API +func CreateStopInstanceRequest() (request *StopInstanceRequest) { + request = &StopInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("alikafka", "2019-09-16", "StopInstance", "alikafka", "openAPI") + request.Method = requests.POST + return +} + +// CreateStopInstanceResponse creates a response to parse from StopInstance response +func CreateStopInstanceResponse() (response *StopInstanceResponse) { + response = &StopInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/alikafka/struct_confluent_config.go b/services/alikafka/struct_confluent_config.go new file mode 100644 index 0000000000..172c073df3 --- /dev/null +++ b/services/alikafka/struct_confluent_config.go @@ -0,0 +1,38 @@ +package alikafka + +//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. + +// ConfluentConfig is a nested struct in alikafka response +type ConfluentConfig struct { + KafkaCU int `json:"KafkaCU" xml:"KafkaCU"` + KafkaStorage int `json:"KafkaStorage" xml:"KafkaStorage"` + KafkaReplica int `json:"KafkaReplica" xml:"KafkaReplica"` + ZooKeeperCU int `json:"ZooKeeperCU" xml:"ZooKeeperCU"` + ZooKeeperStorage int `json:"ZooKeeperStorage" xml:"ZooKeeperStorage"` + ZooKeeperReplica int `json:"ZooKeeperReplica" xml:"ZooKeeperReplica"` + ControlCenterCU int `json:"ControlCenterCU" xml:"ControlCenterCU"` + ControlCenterStorage int `json:"ControlCenterStorage" xml:"ControlCenterStorage"` + ControlCenterReplica int `json:"ControlCenterReplica" xml:"ControlCenterReplica"` + SchemaRegistryCU int `json:"SchemaRegistryCU" xml:"SchemaRegistryCU"` + SchemaRegistryReplica int `json:"SchemaRegistryReplica" xml:"SchemaRegistryReplica"` + ConnectCU int `json:"ConnectCU" xml:"ConnectCU"` + ConnectReplica int `json:"ConnectReplica" xml:"ConnectReplica"` + KsqlCU int `json:"KsqlCU" xml:"KsqlCU"` + KsqlStorage int `json:"KsqlStorage" xml:"KsqlStorage"` + KsqlReplica int `json:"KsqlReplica" xml:"KsqlReplica"` + KafkaRestProxyCU int `json:"KafkaRestProxyCU" xml:"KafkaRestProxyCU"` + KafkaRestProxyReplica int `json:"KafkaRestProxyReplica" xml:"KafkaRestProxyReplica"` +} diff --git a/services/alikafka/struct_consumer_groups.go b/services/alikafka/struct_consumer_groups.go new file mode 100644 index 0000000000..69cb9f76b0 --- /dev/null +++ b/services/alikafka/struct_consumer_groups.go @@ -0,0 +1,21 @@ +package alikafka + +//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. + +// ConsumerGroups is a nested struct in alikafka response +type ConsumerGroups struct { + ConsumerGroups []string `json:"ConsumerGroups" xml:"ConsumerGroups"` +} diff --git a/services/alikafka/struct_consumer_progress.go b/services/alikafka/struct_consumer_progress.go index 08f2c46dee..05368d7eed 100644 --- a/services/alikafka/struct_consumer_progress.go +++ b/services/alikafka/struct_consumer_progress.go @@ -17,7 +17,8 @@ package alikafka // ConsumerProgress is a nested struct in alikafka response type ConsumerProgress struct { - LastTimestamp int64 `json:"LastTimestamp" xml:"LastTimestamp"` - TotalDiff int64 `json:"TotalDiff" xml:"TotalDiff"` - TopicList TopicListInGetConsumerProgress `json:"TopicList" xml:"TopicList"` + LastTimestamp int64 `json:"LastTimestamp" xml:"LastTimestamp"` + TotalDiff int64 `json:"TotalDiff" xml:"TotalDiff"` + TopicList TopicListInGetConsumerProgress `json:"TopicList" xml:"TopicList"` + RebalanceInfoList RebalanceInfoList `json:"RebalanceInfoList" xml:"RebalanceInfoList"` } diff --git a/services/alikafka/struct_instance_vo.go b/services/alikafka/struct_instance_vo.go index 7ecfb083d8..76a63d5424 100644 --- a/services/alikafka/struct_instance_vo.go +++ b/services/alikafka/struct_instance_vo.go @@ -17,38 +17,42 @@ package alikafka // InstanceVO is a nested struct in alikafka response type InstanceVO struct { - VpcId string `json:"VpcId" xml:"VpcId"` - SpecType string `json:"SpecType" xml:"SpecType"` - DeployType int `json:"DeployType" xml:"DeployType"` - CreateTime int64 `json:"CreateTime" xml:"CreateTime"` - DiskSize int `json:"DiskSize" xml:"DiskSize"` - DiskType int `json:"DiskType" xml:"DiskType"` - SecurityGroup string `json:"SecurityGroup" xml:"SecurityGroup"` - SslEndPoint string `json:"SslEndPoint" xml:"SslEndPoint"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - AllConfig string `json:"AllConfig" xml:"AllConfig"` - ServiceStatus int `json:"ServiceStatus" xml:"ServiceStatus"` - EipMax int `json:"EipMax" xml:"EipMax"` - RegionId string `json:"RegionId" xml:"RegionId"` - MsgRetain int `json:"MsgRetain" xml:"MsgRetain"` - VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` - ExpiredTime int64 `json:"ExpiredTime" xml:"ExpiredTime"` - TopicNumLimit int `json:"TopicNumLimit" xml:"TopicNumLimit"` - ZoneId string `json:"ZoneId" xml:"ZoneId"` - IoMax int `json:"IoMax" xml:"IoMax"` - PaidType int `json:"PaidType" xml:"PaidType"` - Name string `json:"Name" xml:"Name"` - EndPoint string `json:"EndPoint" xml:"EndPoint"` - DomainEndpoint string `json:"DomainEndpoint" xml:"DomainEndpoint"` - SslDomainEndpoint string `json:"SslDomainEndpoint" xml:"SslDomainEndpoint"` - SaslDomainEndpoint string `json:"SaslDomainEndpoint" xml:"SaslDomainEndpoint"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - UsedTopicCount int `json:"UsedTopicCount" xml:"UsedTopicCount"` - UsedGroupCount int `json:"UsedGroupCount" xml:"UsedGroupCount"` - UsedPartitionCount int `json:"UsedPartitionCount" xml:"UsedPartitionCount"` - KmsKeyId string `json:"KmsKeyId" xml:"KmsKeyId"` - StandardZoneId string `json:"StandardZoneId" xml:"StandardZoneId"` - IoMaxSpec string `json:"IoMaxSpec" xml:"IoMaxSpec"` - UpgradeServiceDetailInfo UpgradeServiceDetailInfo `json:"UpgradeServiceDetailInfo" xml:"UpgradeServiceDetailInfo"` - Tags TagsInGetInstanceList `json:"Tags" xml:"Tags"` + VpcId string `json:"VpcId" xml:"VpcId"` + SpecType string `json:"SpecType" xml:"SpecType"` + DeployType int `json:"DeployType" xml:"DeployType"` + CreateTime int64 `json:"CreateTime" xml:"CreateTime"` + DiskSize int `json:"DiskSize" xml:"DiskSize"` + DiskType int `json:"DiskType" xml:"DiskType"` + SecurityGroup string `json:"SecurityGroup" xml:"SecurityGroup"` + SslEndPoint string `json:"SslEndPoint" xml:"SslEndPoint"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + AllConfig string `json:"AllConfig" xml:"AllConfig"` + ServiceStatus int `json:"ServiceStatus" xml:"ServiceStatus"` + EipMax int `json:"EipMax" xml:"EipMax"` + RegionId string `json:"RegionId" xml:"RegionId"` + MsgRetain int `json:"MsgRetain" xml:"MsgRetain"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + ExpiredTime int64 `json:"ExpiredTime" xml:"ExpiredTime"` + TopicNumLimit int `json:"TopicNumLimit" xml:"TopicNumLimit"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + IoMax int `json:"IoMax" xml:"IoMax"` + PaidType int `json:"PaidType" xml:"PaidType"` + Name string `json:"Name" xml:"Name"` + EndPoint string `json:"EndPoint" xml:"EndPoint"` + DomainEndpoint string `json:"DomainEndpoint" xml:"DomainEndpoint"` + SslDomainEndpoint string `json:"SslDomainEndpoint" xml:"SslDomainEndpoint"` + SaslDomainEndpoint string `json:"SaslDomainEndpoint" xml:"SaslDomainEndpoint"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + UsedTopicCount int `json:"UsedTopicCount" xml:"UsedTopicCount"` + UsedGroupCount int `json:"UsedGroupCount" xml:"UsedGroupCount"` + UsedPartitionCount int `json:"UsedPartitionCount" xml:"UsedPartitionCount"` + KmsKeyId string `json:"KmsKeyId" xml:"KmsKeyId"` + StandardZoneId string `json:"StandardZoneId" xml:"StandardZoneId"` + IoMaxSpec string `json:"IoMaxSpec" xml:"IoMaxSpec"` + ReservedPublishCapacity int `json:"ReservedPublishCapacity" xml:"ReservedPublishCapacity"` + ReservedSubscribeCapacity int `json:"ReservedSubscribeCapacity" xml:"ReservedSubscribeCapacity"` + ViewInstanceStatusCode int `json:"ViewInstanceStatusCode" xml:"ViewInstanceStatusCode"` + UpgradeServiceDetailInfo UpgradeServiceDetailInfo `json:"UpgradeServiceDetailInfo" xml:"UpgradeServiceDetailInfo"` + ConfluentConfig ConfluentConfig `json:"ConfluentConfig" xml:"ConfluentConfig"` + Tags TagsInGetInstanceList `json:"Tags" xml:"Tags"` } diff --git a/services/alikafka/struct_kafka_acl_vo.go b/services/alikafka/struct_kafka_acl_vo.go index b8e9359a0a..8e56794050 100644 --- a/services/alikafka/struct_kafka_acl_vo.go +++ b/services/alikafka/struct_kafka_acl_vo.go @@ -23,4 +23,5 @@ type KafkaAclVO struct { AclResourceName string `json:"AclResourceName" xml:"AclResourceName"` AclResourcePatternType string `json:"AclResourcePatternType" xml:"AclResourcePatternType"` Username string `json:"Username" xml:"Username"` + AclPermissionType string `json:"AclPermissionType" xml:"AclPermissionType"` } diff --git a/services/alikafka/struct_message_list.go b/services/alikafka/struct_message_list.go new file mode 100644 index 0000000000..f9efeef8dd --- /dev/null +++ b/services/alikafka/struct_message_list.go @@ -0,0 +1,21 @@ +package alikafka + +//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. + +// MessageList is a nested struct in alikafka response +type MessageList struct { + MessageVO []MessageVO `json:"MessageVO" xml:"MessageVO"` +} diff --git a/services/alikafka/struct_message_vo.go b/services/alikafka/struct_message_vo.go new file mode 100644 index 0000000000..d5905181fa --- /dev/null +++ b/services/alikafka/struct_message_vo.go @@ -0,0 +1,34 @@ +package alikafka + +//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. + +// MessageVO is a nested struct in alikafka response +type MessageVO struct { + Topic string `json:"Topic" xml:"Topic"` + Partition int64 `json:"Partition" xml:"Partition"` + Offset int64 `json:"Offset" xml:"Offset"` + Timestamp int64 `json:"Timestamp" xml:"Timestamp"` + TimestampType string `json:"TimestampType" xml:"TimestampType"` + Checksum int64 `json:"Checksum" xml:"Checksum"` + SerializedKeySize int `json:"SerializedKeySize" xml:"SerializedKeySize"` + SerializedValueSize int `json:"SerializedValueSize" xml:"SerializedValueSize"` + Key string `json:"Key" xml:"Key"` + Value string `json:"Value" xml:"Value"` + KeyTruncated bool `json:"KeyTruncated" xml:"KeyTruncated"` + ValueTruncated bool `json:"ValueTruncated" xml:"ValueTruncated"` + TruncatedKeySize int `json:"TruncatedKeySize" xml:"TruncatedKeySize"` + TruncatedValueSize int `json:"TruncatedValueSize" xml:"TruncatedValueSize"` +} diff --git a/services/alikafka/struct_rebalance_info_list.go b/services/alikafka/struct_rebalance_info_list.go new file mode 100644 index 0000000000..ab9912f953 --- /dev/null +++ b/services/alikafka/struct_rebalance_info_list.go @@ -0,0 +1,21 @@ +package alikafka + +//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. + +// RebalanceInfoList is a nested struct in alikafka response +type RebalanceInfoList struct { + RebalanceInfoListItem []RebalanceInfoListItem `json:"RebalanceInfoList" xml:"RebalanceInfoList"` +} diff --git a/services/alikafka/struct_rebalance_info_list_item.go b/services/alikafka/struct_rebalance_info_list_item.go new file mode 100644 index 0000000000..735854c815 --- /dev/null +++ b/services/alikafka/struct_rebalance_info_list_item.go @@ -0,0 +1,26 @@ +package alikafka + +//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. + +// RebalanceInfoListItem is a nested struct in alikafka response +type RebalanceInfoListItem struct { + Generation int64 `json:"Generation" xml:"Generation"` + LastRebalanceTimestamp int64 `json:"LastRebalanceTimestamp" xml:"LastRebalanceTimestamp"` + Reason string `json:"Reason" xml:"Reason"` + GroupId string `json:"GroupId" xml:"GroupId"` + RebalanceTimeConsuming int64 `json:"RebalanceTimeConsuming" xml:"RebalanceTimeConsuming"` + RebalanceSuccess bool `json:"RebalanceSuccess" xml:"RebalanceSuccess"` +} diff --git a/services/alikafka/struct_sasl_user_vo.go b/services/alikafka/struct_sasl_user_vo.go index 6918fb0d69..49dcbade8c 100644 --- a/services/alikafka/struct_sasl_user_vo.go +++ b/services/alikafka/struct_sasl_user_vo.go @@ -17,7 +17,8 @@ package alikafka // SaslUserVO is a nested struct in alikafka response type SaslUserVO struct { - Type string `json:"Type" xml:"Type"` - Password string `json:"Password" xml:"Password"` - Username string `json:"Username" xml:"Username"` + Type string `json:"Type" xml:"Type"` + Password string `json:"Password" xml:"Password"` + Username string `json:"Username" xml:"Username"` + Mechanism string `json:"Mechanism" xml:"Mechanism"` } diff --git a/services/alikafka/struct_topic_subscribe_status.go b/services/alikafka/struct_topic_subscribe_status.go new file mode 100644 index 0000000000..8e8cac0c0b --- /dev/null +++ b/services/alikafka/struct_topic_subscribe_status.go @@ -0,0 +1,22 @@ +package alikafka + +//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. + +// TopicSubscribeStatus is a nested struct in alikafka response +type TopicSubscribeStatus struct { + Topic string `json:"Topic" xml:"Topic"` + ConsumerGroups []string `json:"ConsumerGroups" xml:"ConsumerGroups"` +} diff --git a/services/alikafka/tag_resources.go b/services/alikafka/tag_resources.go index 3d30f7766d..84443ff423 100644 --- a/services/alikafka/tag_resources.go +++ b/services/alikafka/tag_resources.go @@ -94,7 +94,7 @@ func CreateTagResourcesRequest() (request *TagResourcesRequest) { request = &TagResourcesRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "TagResources", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "TagResources", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/untag_resources.go b/services/alikafka/untag_resources.go index 0c5aab68fc..7805e12f02 100644 --- a/services/alikafka/untag_resources.go +++ b/services/alikafka/untag_resources.go @@ -88,7 +88,7 @@ func CreateUntagResourcesRequest() (request *UntagResourcesRequest) { request = &UntagResourcesRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "UntagResources", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "UntagResources", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/update_allowed_ip.go b/services/alikafka/update_allowed_ip.go index 8cf41b14e4..1fe9b761a7 100644 --- a/services/alikafka/update_allowed_ip.go +++ b/services/alikafka/update_allowed_ip.go @@ -93,7 +93,7 @@ func CreateUpdateAllowedIpRequest() (request *UpdateAllowedIpRequest) { request = &UpdateAllowedIpRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "UpdateAllowedIp", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "UpdateAllowedIp", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/update_consumer_offset.go b/services/alikafka/update_consumer_offset.go index 7c41464201..74d111426d 100644 --- a/services/alikafka/update_consumer_offset.go +++ b/services/alikafka/update_consumer_offset.go @@ -99,7 +99,7 @@ func CreateUpdateConsumerOffsetRequest() (request *UpdateConsumerOffsetRequest) request = &UpdateConsumerOffsetRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "UpdateConsumerOffset", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "UpdateConsumerOffset", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/update_instance_config.go b/services/alikafka/update_instance_config.go index 8103ec9f18..466166be19 100644 --- a/services/alikafka/update_instance_config.go +++ b/services/alikafka/update_instance_config.go @@ -89,7 +89,7 @@ func CreateUpdateInstanceConfigRequest() (request *UpdateInstanceConfigRequest) request = &UpdateInstanceConfigRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "UpdateInstanceConfig", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "UpdateInstanceConfig", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/update_topic_config.go b/services/alikafka/update_topic_config.go new file mode 100644 index 0000000000..9108c76cac --- /dev/null +++ b/services/alikafka/update_topic_config.go @@ -0,0 +1,106 @@ +package alikafka + +//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" +) + +// UpdateTopicConfig invokes the alikafka.UpdateTopicConfig API synchronously +func (client *Client) UpdateTopicConfig(request *UpdateTopicConfigRequest) (response *UpdateTopicConfigResponse, err error) { + response = CreateUpdateTopicConfigResponse() + err = client.DoAction(request, response) + return +} + +// UpdateTopicConfigWithChan invokes the alikafka.UpdateTopicConfig API asynchronously +func (client *Client) UpdateTopicConfigWithChan(request *UpdateTopicConfigRequest) (<-chan *UpdateTopicConfigResponse, <-chan error) { + responseChan := make(chan *UpdateTopicConfigResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateTopicConfig(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateTopicConfigWithCallback invokes the alikafka.UpdateTopicConfig API asynchronously +func (client *Client) UpdateTopicConfigWithCallback(request *UpdateTopicConfigRequest, callback func(response *UpdateTopicConfigResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateTopicConfigResponse + var err error + defer close(result) + response, err = client.UpdateTopicConfig(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateTopicConfigRequest is the request struct for api UpdateTopicConfig +type UpdateTopicConfigRequest struct { + *requests.RpcRequest + InstanceId string `position:"Query" name:"InstanceId"` + Topic string `position:"Query" name:"Topic"` + Config string `position:"Query" name:"Config"` + Value string `position:"Query" name:"Value"` +} + +// UpdateTopicConfigResponse is the response struct for api UpdateTopicConfig +type UpdateTopicConfigResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code int64 `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data string `json:"Data" xml:"Data"` +} + +// CreateUpdateTopicConfigRequest creates a request to invoke UpdateTopicConfig API +func CreateUpdateTopicConfigRequest() (request *UpdateTopicConfigRequest) { + request = &UpdateTopicConfigRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("alikafka", "2019-09-16", "UpdateTopicConfig", "alikafka", "openAPI") + request.Method = requests.POST + return +} + +// CreateUpdateTopicConfigResponse creates a response to parse from UpdateTopicConfig response +func CreateUpdateTopicConfigResponse() (response *UpdateTopicConfigResponse) { + response = &UpdateTopicConfigResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/alikafka/upgrade_instance_version.go b/services/alikafka/upgrade_instance_version.go index 18afb95fb6..2a63b4d9ec 100644 --- a/services/alikafka/upgrade_instance_version.go +++ b/services/alikafka/upgrade_instance_version.go @@ -89,7 +89,7 @@ func CreateUpgradeInstanceVersionRequest() (request *UpgradeInstanceVersionReque request = &UpgradeInstanceVersionRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "UpgradeInstanceVersion", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "UpgradeInstanceVersion", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/upgrade_post_pay_order.go b/services/alikafka/upgrade_post_pay_order.go index bdb956cc59..50ec1126b5 100644 --- a/services/alikafka/upgrade_post_pay_order.go +++ b/services/alikafka/upgrade_post_pay_order.go @@ -71,15 +71,22 @@ func (client *Client) UpgradePostPayOrderWithCallback(request *UpgradePostPayOrd // UpgradePostPayOrderRequest is the request struct for api UpgradePostPayOrder type UpgradePostPayOrderRequest struct { *requests.RpcRequest - DiskSize requests.Integer `position:"Query" name:"DiskSize"` - IoMax requests.Integer `position:"Query" name:"IoMax"` - EipModel requests.Boolean `position:"Query" name:"EipModel"` - IoMaxSpec string `position:"Query" name:"IoMaxSpec"` - TopicQuota requests.Integer `position:"Query" name:"TopicQuota"` - EipMax requests.Integer `position:"Query" name:"EipMax"` - SpecType string `position:"Query" name:"SpecType"` - InstanceId string `position:"Query" name:"InstanceId"` - PartitionNum requests.Integer `position:"Query" name:"PartitionNum"` + ServerlessConfig UpgradePostPayOrderServerlessConfig `position:"Query" name:"ServerlessConfig" type:"Struct"` + DiskSize requests.Integer `position:"Query" name:"DiskSize"` + IoMax requests.Integer `position:"Query" name:"IoMax"` + EipModel requests.Boolean `position:"Query" name:"EipModel"` + IoMaxSpec string `position:"Query" name:"IoMaxSpec"` + TopicQuota requests.Integer `position:"Query" name:"TopicQuota"` + EipMax requests.Integer `position:"Query" name:"EipMax"` + SpecType string `position:"Query" name:"SpecType"` + InstanceId string `position:"Query" name:"InstanceId"` + PartitionNum requests.Integer `position:"Query" name:"PartitionNum"` +} + +// UpgradePostPayOrderServerlessConfig is a repeated param struct in UpgradePostPayOrderRequest +type UpgradePostPayOrderServerlessConfig struct { + ReservedPublishCapacity string `name:"ReservedPublishCapacity"` + ReservedSubscribeCapacity string `name:"ReservedSubscribeCapacity"` } // UpgradePostPayOrderResponse is the response struct for api UpgradePostPayOrder @@ -96,7 +103,7 @@ func CreateUpgradePostPayOrderRequest() (request *UpgradePostPayOrderRequest) { request = &UpgradePostPayOrderRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "UpgradePostPayOrder", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "UpgradePostPayOrder", "alikafka", "openAPI") request.Method = requests.POST return } diff --git a/services/alikafka/upgrade_pre_pay_order.go b/services/alikafka/upgrade_pre_pay_order.go index a9ee882733..b85dc09875 100644 --- a/services/alikafka/upgrade_pre_pay_order.go +++ b/services/alikafka/upgrade_pre_pay_order.go @@ -71,15 +71,39 @@ func (client *Client) UpgradePrePayOrderWithCallback(request *UpgradePrePayOrder // UpgradePrePayOrderRequest is the request struct for api UpgradePrePayOrder type UpgradePrePayOrderRequest struct { *requests.RpcRequest - DiskSize requests.Integer `position:"Query" name:"DiskSize"` - IoMax requests.Integer `position:"Query" name:"IoMax"` - EipModel requests.Boolean `position:"Query" name:"EipModel"` - IoMaxSpec string `position:"Query" name:"IoMaxSpec"` - TopicQuota requests.Integer `position:"Query" name:"TopicQuota"` - EipMax requests.Integer `position:"Query" name:"EipMax"` - SpecType string `position:"Query" name:"SpecType"` - InstanceId string `position:"Query" name:"InstanceId"` - PartitionNum requests.Integer `position:"Query" name:"PartitionNum"` + IoMax requests.Integer `position:"Query" name:"IoMax"` + EipModel requests.Boolean `position:"Query" name:"EipModel"` + EipMax requests.Integer `position:"Query" name:"EipMax"` + SpecType string `position:"Query" name:"SpecType"` + ConfluentConfig UpgradePrePayOrderConfluentConfig `position:"Query" name:"ConfluentConfig" type:"Struct"` + PartitionNum requests.Integer `position:"Query" name:"PartitionNum"` + PaidType requests.Integer `position:"Query" name:"PaidType"` + DiskSize requests.Integer `position:"Query" name:"DiskSize"` + IoMaxSpec string `position:"Query" name:"IoMaxSpec"` + TopicQuota requests.Integer `position:"Query" name:"TopicQuota"` + InstanceId string `position:"Query" name:"InstanceId"` +} + +// UpgradePrePayOrderConfluentConfig is a repeated param struct in UpgradePrePayOrderRequest +type UpgradePrePayOrderConfluentConfig struct { + KsqlStorage string `name:"KsqlStorage"` + ControlCenterStorage string `name:"ControlCenterStorage"` + KafkaRestProxyReplica string `name:"KafkaRestProxyReplica"` + ZooKeeperReplica string `name:"ZooKeeperReplica"` + ConnectCU string `name:"ConnectCU"` + KafkaReplica string `name:"KafkaReplica"` + SchemaRegistryReplica string `name:"SchemaRegistryReplica"` + KafkaCU string `name:"KafkaCU"` + ConnectReplica string `name:"ConnectReplica"` + ControlCenterCU string `name:"ControlCenterCU"` + KsqlReplica string `name:"KsqlReplica"` + ControlCenterReplica string `name:"ControlCenterReplica"` + KafkaStorage string `name:"KafkaStorage"` + ZooKeeperStorage string `name:"ZooKeeperStorage"` + KsqlCU string `name:"KsqlCU"` + SchemaRegistryCU string `name:"SchemaRegistryCU"` + ZooKeeperCU string `name:"ZooKeeperCU"` + KafkaRestProxyCU string `name:"KafkaRestProxyCU"` } // UpgradePrePayOrderResponse is the response struct for api UpgradePrePayOrder @@ -96,7 +120,7 @@ func CreateUpgradePrePayOrderRequest() (request *UpgradePrePayOrderRequest) { request = &UpgradePrePayOrderRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("alikafka", "2019-09-16", "UpgradePrePayOrder", "", "") + request.InitWithApiInfo("alikafka", "2019-09-16", "UpgradePrePayOrder", "alikafka", "openAPI") request.Method = requests.POST return }