clients

package
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyAccessKey = "access_key"
	KeySecretKey = "secret_key"
	KeyRegion    = "region"
)

Variables

View Source
var (
	AliyunCreds     aliyunCreds
	EssEndpointList EssEndpointRespInfoList
)

Functions

func CreateSDKClient

func CreateSDKClient(regionID string) (result *ess20220222.Client, err error)

*

  • 使用AK&SK初始化账号Client
  • @param accessKeyId
  • @param accessKeySecret
  • @return Client
  • @throws Exception

func TerraformSetupBuilder

func TerraformSetupBuilder(version, providerSource, providerVersion string) terraform.SetupFn

TerraformSetupBuilder builds Terraform a terraform.SetupFn function which returns Terraform provider setup configuration

Types

type EssEndpointResp

type EssEndpointResp struct {
	Code int                 `json:"code"`
	Data EssEndpointRespData `json:"data"`
}

每个区域的 endpoint 需要匹配, 否则无法查询到对应的资源信息. 展示页: https://api.aliyun.com/product/Ess API: https://api.aliyun.com/meta/v1/products/Ess/endpoints.json

type EssEndpointRespData

type EssEndpointRespData struct {
	Type      string                  `json:"type"`
	Endpoints EssEndpointRespInfoList `json:"endpoints"`
}

type EssEndpointRespInfo

type EssEndpointRespInfo struct {
	RegionID   string `json:"regionId"`
	RegionName string `json:"regionName"`
	AreaId     string `json:"areaId"`
	AreaName   string `json:"areaName"`
	Public     string `json:"public"`
	VPC        string `json:"vpc"`
}

type EssEndpointRespInfoList

type EssEndpointRespInfoList []EssEndpointRespInfo

func (EssEndpointRespInfoList) Empty

func (r EssEndpointRespInfoList) Empty() bool

func (EssEndpointRespInfoList) Get

func (r EssEndpointRespInfoList) Get(regionID string) (string, error)

func (EssEndpointRespInfoList) Init

func (r EssEndpointRespInfoList) Init() (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL