Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10722 lines (9315 sloc) 384 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package backup
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opCreateBackupPlan = "CreateBackupPlan"
// CreateBackupPlanRequest generates a "aws/request.Request" representing the
// client's request for the CreateBackupPlan operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateBackupPlan for more information on using the CreateBackupPlan
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateBackupPlanRequest method.
// req, resp := client.CreateBackupPlanRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan
func (c *Backup) CreateBackupPlanRequest(input *CreateBackupPlanInput) (req *request.Request, output *CreateBackupPlanOutput) {
op := &request.Operation{
Name: opCreateBackupPlan,
HTTPMethod: "PUT",
HTTPPath: "/backup/plans/",
}
if input == nil {
input = &CreateBackupPlanInput{}
}
output = &CreateBackupPlanOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateBackupPlan API operation for AWS Backup.
//
// Backup plans are documents that contain information that AWS Backup uses
// to schedule tasks that create recovery points of resources.
//
// If you call CreateBackupPlan with a plan that already exists, the existing
// backupPlanId is returned.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation CreateBackupPlan for usage and error information.
//
// Returned Error Codes:
// * ErrCodeLimitExceededException "LimitExceededException"
// A limit in the request has been exceeded; for example, a maximum number of
// items allowed in a request.
//
// * ErrCodeAlreadyExistsException "AlreadyExistsException"
// The required resource already exists.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan
func (c *Backup) CreateBackupPlan(input *CreateBackupPlanInput) (*CreateBackupPlanOutput, error) {
req, out := c.CreateBackupPlanRequest(input)
return out, req.Send()
}
// CreateBackupPlanWithContext is the same as CreateBackupPlan with the addition of
// the ability to pass a context and additional request options.
//
// See CreateBackupPlan for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) CreateBackupPlanWithContext(ctx aws.Context, input *CreateBackupPlanInput, opts ...request.Option) (*CreateBackupPlanOutput, error) {
req, out := c.CreateBackupPlanRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateBackupSelection = "CreateBackupSelection"
// CreateBackupSelectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateBackupSelection operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateBackupSelection for more information on using the CreateBackupSelection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateBackupSelectionRequest method.
// req, resp := client.CreateBackupSelectionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection
func (c *Backup) CreateBackupSelectionRequest(input *CreateBackupSelectionInput) (req *request.Request, output *CreateBackupSelectionOutput) {
op := &request.Operation{
Name: opCreateBackupSelection,
HTTPMethod: "PUT",
HTTPPath: "/backup/plans/{backupPlanId}/selections/",
}
if input == nil {
input = &CreateBackupSelectionInput{}
}
output = &CreateBackupSelectionOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateBackupSelection API operation for AWS Backup.
//
// Creates a JSON document that specifies a set of resources to assign to a
// backup plan. Resources can be included by specifying patterns for a ListOfTags
// and selected Resources.
//
// For example, consider the following patterns:
//
// * Resources: "arn:aws:ec2:region:account-id:volume/volume-id"
//
// * ConditionKey:"department" ConditionValue:"finance" ConditionType:"StringEquals"
//
// * ConditionKey:"importance" ConditionValue:"critical" ConditionType:"StringEquals"
//
// Using these patterns would back up all Amazon Elastic Block Store (Amazon
// EBS) volumes that are tagged as "department=finance", "importance=critical",
// in addition to an EBS volume with the specified volume Id.
//
// Resources and conditions are additive in that all resources that match the
// pattern are selected. This shouldn't be confused with a logical AND, where
// all conditions must match. The matching patterns are logically 'put together
// using the OR operator. In other words, all patterns that match are selected
// for backup.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation CreateBackupSelection for usage and error information.
//
// Returned Error Codes:
// * ErrCodeLimitExceededException "LimitExceededException"
// A limit in the request has been exceeded; for example, a maximum number of
// items allowed in a request.
//
// * ErrCodeAlreadyExistsException "AlreadyExistsException"
// The required resource already exists.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection
func (c *Backup) CreateBackupSelection(input *CreateBackupSelectionInput) (*CreateBackupSelectionOutput, error) {
req, out := c.CreateBackupSelectionRequest(input)
return out, req.Send()
}
// CreateBackupSelectionWithContext is the same as CreateBackupSelection with the addition of
// the ability to pass a context and additional request options.
//
// See CreateBackupSelection for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) CreateBackupSelectionWithContext(ctx aws.Context, input *CreateBackupSelectionInput, opts ...request.Option) (*CreateBackupSelectionOutput, error) {
req, out := c.CreateBackupSelectionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateBackupVault = "CreateBackupVault"
// CreateBackupVaultRequest generates a "aws/request.Request" representing the
// client's request for the CreateBackupVault operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateBackupVault for more information on using the CreateBackupVault
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateBackupVaultRequest method.
// req, resp := client.CreateBackupVaultRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault
func (c *Backup) CreateBackupVaultRequest(input *CreateBackupVaultInput) (req *request.Request, output *CreateBackupVaultOutput) {
op := &request.Operation{
Name: opCreateBackupVault,
HTTPMethod: "PUT",
HTTPPath: "/backup-vaults/{backupVaultName}",
}
if input == nil {
input = &CreateBackupVaultInput{}
}
output = &CreateBackupVaultOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateBackupVault API operation for AWS Backup.
//
// Creates a logical container where backups are stored. A CreateBackupVault
// request includes a name, optionally one or more resource tags, an encryption
// key, and a request ID.
//
// Sensitive data, such as passport numbers, should not be included the name
// of a backup vault.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation CreateBackupVault for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// A limit in the request has been exceeded; for example, a maximum number of
// items allowed in a request.
//
// * ErrCodeAlreadyExistsException "AlreadyExistsException"
// The required resource already exists.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault
func (c *Backup) CreateBackupVault(input *CreateBackupVaultInput) (*CreateBackupVaultOutput, error) {
req, out := c.CreateBackupVaultRequest(input)
return out, req.Send()
}
// CreateBackupVaultWithContext is the same as CreateBackupVault with the addition of
// the ability to pass a context and additional request options.
//
// See CreateBackupVault for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) CreateBackupVaultWithContext(ctx aws.Context, input *CreateBackupVaultInput, opts ...request.Option) (*CreateBackupVaultOutput, error) {
req, out := c.CreateBackupVaultRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBackupPlan = "DeleteBackupPlan"
// DeleteBackupPlanRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBackupPlan operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteBackupPlan for more information on using the DeleteBackupPlan
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteBackupPlanRequest method.
// req, resp := client.DeleteBackupPlanRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan
func (c *Backup) DeleteBackupPlanRequest(input *DeleteBackupPlanInput) (req *request.Request, output *DeleteBackupPlanOutput) {
op := &request.Operation{
Name: opDeleteBackupPlan,
HTTPMethod: "DELETE",
HTTPPath: "/backup/plans/{backupPlanId}",
}
if input == nil {
input = &DeleteBackupPlanInput{}
}
output = &DeleteBackupPlanOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteBackupPlan API operation for AWS Backup.
//
// Deletes a backup plan. A backup plan can only be deleted after all associated
// selections of resources have been deleted. Deleting a backup plan deletes
// the current version of a backup plan. Previous versions, if any, will still
// exist.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DeleteBackupPlan for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeInvalidRequestException "InvalidRequestException"
// Indicates that something is wrong with the input to the request. For example,
// a parameter is of the wrong type.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan
func (c *Backup) DeleteBackupPlan(input *DeleteBackupPlanInput) (*DeleteBackupPlanOutput, error) {
req, out := c.DeleteBackupPlanRequest(input)
return out, req.Send()
}
// DeleteBackupPlanWithContext is the same as DeleteBackupPlan with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBackupPlan for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DeleteBackupPlanWithContext(ctx aws.Context, input *DeleteBackupPlanInput, opts ...request.Option) (*DeleteBackupPlanOutput, error) {
req, out := c.DeleteBackupPlanRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBackupSelection = "DeleteBackupSelection"
// DeleteBackupSelectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBackupSelection operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteBackupSelection for more information on using the DeleteBackupSelection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteBackupSelectionRequest method.
// req, resp := client.DeleteBackupSelectionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection
func (c *Backup) DeleteBackupSelectionRequest(input *DeleteBackupSelectionInput) (req *request.Request, output *DeleteBackupSelectionOutput) {
op := &request.Operation{
Name: opDeleteBackupSelection,
HTTPMethod: "DELETE",
HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}",
}
if input == nil {
input = &DeleteBackupSelectionInput{}
}
output = &DeleteBackupSelectionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteBackupSelection API operation for AWS Backup.
//
// Deletes the resource selection associated with a backup plan that is specified
// by the SelectionId.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DeleteBackupSelection for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection
func (c *Backup) DeleteBackupSelection(input *DeleteBackupSelectionInput) (*DeleteBackupSelectionOutput, error) {
req, out := c.DeleteBackupSelectionRequest(input)
return out, req.Send()
}
// DeleteBackupSelectionWithContext is the same as DeleteBackupSelection with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBackupSelection for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DeleteBackupSelectionWithContext(ctx aws.Context, input *DeleteBackupSelectionInput, opts ...request.Option) (*DeleteBackupSelectionOutput, error) {
req, out := c.DeleteBackupSelectionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBackupVault = "DeleteBackupVault"
// DeleteBackupVaultRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBackupVault operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteBackupVault for more information on using the DeleteBackupVault
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteBackupVaultRequest method.
// req, resp := client.DeleteBackupVaultRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault
func (c *Backup) DeleteBackupVaultRequest(input *DeleteBackupVaultInput) (req *request.Request, output *DeleteBackupVaultOutput) {
op := &request.Operation{
Name: opDeleteBackupVault,
HTTPMethod: "DELETE",
HTTPPath: "/backup-vaults/{backupVaultName}",
}
if input == nil {
input = &DeleteBackupVaultInput{}
}
output = &DeleteBackupVaultOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteBackupVault API operation for AWS Backup.
//
// Deletes the backup vault identified by its name. A vault can be deleted only
// if it is empty.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DeleteBackupVault for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeInvalidRequestException "InvalidRequestException"
// Indicates that something is wrong with the input to the request. For example,
// a parameter is of the wrong type.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault
func (c *Backup) DeleteBackupVault(input *DeleteBackupVaultInput) (*DeleteBackupVaultOutput, error) {
req, out := c.DeleteBackupVaultRequest(input)
return out, req.Send()
}
// DeleteBackupVaultWithContext is the same as DeleteBackupVault with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBackupVault for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DeleteBackupVaultWithContext(ctx aws.Context, input *DeleteBackupVaultInput, opts ...request.Option) (*DeleteBackupVaultOutput, error) {
req, out := c.DeleteBackupVaultRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBackupVaultAccessPolicy = "DeleteBackupVaultAccessPolicy"
// DeleteBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBackupVaultAccessPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteBackupVaultAccessPolicy for more information on using the DeleteBackupVaultAccessPolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteBackupVaultAccessPolicyRequest method.
// req, resp := client.DeleteBackupVaultAccessPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy
func (c *Backup) DeleteBackupVaultAccessPolicyRequest(input *DeleteBackupVaultAccessPolicyInput) (req *request.Request, output *DeleteBackupVaultAccessPolicyOutput) {
op := &request.Operation{
Name: opDeleteBackupVaultAccessPolicy,
HTTPMethod: "DELETE",
HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
}
if input == nil {
input = &DeleteBackupVaultAccessPolicyInput{}
}
output = &DeleteBackupVaultAccessPolicyOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteBackupVaultAccessPolicy API operation for AWS Backup.
//
// Deletes the policy document that manages permissions on a backup vault.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DeleteBackupVaultAccessPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy
func (c *Backup) DeleteBackupVaultAccessPolicy(input *DeleteBackupVaultAccessPolicyInput) (*DeleteBackupVaultAccessPolicyOutput, error) {
req, out := c.DeleteBackupVaultAccessPolicyRequest(input)
return out, req.Send()
}
// DeleteBackupVaultAccessPolicyWithContext is the same as DeleteBackupVaultAccessPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBackupVaultAccessPolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DeleteBackupVaultAccessPolicyWithContext(ctx aws.Context, input *DeleteBackupVaultAccessPolicyInput, opts ...request.Option) (*DeleteBackupVaultAccessPolicyOutput, error) {
req, out := c.DeleteBackupVaultAccessPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBackupVaultNotifications = "DeleteBackupVaultNotifications"
// DeleteBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBackupVaultNotifications operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteBackupVaultNotifications for more information on using the DeleteBackupVaultNotifications
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteBackupVaultNotificationsRequest method.
// req, resp := client.DeleteBackupVaultNotificationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications
func (c *Backup) DeleteBackupVaultNotificationsRequest(input *DeleteBackupVaultNotificationsInput) (req *request.Request, output *DeleteBackupVaultNotificationsOutput) {
op := &request.Operation{
Name: opDeleteBackupVaultNotifications,
HTTPMethod: "DELETE",
HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
}
if input == nil {
input = &DeleteBackupVaultNotificationsInput{}
}
output = &DeleteBackupVaultNotificationsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteBackupVaultNotifications API operation for AWS Backup.
//
// Deletes event notifications for the specified backup vault.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DeleteBackupVaultNotifications for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications
func (c *Backup) DeleteBackupVaultNotifications(input *DeleteBackupVaultNotificationsInput) (*DeleteBackupVaultNotificationsOutput, error) {
req, out := c.DeleteBackupVaultNotificationsRequest(input)
return out, req.Send()
}
// DeleteBackupVaultNotificationsWithContext is the same as DeleteBackupVaultNotifications with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBackupVaultNotifications for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DeleteBackupVaultNotificationsWithContext(ctx aws.Context, input *DeleteBackupVaultNotificationsInput, opts ...request.Option) (*DeleteBackupVaultNotificationsOutput, error) {
req, out := c.DeleteBackupVaultNotificationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteRecoveryPoint = "DeleteRecoveryPoint"
// DeleteRecoveryPointRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRecoveryPoint operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteRecoveryPoint for more information on using the DeleteRecoveryPoint
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteRecoveryPointRequest method.
// req, resp := client.DeleteRecoveryPointRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint
func (c *Backup) DeleteRecoveryPointRequest(input *DeleteRecoveryPointInput) (req *request.Request, output *DeleteRecoveryPointOutput) {
op := &request.Operation{
Name: opDeleteRecoveryPoint,
HTTPMethod: "DELETE",
HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
}
if input == nil {
input = &DeleteRecoveryPointInput{}
}
output = &DeleteRecoveryPointOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteRecoveryPoint API operation for AWS Backup.
//
// Deletes the recovery point specified by a recovery point ID.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DeleteRecoveryPoint for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeInvalidRequestException "InvalidRequestException"
// Indicates that something is wrong with the input to the request. For example,
// a parameter is of the wrong type.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint
func (c *Backup) DeleteRecoveryPoint(input *DeleteRecoveryPointInput) (*DeleteRecoveryPointOutput, error) {
req, out := c.DeleteRecoveryPointRequest(input)
return out, req.Send()
}
// DeleteRecoveryPointWithContext is the same as DeleteRecoveryPoint with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteRecoveryPoint for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DeleteRecoveryPointWithContext(ctx aws.Context, input *DeleteRecoveryPointInput, opts ...request.Option) (*DeleteRecoveryPointOutput, error) {
req, out := c.DeleteRecoveryPointRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeBackupJob = "DescribeBackupJob"
// DescribeBackupJobRequest generates a "aws/request.Request" representing the
// client's request for the DescribeBackupJob operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeBackupJob for more information on using the DescribeBackupJob
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeBackupJobRequest method.
// req, resp := client.DescribeBackupJobRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob
func (c *Backup) DescribeBackupJobRequest(input *DescribeBackupJobInput) (req *request.Request, output *DescribeBackupJobOutput) {
op := &request.Operation{
Name: opDescribeBackupJob,
HTTPMethod: "GET",
HTTPPath: "/backup-jobs/{backupJobId}",
}
if input == nil {
input = &DescribeBackupJobInput{}
}
output = &DescribeBackupJobOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeBackupJob API operation for AWS Backup.
//
// Returns metadata associated with creating a backup of a resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DescribeBackupJob for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeDependencyFailureException "DependencyFailureException"
// A dependent AWS service or resource returned an error to the AWS Backup service,
// and the action cannot be completed.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob
func (c *Backup) DescribeBackupJob(input *DescribeBackupJobInput) (*DescribeBackupJobOutput, error) {
req, out := c.DescribeBackupJobRequest(input)
return out, req.Send()
}
// DescribeBackupJobWithContext is the same as DescribeBackupJob with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeBackupJob for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DescribeBackupJobWithContext(ctx aws.Context, input *DescribeBackupJobInput, opts ...request.Option) (*DescribeBackupJobOutput, error) {
req, out := c.DescribeBackupJobRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeBackupVault = "DescribeBackupVault"
// DescribeBackupVaultRequest generates a "aws/request.Request" representing the
// client's request for the DescribeBackupVault operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeBackupVault for more information on using the DescribeBackupVault
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeBackupVaultRequest method.
// req, resp := client.DescribeBackupVaultRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault
func (c *Backup) DescribeBackupVaultRequest(input *DescribeBackupVaultInput) (req *request.Request, output *DescribeBackupVaultOutput) {
op := &request.Operation{
Name: opDescribeBackupVault,
HTTPMethod: "GET",
HTTPPath: "/backup-vaults/{backupVaultName}",
}
if input == nil {
input = &DescribeBackupVaultInput{}
}
output = &DescribeBackupVaultOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeBackupVault API operation for AWS Backup.
//
// Returns metadata about a backup vault specified by its name.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DescribeBackupVault for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault
func (c *Backup) DescribeBackupVault(input *DescribeBackupVaultInput) (*DescribeBackupVaultOutput, error) {
req, out := c.DescribeBackupVaultRequest(input)
return out, req.Send()
}
// DescribeBackupVaultWithContext is the same as DescribeBackupVault with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeBackupVault for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DescribeBackupVaultWithContext(ctx aws.Context, input *DescribeBackupVaultInput, opts ...request.Option) (*DescribeBackupVaultOutput, error) {
req, out := c.DescribeBackupVaultRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeProtectedResource = "DescribeProtectedResource"
// DescribeProtectedResourceRequest generates a "aws/request.Request" representing the
// client's request for the DescribeProtectedResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeProtectedResource for more information on using the DescribeProtectedResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeProtectedResourceRequest method.
// req, resp := client.DescribeProtectedResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource
func (c *Backup) DescribeProtectedResourceRequest(input *DescribeProtectedResourceInput) (req *request.Request, output *DescribeProtectedResourceOutput) {
op := &request.Operation{
Name: opDescribeProtectedResource,
HTTPMethod: "GET",
HTTPPath: "/resources/{resourceArn}",
}
if input == nil {
input = &DescribeProtectedResourceInput{}
}
output = &DescribeProtectedResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeProtectedResource API operation for AWS Backup.
//
// Returns information about a saved resource, including the last time it was
// backed-up, its Amazon Resource Name (ARN), and the AWS service type of the
// saved resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DescribeProtectedResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource
func (c *Backup) DescribeProtectedResource(input *DescribeProtectedResourceInput) (*DescribeProtectedResourceOutput, error) {
req, out := c.DescribeProtectedResourceRequest(input)
return out, req.Send()
}
// DescribeProtectedResourceWithContext is the same as DescribeProtectedResource with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeProtectedResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DescribeProtectedResourceWithContext(ctx aws.Context, input *DescribeProtectedResourceInput, opts ...request.Option) (*DescribeProtectedResourceOutput, error) {
req, out := c.DescribeProtectedResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeRecoveryPoint = "DescribeRecoveryPoint"
// DescribeRecoveryPointRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRecoveryPoint operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeRecoveryPoint for more information on using the DescribeRecoveryPoint
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeRecoveryPointRequest method.
// req, resp := client.DescribeRecoveryPointRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint
func (c *Backup) DescribeRecoveryPointRequest(input *DescribeRecoveryPointInput) (req *request.Request, output *DescribeRecoveryPointOutput) {
op := &request.Operation{
Name: opDescribeRecoveryPoint,
HTTPMethod: "GET",
HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
}
if input == nil {
input = &DescribeRecoveryPointInput{}
}
output = &DescribeRecoveryPointOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeRecoveryPoint API operation for AWS Backup.
//
// Returns metadata associated with a recovery point, including ID, status,
// encryption, and lifecycle.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DescribeRecoveryPoint for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint
func (c *Backup) DescribeRecoveryPoint(input *DescribeRecoveryPointInput) (*DescribeRecoveryPointOutput, error) {
req, out := c.DescribeRecoveryPointRequest(input)
return out, req.Send()
}
// DescribeRecoveryPointWithContext is the same as DescribeRecoveryPoint with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeRecoveryPoint for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DescribeRecoveryPointWithContext(ctx aws.Context, input *DescribeRecoveryPointInput, opts ...request.Option) (*DescribeRecoveryPointOutput, error) {
req, out := c.DescribeRecoveryPointRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeRestoreJob = "DescribeRestoreJob"
// DescribeRestoreJobRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRestoreJob operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeRestoreJob for more information on using the DescribeRestoreJob
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeRestoreJobRequest method.
// req, resp := client.DescribeRestoreJobRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob
func (c *Backup) DescribeRestoreJobRequest(input *DescribeRestoreJobInput) (req *request.Request, output *DescribeRestoreJobOutput) {
op := &request.Operation{
Name: opDescribeRestoreJob,
HTTPMethod: "GET",
HTTPPath: "/restore-jobs/{restoreJobId}",
}
if input == nil {
input = &DescribeRestoreJobInput{}
}
output = &DescribeRestoreJobOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeRestoreJob API operation for AWS Backup.
//
// Returns metadata associated with a restore job that is specified by a job
// ID.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation DescribeRestoreJob for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeDependencyFailureException "DependencyFailureException"
// A dependent AWS service or resource returned an error to the AWS Backup service,
// and the action cannot be completed.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob
func (c *Backup) DescribeRestoreJob(input *DescribeRestoreJobInput) (*DescribeRestoreJobOutput, error) {
req, out := c.DescribeRestoreJobRequest(input)
return out, req.Send()
}
// DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeRestoreJob for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) {
req, out := c.DescribeRestoreJobRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opExportBackupPlanTemplate = "ExportBackupPlanTemplate"
// ExportBackupPlanTemplateRequest generates a "aws/request.Request" representing the
// client's request for the ExportBackupPlanTemplate operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ExportBackupPlanTemplate for more information on using the ExportBackupPlanTemplate
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ExportBackupPlanTemplateRequest method.
// req, resp := client.ExportBackupPlanTemplateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate
func (c *Backup) ExportBackupPlanTemplateRequest(input *ExportBackupPlanTemplateInput) (req *request.Request, output *ExportBackupPlanTemplateOutput) {
op := &request.Operation{
Name: opExportBackupPlanTemplate,
HTTPMethod: "GET",
HTTPPath: "/backup/plans/{backupPlanId}/toTemplate/",
}
if input == nil {
input = &ExportBackupPlanTemplateInput{}
}
output = &ExportBackupPlanTemplateOutput{}
req = c.newRequest(op, input, output)
return
}
// ExportBackupPlanTemplate API operation for AWS Backup.
//
// Returns the backup plan that is specified by the plan ID as a backup template.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ExportBackupPlanTemplate for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate
func (c *Backup) ExportBackupPlanTemplate(input *ExportBackupPlanTemplateInput) (*ExportBackupPlanTemplateOutput, error) {
req, out := c.ExportBackupPlanTemplateRequest(input)
return out, req.Send()
}
// ExportBackupPlanTemplateWithContext is the same as ExportBackupPlanTemplate with the addition of
// the ability to pass a context and additional request options.
//
// See ExportBackupPlanTemplate for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ExportBackupPlanTemplateWithContext(ctx aws.Context, input *ExportBackupPlanTemplateInput, opts ...request.Option) (*ExportBackupPlanTemplateOutput, error) {
req, out := c.ExportBackupPlanTemplateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetBackupPlan = "GetBackupPlan"
// GetBackupPlanRequest generates a "aws/request.Request" representing the
// client's request for the GetBackupPlan operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetBackupPlan for more information on using the GetBackupPlan
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetBackupPlanRequest method.
// req, resp := client.GetBackupPlanRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan
func (c *Backup) GetBackupPlanRequest(input *GetBackupPlanInput) (req *request.Request, output *GetBackupPlanOutput) {
op := &request.Operation{
Name: opGetBackupPlan,
HTTPMethod: "GET",
HTTPPath: "/backup/plans/{backupPlanId}/",
}
if input == nil {
input = &GetBackupPlanInput{}
}
output = &GetBackupPlanOutput{}
req = c.newRequest(op, input, output)
return
}
// GetBackupPlan API operation for AWS Backup.
//
// Returns the body of a backup plan in JSON format, in addition to plan metadata.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetBackupPlan for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan
func (c *Backup) GetBackupPlan(input *GetBackupPlanInput) (*GetBackupPlanOutput, error) {
req, out := c.GetBackupPlanRequest(input)
return out, req.Send()
}
// GetBackupPlanWithContext is the same as GetBackupPlan with the addition of
// the ability to pass a context and additional request options.
//
// See GetBackupPlan for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetBackupPlanWithContext(ctx aws.Context, input *GetBackupPlanInput, opts ...request.Option) (*GetBackupPlanOutput, error) {
req, out := c.GetBackupPlanRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetBackupPlanFromJSON = "GetBackupPlanFromJSON"
// GetBackupPlanFromJSONRequest generates a "aws/request.Request" representing the
// client's request for the GetBackupPlanFromJSON operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetBackupPlanFromJSON for more information on using the GetBackupPlanFromJSON
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetBackupPlanFromJSONRequest method.
// req, resp := client.GetBackupPlanFromJSONRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON
func (c *Backup) GetBackupPlanFromJSONRequest(input *GetBackupPlanFromJSONInput) (req *request.Request, output *GetBackupPlanFromJSONOutput) {
op := &request.Operation{
Name: opGetBackupPlanFromJSON,
HTTPMethod: "POST",
HTTPPath: "/backup/template/json/toPlan",
}
if input == nil {
input = &GetBackupPlanFromJSONInput{}
}
output = &GetBackupPlanFromJSONOutput{}
req = c.newRequest(op, input, output)
return
}
// GetBackupPlanFromJSON API operation for AWS Backup.
//
// Returns a valid JSON document specifying a backup plan or an error.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetBackupPlanFromJSON for usage and error information.
//
// Returned Error Codes:
// * ErrCodeLimitExceededException "LimitExceededException"
// A limit in the request has been exceeded; for example, a maximum number of
// items allowed in a request.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeInvalidRequestException "InvalidRequestException"
// Indicates that something is wrong with the input to the request. For example,
// a parameter is of the wrong type.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON
func (c *Backup) GetBackupPlanFromJSON(input *GetBackupPlanFromJSONInput) (*GetBackupPlanFromJSONOutput, error) {
req, out := c.GetBackupPlanFromJSONRequest(input)
return out, req.Send()
}
// GetBackupPlanFromJSONWithContext is the same as GetBackupPlanFromJSON with the addition of
// the ability to pass a context and additional request options.
//
// See GetBackupPlanFromJSON for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetBackupPlanFromJSONWithContext(ctx aws.Context, input *GetBackupPlanFromJSONInput, opts ...request.Option) (*GetBackupPlanFromJSONOutput, error) {
req, out := c.GetBackupPlanFromJSONRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetBackupPlanFromTemplate = "GetBackupPlanFromTemplate"
// GetBackupPlanFromTemplateRequest generates a "aws/request.Request" representing the
// client's request for the GetBackupPlanFromTemplate operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetBackupPlanFromTemplate for more information on using the GetBackupPlanFromTemplate
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetBackupPlanFromTemplateRequest method.
// req, resp := client.GetBackupPlanFromTemplateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate
func (c *Backup) GetBackupPlanFromTemplateRequest(input *GetBackupPlanFromTemplateInput) (req *request.Request, output *GetBackupPlanFromTemplateOutput) {
op := &request.Operation{
Name: opGetBackupPlanFromTemplate,
HTTPMethod: "GET",
HTTPPath: "/backup/template/plans/{templateId}/toPlan",
}
if input == nil {
input = &GetBackupPlanFromTemplateInput{}
}
output = &GetBackupPlanFromTemplateOutput{}
req = c.newRequest(op, input, output)
return
}
// GetBackupPlanFromTemplate API operation for AWS Backup.
//
// Returns the template specified by its templateId as a backup plan.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetBackupPlanFromTemplate for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate
func (c *Backup) GetBackupPlanFromTemplate(input *GetBackupPlanFromTemplateInput) (*GetBackupPlanFromTemplateOutput, error) {
req, out := c.GetBackupPlanFromTemplateRequest(input)
return out, req.Send()
}
// GetBackupPlanFromTemplateWithContext is the same as GetBackupPlanFromTemplate with the addition of
// the ability to pass a context and additional request options.
//
// See GetBackupPlanFromTemplate for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetBackupPlanFromTemplateWithContext(ctx aws.Context, input *GetBackupPlanFromTemplateInput, opts ...request.Option) (*GetBackupPlanFromTemplateOutput, error) {
req, out := c.GetBackupPlanFromTemplateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetBackupSelection = "GetBackupSelection"
// GetBackupSelectionRequest generates a "aws/request.Request" representing the
// client's request for the GetBackupSelection operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetBackupSelection for more information on using the GetBackupSelection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetBackupSelectionRequest method.
// req, resp := client.GetBackupSelectionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection
func (c *Backup) GetBackupSelectionRequest(input *GetBackupSelectionInput) (req *request.Request, output *GetBackupSelectionOutput) {
op := &request.Operation{
Name: opGetBackupSelection,
HTTPMethod: "GET",
HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}",
}
if input == nil {
input = &GetBackupSelectionInput{}
}
output = &GetBackupSelectionOutput{}
req = c.newRequest(op, input, output)
return
}
// GetBackupSelection API operation for AWS Backup.
//
// Returns selection metadata and a document in JSON format that specifies a
// list of resources that are associated with a backup plan.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetBackupSelection for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection
func (c *Backup) GetBackupSelection(input *GetBackupSelectionInput) (*GetBackupSelectionOutput, error) {
req, out := c.GetBackupSelectionRequest(input)
return out, req.Send()
}
// GetBackupSelectionWithContext is the same as GetBackupSelection with the addition of
// the ability to pass a context and additional request options.
//
// See GetBackupSelection for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetBackupSelectionWithContext(ctx aws.Context, input *GetBackupSelectionInput, opts ...request.Option) (*GetBackupSelectionOutput, error) {
req, out := c.GetBackupSelectionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetBackupVaultAccessPolicy = "GetBackupVaultAccessPolicy"
// GetBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetBackupVaultAccessPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetBackupVaultAccessPolicy for more information on using the GetBackupVaultAccessPolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetBackupVaultAccessPolicyRequest method.
// req, resp := client.GetBackupVaultAccessPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy
func (c *Backup) GetBackupVaultAccessPolicyRequest(input *GetBackupVaultAccessPolicyInput) (req *request.Request, output *GetBackupVaultAccessPolicyOutput) {
op := &request.Operation{
Name: opGetBackupVaultAccessPolicy,
HTTPMethod: "GET",
HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
}
if input == nil {
input = &GetBackupVaultAccessPolicyInput{}
}
output = &GetBackupVaultAccessPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// GetBackupVaultAccessPolicy API operation for AWS Backup.
//
// Returns the access policy document that is associated with the named backup
// vault.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetBackupVaultAccessPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy
func (c *Backup) GetBackupVaultAccessPolicy(input *GetBackupVaultAccessPolicyInput) (*GetBackupVaultAccessPolicyOutput, error) {
req, out := c.GetBackupVaultAccessPolicyRequest(input)
return out, req.Send()
}
// GetBackupVaultAccessPolicyWithContext is the same as GetBackupVaultAccessPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See GetBackupVaultAccessPolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetBackupVaultAccessPolicyWithContext(ctx aws.Context, input *GetBackupVaultAccessPolicyInput, opts ...request.Option) (*GetBackupVaultAccessPolicyOutput, error) {
req, out := c.GetBackupVaultAccessPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetBackupVaultNotifications = "GetBackupVaultNotifications"
// GetBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
// client's request for the GetBackupVaultNotifications operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetBackupVaultNotifications for more information on using the GetBackupVaultNotifications
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetBackupVaultNotificationsRequest method.
// req, resp := client.GetBackupVaultNotificationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications
func (c *Backup) GetBackupVaultNotificationsRequest(input *GetBackupVaultNotificationsInput) (req *request.Request, output *GetBackupVaultNotificationsOutput) {
op := &request.Operation{
Name: opGetBackupVaultNotifications,
HTTPMethod: "GET",
HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
}
if input == nil {
input = &GetBackupVaultNotificationsInput{}
}
output = &GetBackupVaultNotificationsOutput{}
req = c.newRequest(op, input, output)
return
}
// GetBackupVaultNotifications API operation for AWS Backup.
//
// Returns event notifications for the specified backup vault.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetBackupVaultNotifications for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications
func (c *Backup) GetBackupVaultNotifications(input *GetBackupVaultNotificationsInput) (*GetBackupVaultNotificationsOutput, error) {
req, out := c.GetBackupVaultNotificationsRequest(input)
return out, req.Send()
}
// GetBackupVaultNotificationsWithContext is the same as GetBackupVaultNotifications with the addition of
// the ability to pass a context and additional request options.
//
// See GetBackupVaultNotifications for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetBackupVaultNotificationsWithContext(ctx aws.Context, input *GetBackupVaultNotificationsInput, opts ...request.Option) (*GetBackupVaultNotificationsOutput, error) {
req, out := c.GetBackupVaultNotificationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetRecoveryPointRestoreMetadata = "GetRecoveryPointRestoreMetadata"
// GetRecoveryPointRestoreMetadataRequest generates a "aws/request.Request" representing the
// client's request for the GetRecoveryPointRestoreMetadata operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetRecoveryPointRestoreMetadata for more information on using the GetRecoveryPointRestoreMetadata
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetRecoveryPointRestoreMetadataRequest method.
// req, resp := client.GetRecoveryPointRestoreMetadataRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata
func (c *Backup) GetRecoveryPointRestoreMetadataRequest(input *GetRecoveryPointRestoreMetadataInput) (req *request.Request, output *GetRecoveryPointRestoreMetadataOutput) {
op := &request.Operation{
Name: opGetRecoveryPointRestoreMetadata,
HTTPMethod: "GET",
HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}/restore-metadata",
}
if input == nil {
input = &GetRecoveryPointRestoreMetadataInput{}
}
output = &GetRecoveryPointRestoreMetadataOutput{}
req = c.newRequest(op, input, output)
return
}
// GetRecoveryPointRestoreMetadata API operation for AWS Backup.
//
// Returns two sets of metadata key-value pairs. The first set lists the metadata
// that the recovery point was created with. The second set lists the metadata
// key-value pairs that are required to restore the recovery point.
//
// These sets can be the same, or the restore metadata set can contain different
// values if the target service to be restored has changed since the recovery
// point was created and now requires additional or different information in
// order to be restored.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetRecoveryPointRestoreMetadata for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata
func (c *Backup) GetRecoveryPointRestoreMetadata(input *GetRecoveryPointRestoreMetadataInput) (*GetRecoveryPointRestoreMetadataOutput, error) {
req, out := c.GetRecoveryPointRestoreMetadataRequest(input)
return out, req.Send()
}
// GetRecoveryPointRestoreMetadataWithContext is the same as GetRecoveryPointRestoreMetadata with the addition of
// the ability to pass a context and additional request options.
//
// See GetRecoveryPointRestoreMetadata for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetRecoveryPointRestoreMetadataWithContext(ctx aws.Context, input *GetRecoveryPointRestoreMetadataInput, opts ...request.Option) (*GetRecoveryPointRestoreMetadataOutput, error) {
req, out := c.GetRecoveryPointRestoreMetadataRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetSupportedResourceTypes = "GetSupportedResourceTypes"
// GetSupportedResourceTypesRequest generates a "aws/request.Request" representing the
// client's request for the GetSupportedResourceTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetSupportedResourceTypes for more information on using the GetSupportedResourceTypes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetSupportedResourceTypesRequest method.
// req, resp := client.GetSupportedResourceTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes
func (c *Backup) GetSupportedResourceTypesRequest(input *GetSupportedResourceTypesInput) (req *request.Request, output *GetSupportedResourceTypesOutput) {
op := &request.Operation{
Name: opGetSupportedResourceTypes,
HTTPMethod: "GET",
HTTPPath: "/supported-resource-types",
}
if input == nil {
input = &GetSupportedResourceTypesInput{}
}
output = &GetSupportedResourceTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// GetSupportedResourceTypes API operation for AWS Backup.
//
// Returns the AWS resource types supported by AWS Backup.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation GetSupportedResourceTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes
func (c *Backup) GetSupportedResourceTypes(input *GetSupportedResourceTypesInput) (*GetSupportedResourceTypesOutput, error) {
req, out := c.GetSupportedResourceTypesRequest(input)
return out, req.Send()
}
// GetSupportedResourceTypesWithContext is the same as GetSupportedResourceTypes with the addition of
// the ability to pass a context and additional request options.
//
// See GetSupportedResourceTypes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) GetSupportedResourceTypesWithContext(ctx aws.Context, input *GetSupportedResourceTypesInput, opts ...request.Option) (*GetSupportedResourceTypesOutput, error) {
req, out := c.GetSupportedResourceTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListBackupJobs = "ListBackupJobs"
// ListBackupJobsRequest generates a "aws/request.Request" representing the
// client's request for the ListBackupJobs operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListBackupJobs for more information on using the ListBackupJobs
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListBackupJobsRequest method.
// req, resp := client.ListBackupJobsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs
func (c *Backup) ListBackupJobsRequest(input *ListBackupJobsInput) (req *request.Request, output *ListBackupJobsOutput) {
op := &request.Operation{
Name: opListBackupJobs,
HTTPMethod: "GET",
HTTPPath: "/backup-jobs/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListBackupJobsInput{}
}
output = &ListBackupJobsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListBackupJobs API operation for AWS Backup.
//
// Returns metadata about your backup jobs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListBackupJobs for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs
func (c *Backup) ListBackupJobs(input *ListBackupJobsInput) (*ListBackupJobsOutput, error) {
req, out := c.ListBackupJobsRequest(input)
return out, req.Send()
}
// ListBackupJobsWithContext is the same as ListBackupJobs with the addition of
// the ability to pass a context and additional request options.
//
// See ListBackupJobs for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupJobsWithContext(ctx aws.Context, input *ListBackupJobsInput, opts ...request.Option) (*ListBackupJobsOutput, error) {
req, out := c.ListBackupJobsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListBackupJobsPages iterates over the pages of a ListBackupJobs operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListBackupJobs method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListBackupJobs operation.
// pageNum := 0
// err := client.ListBackupJobsPages(params,
// func(page *backup.ListBackupJobsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListBackupJobsPages(input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool) error {
return c.ListBackupJobsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListBackupJobsPagesWithContext same as ListBackupJobsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupJobsPagesWithContext(ctx aws.Context, input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListBackupJobsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListBackupJobsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListBackupJobsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListBackupPlanTemplates = "ListBackupPlanTemplates"
// ListBackupPlanTemplatesRequest generates a "aws/request.Request" representing the
// client's request for the ListBackupPlanTemplates operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListBackupPlanTemplates for more information on using the ListBackupPlanTemplates
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListBackupPlanTemplatesRequest method.
// req, resp := client.ListBackupPlanTemplatesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates
func (c *Backup) ListBackupPlanTemplatesRequest(input *ListBackupPlanTemplatesInput) (req *request.Request, output *ListBackupPlanTemplatesOutput) {
op := &request.Operation{
Name: opListBackupPlanTemplates,
HTTPMethod: "GET",
HTTPPath: "/backup/template/plans",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListBackupPlanTemplatesInput{}
}
output = &ListBackupPlanTemplatesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListBackupPlanTemplates API operation for AWS Backup.
//
// Returns metadata of your saved backup plan templates, including the template
// ID, name, and the creation and deletion dates.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListBackupPlanTemplates for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates
func (c *Backup) ListBackupPlanTemplates(input *ListBackupPlanTemplatesInput) (*ListBackupPlanTemplatesOutput, error) {
req, out := c.ListBackupPlanTemplatesRequest(input)
return out, req.Send()
}
// ListBackupPlanTemplatesWithContext is the same as ListBackupPlanTemplates with the addition of
// the ability to pass a context and additional request options.
//
// See ListBackupPlanTemplates for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupPlanTemplatesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, opts ...request.Option) (*ListBackupPlanTemplatesOutput, error) {
req, out := c.ListBackupPlanTemplatesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListBackupPlanTemplatesPages iterates over the pages of a ListBackupPlanTemplates operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListBackupPlanTemplates method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListBackupPlanTemplates operation.
// pageNum := 0
// err := client.ListBackupPlanTemplatesPages(params,
// func(page *backup.ListBackupPlanTemplatesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListBackupPlanTemplatesPages(input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool) error {
return c.ListBackupPlanTemplatesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListBackupPlanTemplatesPagesWithContext same as ListBackupPlanTemplatesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupPlanTemplatesPagesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListBackupPlanTemplatesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListBackupPlanTemplatesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListBackupPlanTemplatesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListBackupPlanVersions = "ListBackupPlanVersions"
// ListBackupPlanVersionsRequest generates a "aws/request.Request" representing the
// client's request for the ListBackupPlanVersions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListBackupPlanVersions for more information on using the ListBackupPlanVersions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListBackupPlanVersionsRequest method.
// req, resp := client.ListBackupPlanVersionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions
func (c *Backup) ListBackupPlanVersionsRequest(input *ListBackupPlanVersionsInput) (req *request.Request, output *ListBackupPlanVersionsOutput) {
op := &request.Operation{
Name: opListBackupPlanVersions,
HTTPMethod: "GET",
HTTPPath: "/backup/plans/{backupPlanId}/versions/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListBackupPlanVersionsInput{}
}
output = &ListBackupPlanVersionsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListBackupPlanVersions API operation for AWS Backup.
//
// Returns version metadata of your backup plans, including Amazon Resource
// Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and
// version IDs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListBackupPlanVersions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions
func (c *Backup) ListBackupPlanVersions(input *ListBackupPlanVersionsInput) (*ListBackupPlanVersionsOutput, error) {
req, out := c.ListBackupPlanVersionsRequest(input)
return out, req.Send()
}
// ListBackupPlanVersionsWithContext is the same as ListBackupPlanVersions with the addition of
// the ability to pass a context and additional request options.
//
// See ListBackupPlanVersions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupPlanVersionsWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, opts ...request.Option) (*ListBackupPlanVersionsOutput, error) {
req, out := c.ListBackupPlanVersionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListBackupPlanVersionsPages iterates over the pages of a ListBackupPlanVersions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListBackupPlanVersions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListBackupPlanVersions operation.
// pageNum := 0
// err := client.ListBackupPlanVersionsPages(params,
// func(page *backup.ListBackupPlanVersionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListBackupPlanVersionsPages(input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool) error {
return c.ListBackupPlanVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListBackupPlanVersionsPagesWithContext same as ListBackupPlanVersionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupPlanVersionsPagesWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListBackupPlanVersionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListBackupPlanVersionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListBackupPlanVersionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListBackupPlans = "ListBackupPlans"
// ListBackupPlansRequest generates a "aws/request.Request" representing the
// client's request for the ListBackupPlans operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListBackupPlans for more information on using the ListBackupPlans
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListBackupPlansRequest method.
// req, resp := client.ListBackupPlansRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans
func (c *Backup) ListBackupPlansRequest(input *ListBackupPlansInput) (req *request.Request, output *ListBackupPlansOutput) {
op := &request.Operation{
Name: opListBackupPlans,
HTTPMethod: "GET",
HTTPPath: "/backup/plans/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListBackupPlansInput{}
}
output = &ListBackupPlansOutput{}
req = c.newRequest(op, input, output)
return
}
// ListBackupPlans API operation for AWS Backup.
//
// Returns metadata of your saved backup plans, including Amazon Resource Names
// (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and
// creator request IDs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListBackupPlans for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans
func (c *Backup) ListBackupPlans(input *ListBackupPlansInput) (*ListBackupPlansOutput, error) {
req, out := c.ListBackupPlansRequest(input)
return out, req.Send()
}
// ListBackupPlansWithContext is the same as ListBackupPlans with the addition of
// the ability to pass a context and additional request options.
//
// See ListBackupPlans for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupPlansWithContext(ctx aws.Context, input *ListBackupPlansInput, opts ...request.Option) (*ListBackupPlansOutput, error) {
req, out := c.ListBackupPlansRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListBackupPlansPages iterates over the pages of a ListBackupPlans operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListBackupPlans method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListBackupPlans operation.
// pageNum := 0
// err := client.ListBackupPlansPages(params,
// func(page *backup.ListBackupPlansOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListBackupPlansPages(input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool) error {
return c.ListBackupPlansPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListBackupPlansPagesWithContext same as ListBackupPlansPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupPlansPagesWithContext(ctx aws.Context, input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListBackupPlansInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListBackupPlansRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListBackupPlansOutput), !p.HasNextPage())
}
return p.Err()
}
const opListBackupSelections = "ListBackupSelections"
// ListBackupSelectionsRequest generates a "aws/request.Request" representing the
// client's request for the ListBackupSelections operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListBackupSelections for more information on using the ListBackupSelections
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListBackupSelectionsRequest method.
// req, resp := client.ListBackupSelectionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections
func (c *Backup) ListBackupSelectionsRequest(input *ListBackupSelectionsInput) (req *request.Request, output *ListBackupSelectionsOutput) {
op := &request.Operation{
Name: opListBackupSelections,
HTTPMethod: "GET",
HTTPPath: "/backup/plans/{backupPlanId}/selections/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListBackupSelectionsInput{}
}
output = &ListBackupSelectionsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListBackupSelections API operation for AWS Backup.
//
// Returns an array containing metadata of the resources associated with the
// target backup plan.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListBackupSelections for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections
func (c *Backup) ListBackupSelections(input *ListBackupSelectionsInput) (*ListBackupSelectionsOutput, error) {
req, out := c.ListBackupSelectionsRequest(input)
return out, req.Send()
}
// ListBackupSelectionsWithContext is the same as ListBackupSelections with the addition of
// the ability to pass a context and additional request options.
//
// See ListBackupSelections for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupSelectionsWithContext(ctx aws.Context, input *ListBackupSelectionsInput, opts ...request.Option) (*ListBackupSelectionsOutput, error) {
req, out := c.ListBackupSelectionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListBackupSelectionsPages iterates over the pages of a ListBackupSelections operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListBackupSelections method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListBackupSelections operation.
// pageNum := 0
// err := client.ListBackupSelectionsPages(params,
// func(page *backup.ListBackupSelectionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListBackupSelectionsPages(input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool) error {
return c.ListBackupSelectionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListBackupSelectionsPagesWithContext same as ListBackupSelectionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupSelectionsPagesWithContext(ctx aws.Context, input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListBackupSelectionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListBackupSelectionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListBackupSelectionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListBackupVaults = "ListBackupVaults"
// ListBackupVaultsRequest generates a "aws/request.Request" representing the
// client's request for the ListBackupVaults operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListBackupVaults for more information on using the ListBackupVaults
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListBackupVaultsRequest method.
// req, resp := client.ListBackupVaultsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults
func (c *Backup) ListBackupVaultsRequest(input *ListBackupVaultsInput) (req *request.Request, output *ListBackupVaultsOutput) {
op := &request.Operation{
Name: opListBackupVaults,
HTTPMethod: "GET",
HTTPPath: "/backup-vaults/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListBackupVaultsInput{}
}
output = &ListBackupVaultsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListBackupVaults API operation for AWS Backup.
//
// Returns a list of recovery point storage containers along with information
// about them.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListBackupVaults for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults
func (c *Backup) ListBackupVaults(input *ListBackupVaultsInput) (*ListBackupVaultsOutput, error) {
req, out := c.ListBackupVaultsRequest(input)
return out, req.Send()
}
// ListBackupVaultsWithContext is the same as ListBackupVaults with the addition of
// the ability to pass a context and additional request options.
//
// See ListBackupVaults for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupVaultsWithContext(ctx aws.Context, input *ListBackupVaultsInput, opts ...request.Option) (*ListBackupVaultsOutput, error) {
req, out := c.ListBackupVaultsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListBackupVaultsPages iterates over the pages of a ListBackupVaults operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListBackupVaults method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListBackupVaults operation.
// pageNum := 0
// err := client.ListBackupVaultsPages(params,
// func(page *backup.ListBackupVaultsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListBackupVaultsPages(input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool) error {
return c.ListBackupVaultsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListBackupVaultsPagesWithContext same as ListBackupVaultsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListBackupVaultsPagesWithContext(ctx aws.Context, input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListBackupVaultsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListBackupVaultsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListBackupVaultsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListProtectedResources = "ListProtectedResources"
// ListProtectedResourcesRequest generates a "aws/request.Request" representing the
// client's request for the ListProtectedResources operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListProtectedResources for more information on using the ListProtectedResources
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListProtectedResourcesRequest method.
// req, resp := client.ListProtectedResourcesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources
func (c *Backup) ListProtectedResourcesRequest(input *ListProtectedResourcesInput) (req *request.Request, output *ListProtectedResourcesOutput) {
op := &request.Operation{
Name: opListProtectedResources,
HTTPMethod: "GET",
HTTPPath: "/resources/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListProtectedResourcesInput{}
}
output = &ListProtectedResourcesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListProtectedResources API operation for AWS Backup.
//
// Returns an array of resources successfully backed up by AWS Backup, including
// the time the resource was saved, an Amazon Resource Name (ARN) of the resource,
// and a resource type.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListProtectedResources for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources
func (c *Backup) ListProtectedResources(input *ListProtectedResourcesInput) (*ListProtectedResourcesOutput, error) {
req, out := c.ListProtectedResourcesRequest(input)
return out, req.Send()
}
// ListProtectedResourcesWithContext is the same as ListProtectedResources with the addition of
// the ability to pass a context and additional request options.
//
// See ListProtectedResources for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListProtectedResourcesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, opts ...request.Option) (*ListProtectedResourcesOutput, error) {
req, out := c.ListProtectedResourcesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListProtectedResourcesPages iterates over the pages of a ListProtectedResources operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListProtectedResources method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListProtectedResources operation.
// pageNum := 0
// err := client.ListProtectedResourcesPages(params,
// func(page *backup.ListProtectedResourcesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListProtectedResourcesPages(input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool) error {
return c.ListProtectedResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListProtectedResourcesPagesWithContext same as ListProtectedResourcesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListProtectedResourcesPagesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListProtectedResourcesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListProtectedResourcesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListProtectedResourcesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListRecoveryPointsByBackupVault = "ListRecoveryPointsByBackupVault"
// ListRecoveryPointsByBackupVaultRequest generates a "aws/request.Request" representing the
// client's request for the ListRecoveryPointsByBackupVault operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListRecoveryPointsByBackupVault for more information on using the ListRecoveryPointsByBackupVault
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListRecoveryPointsByBackupVaultRequest method.
// req, resp := client.ListRecoveryPointsByBackupVaultRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault
func (c *Backup) ListRecoveryPointsByBackupVaultRequest(input *ListRecoveryPointsByBackupVaultInput) (req *request.Request, output *ListRecoveryPointsByBackupVaultOutput) {
op := &request.Operation{
Name: opListRecoveryPointsByBackupVault,
HTTPMethod: "GET",
HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListRecoveryPointsByBackupVaultInput{}
}
output = &ListRecoveryPointsByBackupVaultOutput{}
req = c.newRequest(op, input, output)
return
}
// ListRecoveryPointsByBackupVault API operation for AWS Backup.
//
// Returns detailed information about the recovery points stored in a backup
// vault.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListRecoveryPointsByBackupVault for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault
func (c *Backup) ListRecoveryPointsByBackupVault(input *ListRecoveryPointsByBackupVaultInput) (*ListRecoveryPointsByBackupVaultOutput, error) {
req, out := c.ListRecoveryPointsByBackupVaultRequest(input)
return out, req.Send()
}
// ListRecoveryPointsByBackupVaultWithContext is the same as ListRecoveryPointsByBackupVault with the addition of
// the ability to pass a context and additional request options.
//
// See ListRecoveryPointsByBackupVault for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListRecoveryPointsByBackupVaultWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, opts ...request.Option) (*ListRecoveryPointsByBackupVaultOutput, error) {
req, out := c.ListRecoveryPointsByBackupVaultRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListRecoveryPointsByBackupVaultPages iterates over the pages of a ListRecoveryPointsByBackupVault operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListRecoveryPointsByBackupVault method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListRecoveryPointsByBackupVault operation.
// pageNum := 0
// err := client.ListRecoveryPointsByBackupVaultPages(params,
// func(page *backup.ListRecoveryPointsByBackupVaultOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListRecoveryPointsByBackupVaultPages(input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool) error {
return c.ListRecoveryPointsByBackupVaultPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListRecoveryPointsByBackupVaultPagesWithContext same as ListRecoveryPointsByBackupVaultPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListRecoveryPointsByBackupVaultPagesWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListRecoveryPointsByBackupVaultInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListRecoveryPointsByBackupVaultRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListRecoveryPointsByBackupVaultOutput), !p.HasNextPage())
}
return p.Err()
}
const opListRecoveryPointsByResource = "ListRecoveryPointsByResource"
// ListRecoveryPointsByResourceRequest generates a "aws/request.Request" representing the
// client's request for the ListRecoveryPointsByResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListRecoveryPointsByResource for more information on using the ListRecoveryPointsByResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListRecoveryPointsByResourceRequest method.
// req, resp := client.ListRecoveryPointsByResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource
func (c *Backup) ListRecoveryPointsByResourceRequest(input *ListRecoveryPointsByResourceInput) (req *request.Request, output *ListRecoveryPointsByResourceOutput) {
op := &request.Operation{
Name: opListRecoveryPointsByResource,
HTTPMethod: "GET",
HTTPPath: "/resources/{resourceArn}/recovery-points/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListRecoveryPointsByResourceInput{}
}
output = &ListRecoveryPointsByResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// ListRecoveryPointsByResource API operation for AWS Backup.
//
// Returns detailed information about recovery points of the type specified
// by a resource Amazon Resource Name (ARN).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListRecoveryPointsByResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource
func (c *Backup) ListRecoveryPointsByResource(input *ListRecoveryPointsByResourceInput) (*ListRecoveryPointsByResourceOutput, error) {
req, out := c.ListRecoveryPointsByResourceRequest(input)
return out, req.Send()
}
// ListRecoveryPointsByResourceWithContext is the same as ListRecoveryPointsByResource with the addition of
// the ability to pass a context and additional request options.
//
// See ListRecoveryPointsByResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListRecoveryPointsByResourceWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, opts ...request.Option) (*ListRecoveryPointsByResourceOutput, error) {
req, out := c.ListRecoveryPointsByResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListRecoveryPointsByResourcePages iterates over the pages of a ListRecoveryPointsByResource operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListRecoveryPointsByResource method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListRecoveryPointsByResource operation.
// pageNum := 0
// err := client.ListRecoveryPointsByResourcePages(params,
// func(page *backup.ListRecoveryPointsByResourceOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Backup) ListRecoveryPointsByResourcePages(input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool) error {
return c.ListRecoveryPointsByResourcePagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListRecoveryPointsByResourcePagesWithContext same as ListRecoveryPointsByResourcePages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListRecoveryPointsByResourcePagesWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListRecoveryPointsByResourceInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListRecoveryPointsByResourceRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListRecoveryPointsByResourceOutput), !p.HasNextPage())
}
return p.Err()
}
const opListRestoreJobs = "ListRestoreJobs"
// ListRestoreJobsRequest generates a "aws/request.Request" representing the
// client's request for the ListRestoreJobs operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListRestoreJobs for more information on using the ListRestoreJobs
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListRestoreJobsRequest method.
// req, resp := client.ListRestoreJobsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs
func (c *Backup) ListRestoreJobsRequest(input *ListRestoreJobsInput) (req *request.Request, output *ListRestoreJobsOutput) {
op := &request.Operation{
Name: opListRestoreJobs,
HTTPMethod: "GET",
HTTPPath: "/restore-jobs/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListRestoreJobsInput{}
}
output = &ListRestoreJobsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListRestoreJobs API operation for AWS Backup.
//
// Returns a list of jobs that AWS Backup initiated to restore a saved resource,
// including metadata about the recovery process.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Backup's
// API operation ListRestoreJobs for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// A resource that is required for the action doesn't exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// Indicates that something is wrong with a parameter's value. For example,
// the value is out of range.
//
// * ErrCodeMissingParameterValueException "MissingParameterValueException"
// Indicates that a required parameter is missing.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request failed due to a temporary failure of the server.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs
func (c *Backup) ListRestoreJobs(input *ListRestoreJobsInput) (*ListRestoreJobsOutput, error) {
req, out := c.ListRestoreJobsRequest(input)
return out, req.Send()
}
// ListRestoreJobsWithContext is the same as ListRestoreJobs with the addition of
// the ability to pass a context and additional request options.
//
// See ListRestoreJobs for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Backup) ListRestoreJobsWithContext(ctx aws.Context, input *ListRestoreJobsInput, opts ...request.Option) (*ListRestoreJobsOutput, error) {
req, out := c.ListRestoreJobsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListRestoreJobsPages iterates over the pages of a ListRestoreJobs operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.