Documentation ¶
Overview ¶
Package dlm provides the client and types for making API requests to Amazon Data Lifecycle Manager.
With Amazon Data Lifecyle Manager, you can manage the lifecycle of your AWS resources. You create lifecycle policies, which are used to automate operations on the specified resources.
Data Lifecycle Manager supports Amazon EBS volumes and snapshots. For information about using Data Lifecycle Manager with Amazon EBS, see Amazon Data Lifecyle Manager for Amazon EBS Snapshots (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html).
See https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12 for more information on this service.
See dlm package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/
Using the Client ¶
To contact Amazon Data Lifecycle Manager with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the Amazon Data Lifecycle Manager client DLM for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/#New
Index ¶
- Constants
- type CreateLifecyclePolicyInput
- func (s CreateLifecyclePolicyInput) GoString() string
- func (s *CreateLifecyclePolicyInput) SetDescription(v string) *CreateLifecyclePolicyInput
- func (s *CreateLifecyclePolicyInput) SetExecutionRoleArn(v string) *CreateLifecyclePolicyInput
- func (s *CreateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *CreateLifecyclePolicyInput
- func (s *CreateLifecyclePolicyInput) SetState(v string) *CreateLifecyclePolicyInput
- func (s CreateLifecyclePolicyInput) String() string
- func (s *CreateLifecyclePolicyInput) Validate() error
- type CreateLifecyclePolicyOutput
- type CreateRule
- type DLM
- func (c *DLM) CreateLifecyclePolicy(input *CreateLifecyclePolicyInput) (*CreateLifecyclePolicyOutput, error)
- func (c *DLM) CreateLifecyclePolicyRequest(input *CreateLifecyclePolicyInput) (req *request.Request, output *CreateLifecyclePolicyOutput)
- func (c *DLM) CreateLifecyclePolicyWithContext(ctx aws.Context, input *CreateLifecyclePolicyInput, opts ...request.Option) (*CreateLifecyclePolicyOutput, error)
- func (c *DLM) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error)
- func (c *DLM) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput)
- func (c *DLM) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error)
- func (c *DLM) GetLifecyclePolicies(input *GetLifecyclePoliciesInput) (*GetLifecyclePoliciesOutput, error)
- func (c *DLM) GetLifecyclePoliciesRequest(input *GetLifecyclePoliciesInput) (req *request.Request, output *GetLifecyclePoliciesOutput)
- func (c *DLM) GetLifecyclePoliciesWithContext(ctx aws.Context, input *GetLifecyclePoliciesInput, opts ...request.Option) (*GetLifecyclePoliciesOutput, error)
- func (c *DLM) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error)
- func (c *DLM) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput)
- func (c *DLM) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error)
- func (c *DLM) UpdateLifecyclePolicy(input *UpdateLifecyclePolicyInput) (*UpdateLifecyclePolicyOutput, error)
- func (c *DLM) UpdateLifecyclePolicyRequest(input *UpdateLifecyclePolicyInput) (req *request.Request, output *UpdateLifecyclePolicyOutput)
- func (c *DLM) UpdateLifecyclePolicyWithContext(ctx aws.Context, input *UpdateLifecyclePolicyInput, opts ...request.Option) (*UpdateLifecyclePolicyOutput, error)
- type DeleteLifecyclePolicyInput
- type DeleteLifecyclePolicyOutput
- type GetLifecyclePoliciesInput
- func (s GetLifecyclePoliciesInput) GoString() string
- func (s *GetLifecyclePoliciesInput) SetPolicyIds(v []*string) *GetLifecyclePoliciesInput
- func (s *GetLifecyclePoliciesInput) SetResourceTypes(v []*string) *GetLifecyclePoliciesInput
- func (s *GetLifecyclePoliciesInput) SetState(v string) *GetLifecyclePoliciesInput
- func (s *GetLifecyclePoliciesInput) SetTagsToAdd(v []*string) *GetLifecyclePoliciesInput
- func (s *GetLifecyclePoliciesInput) SetTargetTags(v []*string) *GetLifecyclePoliciesInput
- func (s GetLifecyclePoliciesInput) String() string
- func (s *GetLifecyclePoliciesInput) Validate() error
- type GetLifecyclePoliciesOutput
- type GetLifecyclePolicyInput
- type GetLifecyclePolicyOutput
- type LifecyclePolicy
- func (s LifecyclePolicy) GoString() string
- func (s *LifecyclePolicy) SetDateCreated(v time.Time) *LifecyclePolicy
- func (s *LifecyclePolicy) SetDateModified(v time.Time) *LifecyclePolicy
- func (s *LifecyclePolicy) SetDescription(v string) *LifecyclePolicy
- func (s *LifecyclePolicy) SetExecutionRoleArn(v string) *LifecyclePolicy
- func (s *LifecyclePolicy) SetPolicyDetails(v *PolicyDetails) *LifecyclePolicy
- func (s *LifecyclePolicy) SetPolicyId(v string) *LifecyclePolicy
- func (s *LifecyclePolicy) SetState(v string) *LifecyclePolicy
- func (s LifecyclePolicy) String() string
- type LifecyclePolicySummary
- func (s LifecyclePolicySummary) GoString() string
- func (s *LifecyclePolicySummary) SetDescription(v string) *LifecyclePolicySummary
- func (s *LifecyclePolicySummary) SetPolicyId(v string) *LifecyclePolicySummary
- func (s *LifecyclePolicySummary) SetState(v string) *LifecyclePolicySummary
- func (s LifecyclePolicySummary) String() string
- type PolicyDetails
- func (s PolicyDetails) GoString() string
- func (s *PolicyDetails) SetResourceTypes(v []*string) *PolicyDetails
- func (s *PolicyDetails) SetSchedules(v []*Schedule) *PolicyDetails
- func (s *PolicyDetails) SetTargetTags(v []*Tag) *PolicyDetails
- func (s PolicyDetails) String() string
- func (s *PolicyDetails) Validate() error
- type RetainRule
- type Schedule
- func (s Schedule) GoString() string
- func (s *Schedule) SetCreateRule(v *CreateRule) *Schedule
- func (s *Schedule) SetName(v string) *Schedule
- func (s *Schedule) SetRetainRule(v *RetainRule) *Schedule
- func (s *Schedule) SetTagsToAdd(v []*Tag) *Schedule
- func (s Schedule) String() string
- func (s *Schedule) Validate() error
- type Tag
- type UpdateLifecyclePolicyInput
- func (s UpdateLifecyclePolicyInput) GoString() string
- func (s *UpdateLifecyclePolicyInput) SetDescription(v string) *UpdateLifecyclePolicyInput
- func (s *UpdateLifecyclePolicyInput) SetExecutionRoleArn(v string) *UpdateLifecyclePolicyInput
- func (s *UpdateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *UpdateLifecyclePolicyInput
- func (s *UpdateLifecyclePolicyInput) SetPolicyId(v string) *UpdateLifecyclePolicyInput
- func (s *UpdateLifecyclePolicyInput) SetState(v string) *UpdateLifecyclePolicyInput
- func (s UpdateLifecyclePolicyInput) String() string
- func (s *UpdateLifecyclePolicyInput) Validate() error
- type UpdateLifecyclePolicyOutput
Constants ¶
const ( // GettablePolicyStateValuesEnabled is a GettablePolicyStateValues enum value GettablePolicyStateValuesEnabled = "ENABLED" // GettablePolicyStateValuesDisabled is a GettablePolicyStateValues enum value GettablePolicyStateValuesDisabled = "DISABLED" // GettablePolicyStateValuesError is a GettablePolicyStateValues enum value GettablePolicyStateValuesError = "ERROR" )
const ( // SettablePolicyStateValuesEnabled is a SettablePolicyStateValues enum value SettablePolicyStateValuesEnabled = "ENABLED" // SettablePolicyStateValuesDisabled is a SettablePolicyStateValues enum value SettablePolicyStateValuesDisabled = "DISABLED" )
const ( // ErrCodeInternalServerException for service response error code // "InternalServerException". // // The service failed in an unexpected way. ErrCodeInternalServerException = "InternalServerException" // ErrCodeInvalidRequestException for service response error code // "InvalidRequestException". // // Bad request. The request is missing required parameters or has invalid parameters. ErrCodeInvalidRequestException = "InvalidRequestException" // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // // The request failed because a limit was exceeded. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // // A requested resource was not found. ErrCodeResourceNotFoundException = "ResourceNotFoundException" )
const ( ServiceName = "DLM" // Name of service. EndpointsID = "dlm" // ID to lookup a service endpoint with. ServiceID = "DLM" // ServiceID is a unique identifer of a specific service. )
Service information constants
const (
// IntervalUnitValuesHours is a IntervalUnitValues enum value
IntervalUnitValuesHours = "HOURS"
)
const (
// ResourceTypeValuesVolume is a ResourceTypeValues enum value
ResourceTypeValuesVolume = "VOLUME"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateLifecyclePolicyInput ¶
type CreateLifecyclePolicyInput struct { // A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are // supported. // // Description is a required field Description *string `type:"string" required:"true"` // The Amazon Resource Name (ARN) of the IAM role used to run the operations // specified by the lifecycle policy. // // ExecutionRoleArn is a required field ExecutionRoleArn *string `type:"string" required:"true"` // The configuration of the lifecycle policy. // // Target tags cannot be re-used across lifecycle policies. // // PolicyDetails is a required field PolicyDetails *PolicyDetails `type:"structure" required:"true"` // The desired activation state of the lifecycle policy after creation. // // State is a required field State *string `type:"string" required:"true" enum:"SettablePolicyStateValues"` // contains filtered or unexported fields }
func (CreateLifecyclePolicyInput) GoString ¶
func (s CreateLifecyclePolicyInput) GoString() string
GoString returns the string representation
func (*CreateLifecyclePolicyInput) SetDescription ¶
func (s *CreateLifecyclePolicyInput) SetDescription(v string) *CreateLifecyclePolicyInput
SetDescription sets the Description field's value.
func (*CreateLifecyclePolicyInput) SetExecutionRoleArn ¶
func (s *CreateLifecyclePolicyInput) SetExecutionRoleArn(v string) *CreateLifecyclePolicyInput
SetExecutionRoleArn sets the ExecutionRoleArn field's value.
func (*CreateLifecyclePolicyInput) SetPolicyDetails ¶
func (s *CreateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *CreateLifecyclePolicyInput
SetPolicyDetails sets the PolicyDetails field's value.
func (*CreateLifecyclePolicyInput) SetState ¶
func (s *CreateLifecyclePolicyInput) SetState(v string) *CreateLifecyclePolicyInput
SetState sets the State field's value.
func (CreateLifecyclePolicyInput) String ¶
func (s CreateLifecyclePolicyInput) String() string
String returns the string representation
func (*CreateLifecyclePolicyInput) Validate ¶
func (s *CreateLifecyclePolicyInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type CreateLifecyclePolicyOutput ¶
type CreateLifecyclePolicyOutput struct { // The identifier of the lifecycle policy. PolicyId *string `type:"string"` // contains filtered or unexported fields }
func (CreateLifecyclePolicyOutput) GoString ¶
func (s CreateLifecyclePolicyOutput) GoString() string
GoString returns the string representation
func (*CreateLifecyclePolicyOutput) SetPolicyId ¶
func (s *CreateLifecyclePolicyOutput) SetPolicyId(v string) *CreateLifecyclePolicyOutput
SetPolicyId sets the PolicyId field's value.
func (CreateLifecyclePolicyOutput) String ¶
func (s CreateLifecyclePolicyOutput) String() string
String returns the string representation
type CreateRule ¶
type CreateRule struct { // The interval. The supported values are 12 and 24. // // Interval is a required field Interval *int64 `min:"1" type:"integer" required:"true"` // The interval unit. // // IntervalUnit is a required field IntervalUnit *string `type:"string" required:"true" enum:"IntervalUnitValues"` // The time, in UTC, to start the operation. // // The operation occurs within a one-hour window following the specified time. Times []*string `type:"list"` // contains filtered or unexported fields }
Specifies when to create snapshots of EBS volumes.
func (CreateRule) GoString ¶
func (s CreateRule) GoString() string
GoString returns the string representation
func (*CreateRule) SetInterval ¶
func (s *CreateRule) SetInterval(v int64) *CreateRule
SetInterval sets the Interval field's value.
func (*CreateRule) SetIntervalUnit ¶
func (s *CreateRule) SetIntervalUnit(v string) *CreateRule
SetIntervalUnit sets the IntervalUnit field's value.
func (*CreateRule) SetTimes ¶
func (s *CreateRule) SetTimes(v []*string) *CreateRule
SetTimes sets the Times field's value.
func (CreateRule) String ¶
func (s CreateRule) String() string
String returns the string representation
func (*CreateRule) Validate ¶
func (s *CreateRule) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type DLM ¶
DLM provides the API operation methods for making requests to Amazon Data Lifecycle Manager. See this package's package overview docs for details on the service.
DLM methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *DLM
New creates a new instance of the DLM client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
// Create a DLM client from just a session. svc := dlm.New(mySession) // Create a DLM client with additional configuration svc := dlm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*DLM) CreateLifecyclePolicy ¶
func (c *DLM) CreateLifecyclePolicy(input *CreateLifecyclePolicyInput) (*CreateLifecyclePolicyOutput, error)
CreateLifecyclePolicy API operation for Amazon Data Lifecycle Manager.
Creates a policy to manage the lifecycle of the specified AWS resources. You can create up to 100 lifecycle policies.
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 Amazon Data Lifecycle Manager's API operation CreateLifecyclePolicy for usage and error information.
Returned Error Codes:
ErrCodeInvalidRequestException "InvalidRequestException" Bad request. The request is missing required parameters or has invalid parameters.
ErrCodeLimitExceededException "LimitExceededException" The request failed because a limit was exceeded.
ErrCodeInternalServerException "InternalServerException" The service failed in an unexpected way.
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/CreateLifecyclePolicy
func (*DLM) CreateLifecyclePolicyRequest ¶
func (c *DLM) CreateLifecyclePolicyRequest(input *CreateLifecyclePolicyInput) (req *request.Request, output *CreateLifecyclePolicyOutput)
CreateLifecyclePolicyRequest generates a "aws/request.Request" representing the client's request for the CreateLifecyclePolicy operation. The "output" return value will be populated with the request's response once the request completes successfuly.
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 CreateLifecyclePolicy for more information on using the CreateLifecyclePolicy 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 CreateLifecyclePolicyRequest method. req, resp := client.CreateLifecyclePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/CreateLifecyclePolicy
func (*DLM) CreateLifecyclePolicyWithContext ¶
func (c *DLM) CreateLifecyclePolicyWithContext(ctx aws.Context, input *CreateLifecyclePolicyInput, opts ...request.Option) (*CreateLifecyclePolicyOutput, error)
CreateLifecyclePolicyWithContext is the same as CreateLifecyclePolicy with the addition of the ability to pass a context and additional request options.
See CreateLifecyclePolicy 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 (*DLM) DeleteLifecyclePolicy ¶
func (c *DLM) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error)
DeleteLifecyclePolicy API operation for Amazon Data Lifecycle Manager.
Deletes the specified lifecycle policy and halts the automated operations that the policy specified.
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 Amazon Data Lifecycle Manager's API operation DeleteLifecyclePolicy for usage and error information.
Returned Error Codes:
ErrCodeResourceNotFoundException "ResourceNotFoundException" A requested resource was not found.
ErrCodeInternalServerException "InternalServerException" The service failed in an unexpected way.
ErrCodeLimitExceededException "LimitExceededException" The request failed because a limit was exceeded.
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/DeleteLifecyclePolicy
func (*DLM) DeleteLifecyclePolicyRequest ¶
func (c *DLM) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput)
DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the client's request for the DeleteLifecyclePolicy operation. The "output" return value will be populated with the request's response once the request completes successfuly.
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 DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy 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 DeleteLifecyclePolicyRequest method. req, resp := client.DeleteLifecyclePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/DeleteLifecyclePolicy
func (*DLM) DeleteLifecyclePolicyWithContext ¶
func (c *DLM) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error)
DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of the ability to pass a context and additional request options.
See DeleteLifecyclePolicy 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 (*DLM) GetLifecyclePolicies ¶
func (c *DLM) GetLifecyclePolicies(input *GetLifecyclePoliciesInput) (*GetLifecyclePoliciesOutput, error)
GetLifecyclePolicies API operation for Amazon Data Lifecycle Manager.
Gets summary information about all or the specified data lifecycle policies.
To get complete information about a policy, use GetLifecyclePolicy.
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 Amazon Data Lifecycle Manager's API operation GetLifecyclePolicies for usage and error information.
Returned Error Codes:
ErrCodeResourceNotFoundException "ResourceNotFoundException" A requested resource was not found.
ErrCodeInvalidRequestException "InvalidRequestException" Bad request. The request is missing required parameters or has invalid parameters.
ErrCodeInternalServerException "InternalServerException" The service failed in an unexpected way.
ErrCodeLimitExceededException "LimitExceededException" The request failed because a limit was exceeded.
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicies
func (*DLM) GetLifecyclePoliciesRequest ¶
func (c *DLM) GetLifecyclePoliciesRequest(input *GetLifecyclePoliciesInput) (req *request.Request, output *GetLifecyclePoliciesOutput)
GetLifecyclePoliciesRequest generates a "aws/request.Request" representing the client's request for the GetLifecyclePolicies operation. The "output" return value will be populated with the request's response once the request completes successfuly.
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 GetLifecyclePolicies for more information on using the GetLifecyclePolicies 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 GetLifecyclePoliciesRequest method. req, resp := client.GetLifecyclePoliciesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicies
func (*DLM) GetLifecyclePoliciesWithContext ¶
func (c *DLM) GetLifecyclePoliciesWithContext(ctx aws.Context, input *GetLifecyclePoliciesInput, opts ...request.Option) (*GetLifecyclePoliciesOutput, error)
GetLifecyclePoliciesWithContext is the same as GetLifecyclePolicies with the addition of the ability to pass a context and additional request options.
See GetLifecyclePolicies 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 (*DLM) GetLifecyclePolicy ¶
func (c *DLM) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error)
GetLifecyclePolicy API operation for Amazon Data Lifecycle Manager.
Gets detailed information about the specified lifecycle policy.
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 Amazon Data Lifecycle Manager's API operation GetLifecyclePolicy for usage and error information.
Returned Error Codes:
ErrCodeResourceNotFoundException "ResourceNotFoundException" A requested resource was not found.
ErrCodeInternalServerException "InternalServerException" The service failed in an unexpected way.
ErrCodeLimitExceededException "LimitExceededException" The request failed because a limit was exceeded.
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicy
func (*DLM) GetLifecyclePolicyRequest ¶
func (c *DLM) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput)
GetLifecyclePolicyRequest generates a "aws/request.Request" representing the client's request for the GetLifecyclePolicy operation. The "output" return value will be populated with the request's response once the request completes successfuly.
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 GetLifecyclePolicy for more information on using the GetLifecyclePolicy 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 GetLifecyclePolicyRequest method. req, resp := client.GetLifecyclePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicy
func (*DLM) GetLifecyclePolicyWithContext ¶
func (c *DLM) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error)
GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of the ability to pass a context and additional request options.
See GetLifecyclePolicy 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 (*DLM) UpdateLifecyclePolicy ¶
func (c *DLM) UpdateLifecyclePolicy(input *UpdateLifecyclePolicyInput) (*UpdateLifecyclePolicyOutput, error)
UpdateLifecyclePolicy API operation for Amazon Data Lifecycle Manager.
Updates the specified lifecycle policy.
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 Amazon Data Lifecycle Manager's API operation UpdateLifecyclePolicy for usage and error information.
Returned Error Codes:
ErrCodeResourceNotFoundException "ResourceNotFoundException" A requested resource was not found.
ErrCodeInvalidRequestException "InvalidRequestException" Bad request. The request is missing required parameters or has invalid parameters.
ErrCodeInternalServerException "InternalServerException" The service failed in an unexpected way.
ErrCodeLimitExceededException "LimitExceededException" The request failed because a limit was exceeded.
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/UpdateLifecyclePolicy
func (*DLM) UpdateLifecyclePolicyRequest ¶
func (c *DLM) UpdateLifecyclePolicyRequest(input *UpdateLifecyclePolicyInput) (req *request.Request, output *UpdateLifecyclePolicyOutput)
UpdateLifecyclePolicyRequest generates a "aws/request.Request" representing the client's request for the UpdateLifecyclePolicy operation. The "output" return value will be populated with the request's response once the request completes successfuly.
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 UpdateLifecyclePolicy for more information on using the UpdateLifecyclePolicy 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 UpdateLifecyclePolicyRequest method. req, resp := client.UpdateLifecyclePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/UpdateLifecyclePolicy
func (*DLM) UpdateLifecyclePolicyWithContext ¶
func (c *DLM) UpdateLifecyclePolicyWithContext(ctx aws.Context, input *UpdateLifecyclePolicyInput, opts ...request.Option) (*UpdateLifecyclePolicyOutput, error)
UpdateLifecyclePolicyWithContext is the same as UpdateLifecyclePolicy with the addition of the ability to pass a context and additional request options.
See UpdateLifecyclePolicy 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.
type DeleteLifecyclePolicyInput ¶
type DeleteLifecyclePolicyInput struct { // The identifier of the lifecycle policy. // // PolicyId is a required field PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteLifecyclePolicyInput) GoString ¶
func (s DeleteLifecyclePolicyInput) GoString() string
GoString returns the string representation
func (*DeleteLifecyclePolicyInput) SetPolicyId ¶
func (s *DeleteLifecyclePolicyInput) SetPolicyId(v string) *DeleteLifecyclePolicyInput
SetPolicyId sets the PolicyId field's value.
func (DeleteLifecyclePolicyInput) String ¶
func (s DeleteLifecyclePolicyInput) String() string
String returns the string representation
func (*DeleteLifecyclePolicyInput) Validate ¶
func (s *DeleteLifecyclePolicyInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type DeleteLifecyclePolicyOutput ¶
type DeleteLifecyclePolicyOutput struct {
// contains filtered or unexported fields
}
func (DeleteLifecyclePolicyOutput) GoString ¶
func (s DeleteLifecyclePolicyOutput) GoString() string
GoString returns the string representation
func (DeleteLifecyclePolicyOutput) String ¶
func (s DeleteLifecyclePolicyOutput) String() string
String returns the string representation
type GetLifecyclePoliciesInput ¶
type GetLifecyclePoliciesInput struct { // The identifiers of the data lifecycle policies. PolicyIds []*string `location:"querystring" locationName:"policyIds" type:"list"` // The resource type. ResourceTypes []*string `location:"querystring" locationName:"resourceTypes" min:"1" type:"list"` // The activation state. State *string `location:"querystring" locationName:"state" type:"string" enum:"GettablePolicyStateValues"` // The tags to add to the resources. // // Tags are strings in the format key:value. // // These tags are added in addition to the AWS-added lifecycle tags. TagsToAdd []*string `location:"querystring" locationName:"tagsToAdd" type:"list"` // The target tags. // // Tags are strings in the format key:value. TargetTags []*string `location:"querystring" locationName:"targetTags" min:"1" type:"list"` // contains filtered or unexported fields }
func (GetLifecyclePoliciesInput) GoString ¶
func (s GetLifecyclePoliciesInput) GoString() string
GoString returns the string representation
func (*GetLifecyclePoliciesInput) SetPolicyIds ¶
func (s *GetLifecyclePoliciesInput) SetPolicyIds(v []*string) *GetLifecyclePoliciesInput
SetPolicyIds sets the PolicyIds field's value.
func (*GetLifecyclePoliciesInput) SetResourceTypes ¶
func (s *GetLifecyclePoliciesInput) SetResourceTypes(v []*string) *GetLifecyclePoliciesInput
SetResourceTypes sets the ResourceTypes field's value.
func (*GetLifecyclePoliciesInput) SetState ¶
func (s *GetLifecyclePoliciesInput) SetState(v string) *GetLifecyclePoliciesInput
SetState sets the State field's value.
func (*GetLifecyclePoliciesInput) SetTagsToAdd ¶
func (s *GetLifecyclePoliciesInput) SetTagsToAdd(v []*string) *GetLifecyclePoliciesInput
SetTagsToAdd sets the TagsToAdd field's value.
func (*GetLifecyclePoliciesInput) SetTargetTags ¶
func (s *GetLifecyclePoliciesInput) SetTargetTags(v []*string) *GetLifecyclePoliciesInput
SetTargetTags sets the TargetTags field's value.
func (GetLifecyclePoliciesInput) String ¶
func (s GetLifecyclePoliciesInput) String() string
String returns the string representation
func (*GetLifecyclePoliciesInput) Validate ¶
func (s *GetLifecyclePoliciesInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GetLifecyclePoliciesOutput ¶
type GetLifecyclePoliciesOutput struct { // Summary information about the lifecycle policies. Policies []*LifecyclePolicySummary `type:"list"` // contains filtered or unexported fields }
func (GetLifecyclePoliciesOutput) GoString ¶
func (s GetLifecyclePoliciesOutput) GoString() string
GoString returns the string representation
func (*GetLifecyclePoliciesOutput) SetPolicies ¶
func (s *GetLifecyclePoliciesOutput) SetPolicies(v []*LifecyclePolicySummary) *GetLifecyclePoliciesOutput
SetPolicies sets the Policies field's value.
func (GetLifecyclePoliciesOutput) String ¶
func (s GetLifecyclePoliciesOutput) String() string
String returns the string representation
type GetLifecyclePolicyInput ¶
type GetLifecyclePolicyInput struct { // The identifier of the lifecycle policy. // // PolicyId is a required field PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` // contains filtered or unexported fields }
func (GetLifecyclePolicyInput) GoString ¶
func (s GetLifecyclePolicyInput) GoString() string
GoString returns the string representation
func (*GetLifecyclePolicyInput) SetPolicyId ¶
func (s *GetLifecyclePolicyInput) SetPolicyId(v string) *GetLifecyclePolicyInput
SetPolicyId sets the PolicyId field's value.
func (GetLifecyclePolicyInput) String ¶
func (s GetLifecyclePolicyInput) String() string
String returns the string representation
func (*GetLifecyclePolicyInput) Validate ¶
func (s *GetLifecyclePolicyInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GetLifecyclePolicyOutput ¶
type GetLifecyclePolicyOutput struct { // Detailed information about the lifecycle policy. Policy *LifecyclePolicy `type:"structure"` // contains filtered or unexported fields }
func (GetLifecyclePolicyOutput) GoString ¶
func (s GetLifecyclePolicyOutput) GoString() string
GoString returns the string representation
func (*GetLifecyclePolicyOutput) SetPolicy ¶
func (s *GetLifecyclePolicyOutput) SetPolicy(v *LifecyclePolicy) *GetLifecyclePolicyOutput
SetPolicy sets the Policy field's value.
func (GetLifecyclePolicyOutput) String ¶
func (s GetLifecyclePolicyOutput) String() string
String returns the string representation
type LifecyclePolicy ¶
type LifecyclePolicy struct { // The local date and time when the lifecycle policy was created. DateCreated *time.Time `type:"timestamp" timestampFormat:"unix"` // The local date and time when the lifecycle policy was last modified. DateModified *time.Time `type:"timestamp" timestampFormat:"unix"` // The description of the lifecycle policy. Description *string `type:"string"` // The Amazon Resource Name (ARN) of the IAM role used to run the operations // specified by the lifecycle policy. ExecutionRoleArn *string `type:"string"` // The configuration of the lifecycle policy PolicyDetails *PolicyDetails `type:"structure"` // The identifier of the lifecycle policy. PolicyId *string `type:"string"` // The activation state of the lifecycle policy. State *string `type:"string" enum:"GettablePolicyStateValues"` // contains filtered or unexported fields }
Detailed information about a lifecycle policy.
func (LifecyclePolicy) GoString ¶
func (s LifecyclePolicy) GoString() string
GoString returns the string representation
func (*LifecyclePolicy) SetDateCreated ¶
func (s *LifecyclePolicy) SetDateCreated(v time.Time) *LifecyclePolicy
SetDateCreated sets the DateCreated field's value.
func (*LifecyclePolicy) SetDateModified ¶
func (s *LifecyclePolicy) SetDateModified(v time.Time) *LifecyclePolicy
SetDateModified sets the DateModified field's value.
func (*LifecyclePolicy) SetDescription ¶
func (s *LifecyclePolicy) SetDescription(v string) *LifecyclePolicy
SetDescription sets the Description field's value.
func (*LifecyclePolicy) SetExecutionRoleArn ¶
func (s *LifecyclePolicy) SetExecutionRoleArn(v string) *LifecyclePolicy
SetExecutionRoleArn sets the ExecutionRoleArn field's value.
func (*LifecyclePolicy) SetPolicyDetails ¶
func (s *LifecyclePolicy) SetPolicyDetails(v *PolicyDetails) *LifecyclePolicy
SetPolicyDetails sets the PolicyDetails field's value.
func (*LifecyclePolicy) SetPolicyId ¶
func (s *LifecyclePolicy) SetPolicyId(v string) *LifecyclePolicy
SetPolicyId sets the PolicyId field's value.
func (*LifecyclePolicy) SetState ¶
func (s *LifecyclePolicy) SetState(v string) *LifecyclePolicy
SetState sets the State field's value.
func (LifecyclePolicy) String ¶
func (s LifecyclePolicy) String() string
String returns the string representation
type LifecyclePolicySummary ¶
type LifecyclePolicySummary struct { // The description of the lifecycle policy. Description *string `type:"string"` // The identifier of the lifecycle policy. PolicyId *string `type:"string"` // The activation state of the lifecycle policy. State *string `type:"string" enum:"GettablePolicyStateValues"` // contains filtered or unexported fields }
Summary information about a lifecycle policy.
func (LifecyclePolicySummary) GoString ¶
func (s LifecyclePolicySummary) GoString() string
GoString returns the string representation
func (*LifecyclePolicySummary) SetDescription ¶
func (s *LifecyclePolicySummary) SetDescription(v string) *LifecyclePolicySummary
SetDescription sets the Description field's value.
func (*LifecyclePolicySummary) SetPolicyId ¶
func (s *LifecyclePolicySummary) SetPolicyId(v string) *LifecyclePolicySummary
SetPolicyId sets the PolicyId field's value.
func (*LifecyclePolicySummary) SetState ¶
func (s *LifecyclePolicySummary) SetState(v string) *LifecyclePolicySummary
SetState sets the State field's value.
func (LifecyclePolicySummary) String ¶
func (s LifecyclePolicySummary) String() string
String returns the string representation
type PolicyDetails ¶
type PolicyDetails struct { // The resource type. ResourceTypes []*string `min:"1" type:"list"` // The schedule. Schedules []*Schedule `min:"1" type:"list"` // The target tags. TargetTags []*Tag `min:"1" type:"list"` // contains filtered or unexported fields }
Specifies the configuration of a lifecycle policy.
func (PolicyDetails) GoString ¶
func (s PolicyDetails) GoString() string
GoString returns the string representation
func (*PolicyDetails) SetResourceTypes ¶
func (s *PolicyDetails) SetResourceTypes(v []*string) *PolicyDetails
SetResourceTypes sets the ResourceTypes field's value.
func (*PolicyDetails) SetSchedules ¶
func (s *PolicyDetails) SetSchedules(v []*Schedule) *PolicyDetails
SetSchedules sets the Schedules field's value.
func (*PolicyDetails) SetTargetTags ¶
func (s *PolicyDetails) SetTargetTags(v []*Tag) *PolicyDetails
SetTargetTags sets the TargetTags field's value.
func (PolicyDetails) String ¶
func (s PolicyDetails) String() string
String returns the string representation
func (*PolicyDetails) Validate ¶
func (s *PolicyDetails) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type RetainRule ¶
type RetainRule struct { // The number of snapshots to keep for each volume, up to a maximum of 1000. // // Count is a required field Count *int64 `min:"1" type:"integer" required:"true"` // contains filtered or unexported fields }
Specifies the number of snapshots to keep for each EBS volume.
func (RetainRule) GoString ¶
func (s RetainRule) GoString() string
GoString returns the string representation
func (*RetainRule) SetCount ¶
func (s *RetainRule) SetCount(v int64) *RetainRule
SetCount sets the Count field's value.
func (RetainRule) String ¶
func (s RetainRule) String() string
String returns the string representation
func (*RetainRule) Validate ¶
func (s *RetainRule) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type Schedule ¶
type Schedule struct { // The create rule. CreateRule *CreateRule `type:"structure"` // The name of the schedule. Name *string `type:"string"` // The retain rule. RetainRule *RetainRule `type:"structure"` // The tags to add to policy-created resources. These tags are added in addition // to the default lifecycle tags. TagsToAdd []*Tag `type:"list"` // contains filtered or unexported fields }
Specifies a schedule.
func (*Schedule) SetCreateRule ¶
func (s *Schedule) SetCreateRule(v *CreateRule) *Schedule
SetCreateRule sets the CreateRule field's value.
func (*Schedule) SetRetainRule ¶
func (s *Schedule) SetRetainRule(v *RetainRule) *Schedule
SetRetainRule sets the RetainRule field's value.
func (*Schedule) SetTagsToAdd ¶
SetTagsToAdd sets the TagsToAdd field's value.
type Tag ¶
type Tag struct { // The tag key. // // Key is a required field Key *string `type:"string" required:"true"` // The tag value. // // Value is a required field Value *string `type:"string" required:"true"` // contains filtered or unexported fields }
Specifies a tag for a resource.
type UpdateLifecyclePolicyInput ¶
type UpdateLifecyclePolicyInput struct { // A description of the lifecycle policy. Description *string `type:"string"` // The Amazon Resource Name (ARN) of the IAM role used to run the operations // specified by the lifecycle policy. ExecutionRoleArn *string `type:"string"` // The configuration of the lifecycle policy. // // Target tags cannot be re-used across policies. PolicyDetails *PolicyDetails `type:"structure"` // The identifier of the lifecycle policy. // // PolicyId is a required field PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` // The desired activation state of the lifecycle policy after creation. State *string `type:"string" enum:"SettablePolicyStateValues"` // contains filtered or unexported fields }
func (UpdateLifecyclePolicyInput) GoString ¶
func (s UpdateLifecyclePolicyInput) GoString() string
GoString returns the string representation
func (*UpdateLifecyclePolicyInput) SetDescription ¶
func (s *UpdateLifecyclePolicyInput) SetDescription(v string) *UpdateLifecyclePolicyInput
SetDescription sets the Description field's value.
func (*UpdateLifecyclePolicyInput) SetExecutionRoleArn ¶
func (s *UpdateLifecyclePolicyInput) SetExecutionRoleArn(v string) *UpdateLifecyclePolicyInput
SetExecutionRoleArn sets the ExecutionRoleArn field's value.
func (*UpdateLifecyclePolicyInput) SetPolicyDetails ¶
func (s *UpdateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *UpdateLifecyclePolicyInput
SetPolicyDetails sets the PolicyDetails field's value.
func (*UpdateLifecyclePolicyInput) SetPolicyId ¶
func (s *UpdateLifecyclePolicyInput) SetPolicyId(v string) *UpdateLifecyclePolicyInput
SetPolicyId sets the PolicyId field's value.
func (*UpdateLifecyclePolicyInput) SetState ¶
func (s *UpdateLifecyclePolicyInput) SetState(v string) *UpdateLifecyclePolicyInput
SetState sets the State field's value.
func (UpdateLifecyclePolicyInput) String ¶
func (s UpdateLifecyclePolicyInput) String() string
String returns the string representation
func (*UpdateLifecyclePolicyInput) Validate ¶
func (s *UpdateLifecyclePolicyInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type UpdateLifecyclePolicyOutput ¶
type UpdateLifecyclePolicyOutput struct {
// contains filtered or unexported fields
}
func (UpdateLifecyclePolicyOutput) GoString ¶
func (s UpdateLifecyclePolicyOutput) GoString() string
GoString returns the string representation
func (UpdateLifecyclePolicyOutput) String ¶
func (s UpdateLifecyclePolicyOutput) String() string
String returns the string representation