|
@@ -20,24 +20,24 @@ import (
|
|
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-// CreateTriggerHook invokes the cs.CreateTriggerHook API synchronously
|
|
|
|
|
-// api document: https://help.aliyun.com/api/cs/createtriggerhook.html
|
|
|
|
|
-func (client *Client) CreateTriggerHook(request *CreateTriggerHookRequest) (response *CreateTriggerHookResponse, err error) {
|
|
|
|
|
- response = CreateCreateTriggerHookResponse()
|
|
|
|
|
|
|
+// CreateServiceMesh invokes the cs.CreateServiceMesh API synchronously
|
|
|
|
|
+// api document: https://help.aliyun.com/api/cs/createservicemesh.html
|
|
|
|
|
+func (client *Client) CreateServiceMesh(request *CreateServiceMeshRequest) (response *CreateServiceMeshResponse, err error) {
|
|
|
|
|
+ response = CreateCreateServiceMeshResponse()
|
|
|
err = client.DoAction(request, response)
|
|
err = client.DoAction(request, response)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateTriggerHookWithChan invokes the cs.CreateTriggerHook API asynchronously
|
|
|
|
|
-// api document: https://help.aliyun.com/api/cs/createtriggerhook.html
|
|
|
|
|
|
|
+// CreateServiceMeshWithChan invokes the cs.CreateServiceMesh API asynchronously
|
|
|
|
|
+// api document: https://help.aliyun.com/api/cs/createservicemesh.html
|
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) CreateTriggerHookWithChan(request *CreateTriggerHookRequest) (<-chan *CreateTriggerHookResponse, <-chan error) {
|
|
|
|
|
- responseChan := make(chan *CreateTriggerHookResponse, 1)
|
|
|
|
|
|
|
+func (client *Client) CreateServiceMeshWithChan(request *CreateServiceMeshRequest) (<-chan *CreateServiceMeshResponse, <-chan error) {
|
|
|
|
|
+ responseChan := make(chan *CreateServiceMeshResponse, 1)
|
|
|
errChan := make(chan error, 1)
|
|
errChan := make(chan error, 1)
|
|
|
err := client.AddAsyncTask(func() {
|
|
err := client.AddAsyncTask(func() {
|
|
|
defer close(responseChan)
|
|
defer close(responseChan)
|
|
|
defer close(errChan)
|
|
defer close(errChan)
|
|
|
- response, err := client.CreateTriggerHook(request)
|
|
|
|
|
|
|
+ response, err := client.CreateServiceMesh(request)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
errChan <- err
|
|
errChan <- err
|
|
|
} else {
|
|
} else {
|
|
@@ -52,16 +52,16 @@ func (client *Client) CreateTriggerHookWithChan(request *CreateTriggerHookReques
|
|
|
return responseChan, errChan
|
|
return responseChan, errChan
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateTriggerHookWithCallback invokes the cs.CreateTriggerHook API asynchronously
|
|
|
|
|
-// api document: https://help.aliyun.com/api/cs/createtriggerhook.html
|
|
|
|
|
|
|
+// CreateServiceMeshWithCallback invokes the cs.CreateServiceMesh API asynchronously
|
|
|
|
|
+// api document: https://help.aliyun.com/api/cs/createservicemesh.html
|
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) CreateTriggerHookWithCallback(request *CreateTriggerHookRequest, callback func(response *CreateTriggerHookResponse, err error)) <-chan int {
|
|
|
|
|
|
|
+func (client *Client) CreateServiceMeshWithCallback(request *CreateServiceMeshRequest, callback func(response *CreateServiceMeshResponse, err error)) <-chan int {
|
|
|
result := make(chan int, 1)
|
|
result := make(chan int, 1)
|
|
|
err := client.AddAsyncTask(func() {
|
|
err := client.AddAsyncTask(func() {
|
|
|
- var response *CreateTriggerHookResponse
|
|
|
|
|
|
|
+ var response *CreateServiceMeshResponse
|
|
|
var err error
|
|
var err error
|
|
|
defer close(result)
|
|
defer close(result)
|
|
|
- response, err = client.CreateTriggerHook(request)
|
|
|
|
|
|
|
+ response, err = client.CreateServiceMesh(request)
|
|
|
callback(response, err)
|
|
callback(response, err)
|
|
|
result <- 1
|
|
result <- 1
|
|
|
})
|
|
})
|
|
@@ -73,30 +73,30 @@ func (client *Client) CreateTriggerHookWithCallback(request *CreateTriggerHookRe
|
|
|
return result
|
|
return result
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateTriggerHookRequest is the request struct for api CreateTriggerHook
|
|
|
|
|
-type CreateTriggerHookRequest struct {
|
|
|
|
|
|
|
+// CreateServiceMeshRequest is the request struct for api CreateServiceMesh
|
|
|
|
|
+type CreateServiceMeshRequest struct {
|
|
|
*requests.RoaRequest
|
|
*requests.RoaRequest
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateTriggerHookResponse is the response struct for api CreateTriggerHook
|
|
|
|
|
-type CreateTriggerHookResponse struct {
|
|
|
|
|
|
|
+// CreateServiceMeshResponse is the response struct for api CreateServiceMesh
|
|
|
|
|
+type CreateServiceMeshResponse struct {
|
|
|
*responses.BaseResponse
|
|
*responses.BaseResponse
|
|
|
RequestId string `json:"RequestId" xml:"RequestId"`
|
|
RequestId string `json:"RequestId" xml:"RequestId"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateCreateTriggerHookRequest creates a request to invoke CreateTriggerHook API
|
|
|
|
|
-func CreateCreateTriggerHookRequest() (request *CreateTriggerHookRequest) {
|
|
|
|
|
- request = &CreateTriggerHookRequest{
|
|
|
|
|
|
|
+// CreateCreateServiceMeshRequest creates a request to invoke CreateServiceMesh API
|
|
|
|
|
+func CreateCreateServiceMeshRequest() (request *CreateServiceMeshRequest) {
|
|
|
|
|
+ request = &CreateServiceMeshRequest{
|
|
|
RoaRequest: &requests.RoaRequest{},
|
|
RoaRequest: &requests.RoaRequest{},
|
|
|
}
|
|
}
|
|
|
- request.InitWithApiInfo("CS", "2015-12-15", "CreateTriggerHook", "/hook/trigger", "", "")
|
|
|
|
|
- request.Method = requests.PUT
|
|
|
|
|
|
|
+ request.InitWithApiInfo("CS", "2015-12-15", "CreateServiceMesh", "/servicemesh", "csk", "openAPI")
|
|
|
|
|
+ request.Method = requests.POST
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateCreateTriggerHookResponse creates a response to parse from CreateTriggerHook response
|
|
|
|
|
-func CreateCreateTriggerHookResponse() (response *CreateTriggerHookResponse) {
|
|
|
|
|
- response = &CreateTriggerHookResponse{
|
|
|
|
|
|
|
+// CreateCreateServiceMeshResponse creates a response to parse from CreateServiceMesh response
|
|
|
|
|
+func CreateCreateServiceMeshResponse() (response *CreateServiceMeshResponse) {
|
|
|
|
|
+ response = &CreateServiceMeshResponse{
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
}
|
|
}
|
|
|
return
|
|
return
|