Documentation
¶
Index ¶
- type BackupJob
- type BackupLifecycle
- type BackupPlan
- type BackupRule
- type BackupSelection
- type BackupService
- type BackupVault
- type RecoveryPoint
- type Store
- func (s *Store) CreateBackupPlan(name string, rules []BackupRule) (*BackupPlan, error)
- func (s *Store) CreateBackupSelection(planID, selName, iamRoleArn string, resources []string) (*BackupSelection, error)
- func (s *Store) CreateBackupVault(name, encryptionKeyArn string) (*BackupVault, error)
- func (s *Store) DeleteBackupPlan(planID string) bool
- func (s *Store) DeleteBackupSelection(planID, selID string) bool
- func (s *Store) DeleteBackupVault(name string) (bool, string)
- func (s *Store) GetBackupJob(jobID string) (*BackupJob, bool)
- func (s *Store) GetBackupPlan(planID string) (*BackupPlan, bool)
- func (s *Store) GetBackupSelection(planID, selID string) (*BackupSelection, bool)
- func (s *Store) GetBackupVault(name string) (*BackupVault, bool)
- func (s *Store) GetRecoveryPoint(vaultName, rpArn string) (*RecoveryPoint, bool)
- func (s *Store) ListBackupJobs() []*BackupJob
- func (s *Store) ListBackupPlans() []*BackupPlan
- func (s *Store) ListBackupSelections(planID string) []*BackupSelection
- func (s *Store) ListBackupVaults() []*BackupVault
- func (s *Store) ListRecoveryPoints(vaultName string) []*RecoveryPoint
- func (s *Store) LockBackupVault(name string, minRetention, maxRetention int64) error
- func (s *Store) StartBackupJob(vaultName, resourceArn, resourceType, iamRoleArn string) (*BackupJob, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupJob ¶
type BackupJob struct {
BackupJobID string
BackupVaultName string
BackupVaultArn string
ResourceArn string
ResourceType string
State string
StatusMessage string
CreationDate time.Time
CompletionDate *time.Time
BackupSizeInBytes int64
RecoveryPointArn string
// contains filtered or unexported fields
}
BackupJob represents a backup job.
type BackupLifecycle ¶
BackupLifecycle defines retention for a backup rule.
type BackupPlan ¶
type BackupPlan struct {
BackupPlanID string
BackupPlanArn string
BackupPlanName string
Rules []BackupRule
CreatedAt time.Time
VersionID string
}
BackupPlan represents an AWS Backup plan.
type BackupRule ¶
type BackupRule struct {
RuleName string
TargetBackupVaultName string
ScheduleExpression string
StartWindowMinutes int64
CompletionWindowMinutes int64
Lifecycle *BackupLifecycle
}
BackupRule represents a rule in a backup plan.
type BackupSelection ¶
type BackupSelection struct {
SelectionID string
SelectionName string
BackupPlanID string
IamRoleArn string
Resources []string
CreationDate time.Time
}
BackupSelection represents a backup selection (resources to back up).
type BackupService ¶
type BackupService struct {
// contains filtered or unexported fields
}
BackupService is the cloudmock implementation of the AWS Backup API.
func New ¶
func New(accountID, region string) *BackupService
New returns a new BackupService for the given AWS account ID and region.
func (*BackupService) Actions ¶
func (s *BackupService) Actions() []service.Action
Actions returns the list of Backup API actions supported by this service.
func (*BackupService) HandleRequest ¶
func (s *BackupService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming Backup request to the appropriate handler.
func (*BackupService) HealthCheck ¶
func (s *BackupService) HealthCheck() error
HealthCheck always returns nil.
func (*BackupService) Name ¶
func (s *BackupService) Name() string
Name returns the AWS service name used for routing.
type BackupVault ¶
type BackupVault struct {
BackupVaultName string
BackupVaultArn string
CreationDate time.Time
NumberOfRecoveryPoints int64
EncryptionKeyArn string
Locked bool
LockDate *time.Time
MinRetentionDays int64
MaxRetentionDays int64
}
BackupVault represents a backup vault.
type RecoveryPoint ¶
type RecoveryPoint struct {
RecoveryPointArn string
BackupVaultName string
BackupVaultArn string
ResourceArn string
ResourceType string
CreationDate time.Time
Status string
BackupSizeInBytes int64
IsEncrypted bool
}
RecoveryPoint represents a recovery point.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages Backup resources in memory.
func (*Store) CreateBackupPlan ¶
func (s *Store) CreateBackupPlan(name string, rules []BackupRule) (*BackupPlan, error)
CreateBackupPlan creates a new backup plan.
func (*Store) CreateBackupSelection ¶
func (s *Store) CreateBackupSelection(planID, selName, iamRoleArn string, resources []string) (*BackupSelection, error)
CreateBackupSelection creates a backup selection for a plan.
func (*Store) CreateBackupVault ¶
func (s *Store) CreateBackupVault(name, encryptionKeyArn string) (*BackupVault, error)
CreateBackupVault creates a new backup vault.
func (*Store) DeleteBackupPlan ¶
DeleteBackupPlan deletes a backup plan.
func (*Store) DeleteBackupSelection ¶
DeleteBackupSelection deletes a backup selection.
func (*Store) DeleteBackupVault ¶
DeleteBackupVault deletes a backup vault.
func (*Store) GetBackupJob ¶
GetBackupJob retrieves a backup job.
func (*Store) GetBackupPlan ¶
func (s *Store) GetBackupPlan(planID string) (*BackupPlan, bool)
GetBackupPlan retrieves a backup plan by ID.
func (*Store) GetBackupSelection ¶
func (s *Store) GetBackupSelection(planID, selID string) (*BackupSelection, bool)
GetBackupSelection retrieves a backup selection.
func (*Store) GetBackupVault ¶
func (s *Store) GetBackupVault(name string) (*BackupVault, bool)
GetBackupVault retrieves a backup vault by name.
func (*Store) GetRecoveryPoint ¶
func (s *Store) GetRecoveryPoint(vaultName, rpArn string) (*RecoveryPoint, bool)
GetRecoveryPoint retrieves a recovery point.
func (*Store) ListBackupJobs ¶
ListBackupJobs returns all backup jobs.
func (*Store) ListBackupPlans ¶
func (s *Store) ListBackupPlans() []*BackupPlan
ListBackupPlans returns all backup plans.
func (*Store) ListBackupSelections ¶
func (s *Store) ListBackupSelections(planID string) []*BackupSelection
ListBackupSelections returns all selections for a plan.
func (*Store) ListBackupVaults ¶
func (s *Store) ListBackupVaults() []*BackupVault
ListBackupVaults returns all backup vaults.
func (*Store) ListRecoveryPoints ¶
func (s *Store) ListRecoveryPoints(vaultName string) []*RecoveryPoint
ListRecoveryPoints returns recovery points for a vault.
func (*Store) LockBackupVault ¶
LockBackupVault locks a vault with retention policy.