Browse Source

Generated 2020-02-06 for acm.

sdk-team 5 năm trước cách đây
mục cha
commit
90b0e9d832

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2020-03-18 Version: v1.61.66
+- Generated 2020-02-06 for `acm`.
+- ACM POP SDK.
+
 2020-03-18 Version: v1.61.65
 - Generated 2019-11-18 for `address-purification`.
 - Support product addrp.

+ 129 - 0
services/acm/client.go

@@ -0,0 +1,129 @@
+package acm
+
+//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
+}

+ 113 - 0
services/acm/create_configuration.go

@@ -0,0 +1,113 @@
+package acm
+
+//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"
+)
+
+// CreateConfiguration invokes the acm.CreateConfiguration API synchronously
+// api document: https://help.aliyun.com/api/acm/createconfiguration.html
+func (client *Client) CreateConfiguration(request *CreateConfigurationRequest) (response *CreateConfigurationResponse, err error) {
+	response = CreateCreateConfigurationResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateConfigurationWithChan invokes the acm.CreateConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/createconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateConfigurationWithChan(request *CreateConfigurationRequest) (<-chan *CreateConfigurationResponse, <-chan error) {
+	responseChan := make(chan *CreateConfigurationResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateConfiguration(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateConfigurationWithCallback invokes the acm.CreateConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/createconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateConfigurationWithCallback(request *CreateConfigurationRequest, callback func(response *CreateConfigurationResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateConfigurationResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateConfiguration(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateConfigurationRequest is the request struct for api CreateConfiguration
+type CreateConfigurationRequest struct {
+	*requests.RoaRequest
+	DataId      string `position:"Body" name:"DataId"`
+	AppName     string `position:"Body" name:"AppName"`
+	NamespaceId string `position:"Body" name:"NamespaceId"`
+	Type        string `position:"Body" name:"Type"`
+	Content     string `position:"Body" name:"Content"`
+	Group       string `position:"Body" name:"Group"`
+	Desc        string `position:"Body" name:"Desc"`
+	Tags        string `position:"Body" name:"Tags"`
+}
+
+// CreateConfigurationResponse is the response struct for api CreateConfiguration
+type CreateConfigurationResponse struct {
+	*responses.BaseResponse
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateCreateConfigurationRequest creates a request to invoke CreateConfiguration API
+func CreateCreateConfigurationRequest() (request *CreateConfigurationRequest) {
+	request = &CreateConfigurationRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "CreateConfiguration", "/diamond-ops/pop/configuration", "acms", "openAPI")
+	request.Method = requests.POST
+	return
+}
+
+// CreateCreateConfigurationResponse creates a response to parse from CreateConfiguration response
+func CreateCreateConfigurationResponse() (response *CreateConfigurationResponse) {
+	response = &CreateConfigurationResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/acm/create_namespace.go

@@ -0,0 +1,107 @@
+package acm
+
+//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"
+)
+
+// CreateNamespace invokes the acm.CreateNamespace API synchronously
+// api document: https://help.aliyun.com/api/acm/createnamespace.html
+func (client *Client) CreateNamespace(request *CreateNamespaceRequest) (response *CreateNamespaceResponse, err error) {
+	response = CreateCreateNamespaceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateNamespaceWithChan invokes the acm.CreateNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/createnamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateNamespaceWithChan(request *CreateNamespaceRequest) (<-chan *CreateNamespaceResponse, <-chan error) {
+	responseChan := make(chan *CreateNamespaceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateNamespace(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateNamespaceWithCallback invokes the acm.CreateNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/createnamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateNamespaceWithCallback(request *CreateNamespaceRequest, callback func(response *CreateNamespaceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateNamespaceResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateNamespace(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateNamespaceRequest is the request struct for api CreateNamespace
+type CreateNamespaceRequest struct {
+	*requests.RoaRequest
+	Name string `position:"Body" name:"Name"`
+}
+
+// CreateNamespaceResponse is the response struct for api CreateNamespace
+type CreateNamespaceResponse struct {
+	*responses.BaseResponse
+	Code        string `json:"Code" xml:"Code"`
+	Message     string `json:"Message" xml:"Message"`
+	NamespaceId string `json:"NamespaceId" xml:"NamespaceId"`
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateCreateNamespaceRequest creates a request to invoke CreateNamespace API
+func CreateCreateNamespaceRequest() (request *CreateNamespaceRequest) {
+	request = &CreateNamespaceRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "CreateNamespace", "/diamond-ops/pop/namespace", "acms", "openAPI")
+	request.Method = requests.POST
+	return
+}
+
+// CreateCreateNamespaceResponse creates a response to parse from CreateNamespace response
+func CreateCreateNamespaceResponse() (response *CreateNamespaceResponse) {
+	response = &CreateNamespaceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/acm/delete_configuration.go

@@ -0,0 +1,108 @@
+package acm
+
+//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"
+)
+
+// DeleteConfiguration invokes the acm.DeleteConfiguration API synchronously
+// api document: https://help.aliyun.com/api/acm/deleteconfiguration.html
+func (client *Client) DeleteConfiguration(request *DeleteConfigurationRequest) (response *DeleteConfigurationResponse, err error) {
+	response = CreateDeleteConfigurationResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteConfigurationWithChan invokes the acm.DeleteConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/deleteconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteConfigurationWithChan(request *DeleteConfigurationRequest) (<-chan *DeleteConfigurationResponse, <-chan error) {
+	responseChan := make(chan *DeleteConfigurationResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteConfiguration(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteConfigurationWithCallback invokes the acm.DeleteConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/deleteconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteConfigurationWithCallback(request *DeleteConfigurationRequest, callback func(response *DeleteConfigurationResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteConfigurationResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteConfiguration(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteConfigurationRequest is the request struct for api DeleteConfiguration
+type DeleteConfigurationRequest struct {
+	*requests.RoaRequest
+	DataId      string `position:"Query" name:"DataId"`
+	NamespaceId string `position:"Query" name:"NamespaceId"`
+	Group       string `position:"Query" name:"Group"`
+}
+
+// DeleteConfigurationResponse is the response struct for api DeleteConfiguration
+type DeleteConfigurationResponse struct {
+	*responses.BaseResponse
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteConfigurationRequest creates a request to invoke DeleteConfiguration API
+func CreateDeleteConfigurationRequest() (request *DeleteConfigurationRequest) {
+	request = &DeleteConfigurationRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "DeleteConfiguration", "/diamond-ops/pop/configuration", "acms", "openAPI")
+	request.Method = requests.DELETE
+	return
+}
+
+// CreateDeleteConfigurationResponse creates a response to parse from DeleteConfiguration response
+func CreateDeleteConfigurationResponse() (response *DeleteConfigurationResponse) {
+	response = &DeleteConfigurationResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/acm/delete_namespace.go

@@ -0,0 +1,106 @@
+package acm
+
+//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"
+)
+
+// DeleteNamespace invokes the acm.DeleteNamespace API synchronously
+// api document: https://help.aliyun.com/api/acm/deletenamespace.html
+func (client *Client) DeleteNamespace(request *DeleteNamespaceRequest) (response *DeleteNamespaceResponse, err error) {
+	response = CreateDeleteNamespaceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteNamespaceWithChan invokes the acm.DeleteNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/deletenamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteNamespaceWithChan(request *DeleteNamespaceRequest) (<-chan *DeleteNamespaceResponse, <-chan error) {
+	responseChan := make(chan *DeleteNamespaceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteNamespace(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteNamespaceWithCallback invokes the acm.DeleteNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/deletenamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteNamespaceWithCallback(request *DeleteNamespaceRequest, callback func(response *DeleteNamespaceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteNamespaceResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteNamespace(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteNamespaceRequest is the request struct for api DeleteNamespace
+type DeleteNamespaceRequest struct {
+	*requests.RoaRequest
+	NamespaceId string `position:"Query" name:"NamespaceId"`
+}
+
+// DeleteNamespaceResponse is the response struct for api DeleteNamespace
+type DeleteNamespaceResponse struct {
+	*responses.BaseResponse
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteNamespaceRequest creates a request to invoke DeleteNamespace API
+func CreateDeleteNamespaceRequest() (request *DeleteNamespaceRequest) {
+	request = &DeleteNamespaceRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "DeleteNamespace", "/diamond-ops/pop/namespace", "acms", "openAPI")
+	request.Method = requests.DELETE
+	return
+}
+
+// CreateDeleteNamespaceResponse creates a response to parse from DeleteNamespace response
+func CreateDeleteNamespaceResponse() (response *DeleteNamespaceResponse) {
+	response = &DeleteNamespaceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/acm/deploy_configuration.go

@@ -0,0 +1,113 @@
+package acm
+
+//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"
+)
+
+// DeployConfiguration invokes the acm.DeployConfiguration API synchronously
+// api document: https://help.aliyun.com/api/acm/deployconfiguration.html
+func (client *Client) DeployConfiguration(request *DeployConfigurationRequest) (response *DeployConfigurationResponse, err error) {
+	response = CreateDeployConfigurationResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeployConfigurationWithChan invokes the acm.DeployConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/deployconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeployConfigurationWithChan(request *DeployConfigurationRequest) (<-chan *DeployConfigurationResponse, <-chan error) {
+	responseChan := make(chan *DeployConfigurationResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeployConfiguration(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeployConfigurationWithCallback invokes the acm.DeployConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/deployconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeployConfigurationWithCallback(request *DeployConfigurationRequest, callback func(response *DeployConfigurationResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeployConfigurationResponse
+		var err error
+		defer close(result)
+		response, err = client.DeployConfiguration(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeployConfigurationRequest is the request struct for api DeployConfiguration
+type DeployConfigurationRequest struct {
+	*requests.RoaRequest
+	DataId      string `position:"Body" name:"DataId"`
+	AppName     string `position:"Body" name:"AppName"`
+	NamespaceId string `position:"Body" name:"NamespaceId"`
+	Type        string `position:"Body" name:"Type"`
+	Content     string `position:"Body" name:"Content"`
+	Group       string `position:"Body" name:"Group"`
+	Desc        string `position:"Body" name:"Desc"`
+	Tags        string `position:"Body" name:"Tags"`
+}
+
+// DeployConfigurationResponse is the response struct for api DeployConfiguration
+type DeployConfigurationResponse struct {
+	*responses.BaseResponse
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeployConfigurationRequest creates a request to invoke DeployConfiguration API
+func CreateDeployConfigurationRequest() (request *DeployConfigurationRequest) {
+	request = &DeployConfigurationRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "DeployConfiguration", "/diamond-ops/pop/configuration", "acms", "openAPI")
+	request.Method = requests.PUT
+	return
+}
+
+// CreateDeployConfigurationResponse creates a response to parse from DeployConfiguration response
+func CreateDeployConfigurationResponse() (response *DeployConfigurationResponse) {
+	response = &DeployConfigurationResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/acm/describe_configuration.go

@@ -0,0 +1,109 @@
+package acm
+
+//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"
+)
+
+// DescribeConfiguration invokes the acm.DescribeConfiguration API synchronously
+// api document: https://help.aliyun.com/api/acm/describeconfiguration.html
+func (client *Client) DescribeConfiguration(request *DescribeConfigurationRequest) (response *DescribeConfigurationResponse, err error) {
+	response = CreateDescribeConfigurationResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeConfigurationWithChan invokes the acm.DescribeConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/describeconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeConfigurationWithChan(request *DescribeConfigurationRequest) (<-chan *DescribeConfigurationResponse, <-chan error) {
+	responseChan := make(chan *DescribeConfigurationResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeConfiguration(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeConfigurationWithCallback invokes the acm.DescribeConfiguration API asynchronously
+// api document: https://help.aliyun.com/api/acm/describeconfiguration.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeConfigurationWithCallback(request *DescribeConfigurationRequest, callback func(response *DescribeConfigurationResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeConfigurationResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeConfiguration(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeConfigurationRequest is the request struct for api DescribeConfiguration
+type DescribeConfigurationRequest struct {
+	*requests.RoaRequest
+	DataId      string `position:"Query" name:"DataId"`
+	NamespaceId string `position:"Query" name:"NamespaceId"`
+	Group       string `position:"Query" name:"Group"`
+}
+
+// DescribeConfigurationResponse is the response struct for api DescribeConfiguration
+type DescribeConfigurationResponse struct {
+	*responses.BaseResponse
+	Code          string        `json:"Code" xml:"Code"`
+	Message       string        `json:"Message" xml:"Message"`
+	RequestId     string        `json:"RequestId" xml:"RequestId"`
+	Configuration Configuration `json:"Configuration" xml:"Configuration"`
+}
+
+// CreateDescribeConfigurationRequest creates a request to invoke DescribeConfiguration API
+func CreateDescribeConfigurationRequest() (request *DescribeConfigurationRequest) {
+	request = &DescribeConfigurationRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "DescribeConfiguration", "/diamond-ops/pop/configuration", "acms", "openAPI")
+	request.Method = requests.GET
+	return
+}
+
+// CreateDescribeConfigurationResponse creates a response to parse from DescribeConfiguration response
+func CreateDescribeConfigurationResponse() (response *DescribeConfigurationResponse) {
+	response = &DescribeConfigurationResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/acm/describe_namespace.go

@@ -0,0 +1,107 @@
+package acm
+
+//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"
+)
+
+// DescribeNamespace invokes the acm.DescribeNamespace API synchronously
+// api document: https://help.aliyun.com/api/acm/describenamespace.html
+func (client *Client) DescribeNamespace(request *DescribeNamespaceRequest) (response *DescribeNamespaceResponse, err error) {
+	response = CreateDescribeNamespaceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeNamespaceWithChan invokes the acm.DescribeNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/describenamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeNamespaceWithChan(request *DescribeNamespaceRequest) (<-chan *DescribeNamespaceResponse, <-chan error) {
+	responseChan := make(chan *DescribeNamespaceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeNamespace(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeNamespaceWithCallback invokes the acm.DescribeNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/describenamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeNamespaceWithCallback(request *DescribeNamespaceRequest, callback func(response *DescribeNamespaceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeNamespaceResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeNamespace(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeNamespaceRequest is the request struct for api DescribeNamespace
+type DescribeNamespaceRequest struct {
+	*requests.RoaRequest
+	NamespaceId string `position:"Query" name:"NamespaceId"`
+}
+
+// DescribeNamespaceResponse is the response struct for api DescribeNamespace
+type DescribeNamespaceResponse struct {
+	*responses.BaseResponse
+	Code      string    `json:"Code" xml:"Code"`
+	Message   string    `json:"Message" xml:"Message"`
+	RequestId string    `json:"RequestId" xml:"RequestId"`
+	Namespace Namespace `json:"Namespace" xml:"Namespace"`
+}
+
+// CreateDescribeNamespaceRequest creates a request to invoke DescribeNamespace API
+func CreateDescribeNamespaceRequest() (request *DescribeNamespaceRequest) {
+	request = &DescribeNamespaceRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "DescribeNamespace", "/diamond-ops/pop/namespace", "acms", "openAPI")
+	request.Method = requests.GET
+	return
+}
+
+// CreateDescribeNamespaceResponse creates a response to parse from DescribeNamespace response
+func CreateDescribeNamespaceResponse() (response *DescribeNamespaceResponse) {
+	response = &DescribeNamespaceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 20 - 0
services/acm/endpoint.go

@@ -0,0 +1,20 @@
+package acm
+
+// EndpointMap Endpoint Data
+var EndpointMap map[string]string
+
+// EndpointType regional or central
+var EndpointType = "regional"
+
+// 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
+}

+ 28 - 0
services/acm/struct_configuration.go

@@ -0,0 +1,28 @@
+package acm
+
+//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.
+
+// Configuration is a nested struct in acm response
+type Configuration struct {
+	AppName string `json:"AppName" xml:"AppName"`
+	Content string `json:"Content" xml:"Content"`
+	DataId  string `json:"DataId" xml:"DataId"`
+	Desc    string `json:"Desc" xml:"Desc"`
+	Group   string `json:"Group" xml:"Group"`
+	Md5     string `json:"Md5" xml:"Md5"`
+	Tags    string `json:"Tags" xml:"Tags"`
+	Type    string `json:"Type" xml:"Type"`
+}

+ 25 - 0
services/acm/struct_namespace.go

@@ -0,0 +1,25 @@
+package acm
+
+//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.
+
+// Namespace is a nested struct in acm response
+type Namespace struct {
+	AccessKey string `json:"AccessKey" xml:"AccessKey"`
+	Endpoint  string `json:"Endpoint" xml:"Endpoint"`
+	Name      string `json:"Name" xml:"Name"`
+	RegionId  string `json:"RegionId" xml:"RegionId"`
+	SecretKey string `json:"SecretKey" xml:"SecretKey"`
+}

+ 107 - 0
services/acm/update_namespace.go

@@ -0,0 +1,107 @@
+package acm
+
+//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"
+)
+
+// UpdateNamespace invokes the acm.UpdateNamespace API synchronously
+// api document: https://help.aliyun.com/api/acm/updatenamespace.html
+func (client *Client) UpdateNamespace(request *UpdateNamespaceRequest) (response *UpdateNamespaceResponse, err error) {
+	response = CreateUpdateNamespaceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateNamespaceWithChan invokes the acm.UpdateNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/updatenamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateNamespaceWithChan(request *UpdateNamespaceRequest) (<-chan *UpdateNamespaceResponse, <-chan error) {
+	responseChan := make(chan *UpdateNamespaceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateNamespace(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateNamespaceWithCallback invokes the acm.UpdateNamespace API asynchronously
+// api document: https://help.aliyun.com/api/acm/updatenamespace.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateNamespaceWithCallback(request *UpdateNamespaceRequest, callback func(response *UpdateNamespaceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateNamespaceResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateNamespace(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateNamespaceRequest is the request struct for api UpdateNamespace
+type UpdateNamespaceRequest struct {
+	*requests.RoaRequest
+	NamespaceName string `position:"Body" name:"NamespaceName"`
+	NamespaceId   string `position:"Body" name:"NamespaceId"`
+}
+
+// UpdateNamespaceResponse is the response struct for api UpdateNamespace
+type UpdateNamespaceResponse struct {
+	*responses.BaseResponse
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUpdateNamespaceRequest creates a request to invoke UpdateNamespace API
+func CreateUpdateNamespaceRequest() (request *UpdateNamespaceRequest) {
+	request = &UpdateNamespaceRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("acm", "2020-02-06", "UpdateNamespace", "/diamond-ops/pop/namespace", "acms", "openAPI")
+	request.Method = requests.PUT
+	return
+}
+
+// CreateUpdateNamespaceResponse creates a response to parse from UpdateNamespace response
+func CreateUpdateNamespaceResponse() (response *UpdateNamespaceResponse) {
+	response = &UpdateNamespaceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}