Documentation ¶
Overview ¶
Package globaltaggingv1 : Operations and models for the GlobalTaggingV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalCreateTagResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCreateTagResultsResultsItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDeleteTagResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDeleteTagResultsItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDeleteTagsResult(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDeleteTagsResultItem(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalResource(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTag(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTagList(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTagResults(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTagResultsItem(m map[string]json.RawMessage, result interface{}) (err error)
- type AttachTagOptions
- func (options *AttachTagOptions) SetAccountID(accountID string) *AttachTagOptions
- func (options *AttachTagOptions) SetHeaders(param map[string]string) *AttachTagOptions
- func (options *AttachTagOptions) SetImpersonateUser(impersonateUser string) *AttachTagOptions
- func (options *AttachTagOptions) SetResources(resources []Resource) *AttachTagOptions
- func (options *AttachTagOptions) SetTagName(tagName string) *AttachTagOptions
- func (options *AttachTagOptions) SetTagNames(tagNames []string) *AttachTagOptions
- func (options *AttachTagOptions) SetTagType(tagType string) *AttachTagOptions
- type CreateTagOptions
- func (options *CreateTagOptions) SetAccountID(accountID string) *CreateTagOptions
- func (options *CreateTagOptions) SetHeaders(param map[string]string) *CreateTagOptions
- func (options *CreateTagOptions) SetImpersonateUser(impersonateUser string) *CreateTagOptions
- func (options *CreateTagOptions) SetTagNames(tagNames []string) *CreateTagOptions
- func (options *CreateTagOptions) SetTagType(tagType string) *CreateTagOptions
- type CreateTagResults
- type CreateTagResultsResultsItem
- type DeleteTagAllOptions
- func (options *DeleteTagAllOptions) SetAccountID(accountID string) *DeleteTagAllOptions
- func (options *DeleteTagAllOptions) SetHeaders(param map[string]string) *DeleteTagAllOptions
- func (options *DeleteTagAllOptions) SetImpersonateUser(impersonateUser string) *DeleteTagAllOptions
- func (options *DeleteTagAllOptions) SetProviders(providers string) *DeleteTagAllOptions
- func (options *DeleteTagAllOptions) SetTagType(tagType string) *DeleteTagAllOptions
- type DeleteTagOptions
- func (options *DeleteTagOptions) SetAccountID(accountID string) *DeleteTagOptions
- func (options *DeleteTagOptions) SetHeaders(param map[string]string) *DeleteTagOptions
- func (options *DeleteTagOptions) SetImpersonateUser(impersonateUser string) *DeleteTagOptions
- func (options *DeleteTagOptions) SetProviders(providers []string) *DeleteTagOptions
- func (options *DeleteTagOptions) SetTagName(tagName string) *DeleteTagOptions
- func (options *DeleteTagOptions) SetTagType(tagType string) *DeleteTagOptions
- type DeleteTagResults
- type DeleteTagResultsItem
- type DeleteTagsResult
- type DeleteTagsResultItem
- type DetachTagOptions
- func (options *DetachTagOptions) SetAccountID(accountID string) *DetachTagOptions
- func (options *DetachTagOptions) SetHeaders(param map[string]string) *DetachTagOptions
- func (options *DetachTagOptions) SetImpersonateUser(impersonateUser string) *DetachTagOptions
- func (options *DetachTagOptions) SetResources(resources []Resource) *DetachTagOptions
- func (options *DetachTagOptions) SetTagName(tagName string) *DetachTagOptions
- func (options *DetachTagOptions) SetTagNames(tagNames []string) *DetachTagOptions
- func (options *DetachTagOptions) SetTagType(tagType string) *DetachTagOptions
- type GlobalTaggingV1
- func (globalTagging *GlobalTaggingV1) AttachTag(attachTagOptions *AttachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) AttachTagWithContext(ctx context.Context, attachTagOptions *AttachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) Clone() *GlobalTaggingV1
- func (globalTagging *GlobalTaggingV1) CreateTag(createTagOptions *CreateTagOptions) (result *CreateTagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) CreateTagWithContext(ctx context.Context, createTagOptions *CreateTagOptions) (result *CreateTagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) DeleteTag(deleteTagOptions *DeleteTagOptions) (result *DeleteTagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) DeleteTagAll(deleteTagAllOptions *DeleteTagAllOptions) (result *DeleteTagsResult, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) DeleteTagAllWithContext(ctx context.Context, deleteTagAllOptions *DeleteTagAllOptions) (result *DeleteTagsResult, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) DeleteTagWithContext(ctx context.Context, deleteTagOptions *DeleteTagOptions) (result *DeleteTagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) DetachTag(detachTagOptions *DetachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) DetachTagWithContext(ctx context.Context, detachTagOptions *DetachTagOptions) (result *TagResults, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) DisableRetries()
- func (globalTagging *GlobalTaggingV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (globalTagging *GlobalTaggingV1) GetEnableGzipCompression() bool
- func (globalTagging *GlobalTaggingV1) GetServiceURL() string
- func (globalTagging *GlobalTaggingV1) ListTags(listTagsOptions *ListTagsOptions) (result *TagList, response *core.DetailedResponse, err error)
- func (globalTagging *GlobalTaggingV1) ListTagsWithContext(ctx context.Context, listTagsOptions *ListTagsOptions) (result *TagList, response *core.DetailedResponse, err error)
- func (*GlobalTaggingV1) NewAttachTagOptions(resources []Resource) *AttachTagOptions
- func (*GlobalTaggingV1) NewCreateTagOptions(tagNames []string) *CreateTagOptions
- func (*GlobalTaggingV1) NewDeleteTagAllOptions() *DeleteTagAllOptions
- func (*GlobalTaggingV1) NewDeleteTagOptions(tagName string) *DeleteTagOptions
- func (*GlobalTaggingV1) NewDetachTagOptions(resources []Resource) *DetachTagOptions
- func (*GlobalTaggingV1) NewListTagsOptions() *ListTagsOptions
- func (*GlobalTaggingV1) NewResource(resourceID string) (model *Resource, err error)
- func (globalTagging *GlobalTaggingV1) SetDefaultHeaders(headers http.Header)
- func (globalTagging *GlobalTaggingV1) SetEnableGzipCompression(enableGzip bool)
- func (globalTagging *GlobalTaggingV1) SetServiceURL(url string) error
- type GlobalTaggingV1Options
- type ListTagsOptions
- func (options *ListTagsOptions) SetAccountID(accountID string) *ListTagsOptions
- func (options *ListTagsOptions) SetAttachedOnly(attachedOnly bool) *ListTagsOptions
- func (options *ListTagsOptions) SetAttachedTo(attachedTo string) *ListTagsOptions
- func (options *ListTagsOptions) SetFullData(fullData bool) *ListTagsOptions
- func (options *ListTagsOptions) SetHeaders(param map[string]string) *ListTagsOptions
- func (options *ListTagsOptions) SetImpersonateUser(impersonateUser string) *ListTagsOptions
- func (options *ListTagsOptions) SetLimit(limit int64) *ListTagsOptions
- func (options *ListTagsOptions) SetOffset(offset int64) *ListTagsOptions
- func (options *ListTagsOptions) SetOrderByName(orderByName string) *ListTagsOptions
- func (options *ListTagsOptions) SetProviders(providers []string) *ListTagsOptions
- func (options *ListTagsOptions) SetTagType(tagType string) *ListTagsOptions
- func (options *ListTagsOptions) SetTimeout(timeout int64) *ListTagsOptions
- type Resource
- type Tag
- type TagList
- type TagResults
- type TagResultsItem
Constants ¶
const ( AttachTagOptionsTagTypeAccessConst = "access" AttachTagOptionsTagTypeServiceConst = "service" AttachTagOptionsTagTypeUserConst = "user" )
Constants associated with the AttachTagOptions.TagType property. The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported for IMS resources.
const ( DeleteTagAllOptionsProvidersGhostConst = "ghost" DeleteTagAllOptionsProvidersImsConst = "ims" )
Constants associated with the DeleteTagAllOptions.Providers property. Select a provider. Supported values are `ghost` and `ims`.
const ( DeleteTagAllOptionsTagTypeAccessConst = "access" DeleteTagAllOptionsTagTypeServiceConst = "service" DeleteTagAllOptionsTagTypeUserConst = "user" )
Constants associated with the DeleteTagAllOptions.TagType property. The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported for IMS resources (`providers` parameter set to `ims`).
const ( DeleteTagOptionsProvidersGhostConst = "ghost" DeleteTagOptionsProvidersImsConst = "ims" )
Constants associated with the DeleteTagOptions.Providers property.
const ( DeleteTagOptionsTagTypeAccessConst = "access" DeleteTagOptionsTagTypeServiceConst = "service" DeleteTagOptionsTagTypeUserConst = "user" )
Constants associated with the DeleteTagOptions.TagType property. The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported for IMS resources (`providers` parameter set to `ims`).
const ( DeleteTagResultsItemProviderGhostConst = "ghost" DeleteTagResultsItemProviderImsConst = "ims" )
Constants associated with the DeleteTagResultsItem.Provider property. The provider of the tag.
const ( DetachTagOptionsTagTypeAccessConst = "access" DetachTagOptionsTagTypeServiceConst = "service" DetachTagOptionsTagTypeUserConst = "user" )
Constants associated with the DetachTagOptions.TagType property. The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported for IMS resources.
const ( ListTagsOptionsTagTypeAccessConst = "access" ListTagsOptionsTagTypeServiceConst = "service" ListTagsOptionsTagTypeUserConst = "user" )
Constants associated with the ListTagsOptions.TagType property. The type of the tag you want to list. Supported values are `user`, `service` and `access`.
const ( ListTagsOptionsProvidersGhostConst = "ghost" ListTagsOptionsProvidersImsConst = "ims" )
Constants associated with the ListTagsOptions.Providers property.
const ( ListTagsOptionsOrderByNameAscConst = "asc" ListTagsOptionsOrderByNameDescConst = "desc" )
Constants associated with the ListTagsOptions.OrderByName property. Order the output by tag name.
const (
CreateTagOptionsTagTypeAccessConst = "access"
)
Constants associated with the CreateTagOptions.TagType property. The type of the tags you want to create. The only allowed value is `access`.
const DefaultServiceName = "global_tagging"
DefaultServiceName is the default key used to find external configuration information.
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 GetServiceURLForRegion ¶ added in v0.17.1
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalCreateTagResults ¶ added in v0.17.6
func UnmarshalCreateTagResults(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCreateTagResults unmarshals an instance of CreateTagResults from the specified map of raw messages.
func UnmarshalCreateTagResultsResultsItem ¶ added in v0.17.6
func UnmarshalCreateTagResultsResultsItem(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCreateTagResultsResultsItem unmarshals an instance of CreateTagResultsResultsItem from the specified map of raw messages.
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 `validate:"required"` // The name of the tag to attach. TagName *string // An array of tag names to attach. TagNames []string // The user on whose behalf the attach operation must be performed (_for administrators only_). ImpersonateUser *string // 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 // The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported // for IMS resources. TagType *string // 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) SetImpersonateUser ¶ added in v0.17.6
func (options *AttachTagOptions) SetImpersonateUser(impersonateUser string) *AttachTagOptions
SetImpersonateUser : Allow user to set ImpersonateUser
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 CreateTagOptions ¶ added in v0.17.6
type CreateTagOptions struct { // An array of tag names to create. TagNames []string `validate:"required"` // The user on whose behalf the create operation must be performed (_for administrators only_). ImpersonateUser *string // The ID of the billing account where the tag must be created. It is a required parameter if `impersonate_user` is // set. AccountID *string // The type of the tags you want to create. The only allowed value is `access`. TagType *string // Allows users to set headers on API requests Headers map[string]string }
CreateTagOptions : The CreateTag options.
func (*CreateTagOptions) SetAccountID ¶ added in v0.17.6
func (options *CreateTagOptions) SetAccountID(accountID string) *CreateTagOptions
SetAccountID : Allow user to set AccountID
func (*CreateTagOptions) SetHeaders ¶ added in v0.17.6
func (options *CreateTagOptions) SetHeaders(param map[string]string) *CreateTagOptions
SetHeaders : Allow user to set Headers
func (*CreateTagOptions) SetImpersonateUser ¶ added in v0.17.6
func (options *CreateTagOptions) SetImpersonateUser(impersonateUser string) *CreateTagOptions
SetImpersonateUser : Allow user to set ImpersonateUser
func (*CreateTagOptions) SetTagNames ¶ added in v0.17.6
func (options *CreateTagOptions) SetTagNames(tagNames []string) *CreateTagOptions
SetTagNames : Allow user to set TagNames
func (*CreateTagOptions) SetTagType ¶ added in v0.17.6
func (options *CreateTagOptions) SetTagType(tagType string) *CreateTagOptions
SetTagType : Allow user to set TagType
type CreateTagResults ¶ added in v0.17.6
type CreateTagResults struct { // Array of results of an set_tags request. Results []CreateTagResultsResultsItem `json:"results,omitempty"` }
CreateTagResults : Results of a create tag(s) request.
type CreateTagResultsResultsItem ¶ added in v0.17.6
type CreateTagResultsResultsItem struct { // The name of the tag created. TagName *string `json:"tag_name,omitempty"` // true if the tag was not created. IsError *bool `json:"is_error,omitempty"` }
CreateTagResultsResultsItem : CreateTagResultsResultsItem struct
type DeleteTagAllOptions ¶
type DeleteTagAllOptions struct { // Select a provider. Supported values are `ghost` and `ims`. Providers *string // The user on whose behalf the delete all operation must be performed (_for administrators only_). ImpersonateUser *string // 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 // The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported // for IMS resources (`providers` parameter set to `ims`). TagType *string // 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) SetImpersonateUser ¶ added in v0.17.6
func (options *DeleteTagAllOptions) SetImpersonateUser(impersonateUser string) *DeleteTagAllOptions
SetImpersonateUser : Allow user to set ImpersonateUser
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 `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 // The user on whose behalf the delete operation must be performed (_for administrators only_). ImpersonateUser *string // 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 // The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported // for IMS resources (`providers` parameter set to `ims`). TagType *string // 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) SetImpersonateUser ¶ added in v0.17.6
func (options *DeleteTagOptions) SetImpersonateUser(impersonateUser string) *DeleteTagOptions
SetImpersonateUser : Allow user to set ImpersonateUser
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 `validate:"required"` // The name of the tag to detach. TagName *string // An array of tag names to detach. TagNames []string // The user on whose behalf the detach operation must be performed (_for administrators only_). ImpersonateUser *string // 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 // The type of the tag. Supported values are `user`, `service` and `access`. `service` and `access` are not supported // for IMS resources. TagType *string // 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) SetImpersonateUser ¶ added in v0.17.6
func (options *DetachTagOptions) SetImpersonateUser(impersonateUser string) *DetachTagOptions
SetImpersonateUser : Allow user to set ImpersonateUser
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 three types of tag: `user` `service`, and `access` tags. `service` tags cannot be attached to IMS resources. `service` tags must be in the form `service_prefix:tag_label` where `service_prefix` identifies the Service owning the tag. `access` tags cannot be attached to IMS and Cloud Foundry resources. They must be in the form `key:value`.
Version: 1.2.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. To attach an `access` tag, you must be the resource administrator within the account. You can attach only `access` tags already existing.
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) Clone ¶ added in v0.17.1
func (globalTagging *GlobalTaggingV1) Clone() *GlobalTaggingV1
Clone makes a copy of "globalTagging" suitable for processing requests.
func (*GlobalTaggingV1) CreateTag ¶ added in v0.17.6
func (globalTagging *GlobalTaggingV1) CreateTag(createTagOptions *CreateTagOptions) (result *CreateTagResults, response *core.DetailedResponse, err error)
CreateTag : Create an access tag Create an access tag. To create an `access` tag, you must have the access listed in the [Granting users access to tag resources](https://cloud.ibm.com/docs/account?topic=account-access) documentation. `service` and `user` tags cannot be created upfront. They are created when they are attached for the first time to a resource.
func (*GlobalTaggingV1) CreateTagWithContext ¶ added in v0.17.6
func (globalTagging *GlobalTaggingV1) CreateTagWithContext(ctx context.Context, createTagOptions *CreateTagOptions) (result *CreateTagResults, response *core.DetailedResponse, err error)
CreateTagWithContext is an alternate form of the CreateTag 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. To detach an `access` tag, you must be the resource administrator within the account.
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) NewCreateTagOptions ¶ added in v0.17.6
func (*GlobalTaggingV1) NewCreateTagOptions(tagNames []string) *CreateTagOptions
NewCreateTagOptions : Instantiate CreateTagOptions
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 user on whose behalf the get operation must be performed (_for administrators only_). ImpersonateUser *string // 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 // The type of the tag you want to list. Supported values are `user`, `service` and `access`. TagType *string // 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 // Select a provider. Supported values are `ghost` and `ims`. To list GhoST tags and infrastructure tags use // `ghost,ims`. `service` and `access` tags can only be attached to GhoST onboarded resources, so you should not set // this parameter when listing them. Providers []string // 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 // The offset is the index of the item from which you want to start returning data from. Offset *int64 // The number of tags to return. Limit *int64 // 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 // Order the output by tag name. OrderByName *string // 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 // 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) SetImpersonateUser ¶ added in v0.17.6
func (options *ListTagsOptions) SetImpersonateUser(impersonateUser string) *ListTagsOptions
SetImpersonateUser : Allow user to set ImpersonateUser
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.