resmanager

package
v0.9.208 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

resmanager.go - the resmanager APIs definition supported by the resmanager service

Index

Constants

View Source
const (
	URI_PREFIX                = bce.URI_PREFIX
	DEFAULT_ENDPOINT          = "resourcemanager.baidubce.com"
	REQUEST_BASE_RESOURCE     = "v1/res/resource"
	REQUEST_CHANGE_GROUP      = REQUEST_BASE_RESOURCE + "/move"
	REQUEST_QUERY_GROUP       = "v1/res/group"
	REQUEST_QUERY_GROUP_BATCH = REQUEST_BASE_RESOURCE + "/batch/queryGroupRes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BindGroupInfo added in v0.9.175

type BindGroupInfo struct {
	GroupInfo
	BindTime string `json:"bindTime"`
}

type BindResourceResult

type BindResourceResult struct {
	Status    string     `json:"status"`
	ResGroups []ResGroup `json:"resGroups"`
}

type BindResourceToGroupArgs

type BindResourceToGroupArgs struct {
	Bindings []Binding `json:"bindings"`
}

type Binding

type Binding struct {
	ResourceId     string `json:"resourceId"`
	ResourceType   string `json:"resourceType"`
	ResourceRegion string `json:"resourceRegion"`
	GroupId        string `json:"groupId"`
}

type ChangeResourceGroupArgs

type ChangeResourceGroupArgs struct {
	MoveResModels []MoveResModel `json:"moveResModels"`
}

type Client

type Client struct {
	*bce.BceClient
}

Client of Group service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

func (*Client) BindResourceToGroup

func (c *Client) BindResourceToGroup(args *BindResourceToGroupArgs) (*BindResourceResult, error)

func (*Client) ChangeResourceGroup

func (c *Client) ChangeResourceGroup(args *ChangeResourceGroupArgs) (*BindResourceResult, error)

func (*Client) CreateResourceGroup added in v0.9.207

func (c *Client) CreateResourceGroup(args *CreateResourceGroupArgs) (*CreateResourceGroupResponse, error)

func (*Client) GetResGroupBatch added in v0.9.175

func (c *Client) GetResGroupBatch(args *ResGroupDetailRequest) (*ResGroupDetailResponse, error)

func (*Client) QueryGroupList

func (c *Client) QueryGroupList(name string) (*GroupList, error)

func (*Client) RemoveResourceFromGroup

func (c *Client) RemoveResourceFromGroup(args *BindResourceToGroupArgs) error

type CreateResourceGroupArgs added in v0.9.207

type CreateResourceGroupArgs struct {
	Name  string `json:"name"`
	Extra string `json:"extra"`
}

type CreateResourceGroupResponse added in v0.9.208

type CreateResourceGroupResponse struct {
	GroupId string `json:"groupId"`
}

type Group

type Group struct {
	Name       string `json:"name"`
	Extra      string `json:"extra"`
	ParentUUID string `json:"parentUuid"`
	GroupId    string `json:"groupId"`
}

type GroupInfo added in v0.9.175

type GroupInfo struct {
	Name       string `json:"name"`
	Extra      string `json:"extra"`
	ParentUUID string `json:"parentUuid"`
	GroupId    string `json:"groupId"`
	AccountId  string `json:"accountId"`
	UserId     string `json:"userId"`
	CreateTime string `json:"createTime"`
	UpdateTime string `json:"updateTime"`
	DeleteTime string `json:"deleteTime"`
}

type GroupList

type GroupList struct {
	GroupTrees []GroupTree `json:"groups"`
}

type GroupTree

type GroupTree struct {
	ParentID string      `json:"parentId"`
	GroupID  string      `json:"groupId"`
	Name     string      `json:"name"`
	Extra    string      `json:"extra"`
	Children []GroupTree `json:"children"`
}

type MoveResModel

type MoveResModel struct {
	TargetGroupId   string          `json:"targetGroupId"`
	OldGroupResInfo OldGroupResInfo `json:"oldGroupResInfo"`
}

type OldGroupResInfo

type OldGroupResInfo struct {
	ResourceId     string `json:"resourceId"`
	ResourceType   string `json:"resourceType"`
	ResourceRegion string `json:"resourceRegion"`
	GroupId        string `json:"groupId"`
}

type ResGroup

type ResGroup struct {
	AccountID string  `json:"accountId"`
	UserID    string  `json:"userId"`
	Name      string  `json:"name"`
	Type      string  `json:"type"`
	Region    string  `json:"region"`
	ID        string  `json:"id"`
	UUID      string  `json:"uuid"`
	Summary   string  `json:"summary"`
	URL       string  `json:"url"`
	Groups    []Group `json:"groups"`
}

type ResGroupDetailRequest added in v0.9.175

type ResGroupDetailRequest struct {
	ResourceBrief []ResourceBrief `json:"resourceBriefs"`
}

type ResGroupDetailResponse added in v0.9.175

type ResGroupDetailResponse struct {
	ResourceGroupsDetailFull []ResourceGroupsDetailFull `json:"resGroups"`
}

type ResourceBrief added in v0.9.175

type ResourceBrief struct {
	ResourceId     string `json:"resourceId"`
	ResourceType   string `json:"resourceType"`
	ResourceRegion string `json:"resourceRegion"`
}

type ResourceGroupsDetailFull added in v0.9.175

type ResourceGroupsDetailFull struct {
	ResourceInfo
	BindGroupInfo []BindGroupInfo `json:"groups"`
}

type ResourceGroupsInfo added in v0.9.177

type ResourceGroupsInfo struct {
	ResourceInfo
	GroupIds []string `json:"groupIds"`
}

type ResourceGroupsPageInfo added in v0.9.177

type ResourceGroupsPageInfo struct {
	ResourceGroupsInfo []ResourceGroupsInfo `json:"infos"`
	Total              int                  `json:"total"`
}

type ResourceInfo added in v0.9.175

type ResourceInfo struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	Region string `json:"region"`
	// 资源的短id
	Id string `json:"id"`
	// 资源的长id
	UUID      string `json:"uuid"`
	Summary   string `json:"summary"`
	Url       string `json:"url"`
	AccountId string `json:"accountId"`
	UserId    string `json:"userId"`
	Tag       []Tag  `json:"tags"`
}

type Tag added in v0.9.175

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

Jump to

Keyboard shortcuts

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