Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionResults ¶
type ActionResults struct {
// contains filtered or unexported fields
}
func BatchAction ¶
func BatchAction(client *golangsdk.ServiceClient, policyID string, opts BatchOptsBuilder) (r ActionResults)
BatchAction is used to create ,update or delete the tags of a specified backup policy.
type ActionType ¶
type ActionType string
ActionType specifies the type of batch operation action to be performed
var ( // ActionCreate is used to set action operator to create ActionCreate ActionType = "create" // ActionDelete is used to set action operator to delete ActionDelete ActionType = "delete" // ActionUpdate is used to set action operator to update ActionUpdate ActionType = "update" )
type BatchOpts ¶
type BatchOpts struct { //List of tags to perform batch operation Tags []Tag `json:"tags,omitempty"` //Operator , Possible values are:create, update,delete Action ActionType `json:"action" required:"true"` }
BatchOpts contains all the values needed to perform BatchAction on the policy tags.
func (BatchOpts) ToTagsBatchMap ¶
ToTagsBatchMap builds a BatchAction request body from BatchOpts.
type BatchOptsBuilder ¶
BatchOptsBuilder allows extensions to add additional parameters to the BatchAction request.
type CreateOpts ¶
type CreateOpts struct {
Tag Tag `json:"tag" required:"true"`
}
CreateOpts contains all the values needed to create or add a new tag.
func (CreateOpts) ToTagCreateMap ¶
func (opts CreateOpts) ToTagCreateMap() (map[string]interface{}, error)
ToTagCreateMap builds a create request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, policyID string, opts CreateOptsBuilder) (r CreateResult)
Adds a tag to a backup policy based on the values in CreateOpts. To extract the tag object from the response, call the Extract method on the CreateResult.
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
func Delete ¶
func Delete(c *golangsdk.ServiceClient, policyID string, key string) (r DeleteResult)
deletes a tag ,specified in the key for a backup policy.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
type ListOpts ¶
type ListOpts struct { //Number of queried records. This parameter is not displayed if action is set to count. Limit string `json:"limit,omitempty"` //Query index,this parameter is not displayed if action is set to count. Offset string `json:"offset,omitempty"` //Backup policies with these tags will be filtered. // This list can have a maximum of 10 tags. Tags []Tags `json:"tags,omitempty"` //Backup policies with any tags in this list will be filtered. AnyTags []Tags `json:"tags_any,omitempty"` //Backup policies without these tags will be filtered. NotTags []Tags `json:"not_tags,omitempty"` //Backup policies without any of these tags will be filtered. NotAnyTags []Tags `json:"not_tags_any,omitempty"` //Operator. Possible values are filter and count. Action string `json:"action" required:"true"` }
ListOpts contains all the values needed to ListResources the policy details based on tags.
func (ListOpts) ToTagsListMap ¶
ToTagsListMap builds a ListResources request body from ListOpts.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the ListResources request.
type QueryResults ¶
type QueryResults struct {
// contains filtered or unexported fields
}
func ListResources ¶
func ListResources(client *golangsdk.ServiceClient, opts ListOptsBuilder) (r QueryResults)
ListResources retrives a backup policy details using tags.To extract the tag object from the response, call the ExtractResources method on the QueryResults.
func (QueryResults) ExtractResources ¶
func (r QueryResults) ExtractResources() (*Resources, error)
type RespTags ¶
type RespTags struct { //contains list of tags, i.e.key value pair Tags []Tag `json:"tags"` }