From 44e928bb5dad877ad5c014dd1363f503486c1912 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 27 Nov 2024 12:55:51 +0000 Subject: [PATCH] Generated 2018-11-01 for dms-enterprise. --- ChangeLog.txt | 4 + .../add_authority_template_items.go | 114 ++++++++++++++++++ .../create_abac_authorization.go | 107 ++++++++++++++++ services/dms-enterprise/create_abac_policy.go | 106 ++++++++++++++++ .../delete_abac_authorization.go | 105 ++++++++++++++++ services/dms-enterprise/delete_abac_policy.go | 104 ++++++++++++++++ services/dms-enterprise/get_abac_policy.go | 105 ++++++++++++++++ .../dms-enterprise/get_data_lake_catalog.go | 105 ++++++++++++++++ .../dms-enterprise/get_data_lake_database.go | 106 ++++++++++++++++ .../dms-enterprise/get_data_lake_table.go | 102 ++++++++++++++++ .../list_abac_authorizations.go | 108 +++++++++++++++++ services/dms-enterprise/list_abac_policies.go | 108 +++++++++++++++++ .../list_authorized_databases_for_user.go | 107 ++++++++++++++++ .../list_authorized_instances_for_user.go | 106 ++++++++++++++++ .../list_authorized_users_for_database.go | 105 ++++++++++++++++ .../list_authorized_users_for_instance.go | 104 ++++++++++++++++ .../dms-enterprise/list_data_lake_catalog.go | 105 ++++++++++++++++ .../dms-enterprise/list_data_lake_database.go | 106 ++++++++++++++++ .../list_data_lake_tablebase_info.go | 110 +++++++++++++++++ .../dms-enterprise/pause_data_export_job.go | 104 ++++++++++++++++ .../dms-enterprise/remove_data_export_job.go | 104 ++++++++++++++++ .../dms-enterprise/restart_data_export_job.go | 104 ++++++++++++++++ .../dms-enterprise/set_workflow_extra_info.go | 111 +++++++++++++++++ .../dms-enterprise/struct_approval_detail.go | 24 ++-- .../struct_authorization_list.go | 21 ++++ .../struct_authorization_list_item.go | 27 +++++ .../dms-enterprise/struct_cata_log_list.go | 21 ++++ services/dms-enterprise/struct_catalog.go | 23 ++++ services/dms-enterprise/struct_column.go | 3 + ...ruct_database_in_get_data_lake_database.go | 26 ++++ ...uct_database_in_list_data_lake_database.go | 26 ++++ ...atabase_list_in_list_data_lake_database.go | 21 ++++ services/dms-enterprise/struct_databases.go | 21 ++++ .../dms-enterprise/struct_databases_item.go | 29 +++++ ...ances_in_get_data_archive_order_detail.go} | 4 +- ...s_in_list_authorized_instances_for_user.go | 21 ++++ .../dms-enterprise/struct_instances_item.go | 35 ++++-- services/dms-enterprise/struct_key_info.go | 1 + .../dms-enterprise/struct_partition_keys.go | 21 ++++ .../struct_permission_detail.go | 24 ++++ services/dms-enterprise/struct_policy.go | 27 +++++ services/dms-enterprise/struct_policy_list.go | 21 ++++ .../dms-enterprise/struct_policy_list_item.go | 26 ++++ .../dms-enterprise/struct_tablebase_info.go | 38 ++++++ .../struct_tablebase_info_list.go | 21 ++++ ...s_in_list_authorized_users_for_database.go | 21 ++++ ...s_in_list_authorized_users_for_instance.go | 21 ++++ services/dms-enterprise/struct_users_item.go | 24 ++++ .../dms-enterprise/suspend_data_export_job.go | 104 ++++++++++++++++ services/dms-enterprise/update_abac_policy.go | 107 ++++++++++++++++ 50 files changed, 3072 insertions(+), 26 deletions(-) create mode 100644 services/dms-enterprise/add_authority_template_items.go create mode 100644 services/dms-enterprise/create_abac_authorization.go create mode 100644 services/dms-enterprise/create_abac_policy.go create mode 100644 services/dms-enterprise/delete_abac_authorization.go create mode 100644 services/dms-enterprise/delete_abac_policy.go create mode 100644 services/dms-enterprise/get_abac_policy.go create mode 100644 services/dms-enterprise/get_data_lake_catalog.go create mode 100644 services/dms-enterprise/get_data_lake_database.go create mode 100644 services/dms-enterprise/get_data_lake_table.go create mode 100644 services/dms-enterprise/list_abac_authorizations.go create mode 100644 services/dms-enterprise/list_abac_policies.go create mode 100644 services/dms-enterprise/list_authorized_databases_for_user.go create mode 100644 services/dms-enterprise/list_authorized_instances_for_user.go create mode 100644 services/dms-enterprise/list_authorized_users_for_database.go create mode 100644 services/dms-enterprise/list_authorized_users_for_instance.go create mode 100644 services/dms-enterprise/list_data_lake_catalog.go create mode 100644 services/dms-enterprise/list_data_lake_database.go create mode 100644 services/dms-enterprise/list_data_lake_tablebase_info.go create mode 100644 services/dms-enterprise/pause_data_export_job.go create mode 100644 services/dms-enterprise/remove_data_export_job.go create mode 100644 services/dms-enterprise/restart_data_export_job.go create mode 100644 services/dms-enterprise/set_workflow_extra_info.go create mode 100644 services/dms-enterprise/struct_authorization_list.go create mode 100644 services/dms-enterprise/struct_authorization_list_item.go create mode 100644 services/dms-enterprise/struct_cata_log_list.go create mode 100644 services/dms-enterprise/struct_catalog.go create mode 100644 services/dms-enterprise/struct_database_in_get_data_lake_database.go create mode 100644 services/dms-enterprise/struct_database_in_list_data_lake_database.go create mode 100644 services/dms-enterprise/struct_database_list_in_list_data_lake_database.go create mode 100644 services/dms-enterprise/struct_databases.go create mode 100644 services/dms-enterprise/struct_databases_item.go rename services/dms-enterprise/{struct_instances.go => struct_instances_in_get_data_archive_order_detail.go} (85%) create mode 100644 services/dms-enterprise/struct_instances_in_list_authorized_instances_for_user.go create mode 100644 services/dms-enterprise/struct_partition_keys.go create mode 100644 services/dms-enterprise/struct_permission_detail.go create mode 100644 services/dms-enterprise/struct_policy.go create mode 100644 services/dms-enterprise/struct_policy_list.go create mode 100644 services/dms-enterprise/struct_policy_list_item.go create mode 100644 services/dms-enterprise/struct_tablebase_info.go create mode 100644 services/dms-enterprise/struct_tablebase_info_list.go create mode 100644 services/dms-enterprise/struct_users_in_list_authorized_users_for_database.go create mode 100644 services/dms-enterprise/struct_users_in_list_authorized_users_for_instance.go create mode 100644 services/dms-enterprise/struct_users_item.go create mode 100644 services/dms-enterprise/suspend_data_export_job.go create mode 100644 services/dms-enterprise/update_abac_policy.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 3ecc60d7d3..e5382e7e1e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-11-27 Version: v1.63.59 +- Generated 2018-11-01 for `dms-enterprise`. +- Support ListDataLakeCatalog, ListDataLakeDatabase, ListDataLakeTablebaseInfo, GetDataLakeCatalog, GetDataLakeDatabase, GetDataLakeTable API. + 2024-11-27 Version: v1.63.58 - Generated 2017-11-10 for `Ens`. undefined diff --git a/services/dms-enterprise/add_authority_template_items.go b/services/dms-enterprise/add_authority_template_items.go new file mode 100644 index 0000000000..b5b62109d9 --- /dev/null +++ b/services/dms-enterprise/add_authority_template_items.go @@ -0,0 +1,114 @@ +package dms_enterprise + +//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" +) + +// AddAuthorityTemplateItems invokes the dms_enterprise.AddAuthorityTemplateItems API synchronously +func (client *Client) AddAuthorityTemplateItems(request *AddAuthorityTemplateItemsRequest) (response *AddAuthorityTemplateItemsResponse, err error) { + response = CreateAddAuthorityTemplateItemsResponse() + err = client.DoAction(request, response) + return +} + +// AddAuthorityTemplateItemsWithChan invokes the dms_enterprise.AddAuthorityTemplateItems API asynchronously +func (client *Client) AddAuthorityTemplateItemsWithChan(request *AddAuthorityTemplateItemsRequest) (<-chan *AddAuthorityTemplateItemsResponse, <-chan error) { + responseChan := make(chan *AddAuthorityTemplateItemsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.AddAuthorityTemplateItems(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// AddAuthorityTemplateItemsWithCallback invokes the dms_enterprise.AddAuthorityTemplateItems API asynchronously +func (client *Client) AddAuthorityTemplateItemsWithCallback(request *AddAuthorityTemplateItemsRequest, callback func(response *AddAuthorityTemplateItemsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *AddAuthorityTemplateItemsResponse + var err error + defer close(result) + response, err = client.AddAuthorityTemplateItems(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// AddAuthorityTemplateItemsRequest is the request struct for api AddAuthorityTemplateItems +type AddAuthorityTemplateItemsRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + TemplateId requests.Integer `position:"Query" name:"TemplateId"` + Items *[]AddAuthorityTemplateItemsItems `position:"Query" name:"Items" type:"Json"` +} + +// AddAuthorityTemplateItemsItems is a repeated param struct in AddAuthorityTemplateItemsRequest +type AddAuthorityTemplateItemsItems struct { + InstanceId string `name:"InstanceId"` + DbId string `name:"DbId"` + PermissionTypes *[]string `name:"PermissionTypes" type:"Repeated"` + TableName string `name:"TableName"` + ResourceType string `name:"ResourceType"` +} + +// AddAuthorityTemplateItemsResponse is the response struct for api AddAuthorityTemplateItems +type AddAuthorityTemplateItemsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Data bool `json:"Data" xml:"Data"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateAddAuthorityTemplateItemsRequest creates a request to invoke AddAuthorityTemplateItems API +func CreateAddAuthorityTemplateItemsRequest() (request *AddAuthorityTemplateItemsRequest) { + request = &AddAuthorityTemplateItemsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "AddAuthorityTemplateItems", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateAddAuthorityTemplateItemsResponse creates a response to parse from AddAuthorityTemplateItems response +func CreateAddAuthorityTemplateItemsResponse() (response *AddAuthorityTemplateItemsResponse) { + response = &AddAuthorityTemplateItemsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/create_abac_authorization.go b/services/dms-enterprise/create_abac_authorization.go new file mode 100644 index 0000000000..78cb2f0582 --- /dev/null +++ b/services/dms-enterprise/create_abac_authorization.go @@ -0,0 +1,107 @@ +package dms_enterprise + +//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" +) + +// CreateAbacAuthorization invokes the dms_enterprise.CreateAbacAuthorization API synchronously +func (client *Client) CreateAbacAuthorization(request *CreateAbacAuthorizationRequest) (response *CreateAbacAuthorizationResponse, err error) { + response = CreateCreateAbacAuthorizationResponse() + err = client.DoAction(request, response) + return +} + +// CreateAbacAuthorizationWithChan invokes the dms_enterprise.CreateAbacAuthorization API asynchronously +func (client *Client) CreateAbacAuthorizationWithChan(request *CreateAbacAuthorizationRequest) (<-chan *CreateAbacAuthorizationResponse, <-chan error) { + responseChan := make(chan *CreateAbacAuthorizationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateAbacAuthorization(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateAbacAuthorizationWithCallback invokes the dms_enterprise.CreateAbacAuthorization API asynchronously +func (client *Client) CreateAbacAuthorizationWithCallback(request *CreateAbacAuthorizationRequest, callback func(response *CreateAbacAuthorizationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateAbacAuthorizationResponse + var err error + defer close(result) + response, err = client.CreateAbacAuthorization(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateAbacAuthorizationRequest is the request struct for api CreateAbacAuthorization +type CreateAbacAuthorizationRequest struct { + *requests.RpcRequest + RoleId requests.Integer `position:"Query" name:"RoleId"` + UserId requests.Integer `position:"Query" name:"UserId"` + Tid requests.Integer `position:"Query" name:"Tid"` + PolicyId requests.Integer `position:"Query" name:"PolicyId"` + IdentityType string `position:"Query" name:"IdentityType"` +} + +// CreateAbacAuthorizationResponse is the response struct for api CreateAbacAuthorization +type CreateAbacAuthorizationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Result string `json:"Result" xml:"Result"` +} + +// CreateCreateAbacAuthorizationRequest creates a request to invoke CreateAbacAuthorization API +func CreateCreateAbacAuthorizationRequest() (request *CreateAbacAuthorizationRequest) { + request = &CreateAbacAuthorizationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "CreateAbacAuthorization", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateAbacAuthorizationResponse creates a response to parse from CreateAbacAuthorization response +func CreateCreateAbacAuthorizationResponse() (response *CreateAbacAuthorizationResponse) { + response = &CreateAbacAuthorizationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/create_abac_policy.go b/services/dms-enterprise/create_abac_policy.go new file mode 100644 index 0000000000..c440a40ac3 --- /dev/null +++ b/services/dms-enterprise/create_abac_policy.go @@ -0,0 +1,106 @@ +package dms_enterprise + +//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" +) + +// CreateAbacPolicy invokes the dms_enterprise.CreateAbacPolicy API synchronously +func (client *Client) CreateAbacPolicy(request *CreateAbacPolicyRequest) (response *CreateAbacPolicyResponse, err error) { + response = CreateCreateAbacPolicyResponse() + err = client.DoAction(request, response) + return +} + +// CreateAbacPolicyWithChan invokes the dms_enterprise.CreateAbacPolicy API asynchronously +func (client *Client) CreateAbacPolicyWithChan(request *CreateAbacPolicyRequest) (<-chan *CreateAbacPolicyResponse, <-chan error) { + responseChan := make(chan *CreateAbacPolicyResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateAbacPolicy(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateAbacPolicyWithCallback invokes the dms_enterprise.CreateAbacPolicy API asynchronously +func (client *Client) CreateAbacPolicyWithCallback(request *CreateAbacPolicyRequest, callback func(response *CreateAbacPolicyResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateAbacPolicyResponse + var err error + defer close(result) + response, err = client.CreateAbacPolicy(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateAbacPolicyRequest is the request struct for api CreateAbacPolicy +type CreateAbacPolicyRequest struct { + *requests.RpcRequest + AbacPolicyContent string `position:"Query" name:"AbacPolicyContent"` + Tid requests.Integer `position:"Query" name:"Tid"` + AbacPolicyDesc string `position:"Query" name:"AbacPolicyDesc"` + AbacPolicyName string `position:"Query" name:"AbacPolicyName"` +} + +// CreateAbacPolicyResponse is the response struct for api CreateAbacPolicy +type CreateAbacPolicyResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + CreatePolicyResult int64 `json:"CreatePolicyResult" xml:"CreatePolicyResult"` +} + +// CreateCreateAbacPolicyRequest creates a request to invoke CreateAbacPolicy API +func CreateCreateAbacPolicyRequest() (request *CreateAbacPolicyRequest) { + request = &CreateAbacPolicyRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "CreateAbacPolicy", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateAbacPolicyResponse creates a response to parse from CreateAbacPolicy response +func CreateCreateAbacPolicyResponse() (response *CreateAbacPolicyResponse) { + response = &CreateAbacPolicyResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/delete_abac_authorization.go b/services/dms-enterprise/delete_abac_authorization.go new file mode 100644 index 0000000000..6c575fa010 --- /dev/null +++ b/services/dms-enterprise/delete_abac_authorization.go @@ -0,0 +1,105 @@ +package dms_enterprise + +//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" +) + +// DeleteAbacAuthorization invokes the dms_enterprise.DeleteAbacAuthorization API synchronously +func (client *Client) DeleteAbacAuthorization(request *DeleteAbacAuthorizationRequest) (response *DeleteAbacAuthorizationResponse, err error) { + response = CreateDeleteAbacAuthorizationResponse() + err = client.DoAction(request, response) + return +} + +// DeleteAbacAuthorizationWithChan invokes the dms_enterprise.DeleteAbacAuthorization API asynchronously +func (client *Client) DeleteAbacAuthorizationWithChan(request *DeleteAbacAuthorizationRequest) (<-chan *DeleteAbacAuthorizationResponse, <-chan error) { + responseChan := make(chan *DeleteAbacAuthorizationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteAbacAuthorization(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteAbacAuthorizationWithCallback invokes the dms_enterprise.DeleteAbacAuthorization API asynchronously +func (client *Client) DeleteAbacAuthorizationWithCallback(request *DeleteAbacAuthorizationRequest, callback func(response *DeleteAbacAuthorizationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteAbacAuthorizationResponse + var err error + defer close(result) + response, err = client.DeleteAbacAuthorization(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteAbacAuthorizationRequest is the request struct for api DeleteAbacAuthorization +type DeleteAbacAuthorizationRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + IdentityType string `position:"Query" name:"IdentityType"` + AuthorizationId requests.Integer `position:"Query" name:"AuthorizationId"` +} + +// DeleteAbacAuthorizationResponse is the response struct for api DeleteAbacAuthorization +type DeleteAbacAuthorizationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Result string `json:"Result" xml:"Result"` +} + +// CreateDeleteAbacAuthorizationRequest creates a request to invoke DeleteAbacAuthorization API +func CreateDeleteAbacAuthorizationRequest() (request *DeleteAbacAuthorizationRequest) { + request = &DeleteAbacAuthorizationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "DeleteAbacAuthorization", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteAbacAuthorizationResponse creates a response to parse from DeleteAbacAuthorization response +func CreateDeleteAbacAuthorizationResponse() (response *DeleteAbacAuthorizationResponse) { + response = &DeleteAbacAuthorizationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/delete_abac_policy.go b/services/dms-enterprise/delete_abac_policy.go new file mode 100644 index 0000000000..f7d2681f8e --- /dev/null +++ b/services/dms-enterprise/delete_abac_policy.go @@ -0,0 +1,104 @@ +package dms_enterprise + +//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" +) + +// DeleteAbacPolicy invokes the dms_enterprise.DeleteAbacPolicy API synchronously +func (client *Client) DeleteAbacPolicy(request *DeleteAbacPolicyRequest) (response *DeleteAbacPolicyResponse, err error) { + response = CreateDeleteAbacPolicyResponse() + err = client.DoAction(request, response) + return +} + +// DeleteAbacPolicyWithChan invokes the dms_enterprise.DeleteAbacPolicy API asynchronously +func (client *Client) DeleteAbacPolicyWithChan(request *DeleteAbacPolicyRequest) (<-chan *DeleteAbacPolicyResponse, <-chan error) { + responseChan := make(chan *DeleteAbacPolicyResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteAbacPolicy(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteAbacPolicyWithCallback invokes the dms_enterprise.DeleteAbacPolicy API asynchronously +func (client *Client) DeleteAbacPolicyWithCallback(request *DeleteAbacPolicyRequest, callback func(response *DeleteAbacPolicyResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteAbacPolicyResponse + var err error + defer close(result) + response, err = client.DeleteAbacPolicy(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteAbacPolicyRequest is the request struct for api DeleteAbacPolicy +type DeleteAbacPolicyRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + AbacPolicyId requests.Integer `position:"Query" name:"AbacPolicyId"` +} + +// DeleteAbacPolicyResponse is the response struct for api DeleteAbacPolicy +type DeleteAbacPolicyResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + DeletePolicyResult bool `json:"DeletePolicyResult" xml:"DeletePolicyResult"` +} + +// CreateDeleteAbacPolicyRequest creates a request to invoke DeleteAbacPolicy API +func CreateDeleteAbacPolicyRequest() (request *DeleteAbacPolicyRequest) { + request = &DeleteAbacPolicyRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "DeleteAbacPolicy", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteAbacPolicyResponse creates a response to parse from DeleteAbacPolicy response +func CreateDeleteAbacPolicyResponse() (response *DeleteAbacPolicyResponse) { + response = &DeleteAbacPolicyResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/get_abac_policy.go b/services/dms-enterprise/get_abac_policy.go new file mode 100644 index 0000000000..6f2d758d78 --- /dev/null +++ b/services/dms-enterprise/get_abac_policy.go @@ -0,0 +1,105 @@ +package dms_enterprise + +//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" +) + +// GetAbacPolicy invokes the dms_enterprise.GetAbacPolicy API synchronously +func (client *Client) GetAbacPolicy(request *GetAbacPolicyRequest) (response *GetAbacPolicyResponse, err error) { + response = CreateGetAbacPolicyResponse() + err = client.DoAction(request, response) + return +} + +// GetAbacPolicyWithChan invokes the dms_enterprise.GetAbacPolicy API asynchronously +func (client *Client) GetAbacPolicyWithChan(request *GetAbacPolicyRequest) (<-chan *GetAbacPolicyResponse, <-chan error) { + responseChan := make(chan *GetAbacPolicyResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetAbacPolicy(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetAbacPolicyWithCallback invokes the dms_enterprise.GetAbacPolicy API asynchronously +func (client *Client) GetAbacPolicyWithCallback(request *GetAbacPolicyRequest, callback func(response *GetAbacPolicyResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetAbacPolicyResponse + var err error + defer close(result) + response, err = client.GetAbacPolicy(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetAbacPolicyRequest is the request struct for api GetAbacPolicy +type GetAbacPolicyRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + AbacPolicyId requests.Integer `position:"Query" name:"AbacPolicyId"` + AbacPolicyName string `position:"Query" name:"AbacPolicyName"` +} + +// GetAbacPolicyResponse is the response struct for api GetAbacPolicy +type GetAbacPolicyResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` + Policy Policy `json:"Policy" xml:"Policy"` +} + +// CreateGetAbacPolicyRequest creates a request to invoke GetAbacPolicy API +func CreateGetAbacPolicyRequest() (request *GetAbacPolicyRequest) { + request = &GetAbacPolicyRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "GetAbacPolicy", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetAbacPolicyResponse creates a response to parse from GetAbacPolicy response +func CreateGetAbacPolicyResponse() (response *GetAbacPolicyResponse) { + response = &GetAbacPolicyResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/get_data_lake_catalog.go b/services/dms-enterprise/get_data_lake_catalog.go new file mode 100644 index 0000000000..e3cbf67329 --- /dev/null +++ b/services/dms-enterprise/get_data_lake_catalog.go @@ -0,0 +1,105 @@ +package dms_enterprise + +//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" +) + +// GetDataLakeCatalog invokes the dms_enterprise.GetDataLakeCatalog API synchronously +func (client *Client) GetDataLakeCatalog(request *GetDataLakeCatalogRequest) (response *GetDataLakeCatalogResponse, err error) { + response = CreateGetDataLakeCatalogResponse() + err = client.DoAction(request, response) + return +} + +// GetDataLakeCatalogWithChan invokes the dms_enterprise.GetDataLakeCatalog API asynchronously +func (client *Client) GetDataLakeCatalogWithChan(request *GetDataLakeCatalogRequest) (<-chan *GetDataLakeCatalogResponse, <-chan error) { + responseChan := make(chan *GetDataLakeCatalogResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetDataLakeCatalog(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetDataLakeCatalogWithCallback invokes the dms_enterprise.GetDataLakeCatalog API asynchronously +func (client *Client) GetDataLakeCatalogWithCallback(request *GetDataLakeCatalogRequest, callback func(response *GetDataLakeCatalogResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetDataLakeCatalogResponse + var err error + defer close(result) + response, err = client.GetDataLakeCatalog(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetDataLakeCatalogRequest is the request struct for api GetDataLakeCatalog +type GetDataLakeCatalogRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + CatalogName string `position:"Query" name:"CatalogName"` + DataRegion string `position:"Query" name:"DataRegion"` +} + +// GetDataLakeCatalogResponse is the response struct for api GetDataLakeCatalog +type GetDataLakeCatalogResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Catalog Catalog `json:"Catalog" xml:"Catalog"` +} + +// CreateGetDataLakeCatalogRequest creates a request to invoke GetDataLakeCatalog API +func CreateGetDataLakeCatalogRequest() (request *GetDataLakeCatalogRequest) { + request = &GetDataLakeCatalogRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "GetDataLakeCatalog", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetDataLakeCatalogResponse creates a response to parse from GetDataLakeCatalog response +func CreateGetDataLakeCatalogResponse() (response *GetDataLakeCatalogResponse) { + response = &GetDataLakeCatalogResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/get_data_lake_database.go b/services/dms-enterprise/get_data_lake_database.go new file mode 100644 index 0000000000..043c4e9345 --- /dev/null +++ b/services/dms-enterprise/get_data_lake_database.go @@ -0,0 +1,106 @@ +package dms_enterprise + +//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" +) + +// GetDataLakeDatabase invokes the dms_enterprise.GetDataLakeDatabase API synchronously +func (client *Client) GetDataLakeDatabase(request *GetDataLakeDatabaseRequest) (response *GetDataLakeDatabaseResponse, err error) { + response = CreateGetDataLakeDatabaseResponse() + err = client.DoAction(request, response) + return +} + +// GetDataLakeDatabaseWithChan invokes the dms_enterprise.GetDataLakeDatabase API asynchronously +func (client *Client) GetDataLakeDatabaseWithChan(request *GetDataLakeDatabaseRequest) (<-chan *GetDataLakeDatabaseResponse, <-chan error) { + responseChan := make(chan *GetDataLakeDatabaseResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetDataLakeDatabase(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetDataLakeDatabaseWithCallback invokes the dms_enterprise.GetDataLakeDatabase API asynchronously +func (client *Client) GetDataLakeDatabaseWithCallback(request *GetDataLakeDatabaseRequest, callback func(response *GetDataLakeDatabaseResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetDataLakeDatabaseResponse + var err error + defer close(result) + response, err = client.GetDataLakeDatabase(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetDataLakeDatabaseRequest is the request struct for api GetDataLakeDatabase +type GetDataLakeDatabaseRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + CatalogName string `position:"Query" name:"CatalogName"` + DataRegion string `position:"Query" name:"DataRegion"` + Name string `position:"Query" name:"Name"` +} + +// GetDataLakeDatabaseResponse is the response struct for api GetDataLakeDatabase +type GetDataLakeDatabaseResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Database DatabaseInGetDataLakeDatabase `json:"Database" xml:"Database"` +} + +// CreateGetDataLakeDatabaseRequest creates a request to invoke GetDataLakeDatabase API +func CreateGetDataLakeDatabaseRequest() (request *GetDataLakeDatabaseRequest) { + request = &GetDataLakeDatabaseRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "GetDataLakeDatabase", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetDataLakeDatabaseResponse creates a response to parse from GetDataLakeDatabase response +func CreateGetDataLakeDatabaseResponse() (response *GetDataLakeDatabaseResponse) { + response = &GetDataLakeDatabaseResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/get_data_lake_table.go b/services/dms-enterprise/get_data_lake_table.go new file mode 100644 index 0000000000..b0627a49cf --- /dev/null +++ b/services/dms-enterprise/get_data_lake_table.go @@ -0,0 +1,102 @@ +package dms_enterprise + +//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" +) + +// GetDataLakeTable invokes the dms_enterprise.GetDataLakeTable API synchronously +func (client *Client) GetDataLakeTable(request *GetDataLakeTableRequest) (response *GetDataLakeTableResponse, err error) { + response = CreateGetDataLakeTableResponse() + err = client.DoAction(request, response) + return +} + +// GetDataLakeTableWithChan invokes the dms_enterprise.GetDataLakeTable API asynchronously +func (client *Client) GetDataLakeTableWithChan(request *GetDataLakeTableRequest) (<-chan *GetDataLakeTableResponse, <-chan error) { + responseChan := make(chan *GetDataLakeTableResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetDataLakeTable(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetDataLakeTableWithCallback invokes the dms_enterprise.GetDataLakeTable API asynchronously +func (client *Client) GetDataLakeTableWithCallback(request *GetDataLakeTableRequest, callback func(response *GetDataLakeTableResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetDataLakeTableResponse + var err error + defer close(result) + response, err = client.GetDataLakeTable(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetDataLakeTableRequest is the request struct for api GetDataLakeTable +type GetDataLakeTableRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + CatalogName string `position:"Query" name:"CatalogName"` + DbName string `position:"Query" name:"DbName"` + DataRegion string `position:"Query" name:"DataRegion"` + Name string `position:"Query" name:"Name"` +} + +// GetDataLakeTableResponse is the response struct for api GetDataLakeTable +type GetDataLakeTableResponse struct { + *responses.BaseResponse +} + +// CreateGetDataLakeTableRequest creates a request to invoke GetDataLakeTable API +func CreateGetDataLakeTableRequest() (request *GetDataLakeTableRequest) { + request = &GetDataLakeTableRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "GetDataLakeTable", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetDataLakeTableResponse creates a response to parse from GetDataLakeTable response +func CreateGetDataLakeTableResponse() (response *GetDataLakeTableResponse) { + response = &GetDataLakeTableResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_abac_authorizations.go b/services/dms-enterprise/list_abac_authorizations.go new file mode 100644 index 0000000000..82383b0272 --- /dev/null +++ b/services/dms-enterprise/list_abac_authorizations.go @@ -0,0 +1,108 @@ +package dms_enterprise + +//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" +) + +// ListAbacAuthorizations invokes the dms_enterprise.ListAbacAuthorizations API synchronously +func (client *Client) ListAbacAuthorizations(request *ListAbacAuthorizationsRequest) (response *ListAbacAuthorizationsResponse, err error) { + response = CreateListAbacAuthorizationsResponse() + err = client.DoAction(request, response) + return +} + +// ListAbacAuthorizationsWithChan invokes the dms_enterprise.ListAbacAuthorizations API asynchronously +func (client *Client) ListAbacAuthorizationsWithChan(request *ListAbacAuthorizationsRequest) (<-chan *ListAbacAuthorizationsResponse, <-chan error) { + responseChan := make(chan *ListAbacAuthorizationsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAbacAuthorizations(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAbacAuthorizationsWithCallback invokes the dms_enterprise.ListAbacAuthorizations API asynchronously +func (client *Client) ListAbacAuthorizationsWithCallback(request *ListAbacAuthorizationsRequest, callback func(response *ListAbacAuthorizationsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAbacAuthorizationsResponse + var err error + defer close(result) + response, err = client.ListAbacAuthorizations(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAbacAuthorizationsRequest is the request struct for api ListAbacAuthorizations +type ListAbacAuthorizationsRequest struct { + *requests.RpcRequest + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + Tid requests.Integer `position:"Query" name:"Tid"` + PolicyId string `position:"Query" name:"PolicyId"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + PolicySource string `position:"Query" name:"PolicySource"` +} + +// ListAbacAuthorizationsResponse is the response struct for api ListAbacAuthorizations +type ListAbacAuthorizationsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + AuthorizationList []AuthorizationListItem `json:"AuthorizationList" xml:"AuthorizationList"` +} + +// CreateListAbacAuthorizationsRequest creates a request to invoke ListAbacAuthorizations API +func CreateListAbacAuthorizationsRequest() (request *ListAbacAuthorizationsRequest) { + request = &ListAbacAuthorizationsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListAbacAuthorizations", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAbacAuthorizationsResponse creates a response to parse from ListAbacAuthorizations response +func CreateListAbacAuthorizationsResponse() (response *ListAbacAuthorizationsResponse) { + response = &ListAbacAuthorizationsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_abac_policies.go b/services/dms-enterprise/list_abac_policies.go new file mode 100644 index 0000000000..80d4065285 --- /dev/null +++ b/services/dms-enterprise/list_abac_policies.go @@ -0,0 +1,108 @@ +package dms_enterprise + +//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" +) + +// ListAbacPolicies invokes the dms_enterprise.ListAbacPolicies API synchronously +func (client *Client) ListAbacPolicies(request *ListAbacPoliciesRequest) (response *ListAbacPoliciesResponse, err error) { + response = CreateListAbacPoliciesResponse() + err = client.DoAction(request, response) + return +} + +// ListAbacPoliciesWithChan invokes the dms_enterprise.ListAbacPolicies API asynchronously +func (client *Client) ListAbacPoliciesWithChan(request *ListAbacPoliciesRequest) (<-chan *ListAbacPoliciesResponse, <-chan error) { + responseChan := make(chan *ListAbacPoliciesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAbacPolicies(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAbacPoliciesWithCallback invokes the dms_enterprise.ListAbacPolicies API asynchronously +func (client *Client) ListAbacPoliciesWithCallback(request *ListAbacPoliciesRequest, callback func(response *ListAbacPoliciesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAbacPoliciesResponse + var err error + defer close(result) + response, err = client.ListAbacPolicies(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAbacPoliciesRequest is the request struct for api ListAbacPolicies +type ListAbacPoliciesRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + Tid requests.Integer `position:"Query" name:"Tid"` + PageSize requests.Integer `position:"Query" name:"PageSize"` +} + +// ListAbacPoliciesResponse is the response struct for api ListAbacPolicies +type ListAbacPoliciesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` + Tid int64 `json:"Tid" xml:"Tid"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + PolicyList []PolicyListItem `json:"PolicyList" xml:"PolicyList"` +} + +// CreateListAbacPoliciesRequest creates a request to invoke ListAbacPolicies API +func CreateListAbacPoliciesRequest() (request *ListAbacPoliciesRequest) { + request = &ListAbacPoliciesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListAbacPolicies", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAbacPoliciesResponse creates a response to parse from ListAbacPolicies response +func CreateListAbacPoliciesResponse() (response *ListAbacPoliciesResponse) { + response = &ListAbacPoliciesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_authorized_databases_for_user.go b/services/dms-enterprise/list_authorized_databases_for_user.go new file mode 100644 index 0000000000..0e4249932a --- /dev/null +++ b/services/dms-enterprise/list_authorized_databases_for_user.go @@ -0,0 +1,107 @@ +package dms_enterprise + +//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" +) + +// ListAuthorizedDatabasesForUser invokes the dms_enterprise.ListAuthorizedDatabasesForUser API synchronously +func (client *Client) ListAuthorizedDatabasesForUser(request *ListAuthorizedDatabasesForUserRequest) (response *ListAuthorizedDatabasesForUserResponse, err error) { + response = CreateListAuthorizedDatabasesForUserResponse() + err = client.DoAction(request, response) + return +} + +// ListAuthorizedDatabasesForUserWithChan invokes the dms_enterprise.ListAuthorizedDatabasesForUser API asynchronously +func (client *Client) ListAuthorizedDatabasesForUserWithChan(request *ListAuthorizedDatabasesForUserRequest) (<-chan *ListAuthorizedDatabasesForUserResponse, <-chan error) { + responseChan := make(chan *ListAuthorizedDatabasesForUserResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAuthorizedDatabasesForUser(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAuthorizedDatabasesForUserWithCallback invokes the dms_enterprise.ListAuthorizedDatabasesForUser API asynchronously +func (client *Client) ListAuthorizedDatabasesForUserWithCallback(request *ListAuthorizedDatabasesForUserRequest, callback func(response *ListAuthorizedDatabasesForUserResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAuthorizedDatabasesForUserResponse + var err error + defer close(result) + response, err = client.ListAuthorizedDatabasesForUser(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAuthorizedDatabasesForUserRequest is the request struct for api ListAuthorizedDatabasesForUser +type ListAuthorizedDatabasesForUserRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + UserId string `position:"Query" name:"UserId"` + PageNumber string `position:"Query" name:"PageNumber"` + Tid requests.Integer `position:"Query" name:"Tid"` + EnvType string `position:"Query" name:"EnvType"` + PageSize string `position:"Query" name:"PageSize"` + DbType string `position:"Query" name:"DbType"` + Logic requests.Boolean `position:"Query" name:"Logic"` +} + +// ListAuthorizedDatabasesForUserResponse is the response struct for api ListAuthorizedDatabasesForUser +type ListAuthorizedDatabasesForUserResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Databases []DatabasesItem `json:"Databases" xml:"Databases"` +} + +// CreateListAuthorizedDatabasesForUserRequest creates a request to invoke ListAuthorizedDatabasesForUser API +func CreateListAuthorizedDatabasesForUserRequest() (request *ListAuthorizedDatabasesForUserRequest) { + request = &ListAuthorizedDatabasesForUserRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListAuthorizedDatabasesForUser", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAuthorizedDatabasesForUserResponse creates a response to parse from ListAuthorizedDatabasesForUser response +func CreateListAuthorizedDatabasesForUserResponse() (response *ListAuthorizedDatabasesForUserResponse) { + response = &ListAuthorizedDatabasesForUserResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_authorized_instances_for_user.go b/services/dms-enterprise/list_authorized_instances_for_user.go new file mode 100644 index 0000000000..243f58efc8 --- /dev/null +++ b/services/dms-enterprise/list_authorized_instances_for_user.go @@ -0,0 +1,106 @@ +package dms_enterprise + +//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" +) + +// ListAuthorizedInstancesForUser invokes the dms_enterprise.ListAuthorizedInstancesForUser API synchronously +func (client *Client) ListAuthorizedInstancesForUser(request *ListAuthorizedInstancesForUserRequest) (response *ListAuthorizedInstancesForUserResponse, err error) { + response = CreateListAuthorizedInstancesForUserResponse() + err = client.DoAction(request, response) + return +} + +// ListAuthorizedInstancesForUserWithChan invokes the dms_enterprise.ListAuthorizedInstancesForUser API asynchronously +func (client *Client) ListAuthorizedInstancesForUserWithChan(request *ListAuthorizedInstancesForUserRequest) (<-chan *ListAuthorizedInstancesForUserResponse, <-chan error) { + responseChan := make(chan *ListAuthorizedInstancesForUserResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAuthorizedInstancesForUser(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAuthorizedInstancesForUserWithCallback invokes the dms_enterprise.ListAuthorizedInstancesForUser API asynchronously +func (client *Client) ListAuthorizedInstancesForUserWithCallback(request *ListAuthorizedInstancesForUserRequest, callback func(response *ListAuthorizedInstancesForUserResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAuthorizedInstancesForUserResponse + var err error + defer close(result) + response, err = client.ListAuthorizedInstancesForUser(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAuthorizedInstancesForUserRequest is the request struct for api ListAuthorizedInstancesForUser +type ListAuthorizedInstancesForUserRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + UserId string `position:"Query" name:"UserId"` + PageNumber string `position:"Query" name:"PageNumber"` + Tid requests.Integer `position:"Query" name:"Tid"` + EnvType string `position:"Query" name:"EnvType"` + PageSize string `position:"Query" name:"PageSize"` + DbType string `position:"Query" name:"DbType"` +} + +// ListAuthorizedInstancesForUserResponse is the response struct for api ListAuthorizedInstancesForUser +type ListAuthorizedInstancesForUserResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Instances []InstancesItem `json:"Instances" xml:"Instances"` +} + +// CreateListAuthorizedInstancesForUserRequest creates a request to invoke ListAuthorizedInstancesForUser API +func CreateListAuthorizedInstancesForUserRequest() (request *ListAuthorizedInstancesForUserRequest) { + request = &ListAuthorizedInstancesForUserRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListAuthorizedInstancesForUser", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAuthorizedInstancesForUserResponse creates a response to parse from ListAuthorizedInstancesForUser response +func CreateListAuthorizedInstancesForUserResponse() (response *ListAuthorizedInstancesForUserResponse) { + response = &ListAuthorizedInstancesForUserResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_authorized_users_for_database.go b/services/dms-enterprise/list_authorized_users_for_database.go new file mode 100644 index 0000000000..7894112a51 --- /dev/null +++ b/services/dms-enterprise/list_authorized_users_for_database.go @@ -0,0 +1,105 @@ +package dms_enterprise + +//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" +) + +// ListAuthorizedUsersForDatabase invokes the dms_enterprise.ListAuthorizedUsersForDatabase API synchronously +func (client *Client) ListAuthorizedUsersForDatabase(request *ListAuthorizedUsersForDatabaseRequest) (response *ListAuthorizedUsersForDatabaseResponse, err error) { + response = CreateListAuthorizedUsersForDatabaseResponse() + err = client.DoAction(request, response) + return +} + +// ListAuthorizedUsersForDatabaseWithChan invokes the dms_enterprise.ListAuthorizedUsersForDatabase API asynchronously +func (client *Client) ListAuthorizedUsersForDatabaseWithChan(request *ListAuthorizedUsersForDatabaseRequest) (<-chan *ListAuthorizedUsersForDatabaseResponse, <-chan error) { + responseChan := make(chan *ListAuthorizedUsersForDatabaseResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAuthorizedUsersForDatabase(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAuthorizedUsersForDatabaseWithCallback invokes the dms_enterprise.ListAuthorizedUsersForDatabase API asynchronously +func (client *Client) ListAuthorizedUsersForDatabaseWithCallback(request *ListAuthorizedUsersForDatabaseRequest, callback func(response *ListAuthorizedUsersForDatabaseResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAuthorizedUsersForDatabaseResponse + var err error + defer close(result) + response, err = client.ListAuthorizedUsersForDatabase(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAuthorizedUsersForDatabaseRequest is the request struct for api ListAuthorizedUsersForDatabase +type ListAuthorizedUsersForDatabaseRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + PageNumber string `position:"Query" name:"PageNumber"` + Tid requests.Integer `position:"Query" name:"Tid"` + PageSize string `position:"Query" name:"PageSize"` + DbId string `position:"Query" name:"DbId"` + Logic requests.Boolean `position:"Query" name:"Logic"` +} + +// ListAuthorizedUsersForDatabaseResponse is the response struct for api ListAuthorizedUsersForDatabase +type ListAuthorizedUsersForDatabaseResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Users []UsersItem `json:"Users" xml:"Users"` +} + +// CreateListAuthorizedUsersForDatabaseRequest creates a request to invoke ListAuthorizedUsersForDatabase API +func CreateListAuthorizedUsersForDatabaseRequest() (request *ListAuthorizedUsersForDatabaseRequest) { + request = &ListAuthorizedUsersForDatabaseRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListAuthorizedUsersForDatabase", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAuthorizedUsersForDatabaseResponse creates a response to parse from ListAuthorizedUsersForDatabase response +func CreateListAuthorizedUsersForDatabaseResponse() (response *ListAuthorizedUsersForDatabaseResponse) { + response = &ListAuthorizedUsersForDatabaseResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_authorized_users_for_instance.go b/services/dms-enterprise/list_authorized_users_for_instance.go new file mode 100644 index 0000000000..0aed365b0e --- /dev/null +++ b/services/dms-enterprise/list_authorized_users_for_instance.go @@ -0,0 +1,104 @@ +package dms_enterprise + +//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" +) + +// ListAuthorizedUsersForInstance invokes the dms_enterprise.ListAuthorizedUsersForInstance API synchronously +func (client *Client) ListAuthorizedUsersForInstance(request *ListAuthorizedUsersForInstanceRequest) (response *ListAuthorizedUsersForInstanceResponse, err error) { + response = CreateListAuthorizedUsersForInstanceResponse() + err = client.DoAction(request, response) + return +} + +// ListAuthorizedUsersForInstanceWithChan invokes the dms_enterprise.ListAuthorizedUsersForInstance API asynchronously +func (client *Client) ListAuthorizedUsersForInstanceWithChan(request *ListAuthorizedUsersForInstanceRequest) (<-chan *ListAuthorizedUsersForInstanceResponse, <-chan error) { + responseChan := make(chan *ListAuthorizedUsersForInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAuthorizedUsersForInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAuthorizedUsersForInstanceWithCallback invokes the dms_enterprise.ListAuthorizedUsersForInstance API asynchronously +func (client *Client) ListAuthorizedUsersForInstanceWithCallback(request *ListAuthorizedUsersForInstanceRequest, callback func(response *ListAuthorizedUsersForInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAuthorizedUsersForInstanceResponse + var err error + defer close(result) + response, err = client.ListAuthorizedUsersForInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAuthorizedUsersForInstanceRequest is the request struct for api ListAuthorizedUsersForInstance +type ListAuthorizedUsersForInstanceRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + PageNumber string `position:"Query" name:"PageNumber"` + Tid requests.Integer `position:"Query" name:"Tid"` + PageSize string `position:"Query" name:"PageSize"` + InstanceId string `position:"Query" name:"InstanceId"` +} + +// ListAuthorizedUsersForInstanceResponse is the response struct for api ListAuthorizedUsersForInstance +type ListAuthorizedUsersForInstanceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Users []UsersItem `json:"Users" xml:"Users"` +} + +// CreateListAuthorizedUsersForInstanceRequest creates a request to invoke ListAuthorizedUsersForInstance API +func CreateListAuthorizedUsersForInstanceRequest() (request *ListAuthorizedUsersForInstanceRequest) { + request = &ListAuthorizedUsersForInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListAuthorizedUsersForInstance", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAuthorizedUsersForInstanceResponse creates a response to parse from ListAuthorizedUsersForInstance response +func CreateListAuthorizedUsersForInstanceResponse() (response *ListAuthorizedUsersForInstanceResponse) { + response = &ListAuthorizedUsersForInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_data_lake_catalog.go b/services/dms-enterprise/list_data_lake_catalog.go new file mode 100644 index 0000000000..6ca256f951 --- /dev/null +++ b/services/dms-enterprise/list_data_lake_catalog.go @@ -0,0 +1,105 @@ +package dms_enterprise + +//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" +) + +// ListDataLakeCatalog invokes the dms_enterprise.ListDataLakeCatalog API synchronously +func (client *Client) ListDataLakeCatalog(request *ListDataLakeCatalogRequest) (response *ListDataLakeCatalogResponse, err error) { + response = CreateListDataLakeCatalogResponse() + err = client.DoAction(request, response) + return +} + +// ListDataLakeCatalogWithChan invokes the dms_enterprise.ListDataLakeCatalog API asynchronously +func (client *Client) ListDataLakeCatalogWithChan(request *ListDataLakeCatalogRequest) (<-chan *ListDataLakeCatalogResponse, <-chan error) { + responseChan := make(chan *ListDataLakeCatalogResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListDataLakeCatalog(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListDataLakeCatalogWithCallback invokes the dms_enterprise.ListDataLakeCatalog API asynchronously +func (client *Client) ListDataLakeCatalogWithCallback(request *ListDataLakeCatalogRequest, callback func(response *ListDataLakeCatalogResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListDataLakeCatalogResponse + var err error + defer close(result) + response, err = client.ListDataLakeCatalog(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListDataLakeCatalogRequest is the request struct for api ListDataLakeCatalog +type ListDataLakeCatalogRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + Tid requests.Integer `position:"Query" name:"Tid"` + DataRegion string `position:"Query" name:"DataRegion"` +} + +// ListDataLakeCatalogResponse is the response struct for api ListDataLakeCatalog +type ListDataLakeCatalogResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + CataLogList CataLogList `json:"CataLogList" xml:"CataLogList"` +} + +// CreateListDataLakeCatalogRequest creates a request to invoke ListDataLakeCatalog API +func CreateListDataLakeCatalogRequest() (request *ListDataLakeCatalogRequest) { + request = &ListDataLakeCatalogRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListDataLakeCatalog", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListDataLakeCatalogResponse creates a response to parse from ListDataLakeCatalog response +func CreateListDataLakeCatalogResponse() (response *ListDataLakeCatalogResponse) { + response = &ListDataLakeCatalogResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_data_lake_database.go b/services/dms-enterprise/list_data_lake_database.go new file mode 100644 index 0000000000..88d12e88c8 --- /dev/null +++ b/services/dms-enterprise/list_data_lake_database.go @@ -0,0 +1,106 @@ +package dms_enterprise + +//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" +) + +// ListDataLakeDatabase invokes the dms_enterprise.ListDataLakeDatabase API synchronously +func (client *Client) ListDataLakeDatabase(request *ListDataLakeDatabaseRequest) (response *ListDataLakeDatabaseResponse, err error) { + response = CreateListDataLakeDatabaseResponse() + err = client.DoAction(request, response) + return +} + +// ListDataLakeDatabaseWithChan invokes the dms_enterprise.ListDataLakeDatabase API asynchronously +func (client *Client) ListDataLakeDatabaseWithChan(request *ListDataLakeDatabaseRequest) (<-chan *ListDataLakeDatabaseResponse, <-chan error) { + responseChan := make(chan *ListDataLakeDatabaseResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListDataLakeDatabase(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListDataLakeDatabaseWithCallback invokes the dms_enterprise.ListDataLakeDatabase API asynchronously +func (client *Client) ListDataLakeDatabaseWithCallback(request *ListDataLakeDatabaseRequest, callback func(response *ListDataLakeDatabaseResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListDataLakeDatabaseResponse + var err error + defer close(result) + response, err = client.ListDataLakeDatabase(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListDataLakeDatabaseRequest is the request struct for api ListDataLakeDatabase +type ListDataLakeDatabaseRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + Tid requests.Integer `position:"Query" name:"Tid"` + CatalogName string `position:"Query" name:"CatalogName"` + DataRegion string `position:"Query" name:"DataRegion"` +} + +// ListDataLakeDatabaseResponse is the response struct for api ListDataLakeDatabase +type ListDataLakeDatabaseResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + DatabaseList DatabaseListInListDataLakeDatabase `json:"DatabaseList" xml:"DatabaseList"` +} + +// CreateListDataLakeDatabaseRequest creates a request to invoke ListDataLakeDatabase API +func CreateListDataLakeDatabaseRequest() (request *ListDataLakeDatabaseRequest) { + request = &ListDataLakeDatabaseRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListDataLakeDatabase", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListDataLakeDatabaseResponse creates a response to parse from ListDataLakeDatabase response +func CreateListDataLakeDatabaseResponse() (response *ListDataLakeDatabaseResponse) { + response = &ListDataLakeDatabaseResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/list_data_lake_tablebase_info.go b/services/dms-enterprise/list_data_lake_tablebase_info.go new file mode 100644 index 0000000000..2e864d1b22 --- /dev/null +++ b/services/dms-enterprise/list_data_lake_tablebase_info.go @@ -0,0 +1,110 @@ +package dms_enterprise + +//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" +) + +// ListDataLakeTablebaseInfo invokes the dms_enterprise.ListDataLakeTablebaseInfo API synchronously +func (client *Client) ListDataLakeTablebaseInfo(request *ListDataLakeTablebaseInfoRequest) (response *ListDataLakeTablebaseInfoResponse, err error) { + response = CreateListDataLakeTablebaseInfoResponse() + err = client.DoAction(request, response) + return +} + +// ListDataLakeTablebaseInfoWithChan invokes the dms_enterprise.ListDataLakeTablebaseInfo API asynchronously +func (client *Client) ListDataLakeTablebaseInfoWithChan(request *ListDataLakeTablebaseInfoRequest) (<-chan *ListDataLakeTablebaseInfoResponse, <-chan error) { + responseChan := make(chan *ListDataLakeTablebaseInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListDataLakeTablebaseInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListDataLakeTablebaseInfoWithCallback invokes the dms_enterprise.ListDataLakeTablebaseInfo API asynchronously +func (client *Client) ListDataLakeTablebaseInfoWithCallback(request *ListDataLakeTablebaseInfoRequest, callback func(response *ListDataLakeTablebaseInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListDataLakeTablebaseInfoResponse + var err error + defer close(result) + response, err = client.ListDataLakeTablebaseInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListDataLakeTablebaseInfoRequest is the request struct for api ListDataLakeTablebaseInfo +type ListDataLakeTablebaseInfoRequest struct { + *requests.RpcRequest + SearchKey string `position:"Query" name:"SearchKey"` + Tid requests.Integer `position:"Query" name:"Tid"` + CatalogName string `position:"Query" name:"CatalogName"` + Rows requests.Integer `position:"Query" name:"Rows"` + DbName string `position:"Query" name:"DbName"` + DataRegion string `position:"Query" name:"DataRegion"` + Page requests.Integer `position:"Query" name:"Page"` +} + +// ListDataLakeTablebaseInfoResponse is the response struct for api ListDataLakeTablebaseInfo +type ListDataLakeTablebaseInfoResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + TotalCount string `json:"TotalCount" xml:"TotalCount"` + TablebaseInfoList TablebaseInfoList `json:"TablebaseInfoList" xml:"TablebaseInfoList"` +} + +// CreateListDataLakeTablebaseInfoRequest creates a request to invoke ListDataLakeTablebaseInfo API +func CreateListDataLakeTablebaseInfoRequest() (request *ListDataLakeTablebaseInfoRequest) { + request = &ListDataLakeTablebaseInfoRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "ListDataLakeTablebaseInfo", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateListDataLakeTablebaseInfoResponse creates a response to parse from ListDataLakeTablebaseInfo response +func CreateListDataLakeTablebaseInfoResponse() (response *ListDataLakeTablebaseInfoResponse) { + response = &ListDataLakeTablebaseInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/pause_data_export_job.go b/services/dms-enterprise/pause_data_export_job.go new file mode 100644 index 0000000000..9421a49c19 --- /dev/null +++ b/services/dms-enterprise/pause_data_export_job.go @@ -0,0 +1,104 @@ +package dms_enterprise + +//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" +) + +// PauseDataExportJob invokes the dms_enterprise.PauseDataExportJob API synchronously +func (client *Client) PauseDataExportJob(request *PauseDataExportJobRequest) (response *PauseDataExportJobResponse, err error) { + response = CreatePauseDataExportJobResponse() + err = client.DoAction(request, response) + return +} + +// PauseDataExportJobWithChan invokes the dms_enterprise.PauseDataExportJob API asynchronously +func (client *Client) PauseDataExportJobWithChan(request *PauseDataExportJobRequest) (<-chan *PauseDataExportJobResponse, <-chan error) { + responseChan := make(chan *PauseDataExportJobResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.PauseDataExportJob(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// PauseDataExportJobWithCallback invokes the dms_enterprise.PauseDataExportJob API asynchronously +func (client *Client) PauseDataExportJobWithCallback(request *PauseDataExportJobRequest, callback func(response *PauseDataExportJobResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *PauseDataExportJobResponse + var err error + defer close(result) + response, err = client.PauseDataExportJob(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// PauseDataExportJobRequest is the request struct for api PauseDataExportJob +type PauseDataExportJobRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + JobId requests.Integer `position:"Query" name:"JobId"` + OrderId requests.Integer `position:"Query" name:"OrderId"` +} + +// PauseDataExportJobResponse is the response struct for api PauseDataExportJob +type PauseDataExportJobResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` +} + +// CreatePauseDataExportJobRequest creates a request to invoke PauseDataExportJob API +func CreatePauseDataExportJobRequest() (request *PauseDataExportJobRequest) { + request = &PauseDataExportJobRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "PauseDataExportJob", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreatePauseDataExportJobResponse creates a response to parse from PauseDataExportJob response +func CreatePauseDataExportJobResponse() (response *PauseDataExportJobResponse) { + response = &PauseDataExportJobResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/remove_data_export_job.go b/services/dms-enterprise/remove_data_export_job.go new file mode 100644 index 0000000000..e38004d882 --- /dev/null +++ b/services/dms-enterprise/remove_data_export_job.go @@ -0,0 +1,104 @@ +package dms_enterprise + +//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" +) + +// RemoveDataExportJob invokes the dms_enterprise.RemoveDataExportJob API synchronously +func (client *Client) RemoveDataExportJob(request *RemoveDataExportJobRequest) (response *RemoveDataExportJobResponse, err error) { + response = CreateRemoveDataExportJobResponse() + err = client.DoAction(request, response) + return +} + +// RemoveDataExportJobWithChan invokes the dms_enterprise.RemoveDataExportJob API asynchronously +func (client *Client) RemoveDataExportJobWithChan(request *RemoveDataExportJobRequest) (<-chan *RemoveDataExportJobResponse, <-chan error) { + responseChan := make(chan *RemoveDataExportJobResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RemoveDataExportJob(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RemoveDataExportJobWithCallback invokes the dms_enterprise.RemoveDataExportJob API asynchronously +func (client *Client) RemoveDataExportJobWithCallback(request *RemoveDataExportJobRequest, callback func(response *RemoveDataExportJobResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RemoveDataExportJobResponse + var err error + defer close(result) + response, err = client.RemoveDataExportJob(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RemoveDataExportJobRequest is the request struct for api RemoveDataExportJob +type RemoveDataExportJobRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + JobId requests.Integer `position:"Query" name:"JobId"` + OrderId requests.Integer `position:"Query" name:"OrderId"` +} + +// RemoveDataExportJobResponse is the response struct for api RemoveDataExportJob +type RemoveDataExportJobResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateRemoveDataExportJobRequest creates a request to invoke RemoveDataExportJob API +func CreateRemoveDataExportJobRequest() (request *RemoveDataExportJobRequest) { + request = &RemoveDataExportJobRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "RemoveDataExportJob", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateRemoveDataExportJobResponse creates a response to parse from RemoveDataExportJob response +func CreateRemoveDataExportJobResponse() (response *RemoveDataExportJobResponse) { + response = &RemoveDataExportJobResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/restart_data_export_job.go b/services/dms-enterprise/restart_data_export_job.go new file mode 100644 index 0000000000..7600d76106 --- /dev/null +++ b/services/dms-enterprise/restart_data_export_job.go @@ -0,0 +1,104 @@ +package dms_enterprise + +//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" +) + +// RestartDataExportJob invokes the dms_enterprise.RestartDataExportJob API synchronously +func (client *Client) RestartDataExportJob(request *RestartDataExportJobRequest) (response *RestartDataExportJobResponse, err error) { + response = CreateRestartDataExportJobResponse() + err = client.DoAction(request, response) + return +} + +// RestartDataExportJobWithChan invokes the dms_enterprise.RestartDataExportJob API asynchronously +func (client *Client) RestartDataExportJobWithChan(request *RestartDataExportJobRequest) (<-chan *RestartDataExportJobResponse, <-chan error) { + responseChan := make(chan *RestartDataExportJobResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RestartDataExportJob(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RestartDataExportJobWithCallback invokes the dms_enterprise.RestartDataExportJob API asynchronously +func (client *Client) RestartDataExportJobWithCallback(request *RestartDataExportJobRequest, callback func(response *RestartDataExportJobResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RestartDataExportJobResponse + var err error + defer close(result) + response, err = client.RestartDataExportJob(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RestartDataExportJobRequest is the request struct for api RestartDataExportJob +type RestartDataExportJobRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + JobId requests.Integer `position:"Query" name:"JobId"` + OrderId requests.Integer `position:"Query" name:"OrderId"` +} + +// RestartDataExportJobResponse is the response struct for api RestartDataExportJob +type RestartDataExportJobResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateRestartDataExportJobRequest creates a request to invoke RestartDataExportJob API +func CreateRestartDataExportJobRequest() (request *RestartDataExportJobRequest) { + request = &RestartDataExportJobRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "RestartDataExportJob", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateRestartDataExportJobResponse creates a response to parse from RestartDataExportJob response +func CreateRestartDataExportJobResponse() (response *RestartDataExportJobResponse) { + response = &RestartDataExportJobResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/set_workflow_extra_info.go b/services/dms-enterprise/set_workflow_extra_info.go new file mode 100644 index 0000000000..d67e3bd16f --- /dev/null +++ b/services/dms-enterprise/set_workflow_extra_info.go @@ -0,0 +1,111 @@ +package dms_enterprise + +//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" +) + +// SetWorkflowExtraInfo invokes the dms_enterprise.SetWorkflowExtraInfo API synchronously +func (client *Client) SetWorkflowExtraInfo(request *SetWorkflowExtraInfoRequest) (response *SetWorkflowExtraInfoResponse, err error) { + response = CreateSetWorkflowExtraInfoResponse() + err = client.DoAction(request, response) + return +} + +// SetWorkflowExtraInfoWithChan invokes the dms_enterprise.SetWorkflowExtraInfo API asynchronously +func (client *Client) SetWorkflowExtraInfoWithChan(request *SetWorkflowExtraInfoRequest) (<-chan *SetWorkflowExtraInfoResponse, <-chan error) { + responseChan := make(chan *SetWorkflowExtraInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SetWorkflowExtraInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SetWorkflowExtraInfoWithCallback invokes the dms_enterprise.SetWorkflowExtraInfo API asynchronously +func (client *Client) SetWorkflowExtraInfoWithCallback(request *SetWorkflowExtraInfoRequest, callback func(response *SetWorkflowExtraInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SetWorkflowExtraInfoResponse + var err error + defer close(result) + response, err = client.SetWorkflowExtraInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SetWorkflowExtraInfoRequest is the request struct for api SetWorkflowExtraInfo +type SetWorkflowExtraInfoRequest struct { + *requests.RpcRequest + ThirdpartyWorkflowComment string `position:"Query" name:"ThirdpartyWorkflowComment"` + RenderAgree requests.Boolean `position:"Query" name:"RenderAgree"` + Tid requests.Integer `position:"Query" name:"Tid"` + WorkflowInstanceId requests.Integer `position:"Query" name:"WorkflowInstanceId"` + RenderCancel requests.Boolean `position:"Query" name:"RenderCancel"` + RenderAddApprovalNode requests.Boolean `position:"Query" name:"RenderAddApprovalNode"` + RenderTransfer requests.Boolean `position:"Query" name:"RenderTransfer"` + RenderReject requests.Boolean `position:"Query" name:"RenderReject"` + ThirdpartyWorkflowUrl string `position:"Query" name:"ThirdpartyWorkflowUrl"` +} + +// SetWorkflowExtraInfoResponse is the response struct for api SetWorkflowExtraInfo +type SetWorkflowExtraInfoResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Data bool `json:"Data" xml:"Data"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateSetWorkflowExtraInfoRequest creates a request to invoke SetWorkflowExtraInfo API +func CreateSetWorkflowExtraInfoRequest() (request *SetWorkflowExtraInfoRequest) { + request = &SetWorkflowExtraInfoRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "SetWorkflowExtraInfo", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateSetWorkflowExtraInfoResponse creates a response to parse from SetWorkflowExtraInfo response +func CreateSetWorkflowExtraInfoResponse() (response *SetWorkflowExtraInfoResponse) { + response = &SetWorkflowExtraInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/struct_approval_detail.go b/services/dms-enterprise/struct_approval_detail.go index 15dbd60c37..5ffcc09c37 100644 --- a/services/dms-enterprise/struct_approval_detail.go +++ b/services/dms-enterprise/struct_approval_detail.go @@ -17,15 +17,17 @@ package dms_enterprise // ApprovalDetail is a nested struct in dms_enterprise response type ApprovalDetail struct { - Description string `json:"Description" xml:"Description"` - CreateTime string `json:"CreateTime" xml:"CreateTime"` - OrderType string `json:"OrderType" xml:"OrderType"` - Title string `json:"Title" xml:"Title"` - AuditId int64 `json:"AuditId" xml:"AuditId"` - OrderId int64 `json:"OrderId" xml:"OrderId"` - WorkflowInsCode string `json:"WorkflowInsCode" xml:"WorkflowInsCode"` - TemplateId int64 `json:"TemplateId" xml:"TemplateId"` - ReasonList ReasonList `json:"ReasonList" xml:"ReasonList"` - WorkflowNodes WorkflowNodesInGetApprovalDetail `json:"WorkflowNodes" xml:"WorkflowNodes"` - CurrentHandlers CurrentHandlers `json:"CurrentHandlers" xml:"CurrentHandlers"` + Description string `json:"Description" xml:"Description"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + OrderType string `json:"OrderType" xml:"OrderType"` + Title string `json:"Title" xml:"Title"` + AuditId int64 `json:"AuditId" xml:"AuditId"` + OrderId int64 `json:"OrderId" xml:"OrderId"` + WorkflowInsCode string `json:"WorkflowInsCode" xml:"WorkflowInsCode"` + TemplateId int64 `json:"TemplateId" xml:"TemplateId"` + ThirdpartyWorkflowUrl string `json:"ThirdpartyWorkflowUrl" xml:"ThirdpartyWorkflowUrl"` + ThirdpartyWorkflowComment string `json:"ThirdpartyWorkflowComment" xml:"ThirdpartyWorkflowComment"` + ReasonList ReasonList `json:"ReasonList" xml:"ReasonList"` + WorkflowNodes WorkflowNodesInGetApprovalDetail `json:"WorkflowNodes" xml:"WorkflowNodes"` + CurrentHandlers CurrentHandlers `json:"CurrentHandlers" xml:"CurrentHandlers"` } diff --git a/services/dms-enterprise/struct_authorization_list.go b/services/dms-enterprise/struct_authorization_list.go new file mode 100644 index 0000000000..c6386da631 --- /dev/null +++ b/services/dms-enterprise/struct_authorization_list.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// AuthorizationList is a nested struct in dms_enterprise response +type AuthorizationList struct { + AuthorizationListItem []AuthorizationListItem `json:"AuthorizationList" xml:"AuthorizationList"` +} diff --git a/services/dms-enterprise/struct_authorization_list_item.go b/services/dms-enterprise/struct_authorization_list_item.go new file mode 100644 index 0000000000..6b9afe41f8 --- /dev/null +++ b/services/dms-enterprise/struct_authorization_list_item.go @@ -0,0 +1,27 @@ +package dms_enterprise + +//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. + +// AuthorizationListItem is a nested struct in dms_enterprise response +type AuthorizationListItem struct { + PolicyId int64 `json:"PolicyId" xml:"PolicyId"` + PolicyName string `json:"PolicyName" xml:"PolicyName"` + PolicySource string `json:"PolicySource" xml:"PolicySource"` + AuthorizationId int64 `json:"AuthorizationId" xml:"AuthorizationId"` + IdentityId int64 `json:"IdentityId" xml:"IdentityId"` + IdentityName string `json:"IdentityName" xml:"IdentityName"` + IdentityType string `json:"IdentityType" xml:"IdentityType"` +} diff --git a/services/dms-enterprise/struct_cata_log_list.go b/services/dms-enterprise/struct_cata_log_list.go new file mode 100644 index 0000000000..c4acce2e10 --- /dev/null +++ b/services/dms-enterprise/struct_cata_log_list.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// CataLogList is a nested struct in dms_enterprise response +type CataLogList struct { + Catalog []Catalog `json:"Catalog" xml:"Catalog"` +} diff --git a/services/dms-enterprise/struct_catalog.go b/services/dms-enterprise/struct_catalog.go new file mode 100644 index 0000000000..0b504a028f --- /dev/null +++ b/services/dms-enterprise/struct_catalog.go @@ -0,0 +1,23 @@ +package dms_enterprise + +//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. + +// Catalog is a nested struct in dms_enterprise response +type Catalog struct { + Name string `json:"Name" xml:"Name"` + Description string `json:"Description" xml:"Description"` + Location string `json:"Location" xml:"Location"` +} diff --git a/services/dms-enterprise/struct_column.go b/services/dms-enterprise/struct_column.go index f92f85c832..bd5e301765 100644 --- a/services/dms-enterprise/struct_column.go +++ b/services/dms-enterprise/struct_column.go @@ -17,6 +17,7 @@ package dms_enterprise // Column is a nested struct in dms_enterprise response type Column struct { + Name string `json:"Name" xml:"Name"` Charset string `json:"Charset" xml:"Charset"` AutoIncrement bool `json:"AutoIncrement" xml:"AutoIncrement"` ColumnId string `json:"ColumnId" xml:"ColumnId"` @@ -25,6 +26,7 @@ type Column struct { DefaultValue string `json:"DefaultValue" xml:"DefaultValue"` Sensitive bool `json:"Sensitive" xml:"Sensitive"` Nullable bool `json:"Nullable" xml:"Nullable"` + Comment string `json:"Comment" xml:"Comment"` Fictive bool `json:"Fictive" xml:"Fictive"` ColumnName string `json:"ColumnName" xml:"ColumnName"` SecurityLevel string `json:"SecurityLevel" xml:"SecurityLevel"` @@ -35,4 +37,5 @@ type Column struct { Description string `json:"Description" xml:"Description"` DataScale int `json:"DataScale" xml:"DataScale"` DataPrecision int `json:"DataPrecision" xml:"DataPrecision"` + Type string `json:"Type" xml:"Type"` } diff --git a/services/dms-enterprise/struct_database_in_get_data_lake_database.go b/services/dms-enterprise/struct_database_in_get_data_lake_database.go new file mode 100644 index 0000000000..f9c8aba1a3 --- /dev/null +++ b/services/dms-enterprise/struct_database_in_get_data_lake_database.go @@ -0,0 +1,26 @@ +package dms_enterprise + +//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. + +// DatabaseInGetDataLakeDatabase is a nested struct in dms_enterprise response +type DatabaseInGetDataLakeDatabase struct { + Description string `json:"Description" xml:"Description"` + Parameters map[string]interface{} `json:"Parameters" xml:"Parameters"` + DbId int64 `json:"DbId" xml:"DbId"` + CatalogName string `json:"CatalogName" xml:"CatalogName"` + Name string `json:"Name" xml:"Name"` + Location string `json:"Location" xml:"Location"` +} diff --git a/services/dms-enterprise/struct_database_in_list_data_lake_database.go b/services/dms-enterprise/struct_database_in_list_data_lake_database.go new file mode 100644 index 0000000000..7b24e8d086 --- /dev/null +++ b/services/dms-enterprise/struct_database_in_list_data_lake_database.go @@ -0,0 +1,26 @@ +package dms_enterprise + +//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. + +// DatabaseInListDataLakeDatabase is a nested struct in dms_enterprise response +type DatabaseInListDataLakeDatabase struct { + Description string `json:"Description" xml:"Description"` + Parameters map[string]interface{} `json:"Parameters" xml:"Parameters"` + DbId int64 `json:"DbId" xml:"DbId"` + CatalogName string `json:"CatalogName" xml:"CatalogName"` + Name string `json:"Name" xml:"Name"` + Location string `json:"Location" xml:"Location"` +} diff --git a/services/dms-enterprise/struct_database_list_in_list_data_lake_database.go b/services/dms-enterprise/struct_database_list_in_list_data_lake_database.go new file mode 100644 index 0000000000..f2bc338a9d --- /dev/null +++ b/services/dms-enterprise/struct_database_list_in_list_data_lake_database.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// DatabaseListInListDataLakeDatabase is a nested struct in dms_enterprise response +type DatabaseListInListDataLakeDatabase struct { + Database []DatabaseInListDataLakeDatabase `json:"Database" xml:"Database"` +} diff --git a/services/dms-enterprise/struct_databases.go b/services/dms-enterprise/struct_databases.go new file mode 100644 index 0000000000..bd4f224152 --- /dev/null +++ b/services/dms-enterprise/struct_databases.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// Databases is a nested struct in dms_enterprise response +type Databases struct { + DatabasesItem []DatabasesItem `json:"databases" xml:"databases"` +} diff --git a/services/dms-enterprise/struct_databases_item.go b/services/dms-enterprise/struct_databases_item.go new file mode 100644 index 0000000000..c177653478 --- /dev/null +++ b/services/dms-enterprise/struct_databases_item.go @@ -0,0 +1,29 @@ +package dms_enterprise + +//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. + +// DatabasesItem is a nested struct in dms_enterprise response +type DatabasesItem struct { + DbId string `json:"DbId" xml:"DbId"` + SchemaName string `json:"SchemaName" xml:"SchemaName"` + SearchName string `json:"SearchName" xml:"SearchName"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Logic bool `json:"Logic" xml:"Logic"` + DbType string `json:"DbType" xml:"DbType"` + UserId string `json:"UserId" xml:"UserId"` + EnvType string `json:"EnvType" xml:"EnvType"` + PermissionDetail PermissionDetail `json:"PermissionDetail" xml:"PermissionDetail"` +} diff --git a/services/dms-enterprise/struct_instances.go b/services/dms-enterprise/struct_instances_in_get_data_archive_order_detail.go similarity index 85% rename from services/dms-enterprise/struct_instances.go rename to services/dms-enterprise/struct_instances_in_get_data_archive_order_detail.go index c0197f46ac..025f48c2ff 100644 --- a/services/dms-enterprise/struct_instances.go +++ b/services/dms-enterprise/struct_instances_in_get_data_archive_order_detail.go @@ -15,7 +15,7 @@ package dms_enterprise // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Instances is a nested struct in dms_enterprise response -type Instances struct { +// InstancesInGetDataArchiveOrderDetail is a nested struct in dms_enterprise response +type InstancesInGetDataArchiveOrderDetail struct { InstancesItem []InstancesItem `json:"Instances" xml:"Instances"` } diff --git a/services/dms-enterprise/struct_instances_in_list_authorized_instances_for_user.go b/services/dms-enterprise/struct_instances_in_list_authorized_instances_for_user.go new file mode 100644 index 0000000000..527ce4ddb7 --- /dev/null +++ b/services/dms-enterprise/struct_instances_in_list_authorized_instances_for_user.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// InstancesInListAuthorizedInstancesForUser is a nested struct in dms_enterprise response +type InstancesInListAuthorizedInstancesForUser struct { + InstancesItem []InstancesItem `json:"instances" xml:"instances"` +} diff --git a/services/dms-enterprise/struct_instances_item.go b/services/dms-enterprise/struct_instances_item.go index a1da4be15b..59afe8b2de 100644 --- a/services/dms-enterprise/struct_instances_item.go +++ b/services/dms-enterprise/struct_instances_item.go @@ -17,17 +17,26 @@ package dms_enterprise // InstancesItem is a nested struct in dms_enterprise response type InstancesItem struct { - BusinessTime string `json:"BusinessTime" xml:"BusinessTime"` - DagId int64 `json:"DagId" xml:"DagId"` - EndTime string `json:"EndTime" xml:"EndTime"` - GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` - GmtModified string `json:"GmtModified" xml:"GmtModified"` - HistoryDagId int64 `json:"HistoryDagId" xml:"HistoryDagId"` - Id int64 `json:"Id" xml:"Id"` - LastRunningContext string `json:"LastRunningContext" xml:"LastRunningContext"` - Msg string `json:"Msg" xml:"Msg"` - Status int64 `json:"Status" xml:"Status"` - TenantId string `json:"TenantId" xml:"TenantId"` - TriggerType int64 `json:"TriggerType" xml:"TriggerType"` - Version string `json:"Version" xml:"Version"` + DagId int64 `json:"DagId" xml:"DagId"` + Port string `json:"Port" xml:"Port"` + Status int64 `json:"Status" xml:"Status"` + Version string `json:"Version" xml:"Version"` + BusinessTime string `json:"BusinessTime" xml:"BusinessTime"` + GmtModified string `json:"GmtModified" xml:"GmtModified"` + Id int64 `json:"Id" xml:"Id"` + LastRunningContext string `json:"LastRunningContext" xml:"LastRunningContext"` + TriggerType int64 `json:"TriggerType" xml:"TriggerType"` + DbType string `json:"DbType" xml:"DbType"` + GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` + Host string `json:"Host" xml:"Host"` + EndTime string `json:"EndTime" xml:"EndTime"` + EnvType string `json:"EnvType" xml:"EnvType"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + UserId string `json:"UserId" xml:"UserId"` + Msg string `json:"Msg" xml:"Msg"` + UserName string `json:"UserName" xml:"UserName"` + InstanceAlias string `json:"InstanceAlias" xml:"InstanceAlias"` + HistoryDagId int64 `json:"HistoryDagId" xml:"HistoryDagId"` + TenantId string `json:"TenantId" xml:"TenantId"` + PermissionDetail PermissionDetail `json:"PermissionDetail" xml:"PermissionDetail"` } diff --git a/services/dms-enterprise/struct_key_info.go b/services/dms-enterprise/struct_key_info.go index 2f4c4e6603..fe4ec4ca23 100644 --- a/services/dms-enterprise/struct_key_info.go +++ b/services/dms-enterprise/struct_key_info.go @@ -18,6 +18,7 @@ package dms_enterprise // KeyInfo is a nested struct in dms_enterprise response type KeyInfo struct { DbId int64 `json:"DbId" xml:"DbId"` + JobId int64 `json:"JobId" xml:"JobId"` PreCheckId int64 `json:"PreCheckId" xml:"PreCheckId"` DownloadURL string `json:"DownloadURL" xml:"DownloadURL"` AuditDate string `json:"AuditDate" xml:"AuditDate"` diff --git a/services/dms-enterprise/struct_partition_keys.go b/services/dms-enterprise/struct_partition_keys.go new file mode 100644 index 0000000000..115a5c04c3 --- /dev/null +++ b/services/dms-enterprise/struct_partition_keys.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// PartitionKeys is a nested struct in dms_enterprise response +type PartitionKeys struct { + Column []Column `json:"Column" xml:"Column"` +} diff --git a/services/dms-enterprise/struct_permission_detail.go b/services/dms-enterprise/struct_permission_detail.go new file mode 100644 index 0000000000..a653369099 --- /dev/null +++ b/services/dms-enterprise/struct_permission_detail.go @@ -0,0 +1,24 @@ +package dms_enterprise + +//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. + +// PermissionDetail is a nested struct in dms_enterprise response +type PermissionDetail struct { + Message string `json:"Message" xml:"Message"` + PermType string `json:"PermType" xml:"PermType"` + ExpireDate string `json:"ExpireDate" xml:"ExpireDate"` + DsType string `json:"DsType" xml:"DsType"` +} diff --git a/services/dms-enterprise/struct_policy.go b/services/dms-enterprise/struct_policy.go new file mode 100644 index 0000000000..f70d227f1c --- /dev/null +++ b/services/dms-enterprise/struct_policy.go @@ -0,0 +1,27 @@ +package dms_enterprise + +//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. + +// Policy is a nested struct in dms_enterprise response +type Policy struct { + PolicyName string `json:"PolicyName" xml:"PolicyName"` + PolicyDesc string `json:"PolicyDesc" xml:"PolicyDesc"` + PolicyContent string `json:"PolicyContent" xml:"PolicyContent"` + CreatorId int64 `json:"CreatorId" xml:"CreatorId"` + PolicySource string `json:"PolicySource" xml:"PolicySource"` + AuthorizedQuantity string `json:"AuthorizedQuantity" xml:"AuthorizedQuantity"` + PolicyId int64 `json:"PolicyId" xml:"PolicyId"` +} diff --git a/services/dms-enterprise/struct_policy_list.go b/services/dms-enterprise/struct_policy_list.go new file mode 100644 index 0000000000..cb98ad4c43 --- /dev/null +++ b/services/dms-enterprise/struct_policy_list.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// PolicyList is a nested struct in dms_enterprise response +type PolicyList struct { + PolicyListItem []PolicyListItem `json:"policyList" xml:"policyList"` +} diff --git a/services/dms-enterprise/struct_policy_list_item.go b/services/dms-enterprise/struct_policy_list_item.go new file mode 100644 index 0000000000..0a8f4816fe --- /dev/null +++ b/services/dms-enterprise/struct_policy_list_item.go @@ -0,0 +1,26 @@ +package dms_enterprise + +//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. + +// PolicyListItem is a nested struct in dms_enterprise response +type PolicyListItem struct { + AbacPolicyId int64 `json:"AbacPolicyId" xml:"AbacPolicyId"` + AbacPolicyName string `json:"AbacPolicyName" xml:"AbacPolicyName"` + AbacPolicyDesc string `json:"AbacPolicyDesc" xml:"AbacPolicyDesc"` + AbacPolicyContent string `json:"AbacPolicyContent" xml:"AbacPolicyContent"` + CreatorId int64 `json:"CreatorId" xml:"CreatorId"` + AbacPolicySource string `json:"AbacPolicySource" xml:"AbacPolicySource"` +} diff --git a/services/dms-enterprise/struct_tablebase_info.go b/services/dms-enterprise/struct_tablebase_info.go new file mode 100644 index 0000000000..4f46c7fcc1 --- /dev/null +++ b/services/dms-enterprise/struct_tablebase_info.go @@ -0,0 +1,38 @@ +package dms_enterprise + +//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. + +// TablebaseInfo is a nested struct in dms_enterprise response +type TablebaseInfo struct { + Owner string `json:"Owner" xml:"Owner"` + ViewOriginalText string `json:"ViewOriginalText" xml:"ViewOriginalText"` + TableType string `json:"TableType" xml:"TableType"` + Parameters map[string]interface{} `json:"Parameters" xml:"Parameters"` + Description string `json:"Description" xml:"Description"` + CreatorId int64 `json:"CreatorId" xml:"CreatorId"` + CreateTime int `json:"CreateTime" xml:"CreateTime"` + LastAccessTime int `json:"LastAccessTime" xml:"LastAccessTime"` + Retention int `json:"Retention" xml:"Retention"` + Name string `json:"Name" xml:"Name"` + OwnerType string `json:"OwnerType" xml:"OwnerType"` + ViewExpandedText string `json:"ViewExpandedText" xml:"ViewExpandedText"` + DbId int64 `json:"DbId" xml:"DbId"` + DbName string `json:"DbName" xml:"DbName"` + CatalogName string `json:"CatalogName" xml:"CatalogName"` + ModifierId int64 `json:"ModifierId" xml:"ModifierId"` + Location string `json:"Location" xml:"Location"` + PartitionKeys PartitionKeys `json:"PartitionKeys" xml:"PartitionKeys"` +} diff --git a/services/dms-enterprise/struct_tablebase_info_list.go b/services/dms-enterprise/struct_tablebase_info_list.go new file mode 100644 index 0000000000..7fb6f33269 --- /dev/null +++ b/services/dms-enterprise/struct_tablebase_info_list.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// TablebaseInfoList is a nested struct in dms_enterprise response +type TablebaseInfoList struct { + TablebaseInfo []TablebaseInfo `json:"TablebaseInfo" xml:"TablebaseInfo"` +} diff --git a/services/dms-enterprise/struct_users_in_list_authorized_users_for_database.go b/services/dms-enterprise/struct_users_in_list_authorized_users_for_database.go new file mode 100644 index 0000000000..edaa505d4d --- /dev/null +++ b/services/dms-enterprise/struct_users_in_list_authorized_users_for_database.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// UsersInListAuthorizedUsersForDatabase is a nested struct in dms_enterprise response +type UsersInListAuthorizedUsersForDatabase struct { + UsersItem []UsersItem `json:"users" xml:"users"` +} diff --git a/services/dms-enterprise/struct_users_in_list_authorized_users_for_instance.go b/services/dms-enterprise/struct_users_in_list_authorized_users_for_instance.go new file mode 100644 index 0000000000..f64ab7f669 --- /dev/null +++ b/services/dms-enterprise/struct_users_in_list_authorized_users_for_instance.go @@ -0,0 +1,21 @@ +package dms_enterprise + +//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. + +// UsersInListAuthorizedUsersForInstance is a nested struct in dms_enterprise response +type UsersInListAuthorizedUsersForInstance struct { + UsersItem []UsersItem `json:"users" xml:"users"` +} diff --git a/services/dms-enterprise/struct_users_item.go b/services/dms-enterprise/struct_users_item.go new file mode 100644 index 0000000000..edea37ef42 --- /dev/null +++ b/services/dms-enterprise/struct_users_item.go @@ -0,0 +1,24 @@ +package dms_enterprise + +//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. + +// UsersItem is a nested struct in dms_enterprise response +type UsersItem struct { + Uid string `json:"Uid" xml:"Uid"` + UserRealName string `json:"UserRealName" xml:"UserRealName"` + UserId string `json:"UserId" xml:"UserId"` + UserNickName string `json:"UserNickName" xml:"UserNickName"` +} diff --git a/services/dms-enterprise/suspend_data_export_job.go b/services/dms-enterprise/suspend_data_export_job.go new file mode 100644 index 0000000000..6089a892f0 --- /dev/null +++ b/services/dms-enterprise/suspend_data_export_job.go @@ -0,0 +1,104 @@ +package dms_enterprise + +//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" +) + +// SuspendDataExportJob invokes the dms_enterprise.SuspendDataExportJob API synchronously +func (client *Client) SuspendDataExportJob(request *SuspendDataExportJobRequest) (response *SuspendDataExportJobResponse, err error) { + response = CreateSuspendDataExportJobResponse() + err = client.DoAction(request, response) + return +} + +// SuspendDataExportJobWithChan invokes the dms_enterprise.SuspendDataExportJob API asynchronously +func (client *Client) SuspendDataExportJobWithChan(request *SuspendDataExportJobRequest) (<-chan *SuspendDataExportJobResponse, <-chan error) { + responseChan := make(chan *SuspendDataExportJobResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SuspendDataExportJob(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SuspendDataExportJobWithCallback invokes the dms_enterprise.SuspendDataExportJob API asynchronously +func (client *Client) SuspendDataExportJobWithCallback(request *SuspendDataExportJobRequest, callback func(response *SuspendDataExportJobResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SuspendDataExportJobResponse + var err error + defer close(result) + response, err = client.SuspendDataExportJob(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SuspendDataExportJobRequest is the request struct for api SuspendDataExportJob +type SuspendDataExportJobRequest struct { + *requests.RpcRequest + Tid requests.Integer `position:"Query" name:"Tid"` + JobId requests.Integer `position:"Query" name:"JobId"` + OrderId requests.Integer `position:"Query" name:"OrderId"` +} + +// SuspendDataExportJobResponse is the response struct for api SuspendDataExportJob +type SuspendDataExportJobResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateSuspendDataExportJobRequest creates a request to invoke SuspendDataExportJob API +func CreateSuspendDataExportJobRequest() (request *SuspendDataExportJobRequest) { + request = &SuspendDataExportJobRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "SuspendDataExportJob", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateSuspendDataExportJobResponse creates a response to parse from SuspendDataExportJob response +func CreateSuspendDataExportJobResponse() (response *SuspendDataExportJobResponse) { + response = &SuspendDataExportJobResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/dms-enterprise/update_abac_policy.go b/services/dms-enterprise/update_abac_policy.go new file mode 100644 index 0000000000..61b35c0f47 --- /dev/null +++ b/services/dms-enterprise/update_abac_policy.go @@ -0,0 +1,107 @@ +package dms_enterprise + +//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" +) + +// UpdateAbacPolicy invokes the dms_enterprise.UpdateAbacPolicy API synchronously +func (client *Client) UpdateAbacPolicy(request *UpdateAbacPolicyRequest) (response *UpdateAbacPolicyResponse, err error) { + response = CreateUpdateAbacPolicyResponse() + err = client.DoAction(request, response) + return +} + +// UpdateAbacPolicyWithChan invokes the dms_enterprise.UpdateAbacPolicy API asynchronously +func (client *Client) UpdateAbacPolicyWithChan(request *UpdateAbacPolicyRequest) (<-chan *UpdateAbacPolicyResponse, <-chan error) { + responseChan := make(chan *UpdateAbacPolicyResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateAbacPolicy(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateAbacPolicyWithCallback invokes the dms_enterprise.UpdateAbacPolicy API asynchronously +func (client *Client) UpdateAbacPolicyWithCallback(request *UpdateAbacPolicyRequest, callback func(response *UpdateAbacPolicyResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateAbacPolicyResponse + var err error + defer close(result) + response, err = client.UpdateAbacPolicy(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateAbacPolicyRequest is the request struct for api UpdateAbacPolicy +type UpdateAbacPolicyRequest struct { + *requests.RpcRequest + AbacPolicyContent string `position:"Query" name:"AbacPolicyContent"` + Tid requests.Integer `position:"Query" name:"Tid"` + AbacPolicyId requests.Integer `position:"Query" name:"AbacPolicyId"` + AbacPolicyDesc string `position:"Query" name:"AbacPolicyDesc"` + AbacPolicyName string `position:"Query" name:"AbacPolicyName"` +} + +// UpdateAbacPolicyResponse is the response struct for api UpdateAbacPolicy +type UpdateAbacPolicyResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` + Success bool `json:"Success" xml:"Success"` + UpdatePolicyResult int64 `json:"UpdatePolicyResult" xml:"UpdatePolicyResult"` +} + +// CreateUpdateAbacPolicyRequest creates a request to invoke UpdateAbacPolicy API +func CreateUpdateAbacPolicyRequest() (request *UpdateAbacPolicyRequest) { + request = &UpdateAbacPolicyRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("dms-enterprise", "2018-11-01", "UpdateAbacPolicy", "dms-enterprise", "openAPI") + request.Method = requests.POST + return +} + +// CreateUpdateAbacPolicyResponse creates a response to parse from UpdateAbacPolicy response +func CreateUpdateAbacPolicyResponse() (response *UpdateAbacPolicyResponse) { + response = &UpdateAbacPolicyResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}