1234567891011121314151617181920212223242526 |
- package albb
- import (
- openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
- "github.com/alibabacloud-go/tea/tea"
- )
- var _result_sdk = &openapi.Client{}
- var _result_is bool
- func CreateClient () (_result_sdk *openapi.Client,_err error) {
- if _result_is {
- return _result_sdk, _err
- }
- // The project code leakage may result in the leakage of AccessKey, posing a threat to the security of all resources under the account. The following code examples are for reference only.
- // It is recommended to use the more secure STS credential. For more credentials, please refer to: https://www.alibabacloud.com/help/en/alibaba-cloud-sdk-262060/latest/configure-credentials-378661.
- config := &openapi.Config{
- // Required, please ensure that the environment variables ALIBABA_CLOUD_ACCESS_KEY_ID is set.
- AccessKeyId: tea.String("LTAI5tFYbEUnUBH3sh7wV8Fj"),
- // Required, please ensure that the environment variables ALIBABA_CLOUD_ACCESS_KEY_SECRET is set.
- AccessKeySecret: tea.String("D2LXL9oMNKUtpp2xqoH1CVIrEHy2vi"),
- }
- // See https://api.alibabacloud.com/product/Ecs.
- config.Endpoint = tea.String("ecs.cn-hangzhou.aliyuncs.com")
- _result_sdk, _err = openapi.NewClient(config)
- return _result_sdk, _err
- }
|