globaltaggingv1

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 9 Imported by: 18

Documentation

Overview

Package globaltaggingv1 : Operations and models for the GlobalTaggingV1 service

Index

Constants

View Source
const (
	AttachTagOptions_TagType_Service = "service"
	AttachTagOptions_TagType_User    = "user"
)

Constants associated with the AttachTagOptions.TagType property. The type of the tag. Supported values are `user` and `service`. `service` is not supported if `providers` is set to `ims`.

View Source
const (
	DeleteTagAllOptions_Providers_Ghost = "ghost"
	DeleteTagAllOptions_Providers_Ims   = "ims"
)

Constants associated with the DeleteTagAllOptions.Providers property. Select a provider. Supported values are `ghost` and `ims`.

View Source
const (
	DeleteTagAllOptions_TagType_Service = "service"
	DeleteTagAllOptions_TagType_User    = "user"
)

Constants associated with the DeleteTagAllOptions.TagType property. The type of the tag. Supported values are `user` and `service`. `service` is not supported if the `providers` parameter is set to `ims`.

View Source
const (
	DeleteTagOptions_Providers_Ghost = "ghost"
	DeleteTagOptions_Providers_Ims   = "ims"
)

Constants associated with the DeleteTagOptions.Providers property.

View Source
const (
	DeleteTagOptions_TagType_Service = "service"
	DeleteTagOptions_TagType_User    = "user"
)

Constants associated with the DeleteTagOptions.TagType property. The type of the tag. Supported values are `user` and `service`. `service` is not supported for `providers=ims`.

View Source
const (
	DeleteTagResultsItem_Provider_Ghost = "ghost"
	DeleteTagResultsItem_Provider_Ims   = "ims"
)

Constants associated with the DeleteTagResultsItem.Provider property. The provider of the tag.

View Source
const (
	DetachTagOptions_TagType_Service = "service"
	DetachTagOptions_TagType_User    = "user"
)

Constants associated with the DetachTagOptions.TagType property. The type of the tag. Supported values are `user` and `service`. `service` is not supported for `providers=ims`.

View Source
const (
	ListTagsOptions_TagType_Service = "service"
	ListTagsOptions_TagType_User    = "user"
)

Constants associated with the ListTagsOptions.TagType property. The type of the tag you want to list. Supported values are `user` and `service`.

View Source
const (
	ListTagsOptions_Providers_Ghost = "ghost"
	ListTagsOptions_Providers_Ims   = "ims"
)

Constants associated with the ListTagsOptions.Providers property.

View Source
const (
	ListTagsOptions_OrderByName_Asc  = "asc"
	ListTagsOptions_OrderByName_Desc = "desc"
)

Constants associated with the ListTagsOptions.OrderByName property. Order the output by tag name.

View Source
const DefaultServiceName = "global_tagging"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://tags.global-search-tagging.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func UnmarshalDeleteTagResults

func UnmarshalDeleteTagResults(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeleteTagResults unmarshals an instance of DeleteTagResults from the specified map of raw messages.

func UnmarshalDeleteTagResultsItem

func UnmarshalDeleteTagResultsItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeleteTagResultsItem unmarshals an instance of DeleteTagResultsItem from the specified map of raw messages.

func UnmarshalDeleteTagsResult

func UnmarshalDeleteTagsResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeleteTagsResult unmarshals an instance of DeleteTagsResult from the specified map of raw messages.

func UnmarshalDeleteTagsResultItem

func UnmarshalDeleteTagsResultItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeleteTagsResultItem unmarshals an instance of DeleteTagsResultItem from the specified map of raw messages.

func UnmarshalResource added in v0.3.0

func UnmarshalResource(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResource unmarshals an instance of Resource from the specified map of raw messages.

func UnmarshalTag

func UnmarshalTag(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTag unmarshals an instance of Tag from the specified map of raw messages.

func UnmarshalTagList

func UnmarshalTagList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTagList unmarshals an instance of TagList from the specified map of raw messages.

func UnmarshalTagResults

func UnmarshalTagResults(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTagResults unmarshals an instance of TagResults from the specified map of raw messages.

func UnmarshalTagResultsItem

func UnmarshalTagResultsItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTagResultsItem unmarshals an instance of TagResultsItem from the specified map of raw messages.

Types

type AttachTagOptions

type AttachTagOptions struct {
	// List of resources on which the tag or tags should be attached.
	Resources []Resource `json:"resources" validate:"required"`

	// The name of the tag to attach.
	TagName *string `json:"tag_name,omitempty"`

	// An array of tag names to attach.
	TagNames []string `json:"tag_names,omitempty"`

	// The ID of the billing account where the resources to be tagged lives. It is a required parameter if `tag_type` is
	// set to `service`. Otherwise, it is inferred from the authorization IAM token.
	AccountID *string `json:"account_id,omitempty"`

	// The type of the tag. Supported values are `user` and `service`. `service` is not supported if `providers` is set to
	// `ims`.
	TagType *string `json:"tag_type,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

AttachTagOptions : The AttachTag options.

func (*AttachTagOptions) SetAccountID added in v0.11.2

func (options *AttachTagOptions) SetAccountID(accountID string) *AttachTagOptions

SetAccountID : Allow user to set AccountID

func (*AttachTagOptions) SetHeaders

func (options *AttachTagOptions) SetHeaders(param map[string]string) *AttachTagOptions

SetHeaders : Allow user to set Headers

func (*AttachTagOptions) SetResources

func (options *AttachTagOptions) SetResources(resources []Resource) *AttachTagOptions

SetResources : Allow user to set Resources

func (*AttachTagOptions) SetTagName

func (options *AttachTagOptions) SetTagName(tagName string) *AttachTagOptions

SetTagName : Allow user to set TagName

func (*AttachTagOptions) SetTagNames

func (options *AttachTagOptions) SetTagNames(tagNames []string) *AttachTagOptions

SetTagNames : Allow user to set TagNames

func (*AttachTagOptions) SetTagType added in v0.11.2

func (options *AttachTagOptions) SetTagType(tagType string) *AttachTagOptions

SetTagType : Allow user to set TagType

type DeleteTagAllOptions

type DeleteTagAllOptions struct {
	// Select a provider. Supported values are `ghost` and `ims`.
	Providers *string `json:"providers,omitempty"`

	// The ID of the billing account to delete the tags for. If it is not set, then it is taken from the authorization
	// token. It is a required parameter if `tag_type` is set to `service`.
	AccountID *string `json:"account_id,omitempty"`

	// The type of the tag. Supported values are `user` and `service`. `service` is not supported if the `providers`
	// parameter is set to `ims`.
	TagType *string `json:"tag_type,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteTagAllOptions : The DeleteTagAll options.

func (*DeleteTagAllOptions) SetAccountID added in v0.11.2

func (options *DeleteTagAllOptions) SetAccountID(accountID string) *DeleteTagAllOptions

SetAccountID : Allow user to set AccountID

func (*DeleteTagAllOptions) SetHeaders

func (options *DeleteTagAllOptions) SetHeaders(param map[string]string) *DeleteTagAllOptions

SetHeaders : Allow user to set Headers

func (*DeleteTagAllOptions) SetProviders

func (options *DeleteTagAllOptions) SetProviders(providers string) *DeleteTagAllOptions

SetProviders : Allow user to set Providers

func (*DeleteTagAllOptions) SetTagType added in v0.11.2

func (options *DeleteTagAllOptions) SetTagType(tagType string) *DeleteTagAllOptions

SetTagType : Allow user to set TagType

type DeleteTagOptions

type DeleteTagOptions struct {
	// The name of tag to be deleted.
	TagName *string `json:"tag_name" validate:"required,ne="`

	// Select a provider. Supported values are `ghost` and `ims`. To delete tag both in GhoST in IMS, use `ghost,ims`.
	Providers []string `json:"providers,omitempty"`

	// The ID of the billing account to delete the tag for. It is a required parameter if `tag_type` is set to `service`,
	// otherwise it is inferred from the authorization IAM token.
	AccountID *string `json:"account_id,omitempty"`

	// The type of the tag. Supported values are `user` and `service`. `service` is not supported for `providers=ims`.
	TagType *string `json:"tag_type,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteTagOptions : The DeleteTag options.

func (*DeleteTagOptions) SetAccountID added in v0.11.2

func (options *DeleteTagOptions) SetAccountID(accountID string) *DeleteTagOptions

SetAccountID : Allow user to set AccountID

func (*DeleteTagOptions) SetHeaders

func (options *DeleteTagOptions) SetHeaders(param map[string]string) *DeleteTagOptions

SetHeaders : Allow user to set Headers

func (*DeleteTagOptions) SetProviders

func (options *DeleteTagOptions) SetProviders(providers []string) *DeleteTagOptions

SetProviders : Allow user to set Providers

func (*DeleteTagOptions) SetTagName

func (options *DeleteTagOptions) SetTagName(tagName string) *DeleteTagOptions

SetTagName : Allow user to set TagName

func (*DeleteTagOptions) SetTagType added in v0.11.2

func (options *DeleteTagOptions) SetTagType(tagType string) *DeleteTagOptions

SetTagType : Allow user to set TagType

type DeleteTagResults

type DeleteTagResults struct {
	// Array of results of a delete_tag request.
	Results []DeleteTagResultsItem `json:"results,omitempty"`
}

DeleteTagResults : Results of a delete_tag request.

type DeleteTagResultsItem

type DeleteTagResultsItem struct {
	// The provider of the tag.
	Provider *string `json:"provider,omitempty"`

	// It is `true` if the operation exits with an error.
	IsError *bool `json:"is_error,omitempty"`
	// contains filtered or unexported fields
}

DeleteTagResultsItem : Result of a delete_tag request.

func (*DeleteTagResultsItem) GetProperties

func (o *DeleteTagResultsItem) GetProperties() map[string]interface{}

GetProperties allows the user to retrieve the map of arbitrary properties from an instance of DeleteTagResultsItem

func (*DeleteTagResultsItem) GetProperty

func (o *DeleteTagResultsItem) GetProperty(key string) interface{}

GetProperty allows the user to retrieve an arbitrary property from an instance of DeleteTagResultsItem

func (*DeleteTagResultsItem) MarshalJSON

func (o *DeleteTagResultsItem) MarshalJSON() (buffer []byte, err error)

MarshalJSON performs custom serialization for instances of DeleteTagResultsItem

func (*DeleteTagResultsItem) SetProperty

func (o *DeleteTagResultsItem) SetProperty(key string, value interface{})

SetProperty allows the user to set an arbitrary property on an instance of DeleteTagResultsItem

type DeleteTagsResult

type DeleteTagsResult struct {
	// The number of tags that have been deleted.
	TotalCount *int64 `json:"total_count,omitempty"`

	// It is set to true if there is at least one tag operation in error.
	Errors *bool `json:"errors,omitempty"`

	// The list of tag operation results.
	Items []DeleteTagsResultItem `json:"items,omitempty"`
}

DeleteTagsResult : Results of a deleting unattatched tags.

type DeleteTagsResultItem

type DeleteTagsResultItem struct {
	// The name of the deleted tag.
	TagName *string `json:"tag_name,omitempty"`

	// true if the tag was not deleted.
	IsError *bool `json:"is_error,omitempty"`
}

DeleteTagsResultItem : Result of a delete_tags request.

type DetachTagOptions

type DetachTagOptions struct {
	// List of resources on which the tag or tags should be detached.
	Resources []Resource `json:"resources" validate:"required"`

	// The name of the tag to detach.
	TagName *string `json:"tag_name,omitempty"`

	// An array of tag names to detach.
	TagNames []string `json:"tag_names,omitempty"`

	// The ID of the billing account where the resources to be un-tagged lives. It is a required parameter if `tag_type` is
	// set to `service`, otherwise it is inferred from the authorization IAM token.
	AccountID *string `json:"account_id,omitempty"`

	// The type of the tag. Supported values are `user` and `service`. `service` is not supported for `providers=ims`.
	TagType *string `json:"tag_type,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DetachTagOptions : The DetachTag options.

func (*DetachTagOptions) SetAccountID added in v0.11.2

func (options *DetachTagOptions) SetAccountID(accountID string) *DetachTagOptions

SetAccountID : Allow user to set AccountID

func (*DetachTagOptions) SetHeaders

func (options *DetachTagOptions) SetHeaders(param map[string]string) *DetachTagOptions

SetHeaders : Allow user to set Headers

func (*DetachTagOptions) SetResources

func (options *DetachTagOptions) SetResources(resources []Resource) *DetachTagOptions

SetResources : Allow user to set Resources

func (*DetachTagOptions) SetTagName

func (options *DetachTagOptions) SetTagName(tagName string) *DetachTagOptions

SetTagName : Allow user to set TagName

func (*DetachTagOptions) SetTagNames

func (options *DetachTagOptions) SetTagNames(tagNames []string) *DetachTagOptions

SetTagNames : Allow user to set TagNames

func (*DetachTagOptions) SetTagType added in v0.11.2

func (options *DetachTagOptions) SetTagType(tagType string) *DetachTagOptions

SetTagType : Allow user to set TagType

type GlobalTaggingV1

type GlobalTaggingV1 struct {
	Service *core.BaseService
}

GlobalTaggingV1 : Manage your tags with the Tagging API in IBM Cloud. You can attach, detach, delete a tag or list all tags in your billing account with the Tagging API. The tag name must be unique within a billing account. You can create tags in two formats: `key:value` or `label`. The tagging API supports two types of tag: `user` and `service`. `service` tags cannot be attached to IMS resources (see `providers=ims` query parameter). `service` tags must be in the form `service_prefix:tag_label` where `service_prefix` identifies the Service owning the tag.

Version: 1.1.0

func NewGlobalTaggingV1

func NewGlobalTaggingV1(options *GlobalTaggingV1Options) (service *GlobalTaggingV1, err error)

NewGlobalTaggingV1 : constructs an instance of GlobalTaggingV1 with passed in options.

func NewGlobalTaggingV1UsingExternalConfig

func NewGlobalTaggingV1UsingExternalConfig(options *GlobalTaggingV1Options) (globalTagging *GlobalTaggingV1, err error)

NewGlobalTaggingV1UsingExternalConfig : constructs an instance of GlobalTaggingV1 with passed in options and external configuration.

func (*GlobalTaggingV1) AttachTag

func (globalTagging *GlobalTaggingV1) AttachTag(attachTagOptions *AttachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)

AttachTag : Attach tags Attaches one or more tags to one or more resources. To attach a `user` tag on a resource, you must have the access listed in the [Granting users access to tag resources](https://cloud.ibm.com/docs/account?topic=account-access) documentation. To attach a `service` tag, you must be an authorized service. If that is the case, then you can attach a `service` tag with your registered `prefix` to any resource in any account. The account ID must be set through the `account_id` query parameter.

func (*GlobalTaggingV1) AttachTagWithContext added in v0.12.2

func (globalTagging *GlobalTaggingV1) AttachTagWithContext(ctx context.Context, attachTagOptions *AttachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)

AttachTagWithContext is an alternate form of the AttachTag method which supports a Context parameter

func (*GlobalTaggingV1) DeleteTag

func (globalTagging *GlobalTaggingV1) DeleteTag(deleteTagOptions *DeleteTagOptions) (result *DeleteTagResults, response *core.DetailedResponse, err error)

DeleteTag : Delete an unused tag Delete an existing tag. A tag can be deleted only if it is not attached to any resource.

func (*GlobalTaggingV1) DeleteTagAll

func (globalTagging *GlobalTaggingV1) DeleteTagAll(deleteTagAllOptions *DeleteTagAllOptions) (result *DeleteTagsResult, response *core.DetailedResponse, err error)

DeleteTagAll : Delete all unused tags Delete the tags that are not attached to any resource.

func (*GlobalTaggingV1) DeleteTagAllWithContext added in v0.12.2

func (globalTagging *GlobalTaggingV1) DeleteTagAllWithContext(ctx context.Context, deleteTagAllOptions *DeleteTagAllOptions) (result *DeleteTagsResult, response *core.DetailedResponse, err error)

DeleteTagAllWithContext is an alternate form of the DeleteTagAll method which supports a Context parameter

func (*GlobalTaggingV1) DeleteTagWithContext added in v0.12.2

func (globalTagging *GlobalTaggingV1) DeleteTagWithContext(ctx context.Context, deleteTagOptions *DeleteTagOptions) (result *DeleteTagResults, response *core.DetailedResponse, err error)

DeleteTagWithContext is an alternate form of the DeleteTag method which supports a Context parameter

func (*GlobalTaggingV1) DetachTag

func (globalTagging *GlobalTaggingV1) DetachTag(detachTagOptions *DetachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)

DetachTag : Detach tags Detaches one or more tags from one or more resources. To detach a `user` tag on a resource you must have the permissions listed in the [Granting users access to tag resources](https://cloud.ibm.com/docs/account?topic=account-access) documentation. To detach a `service` tag you must be an authorized Service. If that is the case, then you can detach a `service` tag with your registered `prefix` from any resource in any account. The account ID must be set through the `account_id` query parameter.

func (*GlobalTaggingV1) DetachTagWithContext added in v0.12.2

func (globalTagging *GlobalTaggingV1) DetachTagWithContext(ctx context.Context, detachTagOptions *DetachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)

DetachTagWithContext is an alternate form of the DetachTag method which supports a Context parameter

func (*GlobalTaggingV1) DisableRetries added in v0.12.2

func (globalTagging *GlobalTaggingV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*GlobalTaggingV1) EnableRetries added in v0.12.2

func (globalTagging *GlobalTaggingV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*GlobalTaggingV1) GetEnableGzipCompression added in v0.12.2

func (globalTagging *GlobalTaggingV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*GlobalTaggingV1) GetServiceURL added in v0.12.2

func (globalTagging *GlobalTaggingV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*GlobalTaggingV1) ListTags

func (globalTagging *GlobalTaggingV1) ListTags(listTagsOptions *ListTagsOptions) (result *TagList, response *core.DetailedResponse, err error)

ListTags : Get all tags Lists all tags in a billing account. Use the `attached_to` parameter to return the list of tags attached to the specified resource.

func (*GlobalTaggingV1) ListTagsWithContext added in v0.12.2

func (globalTagging *GlobalTaggingV1) ListTagsWithContext(ctx context.Context, listTagsOptions *ListTagsOptions) (result *TagList, response *core.DetailedResponse, err error)

ListTagsWithContext is an alternate form of the ListTags method which supports a Context parameter

func (*GlobalTaggingV1) NewAttachTagOptions

func (*GlobalTaggingV1) NewAttachTagOptions(resources []Resource) *AttachTagOptions

NewAttachTagOptions : Instantiate AttachTagOptions

func (*GlobalTaggingV1) NewDeleteTagAllOptions

func (*GlobalTaggingV1) NewDeleteTagAllOptions() *DeleteTagAllOptions

NewDeleteTagAllOptions : Instantiate DeleteTagAllOptions

func (*GlobalTaggingV1) NewDeleteTagOptions

func (*GlobalTaggingV1) NewDeleteTagOptions(tagName string) *DeleteTagOptions

NewDeleteTagOptions : Instantiate DeleteTagOptions

func (*GlobalTaggingV1) NewDetachTagOptions

func (*GlobalTaggingV1) NewDetachTagOptions(resources []Resource) *DetachTagOptions

NewDetachTagOptions : Instantiate DetachTagOptions

func (*GlobalTaggingV1) NewListTagsOptions

func (*GlobalTaggingV1) NewListTagsOptions() *ListTagsOptions

NewListTagsOptions : Instantiate ListTagsOptions

func (*GlobalTaggingV1) NewResource

func (*GlobalTaggingV1) NewResource(resourceID string) (model *Resource, err error)

NewResource : Instantiate Resource (Generic Model Constructor)

func (*GlobalTaggingV1) SetDefaultHeaders added in v0.12.2

func (globalTagging *GlobalTaggingV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*GlobalTaggingV1) SetEnableGzipCompression added in v0.12.2

func (globalTagging *GlobalTaggingV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*GlobalTaggingV1) SetServiceURL

func (globalTagging *GlobalTaggingV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

type GlobalTaggingV1Options

type GlobalTaggingV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

GlobalTaggingV1Options : Service options

type ListTagsOptions

type ListTagsOptions struct {
	// The ID of the billing account to list the tags for. If it is not set, then it is taken from the authorization token.
	// This parameter is required if `tag_type` is set to `service`.
	AccountID *string `json:"account_id,omitempty"`

	// The type of the tag you want to list. Supported values are `user` and `service`.
	TagType *string `json:"tag_type,omitempty"`

	// If set to `true`, this query returns the provider, `ghost`, `ims` or `ghost,ims`, where the tag exists and the
	// number of attached resources.
	FullData *bool `json:"full_data,omitempty"`

	// Select a provider. Supported values are `ghost` and `ims`. To list GhoST tags and infrastructure tags use
	// `ghost,ims`. `service` tags can only be attached to GhoST onboarded resources, so you don't need to set this
	// parameter when listing `service` tags.
	Providers []string `json:"providers,omitempty"`

	// If you want to return only the list of tags attached to a specified resource, pass the ID of the resource on this
	// parameter. For GhoST onboarded resources, the resource ID is the CRN; for IMS resources, it is the IMS ID. When
	// using this parameter, you must specify the appropriate provider (`ims` or `ghost`).
	AttachedTo *string `json:"attached_to,omitempty"`

	// The offset is the index of the item from which you want to start returning data from.
	Offset *int64 `json:"offset,omitempty"`

	// The number of tags to return.
	Limit *int64 `json:"limit,omitempty"`

	// The search timeout bounds the search request to be executed within the specified time value. It returns the hits
	// accumulated until time runs out.
	Timeout *int64 `json:"timeout,omitempty"`

	// Order the output by tag name.
	OrderByName *string `json:"order_by_name,omitempty"`

	// Filter on attached tags. If `true`, it returns only tags that are attached to one or more resources. If `false`, it
	// returns all tags.
	AttachedOnly *bool `json:"attached_only,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListTagsOptions : The ListTags options.

func (*ListTagsOptions) SetAccountID added in v0.11.2

func (options *ListTagsOptions) SetAccountID(accountID string) *ListTagsOptions

SetAccountID : Allow user to set AccountID

func (*ListTagsOptions) SetAttachedOnly

func (options *ListTagsOptions) SetAttachedOnly(attachedOnly bool) *ListTagsOptions

SetAttachedOnly : Allow user to set AttachedOnly

func (*ListTagsOptions) SetAttachedTo

func (options *ListTagsOptions) SetAttachedTo(attachedTo string) *ListTagsOptions

SetAttachedTo : Allow user to set AttachedTo

func (*ListTagsOptions) SetFullData

func (options *ListTagsOptions) SetFullData(fullData bool) *ListTagsOptions

SetFullData : Allow user to set FullData

func (*ListTagsOptions) SetHeaders

func (options *ListTagsOptions) SetHeaders(param map[string]string) *ListTagsOptions

SetHeaders : Allow user to set Headers

func (*ListTagsOptions) SetLimit

func (options *ListTagsOptions) SetLimit(limit int64) *ListTagsOptions

SetLimit : Allow user to set Limit

func (*ListTagsOptions) SetOffset

func (options *ListTagsOptions) SetOffset(offset int64) *ListTagsOptions

SetOffset : Allow user to set Offset

func (*ListTagsOptions) SetOrderByName

func (options *ListTagsOptions) SetOrderByName(orderByName string) *ListTagsOptions

SetOrderByName : Allow user to set OrderByName

func (*ListTagsOptions) SetProviders

func (options *ListTagsOptions) SetProviders(providers []string) *ListTagsOptions

SetProviders : Allow user to set Providers

func (*ListTagsOptions) SetTagType added in v0.11.2

func (options *ListTagsOptions) SetTagType(tagType string) *ListTagsOptions

SetTagType : Allow user to set TagType

func (*ListTagsOptions) SetTimeout

func (options *ListTagsOptions) SetTimeout(timeout int64) *ListTagsOptions

SetTimeout : Allow user to set Timeout

type Resource

type Resource struct {
	// The CRN or IMS ID of the resource.
	ResourceID *string `json:"resource_id" validate:"required"`

	// The IMS resource type of the resource.
	ResourceType *string `json:"resource_type,omitempty"`
}

Resource : A resource that may have attached tags.

type Tag

type Tag struct {
	// This is the name of the tag.
	Name *string `json:"name" validate:"required"`
}

Tag : A tag.

type TagList

type TagList struct {
	// Set the occurrencies of the total tags associated to this account.
	TotalCount *int64 `json:"total_count,omitempty"`

	// The offset at which tags are returned.
	Offset *int64 `json:"offset,omitempty"`

	// The number of tags requested to be returned.
	Limit *int64 `json:"limit,omitempty"`

	// Array of output results.
	Items []Tag `json:"items,omitempty"`
}

TagList : A list of tags.

type TagResults

type TagResults struct {
	// Array of results of an attach_tag or detach_tag request.
	Results []TagResultsItem `json:"results,omitempty"`
}

TagResults : Results of an attach_tag or detach_tag request.

type TagResultsItem

type TagResultsItem struct {
	// The CRN or IMS ID of the resource.
	ResourceID *string `json:"resource_id" validate:"required"`

	// It is `true` if the operation exits with an error.
	IsError *bool `json:"is_error,omitempty"`
}

TagResultsItem : Result of an attach_tag or detach_tag request for a tagged resource.

Jump to

Keyboard shortcuts

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