tags

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionOpts

type ActionOpts struct {
	Tags   []ResourceTag `json:"tags" required:"true"`
	Action string        `json:"action" required:"ture"`
}

ActionOpts is a struct contains the parameters of creating/deleting group tags

func (ActionOpts) ToGroupTagsActionMap

func (opts ActionOpts) ToGroupTagsActionMap() (map[string]interface{}, error)

ToGroupTagsActionMap build the action request in json format

type ActionOptsBuilder

type ActionOptsBuilder interface {
	ToGroupTagsActionMap() (map[string]interface{}, error)
}

ActionOptsBuilder is an interface from which can build the request of creating/deleting group tags

type ActionResult

type ActionResult struct {
	golangsdk.ErrResult
}

ActionResult is the action result which is the result of create or delete operations

func Create

func Create(client *golangsdk.ServiceClient, id string, tags []ResourceTag) (r ActionResult)

Create is a method of creating group tags by id

func Delete

func Delete(client *golangsdk.ServiceClient, id string, tags []ResourceTag) (r ActionResult)

Delete is a method of deleting group tags by id

func Update

func Update(client *golangsdk.ServiceClient, id string, tags []ResourceTag) (r ActionResult)

Update is a method of updating group tags by id, used by hcs

type GetResult

type GetResult struct {
	golangsdk.Result
}

GetResult contains the body of getting detailed group tags request

func Get

func Get(client *golangsdk.ServiceClient, id string) (r GetResult)

Get is a method of getting the tags of the group by id

func (GetResult) Extract

func (r GetResult) Extract() (ResourceTags, error)

Extract method will parse the result body into ResourceTags struct

type ListResult

type ListResult struct {
	golangsdk.Result
}

ListResult contains the body of getting detailed group tags request

func List

func List(client *golangsdk.ServiceClient) (r ListResult)

List is a method of getting the tags of all groups

func (ListResult) Extract

func (r ListResult) Extract() (ResourceTags, error)

Extract method will parse the result body into ResourceTags struct

type ResourceTag

type ResourceTag struct {
	Key   string `json:"key" required:"ture"`
	Value string `json:"value,omitempty"`
}

ResourceTag is in key-value format

type ResourceTags

type ResourceTags struct {
	Tags    []ResourceTag `json:"tags"`
	SysTags []ResourceTag `json:"sys_tags"`
}

ResourceTags represents the struct of one autoscaling group

Jump to

Keyboard shortcuts

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