Documentation ¶
Index ¶
- type AssociateResourcesOpts
- type AssociateResourcesOptsBuilder
- type AssociateResourcesResult
- type Billing
- type BillingCreate
- type BillingCreateExtraInfo
- type BillingUpdate
- type BindPolicyOpts
- type BindPolicyOptsBuilder
- type BindPolicyResult
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type DissociateResourcesOpts
- type DissociateResourcesOptsBuilder
- type DissociateResourcesResult
- type GetResult
- type PolicyBinding
- type ResourceCreate
- type ResourceExtraInfo
- type ResourceExtraInfoIncludeVolumes
- type ResourceResp
- type Tag
- type UnbindPolicyResult
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
- type Vault
- type VaultBindRules
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssociateResourcesOpts ¶ added in v0.2.5
type AssociateResourcesOpts struct {
Resources []ResourceCreate `json:"resources"`
}
func (AssociateResourcesOpts) ToAssociateResourcesMap ¶ added in v0.2.5
func (opts AssociateResourcesOpts) ToAssociateResourcesMap() (map[string]interface{}, error)
type AssociateResourcesOptsBuilder ¶ added in v0.2.5
type AssociateResourcesResult ¶ added in v0.2.5
type AssociateResourcesResult struct {
golangsdk.Result
}
func AssociateResources ¶ added in v0.2.5
func AssociateResources(client *golangsdk.ServiceClient, vaultID string, opts AssociateResourcesOptsBuilder) (r AssociateResourcesResult)
func (AssociateResourcesResult) Extract ¶ added in v0.2.5
func (r AssociateResourcesResult) Extract() ([]string, error)
type Billing ¶
type Billing struct { Allocated int `json:"allocated"` ChargingMode string `json:"charging_mode"` CloudType string `json:"cloud_type"` ConsistentLevel string `json:"consistent_level"` ObjectType string `json:"object_type"` OrderID string `json:"order_id"` ProductID string `json:"product_id"` ProtectType string `json:"protect_type"` Size int `json:"size"` SpecCode string `json:"spec_code"` Status string `json:"status"` StorageUnit string `json:"storage_unit"` Used int `json:"used"` FrozenScene string `json:"frozen_scene"` }
type BillingCreate ¶
type BillingCreate struct { // Cloud platform. Enumeration values: // public // hybrid CloudType string `json:"cloud_type,omitempty"` // Backup specifications. The default value is `crash_consistent` ConsistentLevel string `json:"consistent_level"` // Object type ObjectType string `json:"object_type"` // Operation type. Enumeration values: // backup // replication ProtectType string `json:"protect_type"` // Capacity, in GB. Minimum: `1`. Maximum: `10485760` Size int `json:"size"` // Billing mode. Possible values are `post_paid` (pay-per-use) or `pre_paid` (yearly/monthly packages). // The value defaults to post_paid. ChargingMode string `json:"charging_mode,omitempty"` // Package type. This parameter is mandatory if charging_mode is set to pre_paid. // Possible values are `year` (yearly) or `month`(monthly). PeriodType string `json:"period_type,omitempty"` // Required duration for the package. This parameter is mandatory if charging_mode is set to `pre_paid`. PeriodNum int `json:"period_num,omitempty"` // Whether to automatically renew the subscription after expiration. By default, it is not renewed. IsAutoRenew bool `json:"is_auto_renew,omitempty"` // Whether the fee is automatically deducted from the customer's account balance after an order is submitted. // The non-automatic payment mode is used by default. IsAutoPay bool `json:"is_auto_pay,omitempty"` // Redirection URL ConsoleURL string `json:"console_url,omitempty"` // Extended information for creating a vault ExtraInfo *BillingCreateExtraInfo `json:"extra_info,omitempty"` }
type BillingCreateExtraInfo ¶
type BillingCreateExtraInfo struct { // ID of the application for creating vaults in combination. // This parameter is mandatory when creating vaults in combination. CombinedOrderID string `json:"combined_order_id,omitempty"` // Number of items in the application for creating vaults in the combination mode. // This parameter is mandatory when creating vaults in the combination mode. CombinedOrderECSNum int `json:"combined_order_ecs_num,omitempty"` }
type BillingUpdate ¶
type BillingUpdate struct {
Size int `json:"size,omitempty"`
}
type BindPolicyOpts ¶ added in v0.2.5
type BindPolicyOpts struct {
PolicyID string `json:"policy_id"`
}
func (BindPolicyOpts) ToBindPolicyMap ¶ added in v0.2.5
func (opts BindPolicyOpts) ToBindPolicyMap() (map[string]interface{}, error)
type BindPolicyOptsBuilder ¶ added in v0.2.5
type BindPolicyResult ¶ added in v0.2.5
type BindPolicyResult struct {
golangsdk.Result
}
func BindPolicy ¶ added in v0.2.5
func BindPolicy(client *golangsdk.ServiceClient, vaultID string, opts BindPolicyOptsBuilder) (r BindPolicyResult)
func (BindPolicyResult) Extract ¶ added in v0.2.5
func (r BindPolicyResult) Extract() (*PolicyBinding, error)
type CreateOpts ¶
type CreateOpts struct { // Backup policy ID. If the value of this parameter is missing, // automatic backup is not performed. BackupPolicyID string `json:"backup_policy_id,omitempty"` // Parameter information for billing creation Billing *BillingCreate `json:"billing"` // User-defined vault description Description string `json:"description,omitempty"` // Vault name Name string `json:"name"` // Associated resources. Set this parameter to [] if no resources are associated when creating a vault. Resources []ResourceCreate `json:"resources"` // Tags - Tag list. // This list cannot be an empty list. // The list can contain up to 10 keys. // Keys in this list must be unique. Tags []Tag `json:"tags,omitempty"` // Enterprise project ID. The default value is 0. EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` // Whether automatic association is supported AutoBind bool `json:"auto_bind,omitempty"` // Rules for automatic association BindRules *VaultBindRules `json:"bind_rules,omitempty"` // Whether to automatically expand the vault capacity. // Only pay-per-use vaults support this function. AutoExpand bool `json:"auto_expand,omitempty"` }
func (CreateOpts) ToVaultCreateMap ¶
func (opts CreateOpts) ToVaultCreateMap() (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 ¶
type DeleteResult struct {
golangsdk.ErrResult
}
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
type DissociateResourcesOpts ¶ added in v0.2.5
type DissociateResourcesOpts struct {
ResourceIDs []string `json:"resource_ids"`
}
func (DissociateResourcesOpts) ToDissociateResourcesMap ¶ added in v0.2.5
func (opts DissociateResourcesOpts) ToDissociateResourcesMap() (map[string]interface{}, error)
type DissociateResourcesOptsBuilder ¶ added in v0.2.5
type DissociateResourcesResult ¶ added in v0.2.5
type DissociateResourcesResult struct {
golangsdk.Result
}
func DissociateResources ¶ added in v0.2.5
func DissociateResources(client *golangsdk.ServiceClient, vaultID string, opts DissociateResourcesOptsBuilder) (r DissociateResourcesResult)
func (DissociateResourcesResult) Extract ¶ added in v0.2.5
func (r DissociateResourcesResult) Extract() ([]string, error)
type PolicyBinding ¶ added in v0.2.5
type ResourceCreate ¶
type ResourceCreate struct { // ID of the resource to be backed up ID string `json:"id"` // Type of the resource to be backed up. // Possible values are `OS::Nova::Server` and `OS::Cinder::Volume` Type string `json:"type"` // Resource name Name string `json:"name,omitempty"` // Extra information of the resource ExtraInfo *ResourceExtraInfo `json:"extra_info,omitempty"` }
type ResourceExtraInfo ¶
type ResourceExtraInfo struct { // ID of the disk that is excluded from the backup. // This parameter is used only when there are VM disk backups. ExcludeVolumes []string `json:"exclude_volumes,omitempty"` // Disk to be backed up IncludeVolumes []ResourceExtraInfoIncludeVolumes `json:"include_volumes,omitempty"` }
type ResourceResp ¶
type UnbindPolicyResult ¶ added in v0.2.5
type UnbindPolicyResult struct {
golangsdk.Result
}
func UnbindPolicy ¶ added in v0.2.5
func UnbindPolicy(client *golangsdk.ServiceClient, vaultID string, opts BindPolicyOptsBuilder) (r UnbindPolicyResult)
func (UnbindPolicyResult) Extract ¶ added in v0.2.5
func (r UnbindPolicyResult) Extract() (*PolicyBinding, error)
type UpdateOpts ¶
type UpdateOpts struct { Billing *BillingUpdate `json:"billing,omitempty"` Name string `json:"name,omitempty"` AutoBind *bool `json:"auto_bind,omitempty"` BindRules *VaultBindRules `json:"bind_rules,omitempty"` AutoExpand *bool `json:"auto_expand,omitempty"` }
func (UpdateOpts) ToVaultUpdateMap ¶
func (opts UpdateOpts) ToVaultUpdateMap() (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)
type Vault ¶
type Vault struct { ID string `json:"id"` Name string `json:"name"` Billing Billing `json:"billing"` Description string `json:"description"` ProjectID string `json:"project_id"` ProviderID string `json:"provider_id"` Resources []ResourceResp `json:"resources"` Tags []Tag `json:"tags"` EnterpriseProjectID string `json:"enterprise_project_id"` AutoBind bool `json:"auto_bind"` BindRules VaultBindRules `json:"bind_rules"` UserID string `json:"user_id"` CreatedAt string `json:"created_at"` AutoExpand bool `json:"auto_expand"` }
type VaultBindRules ¶
type VaultBindRules struct { // Filters automatically associated resources by tag. Tags []Tag `json:"tags,omitempty"` }
Click to show internal directories.
Click to hide internal directories.