tag

package
v0.0.0-...-a452e60 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagHost = "tag.api.qcloud.com"
	TagPath = "/v2/index.php"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(credential common.CredentialInterface, opts common.Opts) (*Client, error)

func NewClientFromEnv

func NewClientFromEnv() (*Client, error)

func (*Client) GetResourceTagsByResourceIds

func (client *Client) GetResourceTagsByResourceIds(args *GetResourceTagsByResourceIdsArgs) (*GetResourceTagsByResourceIdsResponse, error)

func (*Client) GetResourcesByTags

func (client *Client) GetResourcesByTags(args *GetResourcesByTagsArgs) (*GetResourcesByTagsResponse, error)

func (*Client) ModifyResourceTags

func (client *Client) ModifyResourceTags(args *ModifyResourceTagsArgs) (*ModifyResourceTagsArgsResponse, error)

type GetResourceTagsByResourceIdsArgs

type GetResourceTagsByResourceIdsArgs struct {
	CreateUin      *string  `qcloud_arg:"createUin"`
	Region         string   `qcloud_arg:"region,required"`
	ServiceType    string   `qcloud_arg:"serviceType,required"`
	ResourcePrefix string   `qcloud_arg:"resourcePrefix,required"`
	ResourceIds    []string `qcloud_arg:"resourceIds,required"`
	Page           *int     `qcloud_arg:"page"`
	Rp             *int     `qcloud_arg:"rp"`
}

type GetResourceTagsByResourceIdsResponse

type GetResourceTagsByResourceIdsResponse struct {
	Response
	Data struct {
		Total int           `json:"total"`
		Page  int           `json:"page"`
		Rp    int           `json:"rp"`
		Rows  []ResourceTag `json:"rows"`
	} `json:"data"`
}

type GetResourcesByTagsArgs

type GetResourcesByTagsArgs struct {
	CreateUin  *int        `qcloud_arg:"createUin"`
	TagFilters []TagFilter `qcloud_arg:"tagFilters,required"`
	Page       *int        `qcloud_arg:"page"`
	Rp         *int        `qcloud_arg:"rp"`
}

type GetResourcesByTagsResponse

type GetResourcesByTagsResponse struct {
	Response
	Data struct {
		Total int        `json:"total"`
		Page  int        `json:"page"`
		Rp    int        `json:"rp"`
		Rows  []Resource `json:"rows"`
	} `json:"data"`
}

type ModifyResourceTagsArgs

type ModifyResourceTagsArgs struct {
	Resource    string `qcloud_arg:"resource,required"`
	AddTags     *[]Tag `qcloud_arg:"addTags"`
	ReplaceTags *[]Tag `qcloud_arg:"replaceTags"`
	DeleteTags  *[]Tag `qcloud_arg:"deleteTags"`
}

type ModifyResourceTagsArgsResponse

type ModifyResourceTagsArgsResponse struct {
	Response
}

type Resource

type Resource struct {
	Region        string        `json:"region"`
	ServiceType   string        `json:"resourceType"`
	ResoucePrefix string        `json:"resourcePrefix"`
	ResourceID    string        `json:"resourceId"`
	Tags          []ResourceTag `json:"tags"`
}

type ResourceTag

type ResourceTag struct {
	TagKey     string `json:"tagKey"`
	TagValue   string `json:"tagValue"`
	ResourceId string `json:"resourceId"`
}

type Response

type Response struct {
	Code     int    `json:"code"`
	Message  string `json:"message"`
	CodeDesc string `json:"codeDesc"`
}

type Tag

type Tag struct {
	TagKey   *string `qcloud_arg:"tagKey" json:"tagKey"`
	TagValue *string `qcloud_arg:"tagValue" json:"tagValue"`
}

type TagFilter

type TagFilter struct {
	TagKey   *string   `qcloud_arg:"tagKey"`
	TagValue *[]string `qcloud_arg:"tagValue"`
}

Jump to

Keyboard shortcuts

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