Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16489 lines (14317 sloc) 641 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package swf
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/jsonrpc"
)
const opCountClosedWorkflowExecutions = "CountClosedWorkflowExecutions"
// CountClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the
// client's request for the CountClosedWorkflowExecutions 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 CountClosedWorkflowExecutions for more information on using the CountClosedWorkflowExecutions
// 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 CountClosedWorkflowExecutionsRequest method.
// req, resp := client.CountClosedWorkflowExecutionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) CountClosedWorkflowExecutionsRequest(input *CountClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) {
op := &request.Operation{
Name: opCountClosedWorkflowExecutions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CountClosedWorkflowExecutionsInput{}
}
output = &WorkflowExecutionCount{}
req = c.newRequest(op, input, output)
return
}
// CountClosedWorkflowExecutions API operation for Amazon Simple Workflow Service.
//
// Returns the number of closed workflow executions within the given domain
// that meet the specified filtering criteria.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
// typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
// String constraint. The key is swf:typeFilter.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation CountClosedWorkflowExecutions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) CountClosedWorkflowExecutions(input *CountClosedWorkflowExecutionsInput) (*WorkflowExecutionCount, error) {
req, out := c.CountClosedWorkflowExecutionsRequest(input)
return out, req.Send()
}
// CountClosedWorkflowExecutionsWithContext is the same as CountClosedWorkflowExecutions with the addition of
// the ability to pass a context and additional request options.
//
// See CountClosedWorkflowExecutions 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 *SWF) CountClosedWorkflowExecutionsWithContext(ctx aws.Context, input *CountClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) {
req, out := c.CountClosedWorkflowExecutionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCountOpenWorkflowExecutions = "CountOpenWorkflowExecutions"
// CountOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the
// client's request for the CountOpenWorkflowExecutions 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 CountOpenWorkflowExecutions for more information on using the CountOpenWorkflowExecutions
// 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 CountOpenWorkflowExecutionsRequest method.
// req, resp := client.CountOpenWorkflowExecutionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) CountOpenWorkflowExecutionsRequest(input *CountOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) {
op := &request.Operation{
Name: opCountOpenWorkflowExecutions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CountOpenWorkflowExecutionsInput{}
}
output = &WorkflowExecutionCount{}
req = c.newRequest(op, input, output)
return
}
// CountOpenWorkflowExecutions API operation for Amazon Simple Workflow Service.
//
// Returns the number of open workflow executions within the given domain that
// meet the specified filtering criteria.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
// typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
// String constraint. The key is swf:typeFilter.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation CountOpenWorkflowExecutions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) CountOpenWorkflowExecutions(input *CountOpenWorkflowExecutionsInput) (*WorkflowExecutionCount, error) {
req, out := c.CountOpenWorkflowExecutionsRequest(input)
return out, req.Send()
}
// CountOpenWorkflowExecutionsWithContext is the same as CountOpenWorkflowExecutions with the addition of
// the ability to pass a context and additional request options.
//
// See CountOpenWorkflowExecutions 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 *SWF) CountOpenWorkflowExecutionsWithContext(ctx aws.Context, input *CountOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) {
req, out := c.CountOpenWorkflowExecutionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCountPendingActivityTasks = "CountPendingActivityTasks"
// CountPendingActivityTasksRequest generates a "aws/request.Request" representing the
// client's request for the CountPendingActivityTasks 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 CountPendingActivityTasks for more information on using the CountPendingActivityTasks
// 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 CountPendingActivityTasksRequest method.
// req, resp := client.CountPendingActivityTasksRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) CountPendingActivityTasksRequest(input *CountPendingActivityTasksInput) (req *request.Request, output *PendingTaskCount) {
op := &request.Operation{
Name: opCountPendingActivityTasks,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CountPendingActivityTasksInput{}
}
output = &PendingTaskCount{}
req = c.newRequest(op, input, output)
return
}
// CountPendingActivityTasks API operation for Amazon Simple Workflow Service.
//
// Returns the estimated number of activity tasks in the specified task list.
// The count returned is an approximation and isn't guaranteed to be exact.
// If you specify a task list that no activity task was ever scheduled in then
// 0 is returned.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the taskList.name parameter by using a Condition element with
// the swf:taskList.name key to allow the action to access only certain task
// lists.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation CountPendingActivityTasks for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) CountPendingActivityTasks(input *CountPendingActivityTasksInput) (*PendingTaskCount, error) {
req, out := c.CountPendingActivityTasksRequest(input)
return out, req.Send()
}
// CountPendingActivityTasksWithContext is the same as CountPendingActivityTasks with the addition of
// the ability to pass a context and additional request options.
//
// See CountPendingActivityTasks 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 *SWF) CountPendingActivityTasksWithContext(ctx aws.Context, input *CountPendingActivityTasksInput, opts ...request.Option) (*PendingTaskCount, error) {
req, out := c.CountPendingActivityTasksRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCountPendingDecisionTasks = "CountPendingDecisionTasks"
// CountPendingDecisionTasksRequest generates a "aws/request.Request" representing the
// client's request for the CountPendingDecisionTasks 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 CountPendingDecisionTasks for more information on using the CountPendingDecisionTasks
// 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 CountPendingDecisionTasksRequest method.
// req, resp := client.CountPendingDecisionTasksRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) CountPendingDecisionTasksRequest(input *CountPendingDecisionTasksInput) (req *request.Request, output *PendingTaskCount) {
op := &request.Operation{
Name: opCountPendingDecisionTasks,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CountPendingDecisionTasksInput{}
}
output = &PendingTaskCount{}
req = c.newRequest(op, input, output)
return
}
// CountPendingDecisionTasks API operation for Amazon Simple Workflow Service.
//
// Returns the estimated number of decision tasks in the specified task list.
// The count returned is an approximation and isn't guaranteed to be exact.
// If you specify a task list that no decision task was ever scheduled in then
// 0 is returned.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the taskList.name parameter by using a Condition element with
// the swf:taskList.name key to allow the action to access only certain task
// lists.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation CountPendingDecisionTasks for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) CountPendingDecisionTasks(input *CountPendingDecisionTasksInput) (*PendingTaskCount, error) {
req, out := c.CountPendingDecisionTasksRequest(input)
return out, req.Send()
}
// CountPendingDecisionTasksWithContext is the same as CountPendingDecisionTasks with the addition of
// the ability to pass a context and additional request options.
//
// See CountPendingDecisionTasks 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 *SWF) CountPendingDecisionTasksWithContext(ctx aws.Context, input *CountPendingDecisionTasksInput, opts ...request.Option) (*PendingTaskCount, error) {
req, out := c.CountPendingDecisionTasksRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeprecateActivityType = "DeprecateActivityType"
// DeprecateActivityTypeRequest generates a "aws/request.Request" representing the
// client's request for the DeprecateActivityType 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 DeprecateActivityType for more information on using the DeprecateActivityType
// 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 DeprecateActivityTypeRequest method.
// req, resp := client.DeprecateActivityTypeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) DeprecateActivityTypeRequest(input *DeprecateActivityTypeInput) (req *request.Request, output *DeprecateActivityTypeOutput) {
op := &request.Operation{
Name: opDeprecateActivityType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeprecateActivityTypeInput{}
}
output = &DeprecateActivityTypeOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeprecateActivityType API operation for Amazon Simple Workflow Service.
//
// Deprecates the specified activity type. After an activity type has been deprecated,
// you cannot create new tasks of that activity type. Tasks of this type that
// were scheduled before the type was deprecated continue to run.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. activityType.name: String constraint. The key is
// swf:activityType.name. activityType.version: String constraint. The key
// is swf:activityType.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation DeprecateActivityType for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault"
// Returned when the specified activity or workflow type was already deprecated.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) DeprecateActivityType(input *DeprecateActivityTypeInput) (*DeprecateActivityTypeOutput, error) {
req, out := c.DeprecateActivityTypeRequest(input)
return out, req.Send()
}
// DeprecateActivityTypeWithContext is the same as DeprecateActivityType with the addition of
// the ability to pass a context and additional request options.
//
// See DeprecateActivityType 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 *SWF) DeprecateActivityTypeWithContext(ctx aws.Context, input *DeprecateActivityTypeInput, opts ...request.Option) (*DeprecateActivityTypeOutput, error) {
req, out := c.DeprecateActivityTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeprecateDomain = "DeprecateDomain"
// DeprecateDomainRequest generates a "aws/request.Request" representing the
// client's request for the DeprecateDomain 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 DeprecateDomain for more information on using the DeprecateDomain
// 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 DeprecateDomainRequest method.
// req, resp := client.DeprecateDomainRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) DeprecateDomainRequest(input *DeprecateDomainInput) (req *request.Request, output *DeprecateDomainOutput) {
op := &request.Operation{
Name: opDeprecateDomain,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeprecateDomainInput{}
}
output = &DeprecateDomainOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeprecateDomain API operation for Amazon Simple Workflow Service.
//
// Deprecates the specified domain. After a domain has been deprecated it cannot
// be used to create new workflow executions or register new types. However,
// you can still use visibility actions on this domain. Deprecating a domain
// also deprecates all activity and workflow types registered in the domain.
// Executions that were started before the domain was deprecated continues to
// run.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation DeprecateDomain for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeDomainDeprecatedFault "DomainDeprecatedFault"
// Returned when the specified domain has been deprecated.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) DeprecateDomain(input *DeprecateDomainInput) (*DeprecateDomainOutput, error) {
req, out := c.DeprecateDomainRequest(input)
return out, req.Send()
}
// DeprecateDomainWithContext is the same as DeprecateDomain with the addition of
// the ability to pass a context and additional request options.
//
// See DeprecateDomain 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 *SWF) DeprecateDomainWithContext(ctx aws.Context, input *DeprecateDomainInput, opts ...request.Option) (*DeprecateDomainOutput, error) {
req, out := c.DeprecateDomainRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeprecateWorkflowType = "DeprecateWorkflowType"
// DeprecateWorkflowTypeRequest generates a "aws/request.Request" representing the
// client's request for the DeprecateWorkflowType 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 DeprecateWorkflowType for more information on using the DeprecateWorkflowType
// 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 DeprecateWorkflowTypeRequest method.
// req, resp := client.DeprecateWorkflowTypeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) DeprecateWorkflowTypeRequest(input *DeprecateWorkflowTypeInput) (req *request.Request, output *DeprecateWorkflowTypeOutput) {
op := &request.Operation{
Name: opDeprecateWorkflowType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeprecateWorkflowTypeInput{}
}
output = &DeprecateWorkflowTypeOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeprecateWorkflowType API operation for Amazon Simple Workflow Service.
//
// Deprecates the specified workflow type. After a workflow type has been deprecated,
// you cannot create new executions of that type. Executions that were started
// before the type was deprecated continues to run. A deprecated workflow type
// may still be used when calling visibility actions.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. workflowType.name: String constraint. The key is
// swf:workflowType.name. workflowType.version: String constraint. The key
// is swf:workflowType.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation DeprecateWorkflowType for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault"
// Returned when the specified activity or workflow type was already deprecated.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) DeprecateWorkflowType(input *DeprecateWorkflowTypeInput) (*DeprecateWorkflowTypeOutput, error) {
req, out := c.DeprecateWorkflowTypeRequest(input)
return out, req.Send()
}
// DeprecateWorkflowTypeWithContext is the same as DeprecateWorkflowType with the addition of
// the ability to pass a context and additional request options.
//
// See DeprecateWorkflowType 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 *SWF) DeprecateWorkflowTypeWithContext(ctx aws.Context, input *DeprecateWorkflowTypeInput, opts ...request.Option) (*DeprecateWorkflowTypeOutput, error) {
req, out := c.DeprecateWorkflowTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeActivityType = "DescribeActivityType"
// DescribeActivityTypeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeActivityType 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 DescribeActivityType for more information on using the DescribeActivityType
// 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 DescribeActivityTypeRequest method.
// req, resp := client.DescribeActivityTypeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) DescribeActivityTypeRequest(input *DescribeActivityTypeInput) (req *request.Request, output *DescribeActivityTypeOutput) {
op := &request.Operation{
Name: opDescribeActivityType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeActivityTypeInput{}
}
output = &DescribeActivityTypeOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeActivityType API operation for Amazon Simple Workflow Service.
//
// Returns information about the specified activity type. This includes configuration
// settings provided when the type was registered and other general information
// about the type.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. activityType.name: String constraint. The key is
// swf:activityType.name. activityType.version: String constraint. The key
// is swf:activityType.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation DescribeActivityType for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) DescribeActivityType(input *DescribeActivityTypeInput) (*DescribeActivityTypeOutput, error) {
req, out := c.DescribeActivityTypeRequest(input)
return out, req.Send()
}
// DescribeActivityTypeWithContext is the same as DescribeActivityType with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeActivityType 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 *SWF) DescribeActivityTypeWithContext(ctx aws.Context, input *DescribeActivityTypeInput, opts ...request.Option) (*DescribeActivityTypeOutput, error) {
req, out := c.DescribeActivityTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeDomain = "DescribeDomain"
// DescribeDomainRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDomain 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 DescribeDomain for more information on using the DescribeDomain
// 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 DescribeDomainRequest method.
// req, resp := client.DescribeDomainRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) DescribeDomainRequest(input *DescribeDomainInput) (req *request.Request, output *DescribeDomainOutput) {
op := &request.Operation{
Name: opDescribeDomain,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeDomainInput{}
}
output = &DescribeDomainOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeDomain API operation for Amazon Simple Workflow Service.
//
// Returns information about the specified domain, including description and
// status.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation DescribeDomain for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) DescribeDomain(input *DescribeDomainInput) (*DescribeDomainOutput, error) {
req, out := c.DescribeDomainRequest(input)
return out, req.Send()
}
// DescribeDomainWithContext is the same as DescribeDomain with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeDomain 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 *SWF) DescribeDomainWithContext(ctx aws.Context, input *DescribeDomainInput, opts ...request.Option) (*DescribeDomainOutput, error) {
req, out := c.DescribeDomainRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeWorkflowExecution = "DescribeWorkflowExecution"
// DescribeWorkflowExecutionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeWorkflowExecution 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 DescribeWorkflowExecution for more information on using the DescribeWorkflowExecution
// 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 DescribeWorkflowExecutionRequest method.
// req, resp := client.DescribeWorkflowExecutionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) DescribeWorkflowExecutionRequest(input *DescribeWorkflowExecutionInput) (req *request.Request, output *DescribeWorkflowExecutionOutput) {
op := &request.Operation{
Name: opDescribeWorkflowExecution,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeWorkflowExecutionInput{}
}
output = &DescribeWorkflowExecutionOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeWorkflowExecution API operation for Amazon Simple Workflow Service.
//
// Returns information about the specified workflow execution including its
// type and some statistics.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation DescribeWorkflowExecution for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) DescribeWorkflowExecution(input *DescribeWorkflowExecutionInput) (*DescribeWorkflowExecutionOutput, error) {
req, out := c.DescribeWorkflowExecutionRequest(input)
return out, req.Send()
}
// DescribeWorkflowExecutionWithContext is the same as DescribeWorkflowExecution with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeWorkflowExecution 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 *SWF) DescribeWorkflowExecutionWithContext(ctx aws.Context, input *DescribeWorkflowExecutionInput, opts ...request.Option) (*DescribeWorkflowExecutionOutput, error) {
req, out := c.DescribeWorkflowExecutionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeWorkflowType = "DescribeWorkflowType"
// DescribeWorkflowTypeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeWorkflowType 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 DescribeWorkflowType for more information on using the DescribeWorkflowType
// 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 DescribeWorkflowTypeRequest method.
// req, resp := client.DescribeWorkflowTypeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) DescribeWorkflowTypeRequest(input *DescribeWorkflowTypeInput) (req *request.Request, output *DescribeWorkflowTypeOutput) {
op := &request.Operation{
Name: opDescribeWorkflowType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeWorkflowTypeInput{}
}
output = &DescribeWorkflowTypeOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeWorkflowType API operation for Amazon Simple Workflow Service.
//
// Returns information about the specified workflow type. This includes configuration
// settings specified when the type was registered and other information such
// as creation date, current status, etc.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. workflowType.name: String constraint. The key is
// swf:workflowType.name. workflowType.version: String constraint. The key
// is swf:workflowType.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation DescribeWorkflowType for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) DescribeWorkflowType(input *DescribeWorkflowTypeInput) (*DescribeWorkflowTypeOutput, error) {
req, out := c.DescribeWorkflowTypeRequest(input)
return out, req.Send()
}
// DescribeWorkflowTypeWithContext is the same as DescribeWorkflowType with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeWorkflowType 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 *SWF) DescribeWorkflowTypeWithContext(ctx aws.Context, input *DescribeWorkflowTypeInput, opts ...request.Option) (*DescribeWorkflowTypeOutput, error) {
req, out := c.DescribeWorkflowTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetWorkflowExecutionHistory = "GetWorkflowExecutionHistory"
// GetWorkflowExecutionHistoryRequest generates a "aws/request.Request" representing the
// client's request for the GetWorkflowExecutionHistory 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 GetWorkflowExecutionHistory for more information on using the GetWorkflowExecutionHistory
// 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 GetWorkflowExecutionHistoryRequest method.
// req, resp := client.GetWorkflowExecutionHistoryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) GetWorkflowExecutionHistoryRequest(input *GetWorkflowExecutionHistoryInput) (req *request.Request, output *GetWorkflowExecutionHistoryOutput) {
op := &request.Operation{
Name: opGetWorkflowExecutionHistory,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextPageToken"},
OutputTokens: []string{"nextPageToken"},
LimitToken: "maximumPageSize",
TruncationToken: "",
},
}
if input == nil {
input = &GetWorkflowExecutionHistoryInput{}
}
output = &GetWorkflowExecutionHistoryOutput{}
req = c.newRequest(op, input, output)
return
}
// GetWorkflowExecutionHistory API operation for Amazon Simple Workflow Service.
//
// Returns the history of the specified workflow execution. The results may
// be split into multiple pages. To retrieve subsequent pages, make the call
// again using the nextPageToken returned by the initial call.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation GetWorkflowExecutionHistory for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) GetWorkflowExecutionHistory(input *GetWorkflowExecutionHistoryInput) (*GetWorkflowExecutionHistoryOutput, error) {
req, out := c.GetWorkflowExecutionHistoryRequest(input)
return out, req.Send()
}
// GetWorkflowExecutionHistoryWithContext is the same as GetWorkflowExecutionHistory with the addition of
// the ability to pass a context and additional request options.
//
// See GetWorkflowExecutionHistory 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 *SWF) GetWorkflowExecutionHistoryWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, opts ...request.Option) (*GetWorkflowExecutionHistoryOutput, error) {
req, out := c.GetWorkflowExecutionHistoryRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// GetWorkflowExecutionHistoryPages iterates over the pages of a GetWorkflowExecutionHistory operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See GetWorkflowExecutionHistory 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 GetWorkflowExecutionHistory operation.
// pageNum := 0
// err := client.GetWorkflowExecutionHistoryPages(params,
// func(page *swf.GetWorkflowExecutionHistoryOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *SWF) GetWorkflowExecutionHistoryPages(input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool) error {
return c.GetWorkflowExecutionHistoryPagesWithContext(aws.BackgroundContext(), input, fn)
}
// GetWorkflowExecutionHistoryPagesWithContext same as GetWorkflowExecutionHistoryPages 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 *SWF) GetWorkflowExecutionHistoryPagesWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetWorkflowExecutionHistoryInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetWorkflowExecutionHistoryRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*GetWorkflowExecutionHistoryOutput), !p.HasNextPage())
}
return p.Err()
}
const opListActivityTypes = "ListActivityTypes"
// ListActivityTypesRequest generates a "aws/request.Request" representing the
// client's request for the ListActivityTypes 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 ListActivityTypes for more information on using the ListActivityTypes
// 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 ListActivityTypesRequest method.
// req, resp := client.ListActivityTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) ListActivityTypesRequest(input *ListActivityTypesInput) (req *request.Request, output *ListActivityTypesOutput) {
op := &request.Operation{
Name: opListActivityTypes,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextPageToken"},
OutputTokens: []string{"nextPageToken"},
LimitToken: "maximumPageSize",
TruncationToken: "",
},
}
if input == nil {
input = &ListActivityTypesInput{}
}
output = &ListActivityTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListActivityTypes API operation for Amazon Simple Workflow Service.
//
// Returns information about all activities registered in the specified domain
// that match the specified name and registration status. The result includes
// information like creation date, current status of the activity, etc. The
// results may be split into multiple pages. To retrieve subsequent pages, make
// the call again using the nextPageToken returned by the initial call.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation ListActivityTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
func (c *SWF) ListActivityTypes(input *ListActivityTypesInput) (*ListActivityTypesOutput, error) {
req, out := c.ListActivityTypesRequest(input)
return out, req.Send()
}
// ListActivityTypesWithContext is the same as ListActivityTypes with the addition of
// the ability to pass a context and additional request options.
//
// See ListActivityTypes 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 *SWF) ListActivityTypesWithContext(ctx aws.Context, input *ListActivityTypesInput, opts ...request.Option) (*ListActivityTypesOutput, error) {
req, out := c.ListActivityTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListActivityTypesPages iterates over the pages of a ListActivityTypes operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListActivityTypes 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 ListActivityTypes operation.
// pageNum := 0
// err := client.ListActivityTypesPages(params,
// func(page *swf.ListActivityTypesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *SWF) ListActivityTypesPages(input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool) error {
return c.ListActivityTypesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListActivityTypesPagesWithContext same as ListActivityTypesPages 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 *SWF) ListActivityTypesPagesWithContext(ctx aws.Context, input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListActivityTypesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListActivityTypesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListActivityTypesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListClosedWorkflowExecutions = "ListClosedWorkflowExecutions"
// ListClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the
// client's request for the ListClosedWorkflowExecutions 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 ListClosedWorkflowExecutions for more information on using the ListClosedWorkflowExecutions
// 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 ListClosedWorkflowExecutionsRequest method.
// req, resp := client.ListClosedWorkflowExecutionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) ListClosedWorkflowExecutionsRequest(input *ListClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) {
op := &request.Operation{
Name: opListClosedWorkflowExecutions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextPageToken"},
OutputTokens: []string{"nextPageToken"},
LimitToken: "maximumPageSize",
TruncationToken: "",
},
}
if input == nil {
input = &ListClosedWorkflowExecutionsInput{}
}
output = &WorkflowExecutionInfos{}
req = c.newRequest(op, input, output)
return
}
// ListClosedWorkflowExecutions API operation for Amazon Simple Workflow Service.
//
// Returns a list of closed workflow executions in the specified domain that
// meet the filtering criteria. The results may be split into multiple pages.
// To retrieve subsequent pages, make the call again using the nextPageToken
// returned by the initial call.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
// typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
// String constraint. The key is swf:typeFilter.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation ListClosedWorkflowExecutions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) ListClosedWorkflowExecutions(input *ListClosedWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) {
req, out := c.ListClosedWorkflowExecutionsRequest(input)
return out, req.Send()
}
// ListClosedWorkflowExecutionsWithContext is the same as ListClosedWorkflowExecutions with the addition of
// the ability to pass a context and additional request options.
//
// See ListClosedWorkflowExecutions 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 *SWF) ListClosedWorkflowExecutionsWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) {
req, out := c.ListClosedWorkflowExecutionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListClosedWorkflowExecutionsPages iterates over the pages of a ListClosedWorkflowExecutions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListClosedWorkflowExecutions 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 ListClosedWorkflowExecutions operation.
// pageNum := 0
// err := client.ListClosedWorkflowExecutionsPages(params,
// func(page *swf.WorkflowExecutionInfos, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *SWF) ListClosedWorkflowExecutionsPages(input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error {
return c.ListClosedWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListClosedWorkflowExecutionsPagesWithContext same as ListClosedWorkflowExecutionsPages 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 *SWF) ListClosedWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListClosedWorkflowExecutionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListClosedWorkflowExecutionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage())
}
return p.Err()
}
const opListDomains = "ListDomains"
// ListDomainsRequest generates a "aws/request.Request" representing the
// client's request for the ListDomains 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 ListDomains for more information on using the ListDomains
// 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 ListDomainsRequest method.
// req, resp := client.ListDomainsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) {
op := &request.Operation{
Name: opListDomains,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextPageToken"},
OutputTokens: []string{"nextPageToken"},
LimitToken: "maximumPageSize",
TruncationToken: "",
},
}
if input == nil {
input = &ListDomainsInput{}
}
output = &ListDomainsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListDomains API operation for Amazon Simple Workflow Service.
//
// Returns the list of domains registered in the account. The results may be
// split into multiple pages. To retrieve subsequent pages, make the call again
// using the nextPageToken returned by the initial call.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains. The element must be set to arn:aws:swf::AccountID:domain/*,
// where AccountID is the account ID, with no dashes.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation ListDomains for usage and error information.
//
// Returned Error Codes:
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) {
req, out := c.ListDomainsRequest(input)
return out, req.Send()
}
// ListDomainsWithContext is the same as ListDomains with the addition of
// the ability to pass a context and additional request options.
//
// See ListDomains 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 *SWF) ListDomainsWithContext(ctx aws.Context, input *ListDomainsInput, opts ...request.Option) (*ListDomainsOutput, error) {
req, out := c.ListDomainsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListDomainsPages iterates over the pages of a ListDomains operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListDomains 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 ListDomains operation.
// pageNum := 0
// err := client.ListDomainsPages(params,
// func(page *swf.ListDomainsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *SWF) ListDomainsPages(input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool) error {
return c.ListDomainsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListDomainsPagesWithContext same as ListDomainsPages 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 *SWF) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListDomainsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListDomainsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListDomainsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListOpenWorkflowExecutions = "ListOpenWorkflowExecutions"
// ListOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the
// client's request for the ListOpenWorkflowExecutions 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 ListOpenWorkflowExecutions for more information on using the ListOpenWorkflowExecutions
// 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 ListOpenWorkflowExecutionsRequest method.
// req, resp := client.ListOpenWorkflowExecutionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) ListOpenWorkflowExecutionsRequest(input *ListOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) {
op := &request.Operation{
Name: opListOpenWorkflowExecutions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextPageToken"},
OutputTokens: []string{"nextPageToken"},
LimitToken: "maximumPageSize",
TruncationToken: "",
},
}
if input == nil {
input = &ListOpenWorkflowExecutionsInput{}
}
output = &WorkflowExecutionInfos{}
req = c.newRequest(op, input, output)
return
}
// ListOpenWorkflowExecutions API operation for Amazon Simple Workflow Service.
//
// Returns a list of open workflow executions in the specified domain that meet
// the filtering criteria. The results may be split into multiple pages. To
// retrieve subsequent pages, make the call again using the nextPageToken returned
// by the initial call.
//
// This operation is eventually consistent. The results are best effort and
// may not exactly reflect recent updates and changes.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
// typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
// String constraint. The key is swf:typeFilter.version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation ListOpenWorkflowExecutions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) ListOpenWorkflowExecutions(input *ListOpenWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) {
req, out := c.ListOpenWorkflowExecutionsRequest(input)
return out, req.Send()
}
// ListOpenWorkflowExecutionsWithContext is the same as ListOpenWorkflowExecutions with the addition of
// the ability to pass a context and additional request options.
//
// See ListOpenWorkflowExecutions 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 *SWF) ListOpenWorkflowExecutionsWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) {
req, out := c.ListOpenWorkflowExecutionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListOpenWorkflowExecutionsPages iterates over the pages of a ListOpenWorkflowExecutions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListOpenWorkflowExecutions 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 ListOpenWorkflowExecutions operation.
// pageNum := 0
// err := client.ListOpenWorkflowExecutionsPages(params,
// func(page *swf.WorkflowExecutionInfos, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *SWF) ListOpenWorkflowExecutionsPages(input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error {
return c.ListOpenWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListOpenWorkflowExecutionsPagesWithContext same as ListOpenWorkflowExecutionsPages 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 *SWF) ListOpenWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListOpenWorkflowExecutionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListOpenWorkflowExecutionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage())
}
return p.Err()
}
const opListTagsForResource = "ListTagsForResource"
// ListTagsForResourceRequest generates a "aws/request.Request" representing the
// client's request for the ListTagsForResource 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 ListTagsForResource for more information on using the ListTagsForResource
// 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 ListTagsForResourceRequest method.
// req, resp := client.ListTagsForResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
op := &request.Operation{
Name: opListTagsForResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListTagsForResourceInput{}
}
output = &ListTagsForResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTagsForResource API operation for Amazon Simple Workflow Service.
//
// List tags for a given domain.
//
// 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 Simple Workflow Service's
// API operation ListTagsForResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeLimitExceededFault "LimitExceededFault"
// Returned by any operation if a system imposed limitation has been reached.
// To address this fault you should either clean up unused resources or increase
// the limit by contacting AWS.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
return out, req.Send()
}
// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
// the ability to pass a context and additional request options.
//
// See ListTagsForResource 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 *SWF) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListWorkflowTypes = "ListWorkflowTypes"
// ListWorkflowTypesRequest generates a "aws/request.Request" representing the
// client's request for the ListWorkflowTypes 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 ListWorkflowTypes for more information on using the ListWorkflowTypes
// 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 ListWorkflowTypesRequest method.
// req, resp := client.ListWorkflowTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) ListWorkflowTypesRequest(input *ListWorkflowTypesInput) (req *request.Request, output *ListWorkflowTypesOutput) {
op := &request.Operation{
Name: opListWorkflowTypes,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextPageToken"},
OutputTokens: []string{"nextPageToken"},
LimitToken: "maximumPageSize",
TruncationToken: "",
},
}
if input == nil {
input = &ListWorkflowTypesInput{}
}
output = &ListWorkflowTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListWorkflowTypes API operation for Amazon Simple Workflow Service.
//
// Returns information about workflow types in the specified domain. The results
// may be split into multiple pages that can be retrieved by making the call
// repeatedly.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation ListWorkflowTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
func (c *SWF) ListWorkflowTypes(input *ListWorkflowTypesInput) (*ListWorkflowTypesOutput, error) {
req, out := c.ListWorkflowTypesRequest(input)
return out, req.Send()
}
// ListWorkflowTypesWithContext is the same as ListWorkflowTypes with the addition of
// the ability to pass a context and additional request options.
//
// See ListWorkflowTypes 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 *SWF) ListWorkflowTypesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, opts ...request.Option) (*ListWorkflowTypesOutput, error) {
req, out := c.ListWorkflowTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListWorkflowTypesPages iterates over the pages of a ListWorkflowTypes operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListWorkflowTypes 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 ListWorkflowTypes operation.
// pageNum := 0
// err := client.ListWorkflowTypesPages(params,
// func(page *swf.ListWorkflowTypesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *SWF) ListWorkflowTypesPages(input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool) error {
return c.ListWorkflowTypesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListWorkflowTypesPagesWithContext same as ListWorkflowTypesPages 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 *SWF) ListWorkflowTypesPagesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListWorkflowTypesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListWorkflowTypesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListWorkflowTypesOutput), !p.HasNextPage())
}
return p.Err()
}
const opPollForActivityTask = "PollForActivityTask"
// PollForActivityTaskRequest generates a "aws/request.Request" representing the
// client's request for the PollForActivityTask 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 PollForActivityTask for more information on using the PollForActivityTask
// 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 PollForActivityTaskRequest method.
// req, resp := client.PollForActivityTaskRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) PollForActivityTaskRequest(input *PollForActivityTaskInput) (req *request.Request, output *PollForActivityTaskOutput) {
op := &request.Operation{
Name: opPollForActivityTask,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PollForActivityTaskInput{}
}
output = &PollForActivityTaskOutput{}
req = c.newRequest(op, input, output)
return
}
// PollForActivityTask API operation for Amazon Simple Workflow Service.
//
// Used by workers to get an ActivityTask from the specified activity taskList.
// This initiates a long poll, where the service holds the HTTP connection open
// and responds as soon as a task becomes available. The maximum time the service
// holds on to the request before responding is 60 seconds. If no task is available
// within 60 seconds, the poll returns an empty result. An empty result, in
// this context, means that an ActivityTask is returned, but that the value
// of taskToken is an empty string. If a task is returned, the worker should
// use its type to identify and process it correctly.
//
// Workers should set their client side socket timeout to at least 70 seconds
// (10 seconds higher than the maximum time service may hold the poll request).
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the taskList.name parameter by using a Condition element with
// the swf:taskList.name key to allow the action to access only certain task
// lists.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation PollForActivityTask for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
// * ErrCodeLimitExceededFault "LimitExceededFault"
// Returned by any operation if a system imposed limitation has been reached.
// To address this fault you should either clean up unused resources or increase
// the limit by contacting AWS.
//
func (c *SWF) PollForActivityTask(input *PollForActivityTaskInput) (*PollForActivityTaskOutput, error) {
req, out := c.PollForActivityTaskRequest(input)
return out, req.Send()
}
// PollForActivityTaskWithContext is the same as PollForActivityTask with the addition of
// the ability to pass a context and additional request options.
//
// See PollForActivityTask 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 *SWF) PollForActivityTaskWithContext(ctx aws.Context, input *PollForActivityTaskInput, opts ...request.Option) (*PollForActivityTaskOutput, error) {
req, out := c.PollForActivityTaskRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPollForDecisionTask = "PollForDecisionTask"
// PollForDecisionTaskRequest generates a "aws/request.Request" representing the
// client's request for the PollForDecisionTask 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 PollForDecisionTask for more information on using the PollForDecisionTask
// 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 PollForDecisionTaskRequest method.
// req, resp := client.PollForDecisionTaskRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) PollForDecisionTaskRequest(input *PollForDecisionTaskInput) (req *request.Request, output *PollForDecisionTaskOutput) {
op := &request.Operation{
Name: opPollForDecisionTask,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextPageToken"},
OutputTokens: []string{"nextPageToken"},
LimitToken: "maximumPageSize",
TruncationToken: "",
},
}
if input == nil {
input = &PollForDecisionTaskInput{}
}
output = &PollForDecisionTaskOutput{}
req = c.newRequest(op, input, output)
return
}
// PollForDecisionTask API operation for Amazon Simple Workflow Service.
//
// Used by deciders to get a DecisionTask from the specified decision taskList.
// A decision task may be returned for any open workflow execution that is using
// the specified task list. The task includes a paginated view of the history
// of the workflow execution. The decider should use the workflow type and the
// history to determine how to properly handle the task.
//
// This action initiates a long poll, where the service holds the HTTP connection
// open and responds as soon a task becomes available. If no decision task is
// available in the specified task list before the timeout of 60 seconds expires,
// an empty result is returned. An empty result, in this context, means that
// a DecisionTask is returned, but that the value of taskToken is an empty string.
//
// Deciders should set their client side socket timeout to at least 70 seconds
// (10 seconds higher than the timeout).
//
// Because the number of workflow history events for a single workflow execution
// might be very large, the result returned might be split up across a number
// of pages. To retrieve subsequent pages, make additional calls to PollForDecisionTask
// using the nextPageToken returned by the initial call. Note that you do not
// call GetWorkflowExecutionHistory with this nextPageToken. Instead, call PollForDecisionTask
// again.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the taskList.name parameter by using a Condition element with
// the swf:taskList.name key to allow the action to access only certain task
// lists.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation PollForDecisionTask for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
// * ErrCodeLimitExceededFault "LimitExceededFault"
// Returned by any operation if a system imposed limitation has been reached.
// To address this fault you should either clean up unused resources or increase
// the limit by contacting AWS.
//
func (c *SWF) PollForDecisionTask(input *PollForDecisionTaskInput) (*PollForDecisionTaskOutput, error) {
req, out := c.PollForDecisionTaskRequest(input)
return out, req.Send()
}
// PollForDecisionTaskWithContext is the same as PollForDecisionTask with the addition of
// the ability to pass a context and additional request options.
//
// See PollForDecisionTask 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 *SWF) PollForDecisionTaskWithContext(ctx aws.Context, input *PollForDecisionTaskInput, opts ...request.Option) (*PollForDecisionTaskOutput, error) {
req, out := c.PollForDecisionTaskRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// PollForDecisionTaskPages iterates over the pages of a PollForDecisionTask operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See PollForDecisionTask 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 PollForDecisionTask operation.
// pageNum := 0
// err := client.PollForDecisionTaskPages(params,
// func(page *swf.PollForDecisionTaskOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *SWF) PollForDecisionTaskPages(input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool) error {
return c.PollForDecisionTaskPagesWithContext(aws.BackgroundContext(), input, fn)
}
// PollForDecisionTaskPagesWithContext same as PollForDecisionTaskPages 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 *SWF) PollForDecisionTaskPagesWithContext(ctx aws.Context, input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *PollForDecisionTaskInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.PollForDecisionTaskRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*PollForDecisionTaskOutput), !p.HasNextPage())
}
return p.Err()
}
const opRecordActivityTaskHeartbeat = "RecordActivityTaskHeartbeat"
// RecordActivityTaskHeartbeatRequest generates a "aws/request.Request" representing the
// client's request for the RecordActivityTaskHeartbeat 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 RecordActivityTaskHeartbeat for more information on using the RecordActivityTaskHeartbeat
// 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 RecordActivityTaskHeartbeatRequest method.
// req, resp := client.RecordActivityTaskHeartbeatRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RecordActivityTaskHeartbeatRequest(input *RecordActivityTaskHeartbeatInput) (req *request.Request, output *RecordActivityTaskHeartbeatOutput) {
op := &request.Operation{
Name: opRecordActivityTaskHeartbeat,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RecordActivityTaskHeartbeatInput{}
}
output = &RecordActivityTaskHeartbeatOutput{}
req = c.newRequest(op, input, output)
return
}
// RecordActivityTaskHeartbeat API operation for Amazon Simple Workflow Service.
//
// Used by activity workers to report to the service that the ActivityTask represented
// by the specified taskToken is still making progress. The worker can also
// specify details of the progress, for example percent complete, using the
// details parameter. This action can also be used by the worker as a mechanism
// to check if cancellation is being requested for the activity task. If a cancellation
// is being attempted for the specified task, then the boolean cancelRequested
// flag returned by the service is set to true.
//
// This action resets the taskHeartbeatTimeout clock. The taskHeartbeatTimeout
// is specified in RegisterActivityType.
//
// This action doesn't in itself create an event in the workflow execution history.
// However, if the task times out, the workflow execution history contains a
// ActivityTaskTimedOut event that contains the information from the last heartbeat
// generated by the activity worker.
//
// The taskStartToCloseTimeout of an activity type is the maximum duration of
// an activity task, regardless of the number of RecordActivityTaskHeartbeat
// requests received. The taskStartToCloseTimeout is also specified in RegisterActivityType.
//
// This operation is only useful for long-lived activities to report liveliness
// of the task and to determine if a cancellation is being attempted.
//
// If the cancelRequested flag returns true, a cancellation is being attempted.
// If the worker can cancel the activity, it should respond with RespondActivityTaskCanceled.
// Otherwise, it should ignore the cancellation request.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RecordActivityTaskHeartbeat for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) RecordActivityTaskHeartbeat(input *RecordActivityTaskHeartbeatInput) (*RecordActivityTaskHeartbeatOutput, error) {
req, out := c.RecordActivityTaskHeartbeatRequest(input)
return out, req.Send()
}
// RecordActivityTaskHeartbeatWithContext is the same as RecordActivityTaskHeartbeat with the addition of
// the ability to pass a context and additional request options.
//
// See RecordActivityTaskHeartbeat 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 *SWF) RecordActivityTaskHeartbeatWithContext(ctx aws.Context, input *RecordActivityTaskHeartbeatInput, opts ...request.Option) (*RecordActivityTaskHeartbeatOutput, error) {
req, out := c.RecordActivityTaskHeartbeatRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRegisterActivityType = "RegisterActivityType"
// RegisterActivityTypeRequest generates a "aws/request.Request" representing the
// client's request for the RegisterActivityType 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 RegisterActivityType for more information on using the RegisterActivityType
// 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 RegisterActivityTypeRequest method.
// req, resp := client.RegisterActivityTypeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RegisterActivityTypeRequest(input *RegisterActivityTypeInput) (req *request.Request, output *RegisterActivityTypeOutput) {
op := &request.Operation{
Name: opRegisterActivityType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterActivityTypeInput{}
}
output = &RegisterActivityTypeOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RegisterActivityType API operation for Amazon Simple Workflow Service.
//
// Registers a new activity type along with its configuration settings in the
// specified domain.
//
// A TypeAlreadyExists fault is returned if the type already exists in the domain.
// You cannot change any configuration settings of the type after its registration,
// and it must be registered as a new version.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. defaultTaskList.name: String constraint. The key
// is swf:defaultTaskList.name. name: String constraint. The key is swf:name.
// version: String constraint. The key is swf:version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RegisterActivityType for usage and error information.
//
// Returned Error Codes:
// * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault"
// Returned if the type already exists in the specified domain. You may get
// this fault if you are registering a type that is either already registered
// or deprecated, or if you undeprecate a type that is currently registered.
//
// * ErrCodeLimitExceededFault "LimitExceededFault"
// Returned by any operation if a system imposed limitation has been reached.
// To address this fault you should either clean up unused resources or increase
// the limit by contacting AWS.
//
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) RegisterActivityType(input *RegisterActivityTypeInput) (*RegisterActivityTypeOutput, error) {
req, out := c.RegisterActivityTypeRequest(input)
return out, req.Send()
}
// RegisterActivityTypeWithContext is the same as RegisterActivityType with the addition of
// the ability to pass a context and additional request options.
//
// See RegisterActivityType 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 *SWF) RegisterActivityTypeWithContext(ctx aws.Context, input *RegisterActivityTypeInput, opts ...request.Option) (*RegisterActivityTypeOutput, error) {
req, out := c.RegisterActivityTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRegisterDomain = "RegisterDomain"
// RegisterDomainRequest generates a "aws/request.Request" representing the
// client's request for the RegisterDomain 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 RegisterDomain for more information on using the RegisterDomain
// 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 RegisterDomainRequest method.
// req, resp := client.RegisterDomainRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RegisterDomainRequest(input *RegisterDomainInput) (req *request.Request, output *RegisterDomainOutput) {
op := &request.Operation{
Name: opRegisterDomain,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterDomainInput{}
}
output = &RegisterDomainOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RegisterDomain API operation for Amazon Simple Workflow Service.
//
// Registers a new domain.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * You cannot use an IAM policy to control domain access for this action.
// The name of the domain being registered is available as the resource of
// this action.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RegisterDomain for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDomainAlreadyExistsFault "DomainAlreadyExistsFault"
// Returned if the domain already exists. You may get this fault if you are
// registering a domain that is either already registered or deprecated, or
// if you undeprecate a domain that is currently registered.
//
// * ErrCodeLimitExceededFault "LimitExceededFault"
// Returned by any operation if a system imposed limitation has been reached.
// To address this fault you should either clean up unused resources or increase
// the limit by contacting AWS.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
// * ErrCodeTooManyTagsFault "TooManyTagsFault"
// You've exceeded the number of tags allowed for a domain.
//
func (c *SWF) RegisterDomain(input *RegisterDomainInput) (*RegisterDomainOutput, error) {
req, out := c.RegisterDomainRequest(input)
return out, req.Send()
}
// RegisterDomainWithContext is the same as RegisterDomain with the addition of
// the ability to pass a context and additional request options.
//
// See RegisterDomain 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 *SWF) RegisterDomainWithContext(ctx aws.Context, input *RegisterDomainInput, opts ...request.Option) (*RegisterDomainOutput, error) {
req, out := c.RegisterDomainRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRegisterWorkflowType = "RegisterWorkflowType"
// RegisterWorkflowTypeRequest generates a "aws/request.Request" representing the
// client's request for the RegisterWorkflowType 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 RegisterWorkflowType for more information on using the RegisterWorkflowType
// 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 RegisterWorkflowTypeRequest method.
// req, resp := client.RegisterWorkflowTypeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RegisterWorkflowTypeRequest(input *RegisterWorkflowTypeInput) (req *request.Request, output *RegisterWorkflowTypeOutput) {
op := &request.Operation{
Name: opRegisterWorkflowType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterWorkflowTypeInput{}
}
output = &RegisterWorkflowTypeOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RegisterWorkflowType API operation for Amazon Simple Workflow Service.
//
// Registers a new workflow type and its configuration settings in the specified
// domain.
//
// The retention period for the workflow history is set by the RegisterDomain
// action.
//
// If the type already exists, then a TypeAlreadyExists fault is returned. You
// cannot change the configuration settings of a workflow type once it is registered
// and it must be registered as a new version.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * Constrain the following parameters by using a Condition element with
// the appropriate keys. defaultTaskList.name: String constraint. The key
// is swf:defaultTaskList.name. name: String constraint. The key is swf:name.
// version: String constraint. The key is swf:version.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RegisterWorkflowType for usage and error information.
//
// Returned Error Codes:
// * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault"
// Returned if the type already exists in the specified domain. You may get
// this fault if you are registering a type that is either already registered
// or deprecated, or if you undeprecate a type that is currently registered.
//
// * ErrCodeLimitExceededFault "LimitExceededFault"
// Returned by any operation if a system imposed limitation has been reached.
// To address this fault you should either clean up unused resources or increase
// the limit by contacting AWS.
//
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) RegisterWorkflowType(input *RegisterWorkflowTypeInput) (*RegisterWorkflowTypeOutput, error) {
req, out := c.RegisterWorkflowTypeRequest(input)
return out, req.Send()
}
// RegisterWorkflowTypeWithContext is the same as RegisterWorkflowType with the addition of
// the ability to pass a context and additional request options.
//
// See RegisterWorkflowType 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 *SWF) RegisterWorkflowTypeWithContext(ctx aws.Context, input *RegisterWorkflowTypeInput, opts ...request.Option) (*RegisterWorkflowTypeOutput, error) {
req, out := c.RegisterWorkflowTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRequestCancelWorkflowExecution = "RequestCancelWorkflowExecution"
// RequestCancelWorkflowExecutionRequest generates a "aws/request.Request" representing the
// client's request for the RequestCancelWorkflowExecution 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 RequestCancelWorkflowExecution for more information on using the RequestCancelWorkflowExecution
// 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 RequestCancelWorkflowExecutionRequest method.
// req, resp := client.RequestCancelWorkflowExecutionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RequestCancelWorkflowExecutionRequest(input *RequestCancelWorkflowExecutionInput) (req *request.Request, output *RequestCancelWorkflowExecutionOutput) {
op := &request.Operation{
Name: opRequestCancelWorkflowExecution,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RequestCancelWorkflowExecutionInput{}
}
output = &RequestCancelWorkflowExecutionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RequestCancelWorkflowExecution API operation for Amazon Simple Workflow Service.
//
// Records a WorkflowExecutionCancelRequested event in the currently running
// workflow execution identified by the given domain, workflowId, and runId.
// This logically requests the cancellation of the workflow execution as a whole.
// It is up to the decider to take appropriate actions when it receives an execution
// history with this event.
//
// If the runId isn't specified, the WorkflowExecutionCancelRequested event
// is recorded in the history of the current open workflow execution with the
// specified workflowId in the domain.
//
// Because this action allows the workflow to properly clean up and gracefully
// close, it should be used instead of TerminateWorkflowExecution when possible.
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RequestCancelWorkflowExecution for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) RequestCancelWorkflowExecution(input *RequestCancelWorkflowExecutionInput) (*RequestCancelWorkflowExecutionOutput, error) {
req, out := c.RequestCancelWorkflowExecutionRequest(input)
return out, req.Send()
}
// RequestCancelWorkflowExecutionWithContext is the same as RequestCancelWorkflowExecution with the addition of
// the ability to pass a context and additional request options.
//
// See RequestCancelWorkflowExecution 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 *SWF) RequestCancelWorkflowExecutionWithContext(ctx aws.Context, input *RequestCancelWorkflowExecutionInput, opts ...request.Option) (*RequestCancelWorkflowExecutionOutput, error) {
req, out := c.RequestCancelWorkflowExecutionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRespondActivityTaskCanceled = "RespondActivityTaskCanceled"
// RespondActivityTaskCanceledRequest generates a "aws/request.Request" representing the
// client's request for the RespondActivityTaskCanceled 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 RespondActivityTaskCanceled for more information on using the RespondActivityTaskCanceled
// 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 RespondActivityTaskCanceledRequest method.
// req, resp := client.RespondActivityTaskCanceledRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RespondActivityTaskCanceledRequest(input *RespondActivityTaskCanceledInput) (req *request.Request, output *RespondActivityTaskCanceledOutput) {
op := &request.Operation{
Name: opRespondActivityTaskCanceled,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RespondActivityTaskCanceledInput{}
}
output = &RespondActivityTaskCanceledOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RespondActivityTaskCanceled API operation for Amazon Simple Workflow Service.
//
// Used by workers to tell the service that the ActivityTask identified by the
// taskToken was successfully canceled. Additional details can be provided using
// the details argument.
//
// These details (if provided) appear in the ActivityTaskCanceled event added
// to the workflow history.
//
// Only use this operation if the canceled flag of a RecordActivityTaskHeartbeat
// request returns true and if the activity can be safely undone or abandoned.
//
// A task is considered open from the time that it is scheduled until it is
// closed. Therefore a task is reported as open while a worker is processing
// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted,
// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed
// out (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types).
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RespondActivityTaskCanceled for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) RespondActivityTaskCanceled(input *RespondActivityTaskCanceledInput) (*RespondActivityTaskCanceledOutput, error) {
req, out := c.RespondActivityTaskCanceledRequest(input)
return out, req.Send()
}
// RespondActivityTaskCanceledWithContext is the same as RespondActivityTaskCanceled with the addition of
// the ability to pass a context and additional request options.
//
// See RespondActivityTaskCanceled 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 *SWF) RespondActivityTaskCanceledWithContext(ctx aws.Context, input *RespondActivityTaskCanceledInput, opts ...request.Option) (*RespondActivityTaskCanceledOutput, error) {
req, out := c.RespondActivityTaskCanceledRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRespondActivityTaskCompleted = "RespondActivityTaskCompleted"
// RespondActivityTaskCompletedRequest generates a "aws/request.Request" representing the
// client's request for the RespondActivityTaskCompleted 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 RespondActivityTaskCompleted for more information on using the RespondActivityTaskCompleted
// 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 RespondActivityTaskCompletedRequest method.
// req, resp := client.RespondActivityTaskCompletedRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RespondActivityTaskCompletedRequest(input *RespondActivityTaskCompletedInput) (req *request.Request, output *RespondActivityTaskCompletedOutput) {
op := &request.Operation{
Name: opRespondActivityTaskCompleted,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RespondActivityTaskCompletedInput{}
}
output = &RespondActivityTaskCompletedOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RespondActivityTaskCompleted API operation for Amazon Simple Workflow Service.
//
// Used by workers to tell the service that the ActivityTask identified by the
// taskToken completed successfully with a result (if provided). The result
// appears in the ActivityTaskCompleted event in the workflow history.
//
// If the requested task doesn't complete successfully, use RespondActivityTaskFailed
// instead. If the worker finds that the task is canceled through the canceled
// flag returned by RecordActivityTaskHeartbeat, it should cancel the task,
// clean up and then call RespondActivityTaskCanceled.
//
// A task is considered open from the time that it is scheduled until it is
// closed. Therefore a task is reported as open while a worker is processing
// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted,
// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed
// out (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types).
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RespondActivityTaskCompleted for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) RespondActivityTaskCompleted(input *RespondActivityTaskCompletedInput) (*RespondActivityTaskCompletedOutput, error) {
req, out := c.RespondActivityTaskCompletedRequest(input)
return out, req.Send()
}
// RespondActivityTaskCompletedWithContext is the same as RespondActivityTaskCompleted with the addition of
// the ability to pass a context and additional request options.
//
// See RespondActivityTaskCompleted 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 *SWF) RespondActivityTaskCompletedWithContext(ctx aws.Context, input *RespondActivityTaskCompletedInput, opts ...request.Option) (*RespondActivityTaskCompletedOutput, error) {
req, out := c.RespondActivityTaskCompletedRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRespondActivityTaskFailed = "RespondActivityTaskFailed"
// RespondActivityTaskFailedRequest generates a "aws/request.Request" representing the
// client's request for the RespondActivityTaskFailed 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 RespondActivityTaskFailed for more information on using the RespondActivityTaskFailed
// 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 RespondActivityTaskFailedRequest method.
// req, resp := client.RespondActivityTaskFailedRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RespondActivityTaskFailedRequest(input *RespondActivityTaskFailedInput) (req *request.Request, output *RespondActivityTaskFailedOutput) {
op := &request.Operation{
Name: opRespondActivityTaskFailed,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RespondActivityTaskFailedInput{}
}
output = &RespondActivityTaskFailedOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RespondActivityTaskFailed API operation for Amazon Simple Workflow Service.
//
// Used by workers to tell the service that the ActivityTask identified by the
// taskToken has failed with reason (if specified). The reason and details appear
// in the ActivityTaskFailed event added to the workflow history.
//
// A task is considered open from the time that it is scheduled until it is
// closed. Therefore a task is reported as open while a worker is processing
// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted,
// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed
// out (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types).
//
// Access Control
//
// You can use IAM policies to control this action's access to Amazon SWF resources
// as follows:
//
// * Use a Resource element with the domain name to limit the action to only
// specified domains.
//
// * Use an Action element to allow or deny permission to call this action.
//
// * You cannot use an IAM policy to constrain this action's parameters.
//
// If the caller doesn't have sufficient permissions to invoke the action, or
// the parameter values fall outside the specified constraints, the action fails.
// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
// For details and example IAM policies, see Using IAM to Manage Access to Amazon
// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
// in the Amazon SWF Developer Guide.
//
// 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 Simple Workflow Service's
// API operation RespondActivityTaskFailed for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnknownResourceFault "UnknownResourceFault"
// Returned when the named resource cannot be found with in the scope of this
// operation (region or domain). This could happen if the named resource was
// never created or is no longer available for this operation.
//
// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
// Returned when the caller doesn't have sufficient permissions to invoke the
// action.
//
func (c *SWF) RespondActivityTaskFailed(input *RespondActivityTaskFailedInput) (*RespondActivityTaskFailedOutput, error) {
req, out := c.RespondActivityTaskFailedRequest(input)
return out, req.Send()
}
// RespondActivityTaskFailedWithContext is the same as RespondActivityTaskFailed with the addition of
// the ability to pass a context and additional request options.
//
// See RespondActivityTaskFailed 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 *SWF) RespondActivityTaskFailedWithContext(ctx aws.Context, input *RespondActivityTaskFailedInput, opts ...request.Option) (*RespondActivityTaskFailedOutput, error) {
req, out := c.RespondActivityTaskFailedRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRespondDecisionTaskCompleted = "RespondDecisionTaskCompleted"
// RespondDecisionTaskCompletedRequest generates a "aws/request.Request" representing the
// client's request for the RespondDecisionTaskCompleted 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 RespondDecisionTaskCompleted for more information on using the RespondDecisionTaskCompleted
// 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 RespondDecisionTaskCompletedRequest method.
// req, resp := client.RespondDecisionTaskCompletedRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *SWF) RespondDecisionTaskCompletedRequest(input *RespondDecisionTaskCompletedInput) (req *request.Request, output *RespondDecisionTaskCompletedOutput) {
op := &request.Operation{
Name: opRespondDecisionTaskCompleted,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {