aws-sdk 1.8.5 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/README.rdoc +8 -0
- data/lib/aws-sdk.rb +39 -35
- data/lib/aws/api_config/CloudFront-2012-07-01.yml +2398 -0
- data/lib/aws/api_config/DirectConnect-2012-10-25.yml +475 -0
- data/lib/aws/api_config/DynamoDB-2011-12-05.yml +8 -0
- data/lib/aws/api_config/DynamoDB-2012-08-10.yml +1516 -0
- data/lib/aws/api_config/OpsWorks-2013-02-18.yml +2 -2
- data/lib/aws/auto_scaling.rb +44 -44
- data/lib/aws/auto_scaling/activity.rb +1 -1
- data/lib/aws/auto_scaling/activity_collection.rb +14 -15
- data/lib/aws/auto_scaling/client.rb +277 -277
- data/lib/aws/auto_scaling/config.rb +1 -1
- data/lib/aws/auto_scaling/group.rb +35 -36
- data/lib/aws/auto_scaling/group_collection.rb +10 -10
- data/lib/aws/auto_scaling/group_options.rb +19 -19
- data/lib/aws/auto_scaling/instance.rb +27 -27
- data/lib/aws/auto_scaling/instance_collection.rb +10 -10
- data/lib/aws/auto_scaling/launch_configuration.rb +3 -3
- data/lib/aws/auto_scaling/launch_configuration_collection.rb +1 -1
- data/lib/aws/auto_scaling/notification_configuration.rb +2 -2
- data/lib/aws/auto_scaling/notification_configuration_collection.rb +37 -38
- data/lib/aws/auto_scaling/scaling_policy.rb +3 -3
- data/lib/aws/auto_scaling/scaling_policy_collection.rb +6 -6
- data/lib/aws/auto_scaling/scaling_policy_options.rb +8 -7
- data/lib/aws/auto_scaling/scheduled_action.rb +3 -3
- data/lib/aws/auto_scaling/scheduled_action_collection.rb +28 -28
- data/lib/aws/auto_scaling/tag_collection.rb +30 -28
- data/lib/aws/cloud_formation.rb +95 -94
- data/lib/aws/cloud_formation/client.rb +136 -133
- data/lib/aws/cloud_formation/config.rb +1 -1
- data/lib/aws/cloud_formation/stack.rb +37 -37
- data/lib/aws/cloud_formation/stack_collection.rb +28 -27
- data/lib/aws/cloud_formation/stack_event.rb +9 -11
- data/lib/aws/cloud_formation/stack_output.rb +1 -1
- data/lib/aws/cloud_formation/stack_resource.rb +6 -6
- data/lib/aws/cloud_formation/stack_resource_collection.rb +11 -12
- data/lib/aws/cloud_formation/stack_resource_summary_collection.rb +11 -11
- data/lib/aws/cloud_formation/stack_summary_collection.rb +39 -39
- data/lib/aws/cloud_front.rb +21 -21
- data/lib/aws/cloud_front/client.rb +853 -652
- data/lib/aws/cloud_front/request.rb +3 -0
- data/lib/aws/cloud_search.rb +22 -22
- data/lib/aws/cloud_search/client.rb +322 -315
- data/lib/aws/cloud_search/config.rb +1 -1
- data/lib/aws/cloud_watch.rb +39 -39
- data/lib/aws/cloud_watch/alarm.rb +55 -37
- data/lib/aws/cloud_watch/alarm_collection.rb +18 -18
- data/lib/aws/cloud_watch/alarm_history_item_collection.rb +2 -2
- data/lib/aws/cloud_watch/client.rb +360 -146
- data/lib/aws/cloud_watch/config.rb +1 -1
- data/lib/aws/cloud_watch/metric.rb +15 -15
- data/lib/aws/cloud_watch/metric_alarm_collection.rb +17 -17
- data/lib/aws/cloud_watch/metric_collection.rb +16 -16
- data/lib/aws/cloud_watch/metric_statistics.rb +11 -11
- data/lib/aws/core.rb +243 -225
- data/lib/aws/core/async_handle.rb +13 -13
- data/lib/aws/core/cacheable.rb +14 -15
- data/lib/aws/core/client.rb +40 -15
- data/lib/aws/core/collection.rb +42 -46
- data/lib/aws/core/collection/with_limit_and_next_token.rb +1 -1
- data/lib/aws/core/collection/with_next_token.rb +1 -1
- data/lib/aws/core/configuration.rb +97 -133
- data/lib/aws/core/credential_providers.rb +16 -16
- data/lib/aws/core/data.rb +23 -23
- data/lib/aws/core/http/connection_pool.rb +348 -0
- data/lib/aws/core/http/net_http_handler.rb +17 -26
- data/lib/aws/core/http/patch.rb +102 -0
- data/lib/aws/core/http/request.rb +13 -19
- data/lib/aws/core/http/response.rb +2 -2
- data/lib/aws/core/lazy_error_classes.rb +17 -17
- data/lib/aws/core/log_formatter.rb +70 -104
- data/lib/aws/core/options/json_serializer.rb +1 -1
- data/lib/aws/core/options/validator.rb +4 -4
- data/lib/aws/core/page_result.rb +8 -8
- data/lib/aws/core/policy.rb +49 -49
- data/lib/aws/core/region.rb +72 -0
- data/lib/aws/core/region_collection.rb +106 -0
- data/lib/aws/core/resource.rb +5 -5
- data/lib/aws/core/response.rb +20 -17
- data/lib/aws/core/rest_request_builder.rb +4 -4
- data/lib/aws/core/service_interface.rb +24 -2
- data/lib/aws/core/signature/version_3.rb +2 -2
- data/lib/aws/core/uri_escape.rb +1 -1
- data/lib/aws/core/xml/frame_stack.rb +1 -1
- data/lib/aws/core/xml/grammar.rb +3 -4
- data/lib/aws/core/xml/sax_handlers/libxml.rb +2 -2
- data/lib/aws/core/xml/sax_handlers/nokogiri.rb +3 -3
- data/lib/aws/core/xml/sax_handlers/rexml.rb +5 -5
- data/lib/aws/core/xml/stub.rb +9 -9
- data/lib/aws/data_pipeline.rb +21 -21
- data/lib/aws/data_pipeline/client.rb +189 -133
- data/lib/aws/data_pipeline/config.rb +1 -1
- data/lib/aws/direct_connect.rb +74 -0
- data/lib/aws/direct_connect/client.rb +253 -0
- data/lib/aws/direct_connect/config.rb +18 -0
- data/lib/aws/direct_connect/errors.rb +22 -0
- data/lib/aws/direct_connect/request.rb +27 -0
- data/lib/aws/dynamo_db.rb +71 -69
- data/lib/aws/dynamo_db/attribute_collection.rb +53 -58
- data/lib/aws/dynamo_db/batch_get.rb +23 -23
- data/lib/aws/dynamo_db/batch_write.rb +43 -43
- data/lib/aws/dynamo_db/binary.rb +9 -9
- data/lib/aws/dynamo_db/client.rb +494 -509
- data/lib/aws/dynamo_db/client_base.rb +91 -0
- data/lib/aws/dynamo_db/client_v2.rb +825 -0
- data/lib/aws/dynamo_db/config.rb +1 -1
- data/lib/aws/dynamo_db/item.rb +10 -10
- data/lib/aws/dynamo_db/item_collection.rb +75 -75
- data/lib/aws/dynamo_db/table.rb +85 -85
- data/lib/aws/dynamo_db/table_collection.rb +13 -13
- data/lib/aws/ec2.rb +132 -142
- data/lib/aws/ec2/attachment.rb +31 -36
- data/lib/aws/ec2/attachment_collection.rb +1 -1
- data/lib/aws/ec2/availability_zone.rb +4 -4
- data/lib/aws/ec2/client.rb +2272 -2125
- data/lib/aws/ec2/config.rb +1 -1
- data/lib/aws/ec2/customer_gateway.rb +6 -6
- data/lib/aws/ec2/customer_gateway_collection.rb +6 -6
- data/lib/aws/ec2/dhcp_options.rb +3 -3
- data/lib/aws/ec2/dhcp_options_collection.rb +10 -10
- data/lib/aws/ec2/elastic_ip.rb +15 -15
- data/lib/aws/ec2/elastic_ip_collection.rb +11 -15
- data/lib/aws/ec2/export_task.rb +4 -4
- data/lib/aws/ec2/export_task_collection.rb +11 -11
- data/lib/aws/ec2/filtered_collection.rb +6 -8
- data/lib/aws/ec2/image.rb +46 -40
- data/lib/aws/ec2/image_collection.rb +44 -52
- data/lib/aws/ec2/instance.rb +64 -62
- data/lib/aws/ec2/instance_collection.rb +47 -50
- data/lib/aws/ec2/internet_gateway.rb +6 -6
- data/lib/aws/ec2/internet_gateway/attachment.rb +13 -13
- data/lib/aws/ec2/internet_gateway_collection.rb +3 -3
- data/lib/aws/ec2/key_pair.rb +3 -3
- data/lib/aws/ec2/key_pair_collection.rb +12 -12
- data/lib/aws/ec2/network_acl.rb +39 -39
- data/lib/aws/ec2/network_acl/association.rb +2 -2
- data/lib/aws/ec2/network_acl/entry.rb +22 -22
- data/lib/aws/ec2/network_acl_collection.rb +2 -2
- data/lib/aws/ec2/network_interface.rb +13 -4
- data/lib/aws/ec2/network_interface/attachment.rb +3 -3
- data/lib/aws/ec2/network_interface_collection.rb +5 -5
- data/lib/aws/ec2/permission_collection.rb +1 -1
- data/lib/aws/ec2/region.rb +6 -6
- data/lib/aws/ec2/region_collection.rb +1 -1
- data/lib/aws/ec2/reserved_instances_collection.rb +2 -2
- data/lib/aws/ec2/reserved_instances_offering_collection.rb +2 -2
- data/lib/aws/ec2/resource_tag_collection.rb +5 -5
- data/lib/aws/ec2/route_table.rb +14 -14
- data/lib/aws/ec2/route_table/association.rb +22 -22
- data/lib/aws/ec2/route_table/route.rb +8 -8
- data/lib/aws/ec2/route_table_collection.rb +3 -3
- data/lib/aws/ec2/security_group.rb +39 -41
- data/lib/aws/ec2/security_group_collection.rb +19 -21
- data/lib/aws/ec2/snapshot.rb +3 -3
- data/lib/aws/ec2/snapshot_collection.rb +11 -12
- data/lib/aws/ec2/subnet.rb +2 -2
- data/lib/aws/ec2/subnet_collection.rb +17 -17
- data/lib/aws/ec2/tag_collection.rb +1 -1
- data/lib/aws/ec2/tagged_collection.rb +7 -7
- data/lib/aws/ec2/tagged_item.rb +10 -10
- data/lib/aws/ec2/volume.rb +16 -16
- data/lib/aws/ec2/volume_collection.rb +9 -12
- data/lib/aws/ec2/vpc.rb +6 -6
- data/lib/aws/ec2/vpc_collection.rb +10 -10
- data/lib/aws/ec2/vpn_connection.rb +4 -4
- data/lib/aws/ec2/vpn_connection/telemetry.rb +1 -1
- data/lib/aws/ec2/vpn_connection_collection.rb +6 -6
- data/lib/aws/ec2/vpn_gateway.rb +2 -2
- data/lib/aws/ec2/vpn_gateway_collection.rb +5 -5
- data/lib/aws/elastic_beanstalk.rb +12 -12
- data/lib/aws/elastic_beanstalk/client.rb +376 -368
- data/lib/aws/elastic_beanstalk/config.rb +1 -1
- data/lib/aws/elastic_transcoder.rb +5 -5
- data/lib/aws/elastic_transcoder/client.rb +283 -283
- data/lib/aws/elastic_transcoder/config.rb +1 -1
- data/lib/aws/elasticache.rb +12 -12
- data/lib/aws/elasticache/client.rb +484 -479
- data/lib/aws/elasticache/config.rb +1 -1
- data/lib/aws/elb.rb +23 -23
- data/lib/aws/elb/availability_zone_collection.rb +34 -34
- data/lib/aws/elb/backend_server_policy_collection.rb +24 -24
- data/lib/aws/elb/client.rb +153 -153
- data/lib/aws/elb/config.rb +1 -1
- data/lib/aws/elb/errors.rb +1 -1
- data/lib/aws/elb/instance_collection.rb +20 -25
- data/lib/aws/elb/listener.rb +3 -3
- data/lib/aws/elb/listener_collection.rb +8 -8
- data/lib/aws/elb/load_balancer.rb +15 -16
- data/lib/aws/elb/load_balancer_collection.rb +36 -24
- data/lib/aws/elb/load_balancer_policy.rb +1 -1
- data/lib/aws/elb/load_balancer_policy_collection.rb +5 -5
- data/lib/aws/emr.rb +28 -26
- data/lib/aws/emr/client.rb +165 -149
- data/lib/aws/emr/config.rb +1 -1
- data/lib/aws/emr/instance_group.rb +1 -1
- data/lib/aws/emr/instance_group_collection.rb +1 -1
- data/lib/aws/emr/job_flow.rb +27 -26
- data/lib/aws/emr/job_flow_collection.rb +34 -34
- data/lib/aws/errors.rb +7 -7
- data/lib/aws/glacier.rb +21 -21
- data/lib/aws/glacier/archive_collection.rb +2 -2
- data/lib/aws/glacier/client.rb +139 -140
- data/lib/aws/glacier/config.rb +1 -1
- data/lib/aws/glacier/vault.rb +2 -2
- data/lib/aws/glacier/vault_collection.rb +1 -1
- data/lib/aws/iam.rb +133 -144
- data/lib/aws/iam/access_key.rb +17 -17
- data/lib/aws/iam/access_key_collection.rb +22 -22
- data/lib/aws/iam/account_alias_collection.rb +2 -2
- data/lib/aws/iam/client.rb +429 -420
- data/lib/aws/iam/collection.rb +1 -1
- data/lib/aws/iam/config.rb +2 -2
- data/lib/aws/iam/group.rb +8 -8
- data/lib/aws/iam/group_collection.rb +16 -16
- data/lib/aws/iam/group_policy_collection.rb +6 -6
- data/lib/aws/iam/group_user_collection.rb +3 -3
- data/lib/aws/iam/mfa_device.rb +1 -1
- data/lib/aws/iam/mfa_device_collection.rb +9 -9
- data/lib/aws/iam/policy_collection.rb +4 -4
- data/lib/aws/iam/resource.rb +2 -2
- data/lib/aws/iam/server_certificate.rb +1 -1
- data/lib/aws/iam/server_certificate_collection.rb +15 -15
- data/lib/aws/iam/signing_certificate.rb +29 -29
- data/lib/aws/iam/signing_certificate_collection.rb +23 -23
- data/lib/aws/iam/user.rb +33 -38
- data/lib/aws/iam/user_collection.rb +27 -27
- data/lib/aws/iam/user_group_collection.rb +3 -3
- data/lib/aws/iam/user_policy_collection.rb +6 -6
- data/lib/aws/iam/virtual_mfa_device.rb +12 -12
- data/lib/aws/iam/virtual_mfa_device_collection.rb +4 -4
- data/lib/aws/import_export.rb +22 -21
- data/lib/aws/import_export/client.rb +47 -43
- data/lib/aws/ops_works.rb +5 -5
- data/lib/aws/ops_works/client.rb +484 -438
- data/lib/aws/ops_works/config.rb +1 -1
- data/lib/aws/rails.rb +34 -34
- data/lib/aws/rds.rb +18 -18
- data/lib/aws/rds/client.rb +1286 -1277
- data/lib/aws/rds/config.rb +1 -1
- data/lib/aws/rds/db_instance.rb +15 -4
- data/lib/aws/rds/db_snapshot.rb +1 -1
- data/lib/aws/record.rb +50 -24
- data/lib/aws/record/abstract_base.rb +52 -60
- data/lib/aws/record/attributes.rb +79 -79
- data/lib/aws/record/conversion.rb +1 -1
- data/lib/aws/record/dirty_tracking.rb +69 -67
- data/lib/aws/record/errors.rb +21 -21
- data/lib/aws/record/exceptions.rb +2 -2
- data/lib/aws/record/hash_model.rb +20 -21
- data/lib/aws/record/hash_model/attributes.rb +13 -15
- data/lib/aws/record/hash_model/finder_methods.rb +46 -46
- data/lib/aws/record/hash_model/scope.rb +31 -31
- data/lib/aws/record/model.rb +136 -136
- data/lib/aws/record/model/attributes.rb +57 -59
- data/lib/aws/record/model/finder_methods.rb +67 -67
- data/lib/aws/record/model/scope.rb +48 -49
- data/lib/aws/record/naming.rb +1 -1
- data/lib/aws/record/scope.rb +23 -19
- data/lib/aws/record/validations.rb +253 -271
- data/lib/aws/record/validator.rb +3 -3
- data/lib/aws/record/validators/acceptance.rb +1 -3
- data/lib/aws/record/validators/block.rb +1 -3
- data/lib/aws/record/validators/confirmation.rb +1 -3
- data/lib/aws/record/validators/count.rb +2 -4
- data/lib/aws/record/validators/exclusion.rb +2 -4
- data/lib/aws/record/validators/format.rb +2 -4
- data/lib/aws/record/validators/inclusion.rb +1 -3
- data/lib/aws/record/validators/length.rb +5 -7
- data/lib/aws/record/validators/method.rb +1 -3
- data/lib/aws/record/validators/numericality.rb +6 -8
- data/lib/aws/record/validators/presence.rb +1 -3
- data/lib/aws/redshift.rb +14 -14
- data/lib/aws/redshift/client.rb +596 -592
- data/lib/aws/redshift/config.rb +1 -1
- data/lib/aws/route_53.rb +30 -30
- data/lib/aws/route_53/change_batch.rb +7 -7
- data/lib/aws/route_53/client.rb +188 -152
- data/lib/aws/route_53/hosted_zone.rb +4 -4
- data/lib/aws/route_53/hosted_zone_collection.rb +7 -7
- data/lib/aws/route_53/resource_record_set.rb +10 -10
- data/lib/aws/route_53/resource_record_set_collection.rb +6 -6
- data/lib/aws/s3.rb +79 -79
- data/lib/aws/s3/access_control_list.rb +44 -36
- data/lib/aws/s3/acl_options.rb +51 -51
- data/lib/aws/s3/bucket.rb +146 -146
- data/lib/aws/s3/bucket_collection.rb +21 -21
- data/lib/aws/s3/bucket_lifecycle_configuration.rb +81 -82
- data/lib/aws/s3/bucket_tag_collection.rb +4 -2
- data/lib/aws/s3/cipher_io.rb +5 -4
- data/lib/aws/s3/client.rb +89 -84
- data/lib/aws/s3/client/xml.rb +1 -1
- data/lib/aws/s3/config.rb +7 -1
- data/lib/aws/s3/cors_rule.rb +2 -0
- data/lib/aws/s3/cors_rule_collection.rb +42 -40
- data/lib/aws/s3/data_options.rb +16 -11
- data/lib/aws/s3/encryption_utils.rb +2 -2
- data/lib/aws/s3/errors.rb +7 -7
- data/lib/aws/s3/multipart_upload.rb +30 -33
- data/lib/aws/s3/multipart_upload_collection.rb +8 -6
- data/lib/aws/s3/object_collection.rb +35 -35
- data/lib/aws/s3/object_metadata.rb +6 -6
- data/lib/aws/s3/object_version.rb +4 -4
- data/lib/aws/s3/object_version_collection.rb +15 -15
- data/lib/aws/s3/policy.rb +2 -2
- data/lib/aws/s3/prefixed_collection.rb +9 -5
- data/lib/aws/s3/presigned_post.rb +39 -37
- data/lib/aws/s3/request.rb +11 -11
- data/lib/aws/s3/s3_object.rb +210 -200
- data/lib/aws/s3/tree.rb +25 -27
- data/lib/aws/s3/tree/child_collection.rb +3 -3
- data/lib/aws/s3/tree/leaf_node.rb +2 -2
- data/lib/aws/s3/tree/parent.rb +1 -1
- data/lib/aws/s3/website_configuration.rb +13 -13
- data/lib/aws/simple_db.rb +83 -83
- data/lib/aws/simple_db/attribute.rb +9 -7
- data/lib/aws/simple_db/attribute_collection.rb +22 -13
- data/lib/aws/simple_db/client.rb +107 -107
- data/lib/aws/simple_db/config.rb +7 -1
- data/lib/aws/simple_db/consistent_read_option.rb +5 -5
- data/lib/aws/simple_db/domain.rb +4 -2
- data/lib/aws/simple_db/domain_collection.rb +4 -4
- data/lib/aws/simple_db/domain_metadata.rb +5 -5
- data/lib/aws/simple_db/errors.rb +9 -9
- data/lib/aws/simple_db/item.rb +5 -5
- data/lib/aws/simple_db/item_collection.rb +83 -81
- data/lib/aws/simple_db/item_data.rb +4 -4
- data/lib/aws/simple_db/put_attributes.rb +3 -3
- data/lib/aws/simple_email_service.rb +140 -140
- data/lib/aws/simple_email_service/client.rb +82 -76
- data/lib/aws/simple_email_service/config.rb +1 -2
- data/lib/aws/simple_email_service/email_address_collection.rb +3 -3
- data/lib/aws/simple_email_service/identity.rb +8 -8
- data/lib/aws/simple_email_service/quotas.rb +8 -6
- data/lib/aws/simple_workflow.rb +106 -106
- data/lib/aws/simple_workflow/activity_task.rb +15 -22
- data/lib/aws/simple_workflow/activity_task_collection.rb +15 -15
- data/lib/aws/simple_workflow/activity_type.rb +23 -23
- data/lib/aws/simple_workflow/activity_type_collection.rb +23 -23
- data/lib/aws/simple_workflow/client.rb +1004 -956
- data/lib/aws/simple_workflow/config.rb +1 -1
- data/lib/aws/simple_workflow/count.rb +5 -5
- data/lib/aws/simple_workflow/decision_task.rb +129 -129
- data/lib/aws/simple_workflow/decision_task_collection.rb +59 -59
- data/lib/aws/simple_workflow/domain.rb +11 -11
- data/lib/aws/simple_workflow/domain_collection.rb +26 -26
- data/lib/aws/simple_workflow/history_event.rb +32 -32
- data/lib/aws/simple_workflow/history_event_collection.rb +3 -3
- data/lib/aws/simple_workflow/option_formatters.rb +5 -5
- data/lib/aws/simple_workflow/request.rb +1 -1
- data/lib/aws/simple_workflow/resource.rb +1 -1
- data/lib/aws/simple_workflow/type.rb +8 -8
- data/lib/aws/simple_workflow/type_collection.rb +15 -15
- data/lib/aws/simple_workflow/workflow_execution.rb +70 -72
- data/lib/aws/simple_workflow/workflow_execution_collection.rb +130 -130
- data/lib/aws/simple_workflow/workflow_type.rb +27 -25
- data/lib/aws/simple_workflow/workflow_type_collection.rb +20 -20
- data/lib/aws/sns.rb +25 -25
- data/lib/aws/sns/client.rb +55 -55
- data/lib/aws/sns/config.rb +1 -1
- data/lib/aws/sns/policy.rb +1 -1
- data/lib/aws/sns/subscription.rb +7 -7
- data/lib/aws/sns/subscription_collection.rb +5 -5
- data/lib/aws/sns/topic.rb +49 -49
- data/lib/aws/sns/topic_collection.rb +2 -2
- data/lib/aws/sns/topic_subscription_collection.rb +5 -5
- data/lib/aws/sqs.rb +20 -20
- data/lib/aws/sqs/client.rb +78 -78
- data/lib/aws/sqs/config.rb +1 -1
- data/lib/aws/sqs/errors.rb +12 -12
- data/lib/aws/sqs/queue.rb +66 -67
- data/lib/aws/sqs/queue_collection.rb +16 -8
- data/lib/aws/sqs/received_message.rb +7 -6
- data/lib/aws/storage_gateway.rb +21 -21
- data/lib/aws/storage_gateway/client.rb +269 -202
- data/lib/aws/storage_gateway/config.rb +1 -1
- data/lib/aws/sts.rb +10 -8
- data/lib/aws/sts/client.rb +35 -35
- data/lib/aws/sts/session.rb +3 -3
- data/lib/aws/version.rb +1 -2
- metadata +23 -21
- data/lib/aws/core/autoloader.rb +0 -64
- data/lib/net/http/connection_pool.rb +0 -226
- data/lib/net/http/connection_pool/connection.rb +0 -189
- data/lib/net/http/connection_pool/session.rb +0 -126
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
module AWS
|
|
15
15
|
class SimpleWorkflow
|
|
16
16
|
|
|
17
|
-
# Simple Workflow returns counts that may be truncated. Truncated
|
|
18
|
-
# counts indicate a lower bound. A count of 100 that is truncated
|
|
19
|
-
# could be represented to a user like "100+". Non-truncated counts
|
|
17
|
+
# Simple Workflow returns counts that may be truncated. Truncated
|
|
18
|
+
# counts indicate a lower bound. A count of 100 that is truncated
|
|
19
|
+
# could be represented to a user like "100+". Non-truncated counts
|
|
20
20
|
# are definitive.
|
|
21
21
|
class Count
|
|
22
22
|
|
|
@@ -37,8 +37,8 @@ module AWS
|
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def == other
|
|
40
|
-
other.is_a?(Count) and
|
|
41
|
-
other.count == self.count and
|
|
40
|
+
other.is_a?(Count) and
|
|
41
|
+
other.count == self.count and
|
|
42
42
|
other.truncated? == self.truncated?
|
|
43
43
|
end
|
|
44
44
|
|
|
@@ -14,43 +14,43 @@
|
|
|
14
14
|
module AWS
|
|
15
15
|
class SimpleWorkflow
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# ## Getting Decision Tasks
|
|
18
18
|
#
|
|
19
19
|
# You can use #poll or #poll_for_single_task on {DecisionTaskCollection}
|
|
20
20
|
# to grab a decision task:
|
|
21
21
|
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
22
|
+
# # get a single task
|
|
23
|
+
# if task = domain.decision_tasks.poll_for_single_task('task-list')
|
|
24
|
+
# # make decisions
|
|
25
|
+
# task.complete!
|
|
26
|
+
# end
|
|
27
27
|
#
|
|
28
28
|
# See {DecisionTaskCollection} for more information on getting and
|
|
29
29
|
# counting decision tasks.
|
|
30
30
|
#
|
|
31
|
-
#
|
|
31
|
+
# ## Exploring Event History
|
|
32
32
|
#
|
|
33
|
-
# Once you have a decision task you can examine the event history.
|
|
33
|
+
# Once you have a decision task you can examine the event history.
|
|
34
34
|
# This can give you the information you need to make decisions.
|
|
35
35
|
# The {#events} and {#new_events} methods enumerate through
|
|
36
36
|
# all events or events since the last decision.
|
|
37
37
|
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
38
|
+
# decision_task.new_events.each do |event|
|
|
39
|
+
# # inspect the #event_type and #attributes
|
|
40
|
+
# end
|
|
41
|
+
#
|
|
42
42
|
# Check out {HistoryEvent} for more information on working with
|
|
43
43
|
# events.
|
|
44
44
|
#
|
|
45
|
-
#
|
|
45
|
+
# ## Making Decisions
|
|
46
46
|
#
|
|
47
47
|
# Based on the history of events, you should make decisions by calling
|
|
48
48
|
# methods listed below. You can call each method as many times as
|
|
49
49
|
# you wish, until you have completed the decision task.
|
|
50
|
-
#
|
|
50
|
+
#
|
|
51
51
|
# * {#schedule_activity_task}
|
|
52
52
|
# * {#request_cancel_activity_task}
|
|
53
|
-
#
|
|
53
|
+
#
|
|
54
54
|
# * {#complete_workflow_execution}
|
|
55
55
|
# * {#cancel_workflow_execution}
|
|
56
56
|
# * {#fail_workflow_execution}
|
|
@@ -66,23 +66,23 @@ module AWS
|
|
|
66
66
|
#
|
|
67
67
|
# The decision methods are grouped above by concern.
|
|
68
68
|
#
|
|
69
|
-
#
|
|
69
|
+
# ## Completing the Decision Task
|
|
70
70
|
#
|
|
71
71
|
# Once you have finished adding decisions to the task, you need to
|
|
72
|
-
# complete it. If you called {DecisionTaskCollection#poll} or
|
|
72
|
+
# complete it. If you called {DecisionTaskCollection#poll} or
|
|
73
73
|
# {DecisionTaskCollection#poll_for_single_task} with a block
|
|
74
74
|
# argument then the decision will be completed automatically at the
|
|
75
75
|
# end of the block.
|
|
76
76
|
#
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
#
|
|
77
|
+
# domain.decision_tasks.poll do |decision_task|
|
|
78
|
+
# # ...
|
|
79
|
+
# end #=> the decision task is closed here
|
|
80
80
|
#
|
|
81
81
|
# If you get a task from {DecisionTaskCollection#poll_for_single_task}
|
|
82
82
|
# without a block, then it is your responsibility to call {#complete!}
|
|
83
83
|
# on the decision task. If you fail to do this before the
|
|
84
|
-
# task start to close timeout, then a decisionTaskTimedOut event
|
|
85
|
-
# will be added to the workflow execution history.
|
|
84
|
+
# task start to close timeout, then a decisionTaskTimedOut event
|
|
85
|
+
# will be added to the workflow execution history.
|
|
86
86
|
#
|
|
87
87
|
class DecisionTask
|
|
88
88
|
|
|
@@ -113,7 +113,7 @@ module AWS
|
|
|
113
113
|
@next_token = data['nextPageToken']
|
|
114
114
|
|
|
115
115
|
@events = data['events']
|
|
116
|
-
|
|
116
|
+
|
|
117
117
|
@decisions = []
|
|
118
118
|
|
|
119
119
|
super
|
|
@@ -132,18 +132,18 @@ module AWS
|
|
|
132
132
|
# @return [WorkflowType]
|
|
133
133
|
attr_reader :workflow_type
|
|
134
134
|
|
|
135
|
-
# @return [Integer] The id of the DecisionTaskStarted event of the
|
|
136
|
-
# previous decision task of this workflow execution that was
|
|
137
|
-
# processed by the decider. This can be used to determine the new
|
|
138
|
-
# events in the history new since the last decision task received
|
|
135
|
+
# @return [Integer] The id of the DecisionTaskStarted event of the
|
|
136
|
+
# previous decision task of this workflow execution that was
|
|
137
|
+
# processed by the decider. This can be used to determine the new
|
|
138
|
+
# events in the history new since the last decision task received
|
|
139
139
|
# by the decider.
|
|
140
140
|
attr_reader :previous_started_event_id
|
|
141
141
|
|
|
142
|
-
# @return [Integer] The id of the DecisionTaskStarted event recorded
|
|
142
|
+
# @return [Integer] The id of the DecisionTaskStarted event recorded
|
|
143
143
|
# in the history.
|
|
144
144
|
attr_reader :started_event_id
|
|
145
145
|
|
|
146
|
-
# @return [String,nil] Returns a value if the results are paginated.
|
|
146
|
+
# @return [String,nil] Returns a value if the results are paginated.
|
|
147
147
|
# Normally you do not need this value, as {#events} will enumerate
|
|
148
148
|
# all events, making requests as necessary to get more.
|
|
149
149
|
attr_reader :next_token
|
|
@@ -156,14 +156,14 @@ module AWS
|
|
|
156
156
|
|
|
157
157
|
# @return [Enumerable] Returns an enumerable collection of only the
|
|
158
158
|
# new events for workflow execution (since the last decision).
|
|
159
|
-
def new_events
|
|
159
|
+
def new_events
|
|
160
160
|
enum_for(:_new_events)
|
|
161
161
|
end
|
|
162
162
|
|
|
163
163
|
# @param [Hash] options
|
|
164
164
|
#
|
|
165
|
-
# @option options [String] :execution_context (nil) A user-defined
|
|
166
|
-
# context to add to the workflow execution. You can fetch this
|
|
165
|
+
# @option options [String] :execution_context (nil) A user-defined
|
|
166
|
+
# context to add to the workflow execution. You can fetch this
|
|
167
167
|
# later with {WorkflowExecution#latest_execution_context}.
|
|
168
168
|
#
|
|
169
169
|
# @return [nil]
|
|
@@ -188,67 +188,67 @@ module AWS
|
|
|
188
188
|
def responded?
|
|
189
189
|
!!@responded
|
|
190
190
|
end
|
|
191
|
-
|
|
191
|
+
|
|
192
192
|
# Schedules an activity task.
|
|
193
193
|
#
|
|
194
194
|
# @note This adds a decision to this task that is finalized when you
|
|
195
195
|
# call {#complete!}.
|
|
196
196
|
#
|
|
197
197
|
# @param [ActivityType,Hash] activity_type The type of activity
|
|
198
|
-
# to schedule.
|
|
199
|
-
# or a hash with
|
|
198
|
+
# to schedule. `activity_type` must be an {ActivityType} object
|
|
199
|
+
# or a hash with `:name` and `:version`.
|
|
200
200
|
#
|
|
201
201
|
# @param [Hash] options
|
|
202
202
|
#
|
|
203
|
-
# @option options [String] :control (nil) Optional data attached to
|
|
204
|
-
# the event that can be used by the decider in subsequent workflow
|
|
203
|
+
# @option options [String] :control (nil) Optional data attached to
|
|
204
|
+
# the event that can be used by the decider in subsequent workflow
|
|
205
205
|
# tasks. This data is not sent to the activity.
|
|
206
206
|
#
|
|
207
207
|
# @option options [Integer,:none] :heartbeat_timeout (nil)
|
|
208
|
-
# The maximum time before which a worker processing a task
|
|
209
|
-
# of this type must report progress. If the timeout is exceeded,
|
|
210
|
-
# the activity task is automatically timed out. If the worker
|
|
211
|
-
# subsequently attempts to record a heartbeat or returns a
|
|
212
|
-
# result, it will be ignored. This default can be overridden when
|
|
208
|
+
# The maximum time before which a worker processing a task
|
|
209
|
+
# of this type must report progress. If the timeout is exceeded,
|
|
210
|
+
# the activity task is automatically timed out. If the worker
|
|
211
|
+
# subsequently attempts to record a heartbeat or returns a
|
|
212
|
+
# result, it will be ignored. This default can be overridden when
|
|
213
213
|
# scheduling an activity task.
|
|
214
214
|
#
|
|
215
215
|
# The value should be a number of seconds (integer) or the symbol
|
|
216
|
-
#
|
|
216
|
+
# `:none` (implying no timeout).
|
|
217
217
|
#
|
|
218
|
-
# @option options [String] :input (nil) Input provided to the
|
|
218
|
+
# @option options [String] :input (nil) Input provided to the
|
|
219
219
|
# activity task.
|
|
220
220
|
#
|
|
221
|
-
# @option options [Integer,:none] :schedule_to_close_timeout (nil)
|
|
222
|
-
# The maximum duration that a task of this activity type
|
|
223
|
-
# can wait before being assigned to a worker.
|
|
221
|
+
# @option options [Integer,:none] :schedule_to_close_timeout (nil)
|
|
222
|
+
# The maximum duration that a task of this activity type
|
|
223
|
+
# can wait before being assigned to a worker.
|
|
224
224
|
#
|
|
225
|
-
# A schedule-to-close timeout for this activity task must be
|
|
226
|
-
# specified either as a default for the activity type or through
|
|
227
|
-
# this option. If neither this field is set nor a default was
|
|
225
|
+
# A schedule-to-close timeout for this activity task must be
|
|
226
|
+
# specified either as a default for the activity type or through
|
|
227
|
+
# this option. If neither this field is set nor a default was
|
|
228
228
|
# specified at registration time then a fault will be returned.
|
|
229
229
|
#
|
|
230
230
|
# The value should be a number of seconds (integer) or the symbol
|
|
231
|
-
#
|
|
231
|
+
# `:none` (implying no timeout).
|
|
232
232
|
#
|
|
233
233
|
# @option options [Integer,:none] :schedule_to_start_timeout (nil)
|
|
234
|
-
# The maximum duration that a task of this activity type
|
|
235
|
-
# can wait before being assigned to a worker. This overrides the
|
|
234
|
+
# The maximum duration that a task of this activity type
|
|
235
|
+
# can wait before being assigned to a worker. This overrides the
|
|
236
236
|
# default timeout specified when registering the activity type.
|
|
237
237
|
#
|
|
238
238
|
# The value should be a number of seconds (integer) or the symbol
|
|
239
|
-
#
|
|
239
|
+
# `:none` (implying no timeout).
|
|
240
240
|
#
|
|
241
241
|
# @option options [Integer,:none] :start_to_close_timeout (nil)
|
|
242
|
-
# The maximum duration that a worker can take to process
|
|
243
|
-
# tasks of this activity type. This overrides the default
|
|
242
|
+
# The maximum duration that a worker can take to process
|
|
243
|
+
# tasks of this activity type. This overrides the default
|
|
244
244
|
# timeout specified when registering the activity type.
|
|
245
245
|
#
|
|
246
246
|
# The value should be a number of seconds (integer) or the symbol
|
|
247
|
-
#
|
|
247
|
+
# `:none` (implying no timeout).
|
|
248
248
|
#
|
|
249
249
|
# @option options [String] :task_list (nil)
|
|
250
|
-
# If set, specifies the name of the task list in which to schedule
|
|
251
|
-
# the activity task. If not specified, the default task list
|
|
250
|
+
# If set, specifies the name of the task list in which to schedule
|
|
251
|
+
# the activity task. If not specified, the default task list
|
|
252
252
|
# registered with the activity type will be used.
|
|
253
253
|
#
|
|
254
254
|
# @return [nil]
|
|
@@ -258,8 +258,8 @@ module AWS
|
|
|
258
258
|
options[:activity_id] ||= UUIDTools::UUID.random_create.to_s
|
|
259
259
|
|
|
260
260
|
options[:activity_type] = case activity_type
|
|
261
|
-
when Hash
|
|
262
|
-
unless
|
|
261
|
+
when Hash
|
|
262
|
+
unless
|
|
263
263
|
activity_type[:name].is_a?(String) and
|
|
264
264
|
activity_type[:version].is_a?(String) and
|
|
265
265
|
activity_type.keys.length == 2
|
|
@@ -272,10 +272,10 @@ module AWS
|
|
|
272
272
|
{ :name => activity_type.name, :version => activity_type.version }
|
|
273
273
|
else
|
|
274
274
|
msg = 'expected activity_type to be an ActivityType object or a hash'
|
|
275
|
-
raise ArgumentError, msg
|
|
275
|
+
raise ArgumentError, msg
|
|
276
276
|
end
|
|
277
277
|
|
|
278
|
-
duration_opts(options,
|
|
278
|
+
duration_opts(options,
|
|
279
279
|
:heartbeat_timeout,
|
|
280
280
|
:schedule_to_close_timeout,
|
|
281
281
|
:schedule_to_start_timeout,
|
|
@@ -286,17 +286,17 @@ module AWS
|
|
|
286
286
|
end
|
|
287
287
|
|
|
288
288
|
add_decision :schedule_activity_task, options
|
|
289
|
-
|
|
289
|
+
|
|
290
290
|
end
|
|
291
291
|
|
|
292
|
-
# Attempts to cancel a previously scheduled activity task. If the
|
|
293
|
-
# activity task was scheduled but has not been assigned to a worker,
|
|
294
|
-
# then it will be canceled. If the activity task was already assigned
|
|
295
|
-
# to a worker, then the worker will be informed that cancellation has
|
|
292
|
+
# Attempts to cancel a previously scheduled activity task. If the
|
|
293
|
+
# activity task was scheduled but has not been assigned to a worker,
|
|
294
|
+
# then it will be canceled. If the activity task was already assigned
|
|
295
|
+
# to a worker, then the worker will be informed that cancellation has
|
|
296
296
|
# been requested when recording the activity task heartbeat.
|
|
297
297
|
#
|
|
298
298
|
# @param [ActivityTask,String] activity_or_activity_id An {ActivityTask}
|
|
299
|
-
# object or the activity_id of an activity task to request
|
|
299
|
+
# object or the activity_id of an activity task to request
|
|
300
300
|
# cancellation for.
|
|
301
301
|
#
|
|
302
302
|
# @return [nil]
|
|
@@ -311,12 +311,12 @@ module AWS
|
|
|
311
311
|
|
|
312
312
|
end
|
|
313
313
|
|
|
314
|
-
# Closes the workflow execution and records a
|
|
314
|
+
# Closes the workflow execution and records a
|
|
315
315
|
# WorkflowExecutionCompleted event in the history.
|
|
316
316
|
#
|
|
317
317
|
# @param [Hash] options
|
|
318
318
|
#
|
|
319
|
-
# @option options [String] :result (nil) The results of the workflow
|
|
319
|
+
# @option options [String] :result (nil) The results of the workflow
|
|
320
320
|
# execution.
|
|
321
321
|
#
|
|
322
322
|
# @return [nil]
|
|
@@ -325,7 +325,7 @@ module AWS
|
|
|
325
325
|
add_decision :complete_workflow_execution, options
|
|
326
326
|
end
|
|
327
327
|
|
|
328
|
-
# Closes the workflow execution and records a WorkflowExecutionFailed
|
|
328
|
+
# Closes the workflow execution and records a WorkflowExecutionFailed
|
|
329
329
|
# event in the history.
|
|
330
330
|
#
|
|
331
331
|
# @param [Hash] options
|
|
@@ -340,12 +340,12 @@ module AWS
|
|
|
340
340
|
add_decision :fail_workflow_execution, options
|
|
341
341
|
end
|
|
342
342
|
|
|
343
|
-
# Closes the workflow execution and records a
|
|
343
|
+
# Closes the workflow execution and records a
|
|
344
344
|
# WorkflowExecutionCanceled event in the history.
|
|
345
345
|
#
|
|
346
346
|
# @param [Hash] options
|
|
347
|
-
#
|
|
348
|
-
# @option options [String] :details (nil) Optional details of the
|
|
347
|
+
#
|
|
348
|
+
# @option options [String] :details (nil) Optional details of the
|
|
349
349
|
# cancellation.
|
|
350
350
|
#
|
|
351
351
|
# @return [nil]
|
|
@@ -354,57 +354,57 @@ module AWS
|
|
|
354
354
|
add_decision :cancel_workflow_execution, options
|
|
355
355
|
end
|
|
356
356
|
|
|
357
|
-
# Closes the workflow execution and starts a new workflow execution
|
|
358
|
-
# of the same type using the same workflow id and a unique run Id.
|
|
357
|
+
# Closes the workflow execution and starts a new workflow execution
|
|
358
|
+
# of the same type using the same workflow id and a unique run Id.
|
|
359
359
|
# A WorkflowExecutionContinuedAsNew event is recorded in the history.
|
|
360
360
|
#
|
|
361
361
|
# @option options [String] :input (nil)
|
|
362
|
-
# The input for the workflow execution. This is a free form string
|
|
363
|
-
# which should be meaningful to the workflow you are starting.
|
|
364
|
-
# This input is made available to the new workflow execution in the
|
|
362
|
+
# The input for the workflow execution. This is a free form string
|
|
363
|
+
# which should be meaningful to the workflow you are starting.
|
|
364
|
+
# This input is made available to the new workflow execution in the
|
|
365
365
|
# WorkflowExecutionStarted history event.
|
|
366
|
-
#
|
|
366
|
+
#
|
|
367
367
|
# @option options [Array<string>] :tag_list ([])
|
|
368
368
|
# A list of tags (strings) to associate with the workflow execution.
|
|
369
369
|
# You can specify a maximum of 5 tags.
|
|
370
370
|
#
|
|
371
371
|
# @option options [Symbol] :child_policy (nil)
|
|
372
|
-
# Specifies the policy to use for the child workflow executions of
|
|
373
|
-
# this workflow execution if it is terminated explicitly or due to
|
|
374
|
-
# an expired timeout. This policy overrides the default child policy
|
|
372
|
+
# Specifies the policy to use for the child workflow executions of
|
|
373
|
+
# this workflow execution if it is terminated explicitly or due to
|
|
374
|
+
# an expired timeout. This policy overrides the default child policy
|
|
375
375
|
# specified when registering the workflow type. The supported child
|
|
376
376
|
# policies are:
|
|
377
377
|
#
|
|
378
|
-
# *
|
|
378
|
+
# * `:terminate` - the child executions will be terminated.
|
|
379
379
|
#
|
|
380
|
-
# *
|
|
381
|
-
# child execution by recording a WorkflowExecutionCancelRequested
|
|
380
|
+
# * `:request_cancel` - a request to cancel will be attempted for each
|
|
381
|
+
# child execution by recording a WorkflowExecutionCancelRequested
|
|
382
382
|
# event in its history. It is up to the decider to take appropriate
|
|
383
383
|
# actions when it receives an execution history with this event.
|
|
384
384
|
#
|
|
385
|
-
# *
|
|
385
|
+
# * `:abandon` - no action will be taken. The child executions will
|
|
386
386
|
# continue to run.
|
|
387
387
|
#
|
|
388
388
|
# @option options [Integer,:none] :execution_start_to_close_timeout (nil)
|
|
389
|
-
# The total duration for this workflow execution. This overrides
|
|
389
|
+
# The total duration for this workflow execution. This overrides
|
|
390
390
|
# the default specified when registering the workflow type.
|
|
391
391
|
#
|
|
392
392
|
# The value should be a number of seconds (integer) or the symbol
|
|
393
|
-
#
|
|
393
|
+
# `:none` (implying no timeout).
|
|
394
394
|
#
|
|
395
|
-
# @option options [String] :task_list (nil)
|
|
396
|
-
# The task list to use for the decision tasks generated for this
|
|
395
|
+
# @option options [String] :task_list (nil)
|
|
396
|
+
# The task list to use for the decision tasks generated for this
|
|
397
397
|
# workflow execution. This overrides the default task list specified
|
|
398
398
|
# when registering the workflow type.
|
|
399
399
|
#
|
|
400
400
|
# @option options [Integer,:none] :task_start_to_close_timeout (nil)
|
|
401
|
-
# Specifies the maximum duration of decision tasks for this
|
|
402
|
-
# workflow execution. This parameter overrides the default
|
|
401
|
+
# Specifies the maximum duration of decision tasks for this
|
|
402
|
+
# workflow execution. This parameter overrides the default
|
|
403
403
|
# specified when the workflow type was registered.
|
|
404
404
|
#
|
|
405
405
|
# The value should be a number of seconds (integer) or the symbol
|
|
406
|
-
#
|
|
407
|
-
#
|
|
406
|
+
# `:none` (implying no timeout).
|
|
407
|
+
#
|
|
408
408
|
# @return [nil]
|
|
409
409
|
#
|
|
410
410
|
def continue_as_new_workflow_execution options = {}
|
|
@@ -412,9 +412,9 @@ module AWS
|
|
|
412
412
|
add_decision :continue_as_new_workflow_execution, options
|
|
413
413
|
end
|
|
414
414
|
|
|
415
|
-
# Records a MarkerRecorded event in the history. Markers can be used
|
|
416
|
-
# for adding custom information in the history for instance to let
|
|
417
|
-
# deciders know that they do not need to look at the history beyond
|
|
415
|
+
# Records a MarkerRecorded event in the history. Markers can be used
|
|
416
|
+
# for adding custom information in the history for instance to let
|
|
417
|
+
# deciders know that they do not need to look at the history beyond
|
|
418
418
|
# the marker event.
|
|
419
419
|
#
|
|
420
420
|
# @param [String] marker_name The name of the marker.
|
|
@@ -428,21 +428,21 @@ module AWS
|
|
|
428
428
|
def record_marker marker_name, options = {}
|
|
429
429
|
add_decision :record_marker, options.merge(:marker_name => marker_name)
|
|
430
430
|
end
|
|
431
|
-
|
|
432
|
-
# Schedules a timer for this workflow execution and records a
|
|
433
|
-
# TimerScheduled event in the history. This timer will fire after
|
|
431
|
+
|
|
432
|
+
# Schedules a timer for this workflow execution and records a
|
|
433
|
+
# TimerScheduled event in the history. This timer will fire after
|
|
434
434
|
# the specified delay and record a TimerFired event.
|
|
435
435
|
#
|
|
436
|
-
# @param [Integer] start_to_fire_timeout (nil) The duration to wait
|
|
437
|
-
# before firing the timer.
|
|
438
|
-
#
|
|
436
|
+
# @param [Integer] start_to_fire_timeout (nil) The duration to wait
|
|
437
|
+
# before firing the timer.
|
|
438
|
+
#
|
|
439
439
|
# @param [Hash] options
|
|
440
440
|
#
|
|
441
|
-
# @option options [String] :control (nil) Optional data attached to
|
|
442
|
-
# the event that can be used by the decider in subsequent workflow
|
|
441
|
+
# @option options [String] :control (nil) Optional data attached to
|
|
442
|
+
# the event that can be used by the decider in subsequent workflow
|
|
443
443
|
# tasks.
|
|
444
444
|
#
|
|
445
|
-
# @option options [String] :timer_id (nil) Unique id for the timer.
|
|
445
|
+
# @option options [String] :timer_id (nil) Unique id for the timer.
|
|
446
446
|
# If you do not pass this option, a UUID will be generated.
|
|
447
447
|
#
|
|
448
448
|
# @return [String] Returns the id of the timer.
|
|
@@ -467,7 +467,7 @@ module AWS
|
|
|
467
467
|
end
|
|
468
468
|
|
|
469
469
|
# Requests a signal to be delivered to the specified external workflow
|
|
470
|
-
# execution and records a SignalExternalWorkflowExecutionRequested
|
|
470
|
+
# execution and records a SignalExternalWorkflowExecutionRequested
|
|
471
471
|
# event in the history.
|
|
472
472
|
#
|
|
473
473
|
# @param [WorkflowExecution,String] workflow_execution
|
|
@@ -476,13 +476,13 @@ module AWS
|
|
|
476
476
|
#
|
|
477
477
|
# @param [Hash] options
|
|
478
478
|
#
|
|
479
|
-
# @option options [String] :control (nil) Optional data attached to
|
|
480
|
-
# the event that can be used by the decider in subsequent decision
|
|
479
|
+
# @option options [String] :control (nil) Optional data attached to
|
|
480
|
+
# the event that can be used by the decider in subsequent decision
|
|
481
481
|
# tasks.
|
|
482
482
|
#
|
|
483
|
-
# @option options [String] :input (nil) Optional input to be provided
|
|
484
|
-
# with the signal. The target workflow execution will use the
|
|
485
|
-
# signal name and input to process the signal.
|
|
483
|
+
# @option options [String] :input (nil) Optional input to be provided
|
|
484
|
+
# with the signal. The target workflow execution will use the
|
|
485
|
+
# signal name and input to process the signal.
|
|
486
486
|
#
|
|
487
487
|
# @return [nil]
|
|
488
488
|
#
|
|
@@ -492,9 +492,9 @@ module AWS
|
|
|
492
492
|
add_decision :signal_external_workflow_execution, options
|
|
493
493
|
end
|
|
494
494
|
|
|
495
|
-
# Requests that a request be made to cancel the specified external
|
|
496
|
-
# workflow execution and records a
|
|
497
|
-
# RequestCancelExternalWorkflowExecutionRequested event in
|
|
495
|
+
# Requests that a request be made to cancel the specified external
|
|
496
|
+
# workflow execution and records a
|
|
497
|
+
# RequestCancelExternalWorkflowExecutionRequested event in
|
|
498
498
|
# the history.
|
|
499
499
|
#
|
|
500
500
|
# @return [nil]
|
|
@@ -504,21 +504,21 @@ module AWS
|
|
|
504
504
|
add_decision :request_cancel_external_workflow_execution, options
|
|
505
505
|
end
|
|
506
506
|
|
|
507
|
-
# Requests that a child workflow execution be started and records a
|
|
508
|
-
# StartChildWorkflowExecutionRequested event in the history.
|
|
509
|
-
# The child workflow execution is a separate workflow execution with
|
|
507
|
+
# Requests that a child workflow execution be started and records a
|
|
508
|
+
# StartChildWorkflowExecutionRequested event in the history.
|
|
509
|
+
# The child workflow execution is a separate workflow execution with
|
|
510
510
|
# its own history.
|
|
511
511
|
#
|
|
512
|
-
# @param [WorkflowType,Hash] workflow_type (nil) The type of
|
|
512
|
+
# @param [WorkflowType,Hash] workflow_type (nil) The type of
|
|
513
513
|
# workflow execution to start. This should be a {WorkflowType} object
|
|
514
|
-
# or a hash with the keys
|
|
514
|
+
# or a hash with the keys `:name` and `:version`.
|
|
515
515
|
#
|
|
516
516
|
# @param [Hash] options
|
|
517
517
|
#
|
|
518
518
|
# @option (see WorkflowType#start_execution)
|
|
519
519
|
#
|
|
520
|
-
# @option options [String] :control (nil) Optional data attached to
|
|
521
|
-
# the event that can be used by the decider in subsequent workflow
|
|
520
|
+
# @option options [String] :control (nil) Optional data attached to
|
|
521
|
+
# the event that can be used by the decider in subsequent workflow
|
|
522
522
|
# tasks.
|
|
523
523
|
#
|
|
524
524
|
# @return [String] Returns the workflow id of the new execution.
|
|
@@ -535,8 +535,8 @@ module AWS
|
|
|
535
535
|
if workflow_execution.is_a?(WorkflowExecution)
|
|
536
536
|
options[:workflow_id] = workflow_execution.workflow_id
|
|
537
537
|
options[:run_id] = workflow_execution.run_id
|
|
538
|
-
elsif
|
|
539
|
-
workflow_execution.is_a?(Hash) and
|
|
538
|
+
elsif
|
|
539
|
+
workflow_execution.is_a?(Hash) and
|
|
540
540
|
workflow_execution[:workflow_id].is_a?(String) and
|
|
541
541
|
workflow_execution[:run_id].is_a?(String) and
|
|
542
542
|
workflow_execution.keys.length == 2
|
|
@@ -554,9 +554,9 @@ module AWS
|
|
|
554
554
|
|
|
555
555
|
protected
|
|
556
556
|
def add_decision decision_type, attributes
|
|
557
|
-
@decisions << {
|
|
557
|
+
@decisions << {
|
|
558
558
|
:decision_type => Core::Inflection.class_name(decision_type.to_s),
|
|
559
|
-
:"#{decision_type}_decision_attributes" => attributes,
|
|
559
|
+
:"#{decision_type}_decision_attributes" => attributes,
|
|
560
560
|
}
|
|
561
561
|
nil
|
|
562
562
|
end
|
|
@@ -591,7 +591,7 @@ module AWS
|
|
|
591
591
|
events.each do |description|
|
|
592
592
|
event = HistoryEvent.new(workflow_execution, description)
|
|
593
593
|
Core::MetaUtils.extend_method(event, :new?) do
|
|
594
|
-
prev_event_id.nil? or self.event_id > prev_event_id
|
|
594
|
+
prev_event_id.nil? or self.event_id > prev_event_id
|
|
595
595
|
end
|
|
596
596
|
yield(event)
|
|
597
597
|
end
|