Upgrade AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2017-09-28 17:57:05 +03:00
parent 9a767b7631
commit 182c21e38c
1096 changed files with 309697 additions and 132612 deletions
+178 -180
View File
@@ -1,6 +1,5 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package sfn provides a client for AWS Step Functions.
package sfn
import (
@@ -15,19 +14,18 @@ const opCreateActivity = "CreateActivity"
// CreateActivityRequest generates a "aws/request.Request" representing the
// client's request for the CreateActivity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateActivity for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateActivity method directly
// instead.
// See CreateActivity for more information on using the CreateActivity
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateActivityRequest method.
// req, resp := client.CreateActivityRequest(params)
@@ -99,19 +97,18 @@ const opCreateStateMachine = "CreateStateMachine"
// CreateStateMachineRequest generates a "aws/request.Request" representing the
// client's request for the CreateStateMachine operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateStateMachine for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateStateMachine method directly
// instead.
// See CreateStateMachine for more information on using the CreateStateMachine
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateStateMachineRequest method.
// req, resp := client.CreateStateMachineRequest(params)
@@ -196,19 +193,18 @@ const opDeleteActivity = "DeleteActivity"
// DeleteActivityRequest generates a "aws/request.Request" representing the
// client's request for the DeleteActivity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteActivity for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteActivity method directly
// instead.
// See DeleteActivity for more information on using the DeleteActivity
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteActivityRequest method.
// req, resp := client.DeleteActivityRequest(params)
@@ -276,19 +272,18 @@ const opDeleteStateMachine = "DeleteStateMachine"
// DeleteStateMachineRequest generates a "aws/request.Request" representing the
// client's request for the DeleteStateMachine operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteStateMachine for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteStateMachine method directly
// instead.
// See DeleteStateMachine for more information on using the DeleteStateMachine
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteStateMachineRequest method.
// req, resp := client.DeleteStateMachineRequest(params)
@@ -357,19 +352,18 @@ const opDescribeActivity = "DescribeActivity"
// DescribeActivityRequest generates a "aws/request.Request" representing the
// client's request for the DescribeActivity operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeActivity for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeActivity method directly
// instead.
// See DescribeActivity for more information on using the DescribeActivity
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeActivityRequest method.
// req, resp := client.DescribeActivityRequest(params)
@@ -440,19 +434,18 @@ const opDescribeExecution = "DescribeExecution"
// DescribeExecutionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeExecution operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeExecution for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeExecution method directly
// instead.
// See DescribeExecution for more information on using the DescribeExecution
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeExecutionRequest method.
// req, resp := client.DescribeExecutionRequest(params)
@@ -523,19 +516,18 @@ const opDescribeStateMachine = "DescribeStateMachine"
// DescribeStateMachineRequest generates a "aws/request.Request" representing the
// client's request for the DescribeStateMachine operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeStateMachine for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeStateMachine method directly
// instead.
// See DescribeStateMachine for more information on using the DescribeStateMachine
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeStateMachineRequest method.
// req, resp := client.DescribeStateMachineRequest(params)
@@ -606,19 +598,18 @@ const opGetActivityTask = "GetActivityTask"
// GetActivityTaskRequest generates a "aws/request.Request" representing the
// client's request for the GetActivityTask operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See GetActivityTask for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetActivityTask method directly
// instead.
// See GetActivityTask for more information on using the GetActivityTask
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetActivityTaskRequest method.
// req, resp := client.GetActivityTaskRequest(params)
@@ -702,19 +693,18 @@ const opGetExecutionHistory = "GetExecutionHistory"
// GetExecutionHistoryRequest generates a "aws/request.Request" representing the
// client's request for the GetExecutionHistory operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See GetExecutionHistory for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetExecutionHistory method directly
// instead.
// See GetExecutionHistory for more information on using the GetExecutionHistory
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetExecutionHistoryRequest method.
// req, resp := client.GetExecutionHistoryRequest(params)
@@ -825,8 +815,12 @@ func (c *SFN) GetExecutionHistoryPages(input *GetExecutionHistoryInput, fn func(
func (c *SFN) GetExecutionHistoryPagesWithContext(ctx aws.Context, input *GetExecutionHistoryInput, fn func(*GetExecutionHistoryOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.GetExecutionHistoryRequest(&inCpy)
var inCpy *GetExecutionHistoryInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetExecutionHistoryRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -844,19 +838,18 @@ const opListActivities = "ListActivities"
// ListActivitiesRequest generates a "aws/request.Request" representing the
// client's request for the ListActivities operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See ListActivities for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListActivities method directly
// instead.
// See ListActivities for more information on using the ListActivities
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ListActivitiesRequest method.
// req, resp := client.ListActivitiesRequest(params)
@@ -959,8 +952,12 @@ func (c *SFN) ListActivitiesPages(input *ListActivitiesInput, fn func(*ListActiv
func (c *SFN) ListActivitiesPagesWithContext(ctx aws.Context, input *ListActivitiesInput, fn func(*ListActivitiesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.ListActivitiesRequest(&inCpy)
var inCpy *ListActivitiesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListActivitiesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -978,19 +975,18 @@ const opListExecutions = "ListExecutions"
// ListExecutionsRequest generates a "aws/request.Request" representing the
// client's request for the ListExecutions operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See ListExecutions for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListExecutions method directly
// instead.
// See ListExecutions for more information on using the ListExecutions
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ListExecutionsRequest method.
// req, resp := client.ListExecutionsRequest(params)
@@ -1099,8 +1095,12 @@ func (c *SFN) ListExecutionsPages(input *ListExecutionsInput, fn func(*ListExecu
func (c *SFN) ListExecutionsPagesWithContext(ctx aws.Context, input *ListExecutionsInput, fn func(*ListExecutionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.ListExecutionsRequest(&inCpy)
var inCpy *ListExecutionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListExecutionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1118,19 +1118,18 @@ const opListStateMachines = "ListStateMachines"
// ListStateMachinesRequest generates a "aws/request.Request" representing the
// client's request for the ListStateMachines operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See ListStateMachines for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListStateMachines method directly
// instead.
// See ListStateMachines for more information on using the ListStateMachines
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ListStateMachinesRequest method.
// req, resp := client.ListStateMachinesRequest(params)
@@ -1233,8 +1232,12 @@ func (c *SFN) ListStateMachinesPages(input *ListStateMachinesInput, fn func(*Lis
func (c *SFN) ListStateMachinesPagesWithContext(ctx aws.Context, input *ListStateMachinesInput, fn func(*ListStateMachinesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.ListStateMachinesRequest(&inCpy)
var inCpy *ListStateMachinesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListStateMachinesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1252,19 +1255,18 @@ const opSendTaskFailure = "SendTaskFailure"
// SendTaskFailureRequest generates a "aws/request.Request" representing the
// client's request for the SendTaskFailure operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See SendTaskFailure for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the SendTaskFailure method directly
// instead.
// See SendTaskFailure for more information on using the SendTaskFailure
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the SendTaskFailureRequest method.
// req, resp := client.SendTaskFailureRequest(params)
@@ -1336,19 +1338,18 @@ const opSendTaskHeartbeat = "SendTaskHeartbeat"
// SendTaskHeartbeatRequest generates a "aws/request.Request" representing the
// client's request for the SendTaskHeartbeat operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See SendTaskHeartbeat for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the SendTaskHeartbeat method directly
// instead.
// See SendTaskHeartbeat for more information on using the SendTaskHeartbeat
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the SendTaskHeartbeatRequest method.
// req, resp := client.SendTaskHeartbeatRequest(params)
@@ -1432,19 +1433,18 @@ const opSendTaskSuccess = "SendTaskSuccess"
// SendTaskSuccessRequest generates a "aws/request.Request" representing the
// client's request for the SendTaskSuccess operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See SendTaskSuccess for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the SendTaskSuccess method directly
// instead.
// See SendTaskSuccess for more information on using the SendTaskSuccess
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the SendTaskSuccessRequest method.
// req, resp := client.SendTaskSuccessRequest(params)
@@ -1520,19 +1520,18 @@ const opStartExecution = "StartExecution"
// StartExecutionRequest generates a "aws/request.Request" representing the
// client's request for the StartExecution operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See StartExecution for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the StartExecution method directly
// instead.
// See StartExecution for more information on using the StartExecution
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the StartExecutionRequest method.
// req, resp := client.StartExecutionRequest(params)
@@ -1619,19 +1618,18 @@ const opStopExecution = "StopExecution"
// StopExecutionRequest generates a "aws/request.Request" representing the
// client's request for the StopExecution operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See StopExecution for usage and error information.
// 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.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the StopExecution method directly
// instead.
// See StopExecution for more information on using the StopExecution
// 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.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the StopExecutionRequest method.
// req, resp := client.StopExecutionRequest(params)
+43
View File
@@ -0,0 +1,43 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package sfn provides the client and types for making API
// requests to AWS Step Functions.
//
// AWS Step Functions is a web service that enables you to coordinate the components
// of distributed applications and microservices using visual workflows. You
// build applications from individual components that each perform a discrete
// function, or task, allowing you to scale and change applications quickly.
// Step Functions provides a graphical console to visualize the components of
// your application as a series of steps. It automatically triggers and tracks
// each step, and retries when there are errors, so your application executes
// in order and as expected, every time. Step Functions logs the state of each
// step, so when things do go wrong, you can diagnose and debug problems quickly.
//
// Step Functions manages the operations and underlying infrastructure for you
// to ensure your application is available at any scale. You can run tasks on
// the AWS cloud, on your own servers, or an any system that has access to AWS.
// Step Functions can be accessed and used with the Step Functions console,
// the AWS SDKs (included with your Beta release invitation email), or an HTTP
// API (the subject of this document).
//
// See https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23 for more information on this service.
//
// See sfn package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/sfn/
//
// Using the Client
//
// To AWS Step Functions with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS Step Functions client SFN for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/sfn/#New
package sfn
+1 -1
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sfn
-391
View File
@@ -1,391 +0,0 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package sfn_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sfn"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleSFN_CreateActivity() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.CreateActivityInput{
Name: aws.String("Name"), // Required
}
resp, err := svc.CreateActivity(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_CreateStateMachine() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.CreateStateMachineInput{
Definition: aws.String("Definition"), // Required
Name: aws.String("Name"), // Required
RoleArn: aws.String("Arn"), // Required
}
resp, err := svc.CreateStateMachine(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_DeleteActivity() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.DeleteActivityInput{
ActivityArn: aws.String("Arn"), // Required
}
resp, err := svc.DeleteActivity(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_DeleteStateMachine() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.DeleteStateMachineInput{
StateMachineArn: aws.String("Arn"), // Required
}
resp, err := svc.DeleteStateMachine(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_DescribeActivity() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.DescribeActivityInput{
ActivityArn: aws.String("Arn"), // Required
}
resp, err := svc.DescribeActivity(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_DescribeExecution() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.DescribeExecutionInput{
ExecutionArn: aws.String("Arn"), // Required
}
resp, err := svc.DescribeExecution(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_DescribeStateMachine() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.DescribeStateMachineInput{
StateMachineArn: aws.String("Arn"), // Required
}
resp, err := svc.DescribeStateMachine(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_GetActivityTask() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.GetActivityTaskInput{
ActivityArn: aws.String("Arn"), // Required
WorkerName: aws.String("Name"),
}
resp, err := svc.GetActivityTask(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_GetExecutionHistory() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.GetExecutionHistoryInput{
ExecutionArn: aws.String("Arn"), // Required
MaxResults: aws.Int64(1),
NextToken: aws.String("PageToken"),
ReverseOrder: aws.Bool(true),
}
resp, err := svc.GetExecutionHistory(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_ListActivities() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.ListActivitiesInput{
MaxResults: aws.Int64(1),
NextToken: aws.String("PageToken"),
}
resp, err := svc.ListActivities(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_ListExecutions() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.ListExecutionsInput{
StateMachineArn: aws.String("Arn"), // Required
MaxResults: aws.Int64(1),
NextToken: aws.String("PageToken"),
StatusFilter: aws.String("ExecutionStatus"),
}
resp, err := svc.ListExecutions(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_ListStateMachines() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.ListStateMachinesInput{
MaxResults: aws.Int64(1),
NextToken: aws.String("PageToken"),
}
resp, err := svc.ListStateMachines(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_SendTaskFailure() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.SendTaskFailureInput{
TaskToken: aws.String("TaskToken"), // Required
Cause: aws.String("Cause"),
Error: aws.String("Error"),
}
resp, err := svc.SendTaskFailure(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_SendTaskHeartbeat() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.SendTaskHeartbeatInput{
TaskToken: aws.String("TaskToken"), // Required
}
resp, err := svc.SendTaskHeartbeat(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_SendTaskSuccess() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.SendTaskSuccessInput{
Output: aws.String("Data"), // Required
TaskToken: aws.String("TaskToken"), // Required
}
resp, err := svc.SendTaskSuccess(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_StartExecution() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.StartExecutionInput{
StateMachineArn: aws.String("Arn"), // Required
Input: aws.String("Data"),
Name: aws.String("Name"),
}
resp, err := svc.StartExecution(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleSFN_StopExecution() {
sess := session.Must(session.NewSession())
svc := sfn.New(sess)
params := &sfn.StopExecutionInput{
ExecutionArn: aws.String("Arn"), // Required
Cause: aws.String("Cause"),
Error: aws.String("Error"),
}
resp, err := svc.StopExecution(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
+6 -19
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sfn
@@ -11,25 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// AWS Step Functions is a web service that enables you to coordinate the components
// of distributed applications and microservices using visual workflows. You
// build applications from individual components that each perform a discrete
// function, or task, allowing you to scale and change applications quickly.
// Step Functions provides a graphical console to visualize the components of
// your application as a series of steps. It automatically triggers and tracks
// each step, and retries when there are errors, so your application executes
// in order and as expected, every time. Step Functions logs the state of each
// step, so when things do go wrong, you can diagnose and debug problems quickly.
// SFN provides the API operation methods for making requests to
// AWS Step Functions. See this package's package overview docs
// for details on the service.
//
// Step Functions manages the operations and underlying infrastructure for you
// to ensure your application is available at any scale. You can run tasks on
// the AWS cloud, on your own servers, or an any system that has access to AWS.
// Step Functions can be accessed and used with the Step Functions console,
// the AWS SDKs (included with your Beta release invitation email), or an HTTP
// API (the subject of this document).
// The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23
// SFN methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type SFN struct {
*client.Client
}
+2 -2
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package sfniface provides an interface to enable mocking the AWS Step Functions service client
// for testing your code.
@@ -21,7 +21,7 @@ import (
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the the SDK's request pipeline.
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS Step Functions.