Forráskód Böngészése

CreateReplicationJob API supports the specified instance type.

sdk-team 6 éve
szülő
commit
dedfcb806b

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-11-27 Version: v1.60.269
+- CreateReplicationJob API supports the specified instance type.
+
 2019-11-27 Version: v1.60.268
 - Add enhanced natgateway sdk.
 

+ 129 - 0
services/smc/client.go

@@ -0,0 +1,129 @@
+package smc
+
+//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 (
+	"reflect"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// SetClientProperty Set Property by Reflect
+func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) {
+	v := reflect.ValueOf(client).Elem()
+	if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() {
+		v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue))
+	}
+}
+
+// SetEndpointDataToClient Set EndpointMap and ENdpointType
+func SetEndpointDataToClient(client *Client) {
+	SetClientProperty(client, "EndpointMap", GetEndpointMap())
+	SetClientProperty(client, "EndpointType", GetEndpointType())
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+	client = &Client{}
+	var pc provider.Provider
+	if len(providers) == 0 {
+		pc = provider.DefaultChain
+	} else {
+		pc = provider.NewProviderChain(providers)
+	}
+	err = client.InitWithProviderChain(regionId, pc)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
+// this is the common api to create a sdk client
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	SetEndpointDataToClient(client)
+	return
+}

+ 137 - 0
services/smc/create_replication_job.go

@@ -0,0 +1,137 @@
+package smc
+
+//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"
+)
+
+// CreateReplicationJob invokes the smc.CreateReplicationJob API synchronously
+// api document: https://help.aliyun.com/api/smc/createreplicationjob.html
+func (client *Client) CreateReplicationJob(request *CreateReplicationJobRequest) (response *CreateReplicationJobResponse, err error) {
+	response = CreateCreateReplicationJobResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateReplicationJobWithChan invokes the smc.CreateReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/createreplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateReplicationJobWithChan(request *CreateReplicationJobRequest) (<-chan *CreateReplicationJobResponse, <-chan error) {
+	responseChan := make(chan *CreateReplicationJobResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateReplicationJob(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateReplicationJobWithCallback invokes the smc.CreateReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/createreplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateReplicationJobWithCallback(request *CreateReplicationJobRequest, callback func(response *CreateReplicationJobResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateReplicationJobResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateReplicationJob(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateReplicationJobRequest is the request struct for api CreateReplicationJob
+type CreateReplicationJobRequest struct {
+	*requests.RpcRequest
+	TargetType             string                          `position:"Query" name:"TargetType"`
+	ClientToken            string                          `position:"Query" name:"ClientToken"`
+	Description            string                          `position:"Query" name:"Description"`
+	Frequency              requests.Integer                `position:"Query" name:"Frequency"`
+	ReplicationParameters  string                          `position:"Query" name:"ReplicationParameters"`
+	ImageName              string                          `position:"Query" name:"ImageName"`
+	SystemDiskSize         requests.Integer                `position:"Query" name:"SystemDiskSize"`
+	InstanceType           string                          `position:"Query" name:"InstanceType"`
+	Tag                    *[]CreateReplicationJobTag      `position:"Query" name:"Tag"  type:"Repeated"`
+	NetMode                requests.Integer                `position:"Query" name:"NetMode"`
+	SourceId               string                          `position:"Query" name:"SourceId"`
+	RunOnce                requests.Boolean                `position:"Query" name:"RunOnce"`
+	ResourceOwnerAccount   string                          `position:"Query" name:"ResourceOwnerAccount"`
+	ValidTime              string                          `position:"Query" name:"ValidTime"`
+	OwnerId                requests.Integer                `position:"Query" name:"OwnerId"`
+	DataDisk               *[]CreateReplicationJobDataDisk `position:"Query" name:"DataDisk"  type:"Repeated"`
+	VSwitchId              string                          `position:"Query" name:"VSwitchId"`
+	ScheduledStartTime     string                          `position:"Query" name:"ScheduledStartTime"`
+	InstanceId             string                          `position:"Query" name:"InstanceId"`
+	VpcId                  string                          `position:"Query" name:"VpcId"`
+	Name                   string                          `position:"Query" name:"Name"`
+	MaxNumberOfImageToKeep requests.Integer                `position:"Query" name:"MaxNumberOfImageToKeep"`
+}
+
+// CreateReplicationJobTag is a repeated param struct in CreateReplicationJobRequest
+type CreateReplicationJobTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
+}
+
+// CreateReplicationJobDataDisk is a repeated param struct in CreateReplicationJobRequest
+type CreateReplicationJobDataDisk struct {
+	Size  string `name:"Size"`
+	Index string `name:"Index"`
+}
+
+// CreateReplicationJobResponse is the response struct for api CreateReplicationJob
+type CreateReplicationJobResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	JobId     string `json:"JobId" xml:"JobId"`
+}
+
+// CreateCreateReplicationJobRequest creates a request to invoke CreateReplicationJob API
+func CreateCreateReplicationJobRequest() (request *CreateReplicationJobRequest) {
+	request = &CreateReplicationJobRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "CreateReplicationJob", "smc", "openAPI")
+	return
+}
+
+// CreateCreateReplicationJobResponse creates a response to parse from CreateReplicationJob response
+func CreateCreateReplicationJobResponse() (response *CreateReplicationJobResponse) {
+	response = &CreateReplicationJobResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/smc/delete_replication_job.go

@@ -0,0 +1,105 @@
+package smc
+
+//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"
+)
+
+// DeleteReplicationJob invokes the smc.DeleteReplicationJob API synchronously
+// api document: https://help.aliyun.com/api/smc/deletereplicationjob.html
+func (client *Client) DeleteReplicationJob(request *DeleteReplicationJobRequest) (response *DeleteReplicationJobResponse, err error) {
+	response = CreateDeleteReplicationJobResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteReplicationJobWithChan invokes the smc.DeleteReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/deletereplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteReplicationJobWithChan(request *DeleteReplicationJobRequest) (<-chan *DeleteReplicationJobResponse, <-chan error) {
+	responseChan := make(chan *DeleteReplicationJobResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteReplicationJob(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteReplicationJobWithCallback invokes the smc.DeleteReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/deletereplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteReplicationJobWithCallback(request *DeleteReplicationJobRequest, callback func(response *DeleteReplicationJobResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteReplicationJobResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteReplicationJob(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteReplicationJobRequest is the request struct for api DeleteReplicationJob
+type DeleteReplicationJobRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	JobId                string           `position:"Query" name:"JobId"`
+}
+
+// DeleteReplicationJobResponse is the response struct for api DeleteReplicationJob
+type DeleteReplicationJobResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteReplicationJobRequest creates a request to invoke DeleteReplicationJob API
+func CreateDeleteReplicationJobRequest() (request *DeleteReplicationJobRequest) {
+	request = &DeleteReplicationJobRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "DeleteReplicationJob", "smc", "openAPI")
+	return
+}
+
+// CreateDeleteReplicationJobResponse creates a response to parse from DeleteReplicationJob response
+func CreateDeleteReplicationJobResponse() (response *DeleteReplicationJobResponse) {
+	response = &DeleteReplicationJobResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/smc/delete_source_server.go

@@ -0,0 +1,106 @@
+package smc
+
+//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"
+)
+
+// DeleteSourceServer invokes the smc.DeleteSourceServer API synchronously
+// api document: https://help.aliyun.com/api/smc/deletesourceserver.html
+func (client *Client) DeleteSourceServer(request *DeleteSourceServerRequest) (response *DeleteSourceServerResponse, err error) {
+	response = CreateDeleteSourceServerResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteSourceServerWithChan invokes the smc.DeleteSourceServer API asynchronously
+// api document: https://help.aliyun.com/api/smc/deletesourceserver.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSourceServerWithChan(request *DeleteSourceServerRequest) (<-chan *DeleteSourceServerResponse, <-chan error) {
+	responseChan := make(chan *DeleteSourceServerResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteSourceServer(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteSourceServerWithCallback invokes the smc.DeleteSourceServer API asynchronously
+// api document: https://help.aliyun.com/api/smc/deletesourceserver.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSourceServerWithCallback(request *DeleteSourceServerRequest, callback func(response *DeleteSourceServerResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteSourceServerResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteSourceServer(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteSourceServerRequest is the request struct for api DeleteSourceServer
+type DeleteSourceServerRequest struct {
+	*requests.RpcRequest
+	SourceId             string           `position:"Query" name:"SourceId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Force                requests.Boolean `position:"Query" name:"Force"`
+}
+
+// DeleteSourceServerResponse is the response struct for api DeleteSourceServer
+type DeleteSourceServerResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteSourceServerRequest creates a request to invoke DeleteSourceServer API
+func CreateDeleteSourceServerRequest() (request *DeleteSourceServerRequest) {
+	request = &DeleteSourceServerRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "DeleteSourceServer", "smc", "openAPI")
+	return
+}
+
+// CreateDeleteSourceServerResponse creates a response to parse from DeleteSourceServer response
+func CreateDeleteSourceServerResponse() (response *DeleteSourceServerResponse) {
+	response = &DeleteSourceServerResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/smc/describe_replication_jobs.go

@@ -0,0 +1,115 @@
+package smc
+
+//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"
+)
+
+// DescribeReplicationJobs invokes the smc.DescribeReplicationJobs API synchronously
+// api document: https://help.aliyun.com/api/smc/describereplicationjobs.html
+func (client *Client) DescribeReplicationJobs(request *DescribeReplicationJobsRequest) (response *DescribeReplicationJobsResponse, err error) {
+	response = CreateDescribeReplicationJobsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeReplicationJobsWithChan invokes the smc.DescribeReplicationJobs API asynchronously
+// api document: https://help.aliyun.com/api/smc/describereplicationjobs.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeReplicationJobsWithChan(request *DescribeReplicationJobsRequest) (<-chan *DescribeReplicationJobsResponse, <-chan error) {
+	responseChan := make(chan *DescribeReplicationJobsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeReplicationJobs(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeReplicationJobsWithCallback invokes the smc.DescribeReplicationJobs API asynchronously
+// api document: https://help.aliyun.com/api/smc/describereplicationjobs.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeReplicationJobsWithCallback(request *DescribeReplicationJobsRequest, callback func(response *DescribeReplicationJobsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeReplicationJobsResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeReplicationJobs(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeReplicationJobsRequest is the request struct for api DescribeReplicationJobs
+type DescribeReplicationJobsRequest struct {
+	*requests.RpcRequest
+	PageNumber           requests.Integer `position:"Query" name:"PageNumber"`
+	JobId                *[]string        `position:"Query" name:"JobId"  type:"Repeated"`
+	PageSize             requests.Integer `position:"Query" name:"PageSize"`
+	SourceId             *[]string        `position:"Query" name:"SourceId"  type:"Repeated"`
+	BusinessStatus       string           `position:"Query" name:"BusinessStatus"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Name                 string           `position:"Query" name:"Name"`
+	Status               string           `position:"Query" name:"Status"`
+}
+
+// DescribeReplicationJobsResponse is the response struct for api DescribeReplicationJobs
+type DescribeReplicationJobsResponse struct {
+	*responses.BaseResponse
+	RequestId       string          `json:"RequestId" xml:"RequestId"`
+	TotalCount      int             `json:"TotalCount" xml:"TotalCount"`
+	PageNumber      int             `json:"PageNumber" xml:"PageNumber"`
+	PageSize        int             `json:"PageSize" xml:"PageSize"`
+	ReplicationJobs ReplicationJobs `json:"ReplicationJobs" xml:"ReplicationJobs"`
+}
+
+// CreateDescribeReplicationJobsRequest creates a request to invoke DescribeReplicationJobs API
+func CreateDescribeReplicationJobsRequest() (request *DescribeReplicationJobsRequest) {
+	request = &DescribeReplicationJobsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "DescribeReplicationJobs", "smc", "openAPI")
+	return
+}
+
+// CreateDescribeReplicationJobsResponse creates a response to parse from DescribeReplicationJobs response
+func CreateDescribeReplicationJobsResponse() (response *DescribeReplicationJobsResponse) {
+	response = &DescribeReplicationJobsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 114 - 0
services/smc/describe_source_servers.go

@@ -0,0 +1,114 @@
+package smc
+
+//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"
+)
+
+// DescribeSourceServers invokes the smc.DescribeSourceServers API synchronously
+// api document: https://help.aliyun.com/api/smc/describesourceservers.html
+func (client *Client) DescribeSourceServers(request *DescribeSourceServersRequest) (response *DescribeSourceServersResponse, err error) {
+	response = CreateDescribeSourceServersResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeSourceServersWithChan invokes the smc.DescribeSourceServers API asynchronously
+// api document: https://help.aliyun.com/api/smc/describesourceservers.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeSourceServersWithChan(request *DescribeSourceServersRequest) (<-chan *DescribeSourceServersResponse, <-chan error) {
+	responseChan := make(chan *DescribeSourceServersResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeSourceServers(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeSourceServersWithCallback invokes the smc.DescribeSourceServers API asynchronously
+// api document: https://help.aliyun.com/api/smc/describesourceservers.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeSourceServersWithCallback(request *DescribeSourceServersRequest, callback func(response *DescribeSourceServersResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeSourceServersResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeSourceServers(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeSourceServersRequest is the request struct for api DescribeSourceServers
+type DescribeSourceServersRequest struct {
+	*requests.RpcRequest
+	PageNumber           requests.Integer `position:"Query" name:"PageNumber"`
+	JobId                string           `position:"Query" name:"JobId"`
+	PageSize             requests.Integer `position:"Query" name:"PageSize"`
+	State                string           `position:"Query" name:"State"`
+	SourceId             *[]string        `position:"Query" name:"SourceId"  type:"Repeated"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Name                 string           `position:"Query" name:"Name"`
+}
+
+// DescribeSourceServersResponse is the response struct for api DescribeSourceServers
+type DescribeSourceServersResponse struct {
+	*responses.BaseResponse
+	RequestId     string        `json:"RequestId" xml:"RequestId"`
+	TotalCount    int           `json:"TotalCount" xml:"TotalCount"`
+	PageNumber    int           `json:"PageNumber" xml:"PageNumber"`
+	PageSize      int           `json:"PageSize" xml:"PageSize"`
+	SourceServers SourceServers `json:"SourceServers" xml:"SourceServers"`
+}
+
+// CreateDescribeSourceServersRequest creates a request to invoke DescribeSourceServers API
+func CreateDescribeSourceServersRequest() (request *DescribeSourceServersRequest) {
+	request = &DescribeSourceServersRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "DescribeSourceServers", "smc", "openAPI")
+	return
+}
+
+// CreateDescribeSourceServersResponse creates a response to parse from DescribeSourceServers response
+func CreateDescribeSourceServersResponse() (response *DescribeSourceServersResponse) {
+	response = &DescribeSourceServersResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 20 - 0
services/smc/endpoint.go

@@ -0,0 +1,20 @@
+package smc
+
+// EndpointMap Endpoint Data
+var EndpointMap map[string]string
+
+// EndpointType regional or central
+var EndpointType = "central"
+
+// GetEndpointMap Get Endpoint Data Map
+func GetEndpointMap() map[string]string {
+	if EndpointMap == nil {
+		EndpointMap = map[string]string{}
+	}
+	return EndpointMap
+}
+
+// GetEndpointType Get Endpoint Type Value
+func GetEndpointType() string {
+	return EndpointType
+}

+ 116 - 0
services/smc/list_tag_resources.go

@@ -0,0 +1,116 @@
+package smc
+
+//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"
+)
+
+// ListTagResources invokes the smc.ListTagResources API synchronously
+// api document: https://help.aliyun.com/api/smc/listtagresources.html
+func (client *Client) ListTagResources(request *ListTagResourcesRequest) (response *ListTagResourcesResponse, err error) {
+	response = CreateListTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListTagResourcesWithChan invokes the smc.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/smc/listtagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagResourcesWithChan(request *ListTagResourcesRequest) (<-chan *ListTagResourcesResponse, <-chan error) {
+	responseChan := make(chan *ListTagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListTagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListTagResourcesWithCallback invokes the smc.ListTagResources API asynchronously
+// api document: https://help.aliyun.com/api/smc/listtagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequest, callback func(response *ListTagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListTagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.ListTagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListTagResourcesRequest is the request struct for api ListTagResources
+type ListTagResourcesRequest struct {
+	*requests.RpcRequest
+	NextToken            string                 `position:"Query" name:"NextToken"`
+	Tag                  *[]ListTagResourcesTag `position:"Query" name:"Tag"  type:"Repeated"`
+	ResourceId           *[]string              `position:"Query" name:"ResourceId"  type:"Repeated"`
+	ResourceOwnerAccount string                 `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer       `position:"Query" name:"OwnerId"`
+	ResourceType         string                 `position:"Query" name:"ResourceType"`
+}
+
+// ListTagResourcesTag is a repeated param struct in ListTagResourcesRequest
+type ListTagResourcesTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
+}
+
+// ListTagResourcesResponse is the response struct for api ListTagResources
+type ListTagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId    string       `json:"RequestId" xml:"RequestId"`
+	NextToken    string       `json:"NextToken" xml:"NextToken"`
+	TagResources TagResources `json:"TagResources" xml:"TagResources"`
+}
+
+// CreateListTagResourcesRequest creates a request to invoke ListTagResources API
+func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) {
+	request = &ListTagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "ListTagResources", "smc", "openAPI")
+	return
+}
+
+// CreateListTagResourcesResponse creates a response to parse from ListTagResources response
+func CreateListTagResourcesResponse() (response *ListTagResourcesResponse) {
+	response = &ListTagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 122 - 0
services/smc/modify_replication_job_attribute.go

@@ -0,0 +1,122 @@
+package smc
+
+//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"
+)
+
+// ModifyReplicationJobAttribute invokes the smc.ModifyReplicationJobAttribute API synchronously
+// api document: https://help.aliyun.com/api/smc/modifyreplicationjobattribute.html
+func (client *Client) ModifyReplicationJobAttribute(request *ModifyReplicationJobAttributeRequest) (response *ModifyReplicationJobAttributeResponse, err error) {
+	response = CreateModifyReplicationJobAttributeResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ModifyReplicationJobAttributeWithChan invokes the smc.ModifyReplicationJobAttribute API asynchronously
+// api document: https://help.aliyun.com/api/smc/modifyreplicationjobattribute.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyReplicationJobAttributeWithChan(request *ModifyReplicationJobAttributeRequest) (<-chan *ModifyReplicationJobAttributeResponse, <-chan error) {
+	responseChan := make(chan *ModifyReplicationJobAttributeResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ModifyReplicationJobAttribute(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ModifyReplicationJobAttributeWithCallback invokes the smc.ModifyReplicationJobAttribute API asynchronously
+// api document: https://help.aliyun.com/api/smc/modifyreplicationjobattribute.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifyReplicationJobAttributeWithCallback(request *ModifyReplicationJobAttributeRequest, callback func(response *ModifyReplicationJobAttributeResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ModifyReplicationJobAttributeResponse
+		var err error
+		defer close(result)
+		response, err = client.ModifyReplicationJobAttribute(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ModifyReplicationJobAttributeRequest is the request struct for api ModifyReplicationJobAttribute
+type ModifyReplicationJobAttributeRequest struct {
+	*requests.RpcRequest
+	TargetType             string                                   `position:"Query" name:"TargetType"`
+	Description            string                                   `position:"Query" name:"Description"`
+	Frequency              requests.Integer                         `position:"Query" name:"Frequency"`
+	JobId                  string                                   `position:"Query" name:"JobId"`
+	ImageName              string                                   `position:"Query" name:"ImageName"`
+	SystemDiskSize         requests.Integer                         `position:"Query" name:"SystemDiskSize"`
+	InstanceType           string                                   `position:"Query" name:"InstanceType"`
+	ResourceOwnerAccount   string                                   `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId                requests.Integer                         `position:"Query" name:"OwnerId"`
+	DataDisk               *[]ModifyReplicationJobAttributeDataDisk `position:"Query" name:"DataDisk"  type:"Repeated"`
+	ScheduledStartTime     string                                   `position:"Query" name:"ScheduledStartTime"`
+	InstanceId             string                                   `position:"Query" name:"InstanceId"`
+	Name                   string                                   `position:"Query" name:"Name"`
+	MaxNumberOfImageToKeep requests.Integer                         `position:"Query" name:"MaxNumberOfImageToKeep"`
+}
+
+// ModifyReplicationJobAttributeDataDisk is a repeated param struct in ModifyReplicationJobAttributeRequest
+type ModifyReplicationJobAttributeDataDisk struct {
+	Size  string `name:"Size"`
+	Index string `name:"Index"`
+}
+
+// ModifyReplicationJobAttributeResponse is the response struct for api ModifyReplicationJobAttribute
+type ModifyReplicationJobAttributeResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateModifyReplicationJobAttributeRequest creates a request to invoke ModifyReplicationJobAttribute API
+func CreateModifyReplicationJobAttributeRequest() (request *ModifyReplicationJobAttributeRequest) {
+	request = &ModifyReplicationJobAttributeRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "ModifyReplicationJobAttribute", "smc", "openAPI")
+	return
+}
+
+// CreateModifyReplicationJobAttributeResponse creates a response to parse from ModifyReplicationJobAttribute response
+func CreateModifyReplicationJobAttributeResponse() (response *ModifyReplicationJobAttributeResponse) {
+	response = &ModifyReplicationJobAttributeResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/smc/modify_source_server_attribute.go

@@ -0,0 +1,107 @@
+package smc
+
+//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"
+)
+
+// ModifySourceServerAttribute invokes the smc.ModifySourceServerAttribute API synchronously
+// api document: https://help.aliyun.com/api/smc/modifysourceserverattribute.html
+func (client *Client) ModifySourceServerAttribute(request *ModifySourceServerAttributeRequest) (response *ModifySourceServerAttributeResponse, err error) {
+	response = CreateModifySourceServerAttributeResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ModifySourceServerAttributeWithChan invokes the smc.ModifySourceServerAttribute API asynchronously
+// api document: https://help.aliyun.com/api/smc/modifysourceserverattribute.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifySourceServerAttributeWithChan(request *ModifySourceServerAttributeRequest) (<-chan *ModifySourceServerAttributeResponse, <-chan error) {
+	responseChan := make(chan *ModifySourceServerAttributeResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ModifySourceServerAttribute(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ModifySourceServerAttributeWithCallback invokes the smc.ModifySourceServerAttribute API asynchronously
+// api document: https://help.aliyun.com/api/smc/modifysourceserverattribute.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ModifySourceServerAttributeWithCallback(request *ModifySourceServerAttributeRequest, callback func(response *ModifySourceServerAttributeResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ModifySourceServerAttributeResponse
+		var err error
+		defer close(result)
+		response, err = client.ModifySourceServerAttribute(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ModifySourceServerAttributeRequest is the request struct for api ModifySourceServerAttribute
+type ModifySourceServerAttributeRequest struct {
+	*requests.RpcRequest
+	Description          string           `position:"Query" name:"Description"`
+	SourceId             string           `position:"Query" name:"SourceId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	Name                 string           `position:"Query" name:"Name"`
+}
+
+// ModifySourceServerAttributeResponse is the response struct for api ModifySourceServerAttribute
+type ModifySourceServerAttributeResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateModifySourceServerAttributeRequest creates a request to invoke ModifySourceServerAttribute API
+func CreateModifySourceServerAttributeRequest() (request *ModifySourceServerAttributeRequest) {
+	request = &ModifySourceServerAttributeRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "ModifySourceServerAttribute", "smc", "openAPI")
+	return
+}
+
+// CreateModifySourceServerAttributeResponse creates a response to parse from ModifySourceServerAttribute response
+func CreateModifySourceServerAttributeResponse() (response *ModifySourceServerAttributeResponse) {
+	response = &ModifySourceServerAttributeResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/smc/start_replication_job.go

@@ -0,0 +1,105 @@
+package smc
+
+//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"
+)
+
+// StartReplicationJob invokes the smc.StartReplicationJob API synchronously
+// api document: https://help.aliyun.com/api/smc/startreplicationjob.html
+func (client *Client) StartReplicationJob(request *StartReplicationJobRequest) (response *StartReplicationJobResponse, err error) {
+	response = CreateStartReplicationJobResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StartReplicationJobWithChan invokes the smc.StartReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/startreplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartReplicationJobWithChan(request *StartReplicationJobRequest) (<-chan *StartReplicationJobResponse, <-chan error) {
+	responseChan := make(chan *StartReplicationJobResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StartReplicationJob(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StartReplicationJobWithCallback invokes the smc.StartReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/startreplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartReplicationJobWithCallback(request *StartReplicationJobRequest, callback func(response *StartReplicationJobResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StartReplicationJobResponse
+		var err error
+		defer close(result)
+		response, err = client.StartReplicationJob(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StartReplicationJobRequest is the request struct for api StartReplicationJob
+type StartReplicationJobRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	JobId                string           `position:"Query" name:"JobId"`
+}
+
+// StartReplicationJobResponse is the response struct for api StartReplicationJob
+type StartReplicationJobResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateStartReplicationJobRequest creates a request to invoke StartReplicationJob API
+func CreateStartReplicationJobRequest() (request *StartReplicationJobRequest) {
+	request = &StartReplicationJobRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "StartReplicationJob", "smc", "openAPI")
+	return
+}
+
+// CreateStartReplicationJobResponse creates a response to parse from StartReplicationJob response
+func CreateStartReplicationJobResponse() (response *StartReplicationJobResponse) {
+	response = &StartReplicationJobResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/smc/stop_replication_job.go

@@ -0,0 +1,105 @@
+package smc
+
+//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"
+)
+
+// StopReplicationJob invokes the smc.StopReplicationJob API synchronously
+// api document: https://help.aliyun.com/api/smc/stopreplicationjob.html
+func (client *Client) StopReplicationJob(request *StopReplicationJobRequest) (response *StopReplicationJobResponse, err error) {
+	response = CreateStopReplicationJobResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StopReplicationJobWithChan invokes the smc.StopReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/stopreplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopReplicationJobWithChan(request *StopReplicationJobRequest) (<-chan *StopReplicationJobResponse, <-chan error) {
+	responseChan := make(chan *StopReplicationJobResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StopReplicationJob(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StopReplicationJobWithCallback invokes the smc.StopReplicationJob API asynchronously
+// api document: https://help.aliyun.com/api/smc/stopreplicationjob.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopReplicationJobWithCallback(request *StopReplicationJobRequest, callback func(response *StopReplicationJobResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StopReplicationJobResponse
+		var err error
+		defer close(result)
+		response, err = client.StopReplicationJob(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StopReplicationJobRequest is the request struct for api StopReplicationJob
+type StopReplicationJobRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	JobId                string           `position:"Query" name:"JobId"`
+}
+
+// StopReplicationJobResponse is the response struct for api StopReplicationJob
+type StopReplicationJobResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateStopReplicationJobRequest creates a request to invoke StopReplicationJob API
+func CreateStopReplicationJobRequest() (request *StopReplicationJobRequest) {
+	request = &StopReplicationJobRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "StopReplicationJob", "smc", "openAPI")
+	return
+}
+
+// CreateStopReplicationJobResponse creates a response to parse from StopReplicationJob response
+func CreateStopReplicationJobResponse() (response *StopReplicationJobResponse) {
+	response = &StopReplicationJobResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 23 - 0
services/smc/struct_data_disk.go

@@ -0,0 +1,23 @@
+package smc
+
+//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.
+
+// DataDisk is a nested struct in smc response
+type DataDisk struct {
+	Size  int    `json:"Size" xml:"Size"`
+	Path  string `json:"Path" xml:"Path"`
+	Index int    `json:"Index" xml:"Index"`
+}

+ 21 - 0
services/smc/struct_data_disks_in_describe_replication_jobs.go

@@ -0,0 +1,21 @@
+package smc
+
+//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.
+
+// DataDisksInDescribeReplicationJobs is a nested struct in smc response
+type DataDisksInDescribeReplicationJobs struct {
+	DataDisk []DataDisk `json:"DataDisk" xml:"DataDisk"`
+}

+ 21 - 0
services/smc/struct_data_disks_in_describe_source_servers.go

@@ -0,0 +1,21 @@
+package smc
+
+//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.
+
+// DataDisksInDescribeSourceServers is a nested struct in smc response
+type DataDisksInDescribeSourceServers struct {
+	DataDisk []DataDisk `json:"DataDisk" xml:"DataDisk"`
+}

+ 51 - 0
services/smc/struct_replication_job.go

@@ -0,0 +1,51 @@
+package smc
+
+//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.
+
+// ReplicationJob is a nested struct in smc response
+type ReplicationJob struct {
+	JobId                  string                             `json:"JobId" xml:"JobId"`
+	SourceId               string                             `json:"SourceId" xml:"SourceId"`
+	Name                   string                             `json:"Name" xml:"Name"`
+	Description            string                             `json:"Description" xml:"Description"`
+	RegionId               string                             `json:"RegionId" xml:"RegionId"`
+	TargetType             string                             `json:"TargetType" xml:"TargetType"`
+	ScheduledStartTime     string                             `json:"ScheduledStartTime" xml:"ScheduledStartTime"`
+	ImageName              string                             `json:"ImageName" xml:"ImageName"`
+	InstanceId             string                             `json:"InstanceId" xml:"InstanceId"`
+	ImageId                string                             `json:"ImageId" xml:"ImageId"`
+	Status                 string                             `json:"Status" xml:"Status"`
+	BusinessStatus         string                             `json:"BusinessStatus" xml:"BusinessStatus"`
+	ErrorCode              string                             `json:"ErrorCode" xml:"ErrorCode"`
+	Progress               float64                            `json:"Progress" xml:"Progress"`
+	CreationTime           string                             `json:"CreationTime" xml:"CreationTime"`
+	ValidTime              string                             `json:"ValidTime" xml:"ValidTime"`
+	StartTime              string                             `json:"StartTime" xml:"StartTime"`
+	EndTime                string                             `json:"EndTime" xml:"EndTime"`
+	NetMode                int                                `json:"NetMode" xml:"NetMode"`
+	SystemDiskSize         int                                `json:"SystemDiskSize" xml:"SystemDiskSize"`
+	VpcId                  string                             `json:"VpcId" xml:"VpcId"`
+	VSwitchId              string                             `json:"VSwitchId" xml:"VSwitchId"`
+	TransitionInstanceId   string                             `json:"TransitionInstanceId" xml:"TransitionInstanceId"`
+	StatusInfo             string                             `json:"StatusInfo" xml:"StatusInfo"`
+	ReplicationParameters  string                             `json:"ReplicationParameters" xml:"ReplicationParameters"`
+	RunOnce                bool                               `json:"RunOnce" xml:"RunOnce"`
+	Frequency              int                                `json:"Frequency" xml:"Frequency"`
+	MaxNumberOfImageToKeep int                                `json:"MaxNumberOfImageToKeep" xml:"MaxNumberOfImageToKeep"`
+	InstanceType           string                             `json:"InstanceType" xml:"InstanceType"`
+	DataDisks              DataDisksInDescribeReplicationJobs `json:"DataDisks" xml:"DataDisks"`
+	ReplicationJobRuns     ReplicationJobRuns                 `json:"ReplicationJobRuns" xml:"ReplicationJobRuns"`
+}

+ 24 - 0
services/smc/struct_replication_job_run.go

@@ -0,0 +1,24 @@
+package smc
+
+//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.
+
+// ReplicationJobRun is a nested struct in smc response
+type ReplicationJobRun struct {
+	ImageId   string `json:"ImageId" xml:"ImageId"`
+	Type      string `json:"Type" xml:"Type"`
+	StartTime string `json:"StartTime" xml:"StartTime"`
+	EndTime   string `json:"EndTime" xml:"EndTime"`
+}

+ 21 - 0
services/smc/struct_replication_job_runs.go

@@ -0,0 +1,21 @@
+package smc
+
+//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.
+
+// ReplicationJobRuns is a nested struct in smc response
+type ReplicationJobRuns struct {
+	ReplicationJobRun []ReplicationJobRun `json:"ReplicationJobRun" xml:"ReplicationJobRun"`
+}

+ 21 - 0
services/smc/struct_replication_jobs.go

@@ -0,0 +1,21 @@
+package smc
+
+//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.
+
+// ReplicationJobs is a nested struct in smc response
+type ReplicationJobs struct {
+	ReplicationJob []ReplicationJob `json:"ReplicationJob" xml:"ReplicationJob"`
+}

+ 37 - 0
services/smc/struct_source_server.go

@@ -0,0 +1,37 @@
+package smc
+
+//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.
+
+// SourceServer is a nested struct in smc response
+type SourceServer struct {
+	SourceId          string                           `json:"SourceId" xml:"SourceId"`
+	JobId             string                           `json:"JobId" xml:"JobId"`
+	AgentVersion      string                           `json:"AgentVersion" xml:"AgentVersion"`
+	Name              string                           `json:"Name" xml:"Name"`
+	Description       string                           `json:"Description" xml:"Description"`
+	KernelLevel       int                              `json:"KernelLevel" xml:"KernelLevel"`
+	Platform          string                           `json:"Platform" xml:"Platform"`
+	Architecture      string                           `json:"Architecture" xml:"Architecture"`
+	SystemDiskSize    int                              `json:"SystemDiskSize" xml:"SystemDiskSize"`
+	ReplicationDriver string                           `json:"ReplicationDriver" xml:"ReplicationDriver"`
+	SystemInfo        string                           `json:"SystemInfo" xml:"SystemInfo"`
+	CreationTime      string                           `json:"CreationTime" xml:"CreationTime"`
+	State             string                           `json:"State" xml:"State"`
+	ErrorCode         string                           `json:"ErrorCode" xml:"ErrorCode"`
+	StatusInfo        string                           `json:"StatusInfo" xml:"StatusInfo"`
+	HeartbeatRate     int                              `json:"HeartbeatRate" xml:"HeartbeatRate"`
+	DataDisks         DataDisksInDescribeSourceServers `json:"DataDisks" xml:"DataDisks"`
+}

+ 21 - 0
services/smc/struct_source_servers.go

@@ -0,0 +1,21 @@
+package smc
+
+//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.
+
+// SourceServers is a nested struct in smc response
+type SourceServers struct {
+	SourceServer []SourceServer `json:"SourceServer" xml:"SourceServer"`
+}

+ 24 - 0
services/smc/struct_tag_resource.go

@@ -0,0 +1,24 @@
+package smc
+
+//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.
+
+// TagResource is a nested struct in smc response
+type TagResource struct {
+	ResourceType string `json:"ResourceType" xml:"ResourceType"`
+	ResourceId   string `json:"ResourceId" xml:"ResourceId"`
+	TagKey       string `json:"TagKey" xml:"TagKey"`
+	TagValue     string `json:"TagValue" xml:"TagValue"`
+}

+ 21 - 0
services/smc/struct_tag_resources.go

@@ -0,0 +1,21 @@
+package smc
+
+//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.
+
+// TagResources is a nested struct in smc response
+type TagResources struct {
+	TagResource []TagResource `json:"TagResource" xml:"TagResource"`
+}

+ 113 - 0
services/smc/tag_resources.go

@@ -0,0 +1,113 @@
+package smc
+
+//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"
+)
+
+// TagResources invokes the smc.TagResources API synchronously
+// api document: https://help.aliyun.com/api/smc/tagresources.html
+func (client *Client) TagResources(request *TagResourcesRequest) (response *TagResourcesResponse, err error) {
+	response = CreateTagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// TagResourcesWithChan invokes the smc.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/smc/tagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourcesWithChan(request *TagResourcesRequest) (<-chan *TagResourcesResponse, <-chan error) {
+	responseChan := make(chan *TagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.TagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// TagResourcesWithCallback invokes the smc.TagResources API asynchronously
+// api document: https://help.aliyun.com/api/smc/tagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) TagResourcesWithCallback(request *TagResourcesRequest, callback func(response *TagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *TagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.TagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// TagResourcesRequest is the request struct for api TagResources
+type TagResourcesRequest struct {
+	*requests.RpcRequest
+	Tag                  *[]TagResourcesTag `position:"Query" name:"Tag"  type:"Repeated"`
+	ResourceId           *[]string          `position:"Query" name:"ResourceId"  type:"Repeated"`
+	ResourceOwnerAccount string             `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer   `position:"Query" name:"OwnerId"`
+	ResourceType         string             `position:"Query" name:"ResourceType"`
+}
+
+// TagResourcesTag is a repeated param struct in TagResourcesRequest
+type TagResourcesTag struct {
+	Value string `name:"Value"`
+	Key   string `name:"Key"`
+}
+
+// TagResourcesResponse is the response struct for api TagResources
+type TagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateTagResourcesRequest creates a request to invoke TagResources API
+func CreateTagResourcesRequest() (request *TagResourcesRequest) {
+	request = &TagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "TagResources", "smc", "openAPI")
+	return
+}
+
+// CreateTagResourcesResponse creates a response to parse from TagResources response
+func CreateTagResourcesResponse() (response *TagResourcesResponse) {
+	response = &TagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/smc/untag_resources.go

@@ -0,0 +1,108 @@
+package smc
+
+//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"
+)
+
+// UntagResources invokes the smc.UntagResources API synchronously
+// api document: https://help.aliyun.com/api/smc/untagresources.html
+func (client *Client) UntagResources(request *UntagResourcesRequest) (response *UntagResourcesResponse, err error) {
+	response = CreateUntagResourcesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UntagResourcesWithChan invokes the smc.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/smc/untagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourcesWithChan(request *UntagResourcesRequest) (<-chan *UntagResourcesResponse, <-chan error) {
+	responseChan := make(chan *UntagResourcesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UntagResources(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UntagResourcesWithCallback invokes the smc.UntagResources API asynchronously
+// api document: https://help.aliyun.com/api/smc/untagresources.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UntagResourcesWithCallback(request *UntagResourcesRequest, callback func(response *UntagResourcesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UntagResourcesResponse
+		var err error
+		defer close(result)
+		response, err = client.UntagResources(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UntagResourcesRequest is the request struct for api UntagResources
+type UntagResourcesRequest struct {
+	*requests.RpcRequest
+	All                  requests.Boolean `position:"Query" name:"All"`
+	ResourceId           *[]string        `position:"Query" name:"ResourceId"  type:"Repeated"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceType         string           `position:"Query" name:"ResourceType"`
+	TagKey               *[]string        `position:"Query" name:"TagKey"  type:"Repeated"`
+}
+
+// UntagResourcesResponse is the response struct for api UntagResources
+type UntagResourcesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUntagResourcesRequest creates a request to invoke UntagResources API
+func CreateUntagResourcesRequest() (request *UntagResourcesRequest) {
+	request = &UntagResourcesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("smc", "2019-06-01", "UntagResources", "smc", "openAPI")
+	return
+}
+
+// CreateUntagResourcesResponse creates a response to parse from UntagResources response
+func CreateUntagResourcesResponse() (response *UntagResourcesResponse) {
+	response = &UntagResourcesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}