zrm

package
v0.2.53 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Overview

* Zenlayer.com Inc. * Copyright (c) 2014-2022 All Rights Reserved.

Index

Constants

View Source
const (
	APIVersion = "2025-10-14"
	SERVICE    = "zrm"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(config *common.Config, secretKeyId, secretKeyPassword string) (client *Client, err error)

func NewClientWithSecretKey

func NewClientWithSecretKey(secretKeyId, secretKeyPassword string) (client *Client, err error)

func NewClientWithToken added in v0.2.37

func NewClientWithToken(token string) (client *Client, err error)

func NewClientWithTokenAndConfig added in v0.2.37

func NewClientWithTokenAndConfig(config *common.Config, token string) (client *Client, err error)

func (*Client) CreateTags

func (c *Client) CreateTags(request *CreateTagsRequest) (response *CreateTagsResponse, err error)

CreateTags 批量创建标签。

func (*Client) DeleteTags

func (c *Client) DeleteTags(request *DeleteTagsRequest) (response *DeleteTagsResponse, err error)

DeleteTags 批量删除标签。

func (*Client) DescribeResourceByTags added in v0.2.24

func (c *Client) DescribeResourceByTags(request *DescribeResourceByTagsRequest) (response *DescribeResourceByTagsResponse, err error)

DescribeResourceByTags 获取标签下绑定的所有资源列表。

func (*Client) DescribeResourceTags

func (c *Client) DescribeResourceTags(request *DescribeResourceTagsRequest) (response *DescribeResourceTagsResponse, err error)

DescribeResourceTags 获取某个资源下绑定的所有标签列表。

func (*Client) DescribeResourceTypes added in v0.2.53

func (c *Client) DescribeResourceTypes(request *DescribeResourceTypesRequest) (response *DescribeResourceTypesResponse, err error)

DescribeResourceTypes 查询当前支持的资源类型,支持按所属服务与资源类型筛选。

func (*Client) DescribeResources added in v0.2.53

func (c *Client) DescribeResources(request *DescribeResourcesRequest) (response *DescribeResourcesResponse, err error)

DescribeResources 按资源唯一标识或资源名称搜索当前Team下的所有资源。

func (*Client) DescribeTags

func (c *Client) DescribeTags(request *DescribeTagsRequest) (response *DescribeTagsResponse, err error)

DescribeTags 标签分页列表。

func (*Client) ModifyResourceTags added in v0.2.16

func (c *Client) ModifyResourceTags(request *ModifyResourceTagsRequest) (response *ModifyResourceTagsResponse, err error)

ModifyResourceTags 修改某个资源的标签。

func (*Client) TagBindResources

func (c *Client) TagBindResources(request *TagBindResourcesRequest) (response *TagBindResourcesResponse, err error)

TagBindResources 标签批量绑定资源。

func (*Client) TagUnbindResources

func (c *Client) TagUnbindResources(request *TagUnbindResourcesRequest) (response *TagUnbindResourcesResponse, err error)

TagUnbindResources 标签批量解绑资源。

type CreateTagsRequest

type CreateTagsRequest struct {
	*common.BaseRequest

	// Tags 创建的标签。
	// 一次性最多创建20个标签。
	Tags []*Tag `json:"tags,omitempty"`
}

CreateTagsRequest

func NewCreateTagsRequest

func NewCreateTagsRequest() (request *CreateTagsRequest)

type CreateTagsResponse

type CreateTagsResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response struct {
		RequestId string `json:"requestId,omitempty"`
	} `json:"response,omitempty"`
}

func NewCreateTagsResponse

func NewCreateTagsResponse() (response *CreateTagsResponse)

type DeleteTagsRequest

type DeleteTagsRequest struct {
	*common.BaseRequest

	// Tags 需要删除的标签。
	Tags []*Tag `json:"tags,omitempty"`
}

DeleteTagsRequest

func NewDeleteTagsRequest

func NewDeleteTagsRequest() (request *DeleteTagsRequest)

type DeleteTagsResponse

type DeleteTagsResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response struct {
		RequestId string `json:"requestId,omitempty"`
	} `json:"response,omitempty"`
}

func NewDeleteTagsResponse

func NewDeleteTagsResponse() (response *DeleteTagsResponse)

type DescribeResourceByTagsRequest added in v0.2.24

type DescribeResourceByTagsRequest struct {
	*common.BaseRequest

	// Tags 查询的标签列表。
	Tags []*Tag `json:"tags,omitempty"`

	// TagKeys 查询的标签键列表。
	TagKeys []string `json:"tagKeys,omitempty"`
}

DescribeResourceByTagsRequest

func NewDescribeResourceByTagsRequest added in v0.2.24

func NewDescribeResourceByTagsRequest() (request *DescribeResourceByTagsRequest)

type DescribeResourceByTagsResponse added in v0.2.24

type DescribeResourceByTagsResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response *DescribeResourceByTagsResponseParams `json:"response,omitempty"`
}

func NewDescribeResourceByTagsResponse added in v0.2.24

func NewDescribeResourceByTagsResponse() (response *DescribeResourceByTagsResponse)

type DescribeResourceByTagsResponseParams added in v0.2.24

type DescribeResourceByTagsResponseParams struct {
	RequestId *string `json:"requestId,omitempty"`

	// TotalCount 绑定了指定标签的资源总数量。
	TotalCount *int `json:"totalCount,omitempty"`

	// DataSet 绑定了指定标签的资源列表。
	DataSet []*ResourceInfo `json:"dataSet,omitempty"`
}

type DescribeResourceTagsRequest

type DescribeResourceTagsRequest struct {
	*common.BaseRequest

	// ResourceUuid 资源的唯一标识。
	ResourceUuid *string `json:"resourceUuid,omitempty"`
}

DescribeResourceTagsRequest

func NewDescribeResourceTagsRequest

func NewDescribeResourceTagsRequest() (request *DescribeResourceTagsRequest)

type DescribeResourceTagsResponse

type DescribeResourceTagsResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response *DescribeResourceTagsResponseParams `json:"response,omitempty"`
}

func NewDescribeResourceTagsResponse

func NewDescribeResourceTagsResponse() (response *DescribeResourceTagsResponse)

type DescribeResourceTagsResponseParams

type DescribeResourceTagsResponseParams struct {
	RequestId *string `json:"requestId,omitempty"`

	// TotalCount 该资源绑定的标签总数量。
	TotalCount *int `json:"totalCount,omitempty"`

	// DataSet 该资源绑定的标签列表。
	DataSet []*ResourceTag `json:"dataSet,omitempty"`
}

type DescribeResourceTypesRequest added in v0.2.53

type DescribeResourceTypesRequest struct {
	*common.BaseRequest

	// Services 按所属服务筛选,精确匹配,多个服务之间为或的关系。
	// 不传时返回全部服务的资源类型。
	Services []string `json:"services,omitempty"`

	// ResourceTypes 按资源类型筛选,精确匹配,多个类型之间为或的关系。
	// 不传时返回全部资源类型。
	ResourceTypes []string `json:"resourceTypes,omitempty"`
}

DescribeResourceTypesRequest

func NewDescribeResourceTypesRequest added in v0.2.53

func NewDescribeResourceTypesRequest() (request *DescribeResourceTypesRequest)

type DescribeResourceTypesResponse added in v0.2.53

type DescribeResourceTypesResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response *DescribeResourceTypesResponseParams `json:"response,omitempty"`
}

func NewDescribeResourceTypesResponse added in v0.2.53

func NewDescribeResourceTypesResponse() (response *DescribeResourceTypesResponse)

type DescribeResourceTypesResponseParams added in v0.2.53

type DescribeResourceTypesResponseParams struct {
	RequestId *string `json:"requestId,omitempty"`

	// TotalCount 符合条件的资源类型总数量。
	TotalCount *int `json:"totalCount,omitempty"`

	// DataSet 资源类型列表。
	DataSet []*ResourceTypeInfo `json:"dataSet,omitempty"`
}

type DescribeResourcesRequest added in v0.2.53

type DescribeResourcesRequest struct {
	*common.BaseRequest

	// PageNum 页码,默认值1。
	PageNum *int `json:"pageNum,omitempty"`

	// PageSize 每页面展示数量,默认值20。
	PageSize *int `json:"pageSize,omitempty"`

	// ResourceIds 资源唯一标识列表,精确匹配,多个标识之间为或的关系。
	ResourceIds []string `json:"resourceIds,omitempty"`

	// ResourceName 资源名称,模糊匹配。
	ResourceName *string `json:"resourceName,omitempty"`

	// ResourceGroupId 资源组唯一标识列表,精确匹配,为空代表查询所有资源组。
	ResourceGroupId *string `json:"resourceGroupId,omitempty"`

	// Tags 查询的标签列表。
	Tags []*Tag `json:"tags,omitempty"`

	// TagKeys 查询的标签键列表。
	TagKeys []string `json:"tagKeys,omitempty"`
}

DescribeResourcesRequest

func NewDescribeResourcesRequest added in v0.2.53

func NewDescribeResourcesRequest() (request *DescribeResourcesRequest)

type DescribeResourcesResponse added in v0.2.53

type DescribeResourcesResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response *DescribeResourcesResponseParams `json:"response,omitempty"`
}

func NewDescribeResourcesResponse added in v0.2.53

func NewDescribeResourcesResponse() (response *DescribeResourcesResponse)

type DescribeResourcesResponseParams added in v0.2.53

type DescribeResourcesResponseParams struct {
	RequestId *string `json:"requestId,omitempty"`

	// TotalCount 符合条件的资源总数量。
	TotalCount *int `json:"totalCount,omitempty"`

	// DataSet 资源列表。
	DataSet []*ResourceSearchInfo `json:"dataSet,omitempty"`
}

type DescribeTagsRequest

type DescribeTagsRequest struct {
	*common.BaseRequest

	// PageNum 页码,默认值1。
	PageNum *int `json:"pageNum,omitempty"`

	// PageSize 每页面展示数量,默认值20。
	PageSize *int `json:"pageSize,omitempty"`

	// KeySort 标签键排序方式:ascend(正序),descend(倒序)。
	KeySort *string `json:"keySort,omitempty"`

	// CreatedDateSort 创建时间排序方式:ascend(正序),descend(倒序)。
	// 默认倒序。
	CreatedDateSort *string `json:"createdDateSort,omitempty"`

	// TagKeys 筛选的标签键集合。
	TagKeys []string `json:"tagKeys,omitempty"`

	// Tags 筛选的标签集合。
	Tags []*Tag `json:"tags,omitempty"`
}

DescribeTagsRequest

func NewDescribeTagsRequest

func NewDescribeTagsRequest() (request *DescribeTagsRequest)

type DescribeTagsResponse

type DescribeTagsResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response *DescribeTagsResponseParams `json:"response,omitempty"`
}

func NewDescribeTagsResponse

func NewDescribeTagsResponse() (response *DescribeTagsResponse)

type DescribeTagsResponseParams

type DescribeTagsResponseParams struct {
	RequestId *string `json:"requestId,omitempty"`

	// TotalCount 符合条件的标签总数量。
	TotalCount *int `json:"totalCount,omitempty"`

	// DataSet 标签列表。
	DataSet []*TagInfo `json:"dataSet,omitempty"`
}

type ModifyResourceTagsRequest added in v0.2.16

type ModifyResourceTagsRequest struct {
	*common.BaseRequest

	// ResourceUuid 需要绑定的资源唯一标识。
	ResourceUuid *string `json:"resourceUuid,omitempty"`

	// ReplaceTags 需要更新的标签列表,包含标签键和值。
	ReplaceTags []*Tag `json:"replaceTags,omitempty"`

	// DeleteTagKeys 需要解绑的标签列表,包含标签键。
	DeleteTagKeys []string `json:"deleteTagKeys,omitempty"`
}

ModifyResourceTagsRequest

func NewModifyResourceTagsRequest added in v0.2.16

func NewModifyResourceTagsRequest() (request *ModifyResourceTagsRequest)

type ModifyResourceTagsResponse added in v0.2.16

type ModifyResourceTagsResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response struct {
		RequestId string `json:"requestId,omitempty"`
	} `json:"response,omitempty"`
}

func NewModifyResourceTagsResponse added in v0.2.16

func NewModifyResourceTagsResponse() (response *ModifyResourceTagsResponse)

type ResourceInfo added in v0.2.24

type ResourceInfo struct {

	// ResourceType 资源类型。
	ResourceType *string `json:"resourceType,omitempty"`

	// ResourceUuid 资源唯一标识。
	ResourceUuid *string `json:"resourceUuid,omitempty"`
}

ResourceInfo 描述资源的基本信息

type ResourceSearchInfo added in v0.2.53

type ResourceSearchInfo struct {

	// ResourceId 资源唯一标识。
	ResourceId *string `json:"resourceId,omitempty"`

	// Name 资源名称。
	Name *string `json:"name,omitempty"`

	// ResourceType 资源类型。
	// 取值见 ~~DescribeResourceTypes~~。
	ResourceType *string `json:"resourceType,omitempty"`

	// CreateTime 资源创建时间。
	CreateTime *string `json:"createTime,omitempty"`

	// ResourceGroupId 资源组唯一标识。
	ResourceGroupId *string `json:"resourceGroupId,omitempty"`

	// ResourceGroupName 资源组名称。
	ResourceGroupName *string `json:"resourceGroupName,omitempty"`

	// Location 资源所属的地域信息。
	Location *string `json:"location,omitempty"`

	// Service 资源所属的服务。
	Service *string `json:"service,omitempty"`
}

ResourceSearchInfo 描述资源的基本信息

type ResourceTag

type ResourceTag struct {

	// Key 标签键。
	Key *string `json:"key,omitempty"`

	// Value 标签值。
	Value *string `json:"value,omitempty"`

	// CreatedDate 标签创建时间。
	CreatedDate *string `json:"createdDate,omitempty"`
}

ResourceTag 描述资源关联标签的基本信息

type ResourceTypeInfo added in v0.2.53

type ResourceTypeInfo struct {

	// ResourceType 资源类型。
	ResourceType *string `json:"resourceType,omitempty"`

	// Name 资源类型名称。
	Name *string `json:"name,omitempty"`

	// Service 资源类型所属的服务。
	Service *string `json:"service,omitempty"`
}

ResourceTypeInfo 描述资源类型的基本信息

type Tag

type Tag struct {

	// Key 标签键。
	// 长度限制:1~64个字符。
	Key *string `json:"key,omitempty"`

	// Value 标签值。
	// 长度限制:1~64个字符。
	Value *string `json:"value,omitempty"`
}

Tag 描述一个标签键值对的信息。

type TagBindResourcesRequest

type TagBindResourcesRequest struct {
	*common.BaseRequest

	// Tag 标签,包含标签键和值。
	Tag *Tag `json:"tag,omitempty"`

	// ResourceUuids 需要绑定的资源唯一标识列表。
	ResourceUuids []string `json:"resourceUuids,omitempty"`
}

TagBindResourcesRequest

func NewTagBindResourcesRequest

func NewTagBindResourcesRequest() (request *TagBindResourcesRequest)

type TagBindResourcesResponse

type TagBindResourcesResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response struct {
		RequestId string `json:"requestId,omitempty"`
	} `json:"response,omitempty"`
}

func NewTagBindResourcesResponse

func NewTagBindResourcesResponse() (response *TagBindResourcesResponse)

type TagInfo

type TagInfo struct {

	// Key 标签键。
	Key *string `json:"key,omitempty"`

	// Value 标签值。
	Value *string `json:"value,omitempty"`

	// BindResourceCount 标签下绑定的资源总数。
	BindResourceCount *int `json:"bindResourceCount,omitempty"`

	// CreatedDate 标签创建时间。
	CreatedDate *string `json:"createdDate,omitempty"`
}

TagInfo 描述标签的基本信息

type TagUnbindResourcesRequest

type TagUnbindResourcesRequest struct {
	*common.BaseRequest

	// Tag 标签,包含标签键和值。
	Tag *Tag `json:"tag,omitempty"`

	// ResourceUuids 需要解绑的资源唯一标识列表。
	ResourceUuids []string `json:"resourceUuids,omitempty"`
}

TagUnbindResourcesRequest

func NewTagUnbindResourcesRequest

func NewTagUnbindResourcesRequest() (request *TagUnbindResourcesRequest)

type TagUnbindResourcesResponse

type TagUnbindResourcesResponse struct {
	*common.BaseResponse

	RequestId *string `json:"requestId,omitempty"`

	Response struct {
		RequestId string `json:"requestId,omitempty"`
	} `json:"response,omitempty"`
}

func NewTagUnbindResourcesResponse

func NewTagUnbindResourcesResponse() (response *TagUnbindResourcesResponse)

Jump to

Keyboard shortcuts

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