mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-09 22:39:53 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+10721
File diff suppressed because it is too large
Load Diff
+269
@@ -0,0 +1,269 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package backupiface provides an interface to enable mocking the AWS Backup service client
|
||||
// for testing your code.
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters.
|
||||
package backupiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/backup"
|
||||
)
|
||||
|
||||
// BackupAPI provides an interface to enable mocking the
|
||||
// backup.Backup service client's API operation,
|
||||
// paginators, and waiters. This make unit testing your code that calls out
|
||||
// to the SDK's service client's calls easier.
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS Backup.
|
||||
// func myFunc(svc backupiface.BackupAPI) bool {
|
||||
// // Make svc.CreateBackupPlan request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := backup.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockBackupClient struct {
|
||||
// backupiface.BackupAPI
|
||||
// }
|
||||
// func (m *mockBackupClient) CreateBackupPlan(input *backup.CreateBackupPlanInput) (*backup.CreateBackupPlanOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockBackupClient{}
|
||||
//
|
||||
// myfunc(mockSvc)
|
||||
//
|
||||
// // Verify myFunc's functionality
|
||||
// }
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type BackupAPI interface {
|
||||
CreateBackupPlan(*backup.CreateBackupPlanInput) (*backup.CreateBackupPlanOutput, error)
|
||||
CreateBackupPlanWithContext(aws.Context, *backup.CreateBackupPlanInput, ...request.Option) (*backup.CreateBackupPlanOutput, error)
|
||||
CreateBackupPlanRequest(*backup.CreateBackupPlanInput) (*request.Request, *backup.CreateBackupPlanOutput)
|
||||
|
||||
CreateBackupSelection(*backup.CreateBackupSelectionInput) (*backup.CreateBackupSelectionOutput, error)
|
||||
CreateBackupSelectionWithContext(aws.Context, *backup.CreateBackupSelectionInput, ...request.Option) (*backup.CreateBackupSelectionOutput, error)
|
||||
CreateBackupSelectionRequest(*backup.CreateBackupSelectionInput) (*request.Request, *backup.CreateBackupSelectionOutput)
|
||||
|
||||
CreateBackupVault(*backup.CreateBackupVaultInput) (*backup.CreateBackupVaultOutput, error)
|
||||
CreateBackupVaultWithContext(aws.Context, *backup.CreateBackupVaultInput, ...request.Option) (*backup.CreateBackupVaultOutput, error)
|
||||
CreateBackupVaultRequest(*backup.CreateBackupVaultInput) (*request.Request, *backup.CreateBackupVaultOutput)
|
||||
|
||||
DeleteBackupPlan(*backup.DeleteBackupPlanInput) (*backup.DeleteBackupPlanOutput, error)
|
||||
DeleteBackupPlanWithContext(aws.Context, *backup.DeleteBackupPlanInput, ...request.Option) (*backup.DeleteBackupPlanOutput, error)
|
||||
DeleteBackupPlanRequest(*backup.DeleteBackupPlanInput) (*request.Request, *backup.DeleteBackupPlanOutput)
|
||||
|
||||
DeleteBackupSelection(*backup.DeleteBackupSelectionInput) (*backup.DeleteBackupSelectionOutput, error)
|
||||
DeleteBackupSelectionWithContext(aws.Context, *backup.DeleteBackupSelectionInput, ...request.Option) (*backup.DeleteBackupSelectionOutput, error)
|
||||
DeleteBackupSelectionRequest(*backup.DeleteBackupSelectionInput) (*request.Request, *backup.DeleteBackupSelectionOutput)
|
||||
|
||||
DeleteBackupVault(*backup.DeleteBackupVaultInput) (*backup.DeleteBackupVaultOutput, error)
|
||||
DeleteBackupVaultWithContext(aws.Context, *backup.DeleteBackupVaultInput, ...request.Option) (*backup.DeleteBackupVaultOutput, error)
|
||||
DeleteBackupVaultRequest(*backup.DeleteBackupVaultInput) (*request.Request, *backup.DeleteBackupVaultOutput)
|
||||
|
||||
DeleteBackupVaultAccessPolicy(*backup.DeleteBackupVaultAccessPolicyInput) (*backup.DeleteBackupVaultAccessPolicyOutput, error)
|
||||
DeleteBackupVaultAccessPolicyWithContext(aws.Context, *backup.DeleteBackupVaultAccessPolicyInput, ...request.Option) (*backup.DeleteBackupVaultAccessPolicyOutput, error)
|
||||
DeleteBackupVaultAccessPolicyRequest(*backup.DeleteBackupVaultAccessPolicyInput) (*request.Request, *backup.DeleteBackupVaultAccessPolicyOutput)
|
||||
|
||||
DeleteBackupVaultNotifications(*backup.DeleteBackupVaultNotificationsInput) (*backup.DeleteBackupVaultNotificationsOutput, error)
|
||||
DeleteBackupVaultNotificationsWithContext(aws.Context, *backup.DeleteBackupVaultNotificationsInput, ...request.Option) (*backup.DeleteBackupVaultNotificationsOutput, error)
|
||||
DeleteBackupVaultNotificationsRequest(*backup.DeleteBackupVaultNotificationsInput) (*request.Request, *backup.DeleteBackupVaultNotificationsOutput)
|
||||
|
||||
DeleteRecoveryPoint(*backup.DeleteRecoveryPointInput) (*backup.DeleteRecoveryPointOutput, error)
|
||||
DeleteRecoveryPointWithContext(aws.Context, *backup.DeleteRecoveryPointInput, ...request.Option) (*backup.DeleteRecoveryPointOutput, error)
|
||||
DeleteRecoveryPointRequest(*backup.DeleteRecoveryPointInput) (*request.Request, *backup.DeleteRecoveryPointOutput)
|
||||
|
||||
DescribeBackupJob(*backup.DescribeBackupJobInput) (*backup.DescribeBackupJobOutput, error)
|
||||
DescribeBackupJobWithContext(aws.Context, *backup.DescribeBackupJobInput, ...request.Option) (*backup.DescribeBackupJobOutput, error)
|
||||
DescribeBackupJobRequest(*backup.DescribeBackupJobInput) (*request.Request, *backup.DescribeBackupJobOutput)
|
||||
|
||||
DescribeBackupVault(*backup.DescribeBackupVaultInput) (*backup.DescribeBackupVaultOutput, error)
|
||||
DescribeBackupVaultWithContext(aws.Context, *backup.DescribeBackupVaultInput, ...request.Option) (*backup.DescribeBackupVaultOutput, error)
|
||||
DescribeBackupVaultRequest(*backup.DescribeBackupVaultInput) (*request.Request, *backup.DescribeBackupVaultOutput)
|
||||
|
||||
DescribeProtectedResource(*backup.DescribeProtectedResourceInput) (*backup.DescribeProtectedResourceOutput, error)
|
||||
DescribeProtectedResourceWithContext(aws.Context, *backup.DescribeProtectedResourceInput, ...request.Option) (*backup.DescribeProtectedResourceOutput, error)
|
||||
DescribeProtectedResourceRequest(*backup.DescribeProtectedResourceInput) (*request.Request, *backup.DescribeProtectedResourceOutput)
|
||||
|
||||
DescribeRecoveryPoint(*backup.DescribeRecoveryPointInput) (*backup.DescribeRecoveryPointOutput, error)
|
||||
DescribeRecoveryPointWithContext(aws.Context, *backup.DescribeRecoveryPointInput, ...request.Option) (*backup.DescribeRecoveryPointOutput, error)
|
||||
DescribeRecoveryPointRequest(*backup.DescribeRecoveryPointInput) (*request.Request, *backup.DescribeRecoveryPointOutput)
|
||||
|
||||
DescribeRestoreJob(*backup.DescribeRestoreJobInput) (*backup.DescribeRestoreJobOutput, error)
|
||||
DescribeRestoreJobWithContext(aws.Context, *backup.DescribeRestoreJobInput, ...request.Option) (*backup.DescribeRestoreJobOutput, error)
|
||||
DescribeRestoreJobRequest(*backup.DescribeRestoreJobInput) (*request.Request, *backup.DescribeRestoreJobOutput)
|
||||
|
||||
ExportBackupPlanTemplate(*backup.ExportBackupPlanTemplateInput) (*backup.ExportBackupPlanTemplateOutput, error)
|
||||
ExportBackupPlanTemplateWithContext(aws.Context, *backup.ExportBackupPlanTemplateInput, ...request.Option) (*backup.ExportBackupPlanTemplateOutput, error)
|
||||
ExportBackupPlanTemplateRequest(*backup.ExportBackupPlanTemplateInput) (*request.Request, *backup.ExportBackupPlanTemplateOutput)
|
||||
|
||||
GetBackupPlan(*backup.GetBackupPlanInput) (*backup.GetBackupPlanOutput, error)
|
||||
GetBackupPlanWithContext(aws.Context, *backup.GetBackupPlanInput, ...request.Option) (*backup.GetBackupPlanOutput, error)
|
||||
GetBackupPlanRequest(*backup.GetBackupPlanInput) (*request.Request, *backup.GetBackupPlanOutput)
|
||||
|
||||
GetBackupPlanFromJSON(*backup.GetBackupPlanFromJSONInput) (*backup.GetBackupPlanFromJSONOutput, error)
|
||||
GetBackupPlanFromJSONWithContext(aws.Context, *backup.GetBackupPlanFromJSONInput, ...request.Option) (*backup.GetBackupPlanFromJSONOutput, error)
|
||||
GetBackupPlanFromJSONRequest(*backup.GetBackupPlanFromJSONInput) (*request.Request, *backup.GetBackupPlanFromJSONOutput)
|
||||
|
||||
GetBackupPlanFromTemplate(*backup.GetBackupPlanFromTemplateInput) (*backup.GetBackupPlanFromTemplateOutput, error)
|
||||
GetBackupPlanFromTemplateWithContext(aws.Context, *backup.GetBackupPlanFromTemplateInput, ...request.Option) (*backup.GetBackupPlanFromTemplateOutput, error)
|
||||
GetBackupPlanFromTemplateRequest(*backup.GetBackupPlanFromTemplateInput) (*request.Request, *backup.GetBackupPlanFromTemplateOutput)
|
||||
|
||||
GetBackupSelection(*backup.GetBackupSelectionInput) (*backup.GetBackupSelectionOutput, error)
|
||||
GetBackupSelectionWithContext(aws.Context, *backup.GetBackupSelectionInput, ...request.Option) (*backup.GetBackupSelectionOutput, error)
|
||||
GetBackupSelectionRequest(*backup.GetBackupSelectionInput) (*request.Request, *backup.GetBackupSelectionOutput)
|
||||
|
||||
GetBackupVaultAccessPolicy(*backup.GetBackupVaultAccessPolicyInput) (*backup.GetBackupVaultAccessPolicyOutput, error)
|
||||
GetBackupVaultAccessPolicyWithContext(aws.Context, *backup.GetBackupVaultAccessPolicyInput, ...request.Option) (*backup.GetBackupVaultAccessPolicyOutput, error)
|
||||
GetBackupVaultAccessPolicyRequest(*backup.GetBackupVaultAccessPolicyInput) (*request.Request, *backup.GetBackupVaultAccessPolicyOutput)
|
||||
|
||||
GetBackupVaultNotifications(*backup.GetBackupVaultNotificationsInput) (*backup.GetBackupVaultNotificationsOutput, error)
|
||||
GetBackupVaultNotificationsWithContext(aws.Context, *backup.GetBackupVaultNotificationsInput, ...request.Option) (*backup.GetBackupVaultNotificationsOutput, error)
|
||||
GetBackupVaultNotificationsRequest(*backup.GetBackupVaultNotificationsInput) (*request.Request, *backup.GetBackupVaultNotificationsOutput)
|
||||
|
||||
GetRecoveryPointRestoreMetadata(*backup.GetRecoveryPointRestoreMetadataInput) (*backup.GetRecoveryPointRestoreMetadataOutput, error)
|
||||
GetRecoveryPointRestoreMetadataWithContext(aws.Context, *backup.GetRecoveryPointRestoreMetadataInput, ...request.Option) (*backup.GetRecoveryPointRestoreMetadataOutput, error)
|
||||
GetRecoveryPointRestoreMetadataRequest(*backup.GetRecoveryPointRestoreMetadataInput) (*request.Request, *backup.GetRecoveryPointRestoreMetadataOutput)
|
||||
|
||||
GetSupportedResourceTypes(*backup.GetSupportedResourceTypesInput) (*backup.GetSupportedResourceTypesOutput, error)
|
||||
GetSupportedResourceTypesWithContext(aws.Context, *backup.GetSupportedResourceTypesInput, ...request.Option) (*backup.GetSupportedResourceTypesOutput, error)
|
||||
GetSupportedResourceTypesRequest(*backup.GetSupportedResourceTypesInput) (*request.Request, *backup.GetSupportedResourceTypesOutput)
|
||||
|
||||
ListBackupJobs(*backup.ListBackupJobsInput) (*backup.ListBackupJobsOutput, error)
|
||||
ListBackupJobsWithContext(aws.Context, *backup.ListBackupJobsInput, ...request.Option) (*backup.ListBackupJobsOutput, error)
|
||||
ListBackupJobsRequest(*backup.ListBackupJobsInput) (*request.Request, *backup.ListBackupJobsOutput)
|
||||
|
||||
ListBackupJobsPages(*backup.ListBackupJobsInput, func(*backup.ListBackupJobsOutput, bool) bool) error
|
||||
ListBackupJobsPagesWithContext(aws.Context, *backup.ListBackupJobsInput, func(*backup.ListBackupJobsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListBackupPlanTemplates(*backup.ListBackupPlanTemplatesInput) (*backup.ListBackupPlanTemplatesOutput, error)
|
||||
ListBackupPlanTemplatesWithContext(aws.Context, *backup.ListBackupPlanTemplatesInput, ...request.Option) (*backup.ListBackupPlanTemplatesOutput, error)
|
||||
ListBackupPlanTemplatesRequest(*backup.ListBackupPlanTemplatesInput) (*request.Request, *backup.ListBackupPlanTemplatesOutput)
|
||||
|
||||
ListBackupPlanTemplatesPages(*backup.ListBackupPlanTemplatesInput, func(*backup.ListBackupPlanTemplatesOutput, bool) bool) error
|
||||
ListBackupPlanTemplatesPagesWithContext(aws.Context, *backup.ListBackupPlanTemplatesInput, func(*backup.ListBackupPlanTemplatesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListBackupPlanVersions(*backup.ListBackupPlanVersionsInput) (*backup.ListBackupPlanVersionsOutput, error)
|
||||
ListBackupPlanVersionsWithContext(aws.Context, *backup.ListBackupPlanVersionsInput, ...request.Option) (*backup.ListBackupPlanVersionsOutput, error)
|
||||
ListBackupPlanVersionsRequest(*backup.ListBackupPlanVersionsInput) (*request.Request, *backup.ListBackupPlanVersionsOutput)
|
||||
|
||||
ListBackupPlanVersionsPages(*backup.ListBackupPlanVersionsInput, func(*backup.ListBackupPlanVersionsOutput, bool) bool) error
|
||||
ListBackupPlanVersionsPagesWithContext(aws.Context, *backup.ListBackupPlanVersionsInput, func(*backup.ListBackupPlanVersionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListBackupPlans(*backup.ListBackupPlansInput) (*backup.ListBackupPlansOutput, error)
|
||||
ListBackupPlansWithContext(aws.Context, *backup.ListBackupPlansInput, ...request.Option) (*backup.ListBackupPlansOutput, error)
|
||||
ListBackupPlansRequest(*backup.ListBackupPlansInput) (*request.Request, *backup.ListBackupPlansOutput)
|
||||
|
||||
ListBackupPlansPages(*backup.ListBackupPlansInput, func(*backup.ListBackupPlansOutput, bool) bool) error
|
||||
ListBackupPlansPagesWithContext(aws.Context, *backup.ListBackupPlansInput, func(*backup.ListBackupPlansOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListBackupSelections(*backup.ListBackupSelectionsInput) (*backup.ListBackupSelectionsOutput, error)
|
||||
ListBackupSelectionsWithContext(aws.Context, *backup.ListBackupSelectionsInput, ...request.Option) (*backup.ListBackupSelectionsOutput, error)
|
||||
ListBackupSelectionsRequest(*backup.ListBackupSelectionsInput) (*request.Request, *backup.ListBackupSelectionsOutput)
|
||||
|
||||
ListBackupSelectionsPages(*backup.ListBackupSelectionsInput, func(*backup.ListBackupSelectionsOutput, bool) bool) error
|
||||
ListBackupSelectionsPagesWithContext(aws.Context, *backup.ListBackupSelectionsInput, func(*backup.ListBackupSelectionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListBackupVaults(*backup.ListBackupVaultsInput) (*backup.ListBackupVaultsOutput, error)
|
||||
ListBackupVaultsWithContext(aws.Context, *backup.ListBackupVaultsInput, ...request.Option) (*backup.ListBackupVaultsOutput, error)
|
||||
ListBackupVaultsRequest(*backup.ListBackupVaultsInput) (*request.Request, *backup.ListBackupVaultsOutput)
|
||||
|
||||
ListBackupVaultsPages(*backup.ListBackupVaultsInput, func(*backup.ListBackupVaultsOutput, bool) bool) error
|
||||
ListBackupVaultsPagesWithContext(aws.Context, *backup.ListBackupVaultsInput, func(*backup.ListBackupVaultsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListProtectedResources(*backup.ListProtectedResourcesInput) (*backup.ListProtectedResourcesOutput, error)
|
||||
ListProtectedResourcesWithContext(aws.Context, *backup.ListProtectedResourcesInput, ...request.Option) (*backup.ListProtectedResourcesOutput, error)
|
||||
ListProtectedResourcesRequest(*backup.ListProtectedResourcesInput) (*request.Request, *backup.ListProtectedResourcesOutput)
|
||||
|
||||
ListProtectedResourcesPages(*backup.ListProtectedResourcesInput, func(*backup.ListProtectedResourcesOutput, bool) bool) error
|
||||
ListProtectedResourcesPagesWithContext(aws.Context, *backup.ListProtectedResourcesInput, func(*backup.ListProtectedResourcesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListRecoveryPointsByBackupVault(*backup.ListRecoveryPointsByBackupVaultInput) (*backup.ListRecoveryPointsByBackupVaultOutput, error)
|
||||
ListRecoveryPointsByBackupVaultWithContext(aws.Context, *backup.ListRecoveryPointsByBackupVaultInput, ...request.Option) (*backup.ListRecoveryPointsByBackupVaultOutput, error)
|
||||
ListRecoveryPointsByBackupVaultRequest(*backup.ListRecoveryPointsByBackupVaultInput) (*request.Request, *backup.ListRecoveryPointsByBackupVaultOutput)
|
||||
|
||||
ListRecoveryPointsByBackupVaultPages(*backup.ListRecoveryPointsByBackupVaultInput, func(*backup.ListRecoveryPointsByBackupVaultOutput, bool) bool) error
|
||||
ListRecoveryPointsByBackupVaultPagesWithContext(aws.Context, *backup.ListRecoveryPointsByBackupVaultInput, func(*backup.ListRecoveryPointsByBackupVaultOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListRecoveryPointsByResource(*backup.ListRecoveryPointsByResourceInput) (*backup.ListRecoveryPointsByResourceOutput, error)
|
||||
ListRecoveryPointsByResourceWithContext(aws.Context, *backup.ListRecoveryPointsByResourceInput, ...request.Option) (*backup.ListRecoveryPointsByResourceOutput, error)
|
||||
ListRecoveryPointsByResourceRequest(*backup.ListRecoveryPointsByResourceInput) (*request.Request, *backup.ListRecoveryPointsByResourceOutput)
|
||||
|
||||
ListRecoveryPointsByResourcePages(*backup.ListRecoveryPointsByResourceInput, func(*backup.ListRecoveryPointsByResourceOutput, bool) bool) error
|
||||
ListRecoveryPointsByResourcePagesWithContext(aws.Context, *backup.ListRecoveryPointsByResourceInput, func(*backup.ListRecoveryPointsByResourceOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListRestoreJobs(*backup.ListRestoreJobsInput) (*backup.ListRestoreJobsOutput, error)
|
||||
ListRestoreJobsWithContext(aws.Context, *backup.ListRestoreJobsInput, ...request.Option) (*backup.ListRestoreJobsOutput, error)
|
||||
ListRestoreJobsRequest(*backup.ListRestoreJobsInput) (*request.Request, *backup.ListRestoreJobsOutput)
|
||||
|
||||
ListRestoreJobsPages(*backup.ListRestoreJobsInput, func(*backup.ListRestoreJobsOutput, bool) bool) error
|
||||
ListRestoreJobsPagesWithContext(aws.Context, *backup.ListRestoreJobsInput, func(*backup.ListRestoreJobsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListTags(*backup.ListTagsInput) (*backup.ListTagsOutput, error)
|
||||
ListTagsWithContext(aws.Context, *backup.ListTagsInput, ...request.Option) (*backup.ListTagsOutput, error)
|
||||
ListTagsRequest(*backup.ListTagsInput) (*request.Request, *backup.ListTagsOutput)
|
||||
|
||||
ListTagsPages(*backup.ListTagsInput, func(*backup.ListTagsOutput, bool) bool) error
|
||||
ListTagsPagesWithContext(aws.Context, *backup.ListTagsInput, func(*backup.ListTagsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
PutBackupVaultAccessPolicy(*backup.PutBackupVaultAccessPolicyInput) (*backup.PutBackupVaultAccessPolicyOutput, error)
|
||||
PutBackupVaultAccessPolicyWithContext(aws.Context, *backup.PutBackupVaultAccessPolicyInput, ...request.Option) (*backup.PutBackupVaultAccessPolicyOutput, error)
|
||||
PutBackupVaultAccessPolicyRequest(*backup.PutBackupVaultAccessPolicyInput) (*request.Request, *backup.PutBackupVaultAccessPolicyOutput)
|
||||
|
||||
PutBackupVaultNotifications(*backup.PutBackupVaultNotificationsInput) (*backup.PutBackupVaultNotificationsOutput, error)
|
||||
PutBackupVaultNotificationsWithContext(aws.Context, *backup.PutBackupVaultNotificationsInput, ...request.Option) (*backup.PutBackupVaultNotificationsOutput, error)
|
||||
PutBackupVaultNotificationsRequest(*backup.PutBackupVaultNotificationsInput) (*request.Request, *backup.PutBackupVaultNotificationsOutput)
|
||||
|
||||
StartBackupJob(*backup.StartBackupJobInput) (*backup.StartBackupJobOutput, error)
|
||||
StartBackupJobWithContext(aws.Context, *backup.StartBackupJobInput, ...request.Option) (*backup.StartBackupJobOutput, error)
|
||||
StartBackupJobRequest(*backup.StartBackupJobInput) (*request.Request, *backup.StartBackupJobOutput)
|
||||
|
||||
StartRestoreJob(*backup.StartRestoreJobInput) (*backup.StartRestoreJobOutput, error)
|
||||
StartRestoreJobWithContext(aws.Context, *backup.StartRestoreJobInput, ...request.Option) (*backup.StartRestoreJobOutput, error)
|
||||
StartRestoreJobRequest(*backup.StartRestoreJobInput) (*request.Request, *backup.StartRestoreJobOutput)
|
||||
|
||||
StopBackupJob(*backup.StopBackupJobInput) (*backup.StopBackupJobOutput, error)
|
||||
StopBackupJobWithContext(aws.Context, *backup.StopBackupJobInput, ...request.Option) (*backup.StopBackupJobOutput, error)
|
||||
StopBackupJobRequest(*backup.StopBackupJobInput) (*request.Request, *backup.StopBackupJobOutput)
|
||||
|
||||
TagResource(*backup.TagResourceInput) (*backup.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *backup.TagResourceInput, ...request.Option) (*backup.TagResourceOutput, error)
|
||||
TagResourceRequest(*backup.TagResourceInput) (*request.Request, *backup.TagResourceOutput)
|
||||
|
||||
UntagResource(*backup.UntagResourceInput) (*backup.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *backup.UntagResourceInput, ...request.Option) (*backup.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*backup.UntagResourceInput) (*request.Request, *backup.UntagResourceOutput)
|
||||
|
||||
UpdateBackupPlan(*backup.UpdateBackupPlanInput) (*backup.UpdateBackupPlanOutput, error)
|
||||
UpdateBackupPlanWithContext(aws.Context, *backup.UpdateBackupPlanInput, ...request.Option) (*backup.UpdateBackupPlanOutput, error)
|
||||
UpdateBackupPlanRequest(*backup.UpdateBackupPlanInput) (*request.Request, *backup.UpdateBackupPlanOutput)
|
||||
|
||||
UpdateRecoveryPointLifecycle(*backup.UpdateRecoveryPointLifecycleInput) (*backup.UpdateRecoveryPointLifecycleOutput, error)
|
||||
UpdateRecoveryPointLifecycleWithContext(aws.Context, *backup.UpdateRecoveryPointLifecycleInput, ...request.Option) (*backup.UpdateRecoveryPointLifecycleOutput, error)
|
||||
UpdateRecoveryPointLifecycleRequest(*backup.UpdateRecoveryPointLifecycleInput) (*request.Request, *backup.UpdateRecoveryPointLifecycleOutput)
|
||||
}
|
||||
|
||||
var _ BackupAPI = (*backup.Backup)(nil)
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package backup provides the client and types for making API
|
||||
// requests to AWS Backup.
|
||||
//
|
||||
// AWS Backup is a unified backup service designed to protect AWS services and
|
||||
// their associated data. AWS Backup simplifies the creation, migration, restoration,
|
||||
// and deletion of backups, while also providing reporting and auditing.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15 for more information on this service.
|
||||
//
|
||||
// See backup package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/backup/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact AWS Backup with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the AWS Backup client Backup for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/backup/#New
|
||||
package backup
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package backup
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAlreadyExistsException for service response error code
|
||||
// "AlreadyExistsException".
|
||||
//
|
||||
// The required resource already exists.
|
||||
ErrCodeAlreadyExistsException = "AlreadyExistsException"
|
||||
|
||||
// ErrCodeDependencyFailureException for service response error code
|
||||
// "DependencyFailureException".
|
||||
//
|
||||
// A dependent AWS service or resource returned an error to the AWS Backup service,
|
||||
// and the action cannot be completed.
|
||||
ErrCodeDependencyFailureException = "DependencyFailureException"
|
||||
|
||||
// ErrCodeInvalidParameterValueException for service response error code
|
||||
// "InvalidParameterValueException".
|
||||
//
|
||||
// Indicates that something is wrong with a parameter's value. For example,
|
||||
// the value is out of range.
|
||||
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
|
||||
|
||||
// ErrCodeInvalidRequestException for service response error code
|
||||
// "InvalidRequestException".
|
||||
//
|
||||
// Indicates that something is wrong with the input to the request. For example,
|
||||
// a parameter is of the wrong type.
|
||||
ErrCodeInvalidRequestException = "InvalidRequestException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// A limit in the request has been exceeded; for example, a maximum number of
|
||||
// items allowed in a request.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeMissingParameterValueException for service response error code
|
||||
// "MissingParameterValueException".
|
||||
//
|
||||
// Indicates that a required parameter is missing.
|
||||
ErrCodeMissingParameterValueException = "MissingParameterValueException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// A resource that is required for the action doesn't exist.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
|
||||
// ErrCodeServiceUnavailableException for service response error code
|
||||
// "ServiceUnavailableException".
|
||||
//
|
||||
// The request failed due to a temporary failure of the server.
|
||||
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
|
||||
)
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package backup
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
)
|
||||
|
||||
// Backup provides the API operation methods for making requests to
|
||||
// AWS Backup. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// Backup methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type Backup struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "Backup" // Name of service.
|
||||
EndpointsID = "backup" // ID to lookup a service endpoint with.
|
||||
ServiceID = "Backup" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the Backup client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a Backup client from just a session.
|
||||
// svc := backup.New(mySession)
|
||||
//
|
||||
// // Create a Backup client with additional configuration
|
||||
// svc := backup.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Backup {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Backup {
|
||||
svc := &Backup{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2018-11-15",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a Backup operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *Backup) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
Reference in New Issue
Block a user