Documentation ¶
Index ¶
- func ExtractVaults(r pagination.Page) (*[]Vault, error)
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
- 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 ListOpts
- type ListOptsBuilder
- type Order
- type OrderResp
- type PolicyBinding
- type ResourceCreate
- type ResourceExtraInfo
- type ResourceExtraInfoIncludeVolumes
- type ResourceResp
- type UnbindPolicyResult
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
- type Vault
- type VaultBindRules
- type VaultPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractVaults ¶
func ExtractVaults(r pagination.Page) (*[]Vault, error)
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
List is a method to obtain the specified CBR vaults according to the vault ID, vault name and so on. This method can also obtain all the CBR vaults through the default parameter settings.
Types ¶
type AssociateResourcesOpts ¶
type AssociateResourcesOpts struct {
Resources []ResourceCreate `json:"resources" required:"true"`
}
func (AssociateResourcesOpts) ToAssociateResourcesMap ¶
func (opts AssociateResourcesOpts) ToAssociateResourcesMap() (map[string]interface{}, error)
type AssociateResourcesResult ¶
func AssociateResources ¶
func AssociateResources(client *golangsdk.ServiceClient, vaultID string, opts AssociateResourcesOptsBuilder) (r AssociateResourcesResult)
func (AssociateResourcesResult) Extract ¶
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"` IsMultiAz bool `json:"is_multi_az"` }
type BillingCreate ¶
type BillingCreate struct { ConsistentLevel string `json:"consistent_level" required:"true"` ObjectType string `json:"object_type" required:"true"` ProtectType string `json:"protect_type" required:"true"` Size int `json:"size" required:"true"` ChargingMode string `json:"charging_mode,omitempty"` CloudType string `json:"cloud_type,omitempty"` ConsoleURL string `json:"console_url,omitempty"` ExtraInfo *BillingCreateExtraInfo `json:"extra_info,omitempty"` PeriodNum int `json:"period_num,omitempty"` PeriodType string `json:"period_type,omitempty"` IsAutoRenew bool `json:"is_auto_renew,omitempty"` IsAutoPay bool `json:"is_auto_pay,omitempty"` IsMultiAz bool `json:"is_multi_az,omitempty"` }
type BillingCreateExtraInfo ¶
type BillingUpdate ¶
type BindPolicyOpts ¶
type BindPolicyOpts struct { // The destination vault ID, only required if associate replication policy. DestinationVaultId string `json:"destination_vault_id,omitempty"` // The policy ID. PolicyID string `json:"policy_id,omitempty"` // The policy ID list. PolicyIDs []string `json:"add_policy_ids,omitempty"` }
func (BindPolicyOpts) ToBindPolicyMap ¶
func (opts BindPolicyOpts) ToBindPolicyMap() (map[string]interface{}, error)
type BindPolicyOptsBuilder ¶
type BindPolicyResult ¶
func BindPolicy ¶
func BindPolicy(client *golangsdk.ServiceClient, vaultID string, opts BindPolicyOptsBuilder) (r BindPolicyResult)
func (BindPolicyResult) Extract ¶
func (r BindPolicyResult) Extract() (*PolicyBinding, error)
type CreateOpts ¶
type CreateOpts struct { Billing *BillingCreate `json:"billing" required:"true"` Name string `json:"name" required:"true"` Resources []ResourceCreate `json:"resources" required:"true"` AutoBind bool `json:"auto_bind,omitempty"` AutoExpand bool `json:"auto_expand,omitempty"` BackupNamePrefix string `json:"backup_name_prefix"` BackupPolicyID string `json:"backup_policy_id,omitempty"` BindRules *VaultBindRules `json:"bind_rules,omitempty"` DemandBilling *bool `json:"demand_billing,omitempty"` Description string `json:"description,omitempty"` EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` SmnNotify *bool `json:"smn_notify,omitempty"` Tags []tags.ResourceTag `json:"tags,omitempty"` Threshold int `json:"threshold,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)
func (CreateResult) ExtractOrder ¶
func (r CreateResult) ExtractOrder() (*OrderResp, error)
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
type DissociateResourcesOpts ¶
type DissociateResourcesOpts struct {
ResourceIDs []string `json:"resource_ids" required:"true"`
}
func (DissociateResourcesOpts) ToDissociateResourcesMap ¶
func (opts DissociateResourcesOpts) ToDissociateResourcesMap() (map[string]interface{}, error)
type DissociateResourcesResult ¶
func DissociateResources ¶
func DissociateResources(client *golangsdk.ServiceClient, vaultID string, opts DissociateResourcesOptsBuilder) (r DissociateResourcesResult)
func (DissociateResourcesResult) Extract ¶
func (r DissociateResourcesResult) Extract() ([]string, error)
type ListOpts ¶
type ListOpts struct { CloudType string `q:"cloud_type"` EnterpriseProjectID string `q:"enterprise_project_id"` ID string `q:"id"` Limit int `q:"limit"` Name string `q:"name"` ObjectType string `q:"object_type"` Offset int `q:"offset"` PolicyID string `q:"policy_id"` ProtectType string `q:"protect_type"` ResourceIDs string `q:"resource_ids"` Status string `q:"status"` }
func (ListOpts) ToPolicyListQuery ¶
type ListOptsBuilder ¶
type PolicyBinding ¶
type ResourceCreate ¶
type ResourceCreate struct { ID string `json:"id" required:"true"` Type string `json:"type" required:"true"` Name string `json:"name,omitempty"` ExtraInfo *ResourceExtraInfo `json:"extra_info,omitempty"` }
type ResourceExtraInfo ¶
type ResourceExtraInfo struct { ExcludeVolumes []string `json:"exclude_volumes,omitempty"` IncludeVolumes []ResourceExtraInfoIncludeVolumes `json:"include_volumes,omitempty"` }
type ResourceResp ¶
type UnbindPolicyResult ¶
func UnbindPolicy ¶
func UnbindPolicy(client *golangsdk.ServiceClient, vaultID string, opts BindPolicyOptsBuilder) (r UnbindPolicyResult)
func (UnbindPolicyResult) Extract ¶
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"` SmnNotify *bool `json:"smn_notify,omitempty"` Threshold int `json:"threshold,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 []tags.ResourceTag `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"` SmnNotify bool `json:"smn_notify"` Threshold int `json:"threshold"` BackupNamePrefix string `json:"backup_name_prefix"` }
type VaultBindRules ¶
type VaultBindRules struct {
Tags []tags.ResourceTag `json:"tags,omitempty"`
}
type VaultPage ¶
type VaultPage struct {
pagination.SinglePageBase
}
Click to show internal directories.
Click to hide internal directories.