Documentation ¶
Overview ¶
Copyright © 2019 Allan Hung <hung.allan@gmail.com>
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.
Index ¶
- func AddInstanceTags(aliClient *AliClient, ecsInstance ecs.Instance, ecsTags []ecs.AddTagsTag) error
- func QueryECS(aliClient *AliClient, queryFlags QueryEcsFlags) ([]ecs.Instance, error)
- func QuerySpotPrice(aliClient *AliClient, instanceType string) ([]ecs.SpotPriceType, error)
- func QueryVpc(aliClient *AliClient, pageSize int) ([]ecs.Vpc, error)
- type AliClient
- type AliCloudConfig
- type QueryEcsFlags
- type QuerySpotPriceFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInstanceTags ¶
func QueryECS ¶
func QueryECS(aliClient *AliClient, queryFlags QueryEcsFlags) ([]ecs.Instance, error)
func QuerySpotPrice ¶
func QuerySpotPrice(aliClient *AliClient, instanceType string) ([]ecs.SpotPriceType, error)
Types ¶
type AliClient ¶
type AliClient struct { RegionID string EcsClient ecs.Client // contains filtered or unexported fields }
func NewAliClient ¶
func NewAliClient(cfg *AliCloudConfig) (*AliClient, error)
type AliCloudConfig ¶
type AliCloudConfig struct { RegionID string `json:"regionId" yaml:"regionId"` AccessKeyID string `json:"accessKeyId" yaml:"accessKeyId"` AccessKeySecret string `json:"accessKeySecret" yaml:"accessKeySecret"` VPCID string `json:"vpcId" yaml:"vpcId"` RoleName string `json:"-" yaml:"-"` // For ECS RAM role only StsToken string `json:"-" yaml:"-"` ExpireTime time.Time `json:"-" yaml:"-"` }
func (*AliCloudConfig) GetCloudConfig ¶
func (a *AliCloudConfig) GetCloudConfig() error
type QueryEcsFlags ¶
Click to show internal directories.
Click to hide internal directories.