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 OperationType
- 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
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Name specifies the policy name. The value consists of 1 to 64 characters // and can contain only letters, digits, underscores (_), and hyphens (-). Name string `json:"name"` // OperationDefinition - scheduling configuration OperationDefinition *PolicyODCreate `json:"operation_definition"` // Enabled - whether to enable the policy, default: true Enabled *bool `json:"enabled,omitempty"` // OperationType - policy type OperationType OperationType `json:"operation_type"` // Trigger - time rule for the policy execution Trigger *Trigger `json:"trigger"` }
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)
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
type ListOpts ¶
type ListOpts struct { OperationType OperationType `q:"operation_type"` VaultID string `q:"vault_id"` }
func (ListOpts) ToPolicyListQuery ¶
type ListOptsBuilder ¶
type OperationType ¶
type OperationType string
OperationType is a Policy type. One of `backup` and `replication`.
type Policy ¶
type Policy struct { ID string `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` OperationDefinition *PolicyODCreate `json:"operation_definition"` OperationType OperationType `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"` WeekBackups int `json:"week_backups"` YearBackups int `json:"year_backups"` MonthBackups int `json:"month_backups"` MaxBackups int `json:"max_backups,omitempty"` RetentionDurationDays int `json:"retention_duration_days,omitempty"` Timezone string `json:"timezone,omitempty"` }
PolicyODCreate is policy operation definition see https://docs.otc.t-systems.com/en-us/api/cbr/CreatePolicy.html#CreatePolicy__request_PolicyoODCreate
type PolicyPage ¶
type PolicyPage struct {
pagination.SinglePageBase
}
type PolicyTriggerResp ¶
type PolicyTriggerResp struct {
Properties PolicyTriggerPropertiesResp `json:"properties"`
}
type Trigger ¶
type Trigger struct {
Properties TriggerProperties `json:"properties"`
}
type TriggerProperties ¶
type TriggerProperties struct { // Pattern - Scheduling policy of the scheduler. Can't be empty. Pattern []string `json:"pattern"` }
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)
Click to show internal directories.
Click to hide internal directories.