Documentation ¶
Index ¶
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type Policy
- type PolicyAssociateVault
- type PolicyODCreate
- type PolicyPage
- type PolicyTriggerPropertiesResp
- type PolicyTriggerResp
- type Trigger
- type TriggerProperties
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
List is a method to obtain the specified CBR policy according to the vault ID or operation type. This method can also obtain all the CBR policies through the default parameter settings.
Types ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` OperationDefinition *PolicyODCreate `json:"operation_definition" required:"true"` OperationType string `json:"operation_type" required:"true"` Trigger *Trigger `json:"trigger" required:"true"` Enabled *bool `json:"enabled,omitempty"` }
func (CreateOpts) ToPolicyCreateMap ¶
func (opts CreateOpts) ToPolicyCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create is a method by which to create function that create a CBR policy
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete is a method to delete an existing CBR policy
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
type ListOpts ¶
func (ListOpts) ToPolicyListQuery ¶
type ListOptsBuilder ¶
type Policy ¶
type Policy struct { ID string `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` OperationDefinition *PolicyODCreate `json:"operation_definition"` OperationType string `json:"operation_type"` Trigger *PolicyTriggerResp `json:"trigger"` AssociatedVaults []PolicyAssociateVault `json:"associated_vaults"` }
func ExtractPolicies ¶
func ExtractPolicies(r pagination.Page) ([]Policy, error)
type PolicyAssociateVault ¶
type PolicyODCreate ¶
type PolicyODCreate struct { DailyBackups int `json:"day_backups,omitempty"` WeekBackups int `json:"week_backups,omitempty"` YearBackups int `json:"year_backups,omitempty"` MonthBackups int `json:"month_backups,omitempty"` MaxBackups int `json:"max_backups,omitempty"` RetentionDurationDays int `json:"retention_duration_days,omitempty"` Timezone string `json:"timezone,omitempty"` EnableAcceleration bool `json:"enable_acceleration,omitempty"` DestinationProjectID string `json:"destination_project_id,omitempty"` DestinationRegion string `json:"destination_region,omitempty"` }
PolicyODCreate is policy operation definition
type PolicyPage ¶
type PolicyPage struct {
pagination.SinglePageBase
}
type PolicyTriggerResp ¶
type PolicyTriggerResp struct { TriggerID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Properties PolicyTriggerPropertiesResp `json:"properties"` }
type Trigger ¶
type Trigger struct {
Properties TriggerProperties `json:"properties" required:"true"`
}
type TriggerProperties ¶
type TriggerProperties struct {
Pattern []string `json:"pattern" required:"true"`
}
type UpdateOpts ¶
type UpdateOpts struct { Enabled *bool `json:"enabled,omitempty"` Name string `json:"name,omitempty"` OperationDefinition *PolicyODCreate `json:"operation_definition,omitempty"` Trigger *Trigger `json:"trigger,omitempty"` }
func (UpdateOpts) ToPolicyUpdateMap ¶
func (opts UpdateOpts) ToPolicyUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Delete is a method to update an existing CBR policy
Click to show internal directories.
Click to hide internal directories.