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
|
@@ -27,53 +27,53 @@ module AWS
|
|
|
27
27
|
# @!method delete_identity(options = {})
|
|
28
28
|
# Calls the DeleteIdentity API operation.
|
|
29
29
|
# @param [Hash] options
|
|
30
|
-
# *
|
|
30
|
+
# * `:identity` - *required* - (String) The identity to be removed from
|
|
31
31
|
# the list of identities for the AWS Account.
|
|
32
32
|
# @return [Core::Response]
|
|
33
33
|
|
|
34
34
|
# @!method delete_verified_email_address(options = {})
|
|
35
35
|
# Calls the DeleteVerifiedEmailAddress API operation.
|
|
36
36
|
# @param [Hash] options
|
|
37
|
-
# *
|
|
37
|
+
# * `:email_address` - *required* - (String) An email address to be
|
|
38
38
|
# removed from the list of verified addresses.
|
|
39
39
|
# @return [Core::Response]
|
|
40
40
|
|
|
41
41
|
# @!method get_identity_dkim_attributes(options = {})
|
|
42
42
|
# Calls the GetIdentityDkimAttributes API operation.
|
|
43
43
|
# @param [Hash] options
|
|
44
|
-
# *
|
|
44
|
+
# * `:identities` - *required* - (Array<String>) A list of one or more
|
|
45
45
|
# verified identities - email addresses, domains, or both.
|
|
46
46
|
# @return [Core::Response]
|
|
47
47
|
# The #data method of the response object returns
|
|
48
48
|
# a hash with the following structure:
|
|
49
|
-
# *
|
|
50
|
-
# *
|
|
51
|
-
# *
|
|
52
|
-
# *
|
|
49
|
+
# * `:dkim_attributes` - (Hash<String,Hash>)
|
|
50
|
+
# * `:dkim_enabled` - (Boolean)
|
|
51
|
+
# * `:dkim_verification_status` - (String)
|
|
52
|
+
# * `:dkim_tokens` - (Array<String>)
|
|
53
53
|
|
|
54
54
|
# @!method get_identity_notification_attributes(options = {})
|
|
55
55
|
# Calls the GetIdentityNotificationAttributes API operation.
|
|
56
56
|
# @param [Hash] options
|
|
57
|
-
# *
|
|
57
|
+
# * `:identities` - *required* - (Array<String>) A list of one or more
|
|
58
58
|
# identities.
|
|
59
59
|
# @return [Core::Response]
|
|
60
60
|
# The #data method of the response object returns
|
|
61
61
|
# a hash with the following structure:
|
|
62
|
-
# *
|
|
63
|
-
# *
|
|
64
|
-
# *
|
|
65
|
-
# *
|
|
62
|
+
# * `:notification_attributes` - (Hash<String,Hash>)
|
|
63
|
+
# * `:bounce_topic` - (String)
|
|
64
|
+
# * `:complaint_topic` - (String)
|
|
65
|
+
# * `:forwarding_enabled` - (Boolean)
|
|
66
66
|
|
|
67
67
|
# @!method get_identity_verification_attributes(options = {})
|
|
68
68
|
# Calls the GetIdentityVerificationAttributes API operation.
|
|
69
69
|
# @param [Hash] options
|
|
70
|
-
# *
|
|
70
|
+
# * `:identities` - *required* - (Array<String>) A list of identities.
|
|
71
71
|
# @return [Core::Response]
|
|
72
72
|
# The #data method of the response object returns
|
|
73
73
|
# a hash with the following structure:
|
|
74
|
-
# *
|
|
75
|
-
# *
|
|
76
|
-
# *
|
|
74
|
+
# * `:verification_attributes` - (Hash<String,Hash>)
|
|
75
|
+
# * `:verification_status` - (String)
|
|
76
|
+
# * `:verification_token` - (String)
|
|
77
77
|
|
|
78
78
|
# @!method get_send_quota(options = {})
|
|
79
79
|
# Calls the GetSendQuota API operation.
|
|
@@ -81,9 +81,9 @@ module AWS
|
|
|
81
81
|
# @return [Core::Response]
|
|
82
82
|
# The #data method of the response object returns
|
|
83
83
|
# a hash with the following structure:
|
|
84
|
-
# *
|
|
85
|
-
# *
|
|
86
|
-
# *
|
|
84
|
+
# * `:max_24_hour_send` - (Numeric)
|
|
85
|
+
# * `:max_send_rate` - (Numeric)
|
|
86
|
+
# * `:sent_last_24_hours` - (Numeric)
|
|
87
87
|
|
|
88
88
|
# @!method get_send_statistics(options = {})
|
|
89
89
|
# Calls the GetSendStatistics API operation.
|
|
@@ -91,27 +91,30 @@ module AWS
|
|
|
91
91
|
# @return [Core::Response]
|
|
92
92
|
# The #data method of the response object returns
|
|
93
93
|
# a hash with the following structure:
|
|
94
|
-
# *
|
|
95
|
-
# *
|
|
96
|
-
# *
|
|
97
|
-
# *
|
|
98
|
-
# *
|
|
99
|
-
# *
|
|
94
|
+
# * `:send_data_points` - (Array<Hash>)
|
|
95
|
+
# * `:timestamp` - (Time)
|
|
96
|
+
# * `:delivery_attempts` - (Integer)
|
|
97
|
+
# * `:bounces` - (Integer)
|
|
98
|
+
# * `:complaints` - (Integer)
|
|
99
|
+
# * `:rejects` - (Integer)
|
|
100
100
|
|
|
101
101
|
# @!method list_identities(options = {})
|
|
102
102
|
# Calls the ListIdentities API operation.
|
|
103
103
|
# @param [Hash] options
|
|
104
|
-
# *
|
|
104
|
+
# * `:identity_type` - (String) The type of the identities to list.
|
|
105
105
|
# Possible values are "EmailAddress" and "Domain". If this parameter
|
|
106
|
-
# is omitted, then all identities will be listed.
|
|
107
|
-
#
|
|
108
|
-
#
|
|
106
|
+
# is omitted, then all identities will be listed. Valid values
|
|
107
|
+
# include:
|
|
108
|
+
# * `EmailAddress`
|
|
109
|
+
# * `Domain`
|
|
110
|
+
# * `:next_token` - (String) The token to use for pagination.
|
|
111
|
+
# * `:max_items` - (Integer) The maximum number of identities per page.
|
|
109
112
|
# Possible values are 1-100 inclusive.
|
|
110
113
|
# @return [Core::Response]
|
|
111
114
|
# The #data method of the response object returns
|
|
112
115
|
# a hash with the following structure:
|
|
113
|
-
# *
|
|
114
|
-
# *
|
|
116
|
+
# * `:identities` - (Array<String>)
|
|
117
|
+
# * `:next_token` - (String)
|
|
115
118
|
|
|
116
119
|
# @!method list_verified_email_addresses(options = {})
|
|
117
120
|
# Calls the ListVerifiedEmailAddresses API operation.
|
|
@@ -119,45 +122,45 @@ module AWS
|
|
|
119
122
|
# @return [Core::Response]
|
|
120
123
|
# The #data method of the response object returns
|
|
121
124
|
# a hash with the following structure:
|
|
122
|
-
# *
|
|
125
|
+
# * `:verified_email_addresses` - (Array<String>)
|
|
123
126
|
|
|
124
127
|
# @!method send_email(options = {})
|
|
125
128
|
# Calls the SendEmail API operation.
|
|
126
129
|
# @param [Hash] options
|
|
127
|
-
# *
|
|
128
|
-
# *
|
|
130
|
+
# * `:source` - *required* - (String) The identity's email address.
|
|
131
|
+
# * `:destination` - *required* - (Hash) The destination for this
|
|
129
132
|
# email, composed of To:, CC:, and BCC: fields.
|
|
130
|
-
# *
|
|
133
|
+
# * `:to_addresses` - (Array<String>) The To: field(s) of the
|
|
131
134
|
# message.
|
|
132
|
-
# *
|
|
135
|
+
# * `:cc_addresses` - (Array<String>) The CC: field(s) of the
|
|
133
136
|
# message.
|
|
134
|
-
# *
|
|
137
|
+
# * `:bcc_addresses` - (Array<String>) The BCC: field(s) of the
|
|
135
138
|
# message.
|
|
136
|
-
# *
|
|
137
|
-
# *
|
|
139
|
+
# * `:message` - *required* - (Hash) The message to be sent.
|
|
140
|
+
# * `:subject` - *required* - (Hash) The subject of the message: A
|
|
138
141
|
# short summary of the content, which will appear in the
|
|
139
142
|
# recipient's inbox.
|
|
140
|
-
# *
|
|
143
|
+
# * `:data` - *required* - (String) The textual data of the
|
|
141
144
|
# content.
|
|
142
|
-
# *
|
|
143
|
-
# *
|
|
144
|
-
# *
|
|
145
|
+
# * `:charset` - (String) The character set of the content.
|
|
146
|
+
# * `:body` - *required* - (Hash) The message body.
|
|
147
|
+
# * `:text` - (Hash) The content of the message, in text format.
|
|
145
148
|
# Use this for text-based email clients, or clients on
|
|
146
149
|
# high-latency networks (such as mobile devices).
|
|
147
|
-
# *
|
|
150
|
+
# * `:data` - *required* - (String) The textual data of the
|
|
148
151
|
# content.
|
|
149
|
-
# *
|
|
150
|
-
# *
|
|
152
|
+
# * `:charset` - (String) The character set of the content.
|
|
153
|
+
# * `:html` - (Hash) The content of the message, in HTML format.
|
|
151
154
|
# Use this for email clients that can process HTML. You can
|
|
152
155
|
# include clickable links, formatted text, and much more in an
|
|
153
156
|
# HTML message.
|
|
154
|
-
# *
|
|
157
|
+
# * `:data` - *required* - (String) The textual data of the
|
|
155
158
|
# content.
|
|
156
|
-
# *
|
|
157
|
-
# *
|
|
159
|
+
# * `:charset` - (String) The character set of the content.
|
|
160
|
+
# * `:reply_to_addresses` - (Array<String>) The reply-to email
|
|
158
161
|
# address(es) for the message. If the recipient replies to the
|
|
159
162
|
# message, each reply-to address will receive the reply.
|
|
160
|
-
# *
|
|
163
|
+
# * `:return_path` - (String) The email address to which bounce
|
|
161
164
|
# notifications are to be forwarded. If the message cannot be
|
|
162
165
|
# delivered to the recipient, then an error message will be returned
|
|
163
166
|
# from the recipient's ISP; this message will then be forwarded to
|
|
@@ -165,19 +168,19 @@ module AWS
|
|
|
165
168
|
# @return [Core::Response]
|
|
166
169
|
# The #data method of the response object returns
|
|
167
170
|
# a hash with the following structure:
|
|
168
|
-
# *
|
|
171
|
+
# * `:message_id` - (String)
|
|
169
172
|
|
|
170
173
|
# @!method send_raw_email(options = {})
|
|
171
174
|
# Calls the SendRawEmail API operation.
|
|
172
175
|
# @param [Hash] options
|
|
173
|
-
# *
|
|
176
|
+
# * `:source` - (String) The identity's email address. If you specify
|
|
174
177
|
# the Source parameter, then bounce notifications and complaints will
|
|
175
178
|
# be sent to this email address. This takes precedence over any
|
|
176
179
|
# Return-Path header that you might include in the raw text of the
|
|
177
180
|
# message.
|
|
178
|
-
# *
|
|
181
|
+
# * `:destinations` - (Array<String>) A list of destinations for the
|
|
179
182
|
# message.
|
|
180
|
-
# *
|
|
183
|
+
# * `:raw_message` - *required* - (Hash) The raw text of the message.
|
|
181
184
|
# The client is responsible for ensuring the following: Message must
|
|
182
185
|
# contain a header and a body, separated by a blank line. All
|
|
183
186
|
# required header fields must be present. Each part of a multipart
|
|
@@ -185,7 +188,7 @@ module AWS
|
|
|
185
188
|
# among those supported by Amazon SES. Refer to the Amazon SES
|
|
186
189
|
# Developer Guide for more details. Content must be base64-encoded,
|
|
187
190
|
# if MIME requires it.
|
|
188
|
-
# *
|
|
191
|
+
# * `:data` - *required* - (String) The raw data of the message. The
|
|
189
192
|
# client must ensure that the message format complies with Internet
|
|
190
193
|
# email standards regarding email header fields, MIME types, MIME
|
|
191
194
|
# encoding, and base64 encoding (if necessary). For more
|
|
@@ -193,77 +196,80 @@ module AWS
|
|
|
193
196
|
# @return [Core::Response]
|
|
194
197
|
# The #data method of the response object returns
|
|
195
198
|
# a hash with the following structure:
|
|
196
|
-
# *
|
|
199
|
+
# * `:message_id` - (String)
|
|
197
200
|
|
|
198
201
|
# @!method set_identity_dkim_enabled(options = {})
|
|
199
202
|
# Calls the SetIdentityDkimEnabled API operation.
|
|
200
203
|
# @param [Hash] options
|
|
201
|
-
# *
|
|
204
|
+
# * `:identity` - *required* - (String) The identity for which DKIM
|
|
202
205
|
# signing should be enabled or disabled.
|
|
203
|
-
# *
|
|
204
|
-
# is enabled for an identity. Set to
|
|
205
|
-
# for this identity;
|
|
206
|
+
# * `:dkim_enabled` - *required* - (Boolean) Sets whether DKIM signing
|
|
207
|
+
# is enabled for an identity. Set to `true` to enable DKIM signing
|
|
208
|
+
# for this identity; `false` to disable it.
|
|
206
209
|
# @return [Core::Response]
|
|
207
210
|
|
|
208
211
|
# @!method set_identity_feedback_forwarding_enabled(options = {})
|
|
209
212
|
# Calls the SetIdentityFeedbackForwardingEnabled API operation.
|
|
210
213
|
# @param [Hash] options
|
|
211
|
-
# *
|
|
214
|
+
# * `:identity` - *required* - (String) The identity for which to set
|
|
212
215
|
# feedback notification forwarding. Examples: user@example.com,
|
|
213
216
|
# example.com.
|
|
214
|
-
# *
|
|
215
|
-
# SES will forward feedback notifications as email.
|
|
217
|
+
# * `:forwarding_enabled` - *required* - (Boolean) Sets whether Amazon
|
|
218
|
+
# SES will forward feedback notifications as email. `true` specifies
|
|
216
219
|
# that Amazon SES will forward feedback notifications as email, in
|
|
217
220
|
# addition to any Amazon SNS topic publishing otherwise specified.
|
|
218
|
-
#
|
|
221
|
+
# `false` specifies that Amazon SES will publish feedback
|
|
219
222
|
# notifications only through Amazon SNS. This value can only be set
|
|
220
|
-
# to
|
|
223
|
+
# to `false` when topics are specified for both Bounce and Complaint
|
|
221
224
|
# topic types.
|
|
222
225
|
# @return [Core::Response]
|
|
223
226
|
|
|
224
227
|
# @!method set_identity_notification_topic(options = {})
|
|
225
228
|
# Calls the SetIdentityNotificationTopic API operation.
|
|
226
229
|
# @param [Hash] options
|
|
227
|
-
# *
|
|
230
|
+
# * `:identity` - *required* - (String) The identity for which the
|
|
228
231
|
# topic will be set. Examples: user@example.com, example.com.
|
|
229
|
-
# *
|
|
230
|
-
# notifications that will be published to the specified topic.
|
|
231
|
-
#
|
|
232
|
+
# * `:notification_type` - *required* - (String) The type of feedback
|
|
233
|
+
# notifications that will be published to the specified topic. Valid
|
|
234
|
+
# values include:
|
|
235
|
+
# * `Bounce`
|
|
236
|
+
# * `Complaint`
|
|
237
|
+
# * `:sns_topic` - (String) The Amazon Resource Name (ARN) of the
|
|
232
238
|
# Amazon Simple Notification Service (Amazon SNS) topic. If the
|
|
233
|
-
# parameter is
|
|
239
|
+
# parameter is ommited from the request or a null value is passed,
|
|
234
240
|
# the topic is cleared and publishing is disabled.
|
|
235
241
|
# @return [Core::Response]
|
|
236
242
|
|
|
237
243
|
# @!method verify_domain_dkim(options = {})
|
|
238
244
|
# Calls the VerifyDomainDkim API operation.
|
|
239
245
|
# @param [Hash] options
|
|
240
|
-
# *
|
|
246
|
+
# * `:domain` - *required* - (String) The name of the domain to be
|
|
241
247
|
# verified for Easy DKIM signing.
|
|
242
248
|
# @return [Core::Response]
|
|
243
249
|
# The #data method of the response object returns
|
|
244
250
|
# a hash with the following structure:
|
|
245
|
-
# *
|
|
251
|
+
# * `:dkim_tokens` - (Array<String>)
|
|
246
252
|
|
|
247
253
|
# @!method verify_domain_identity(options = {})
|
|
248
254
|
# Calls the VerifyDomainIdentity API operation.
|
|
249
255
|
# @param [Hash] options
|
|
250
|
-
# *
|
|
256
|
+
# * `:domain` - *required* - (String) The domain to be verified.
|
|
251
257
|
# @return [Core::Response]
|
|
252
258
|
# The #data method of the response object returns
|
|
253
259
|
# a hash with the following structure:
|
|
254
|
-
# *
|
|
260
|
+
# * `:verification_token` - (String)
|
|
255
261
|
|
|
256
262
|
# @!method verify_email_address(options = {})
|
|
257
263
|
# Calls the VerifyEmailAddress API operation.
|
|
258
264
|
# @param [Hash] options
|
|
259
|
-
# *
|
|
265
|
+
# * `:email_address` - *required* - (String) The email address to be
|
|
260
266
|
# verified.
|
|
261
267
|
# @return [Core::Response]
|
|
262
268
|
|
|
263
269
|
# @!method verify_email_identity(options = {})
|
|
264
270
|
# Calls the VerifyEmailIdentity API operation.
|
|
265
271
|
# @param [Hash] options
|
|
266
|
-
# *
|
|
272
|
+
# * `:email_address` - *required* - (String) The email address to be
|
|
267
273
|
# verified.
|
|
268
274
|
# @return [Core::Response]
|
|
269
275
|
|
|
@@ -15,7 +15,7 @@ module AWS
|
|
|
15
15
|
class SimpleEmailService
|
|
16
16
|
|
|
17
17
|
# Helps you manage your verified SimpleEmailService email addresses.
|
|
18
|
-
# @note This class is deprecated. Please use
|
|
18
|
+
# @note This class is deprecated. Please use
|
|
19
19
|
# {SimpleEmailService#identities} instead.
|
|
20
20
|
class EmailAddressCollection
|
|
21
21
|
|
|
@@ -23,8 +23,8 @@ module AWS
|
|
|
23
23
|
include Enumerable
|
|
24
24
|
|
|
25
25
|
# Requests for an email address to be verified. An email will be
|
|
26
|
-
# sent to the given
|
|
27
|
-
# the link has been followed the
|
|
26
|
+
# sent to the given `email_address` with a link to click. Once
|
|
27
|
+
# the link has been followed the `email_address` will be verified.
|
|
28
28
|
#
|
|
29
29
|
# @param [String] email_address The email address to verify.
|
|
30
30
|
# @return [nil]
|
|
@@ -22,15 +22,15 @@ module AWS
|
|
|
22
22
|
#
|
|
23
23
|
# @attr [String] complaint_topic_arn
|
|
24
24
|
#
|
|
25
|
-
# @attr [Boolean] forwarding_enabled When
|
|
25
|
+
# @attr [Boolean] forwarding_enabled When `false`, complaint and bounce
|
|
26
26
|
# notifications will not be forwarded via email. Can only be set to
|
|
27
|
-
#
|
|
27
|
+
# `false` when there is both a `bounce_topic` and `complaint_topic`.
|
|
28
28
|
#
|
|
29
|
-
# @attr [Boolean] dkim_enabled When set to
|
|
29
|
+
# @attr [Boolean] dkim_enabled When set to `true`, Easy DKIM signing will
|
|
30
30
|
# be enabled for email sent from this identity.
|
|
31
31
|
#
|
|
32
32
|
# @attr_reader [Array<String>] dkim_tokens Returns a set of DNS records,
|
|
33
|
-
# or tokens, that must be published in the domain name's DNS to
|
|
33
|
+
# or tokens, that must be published in the domain name's DNS to
|
|
34
34
|
# complete the DKIM verification process. Call {#verify_dkim} if this
|
|
35
35
|
# returns an empty list.
|
|
36
36
|
#
|
|
@@ -124,25 +124,25 @@ module AWS
|
|
|
124
124
|
end
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
-
# @return [Boolean] Returns
|
|
127
|
+
# @return [Boolean] Returns `true` if this {Identity} represents an
|
|
128
128
|
# email address.
|
|
129
129
|
def email_address?
|
|
130
130
|
identity.match(/@/) ? true : false
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
-
# @return [Boolean] Returns
|
|
133
|
+
# @return [Boolean] Returns `true` if this {Identity} represents a
|
|
134
134
|
# domain.
|
|
135
135
|
def domain?
|
|
136
136
|
!email_address?
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
# @return [Boolean] Returns
|
|
139
|
+
# @return [Boolean] Returns `true` if this email address/domain has
|
|
140
140
|
# been verified.
|
|
141
141
|
def verified?
|
|
142
142
|
verification_status == 'Success'
|
|
143
143
|
end
|
|
144
144
|
|
|
145
|
-
# @return [Boolean] Returns
|
|
145
|
+
# @return [Boolean] Returns `true` if verification for this email
|
|
146
146
|
# address/domain is still pending.
|
|
147
147
|
def pending?
|
|
148
148
|
verification_status == 'Pending'
|
|
@@ -25,13 +25,13 @@ module AWS
|
|
|
25
25
|
to_h[:max_24_hour_send]
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
# @return [Float] The maximum number of emails the user is allowed
|
|
28
|
+
# @return [Float] The maximum number of emails the user is allowed
|
|
29
29
|
# to send per second.
|
|
30
30
|
def max_send_rate
|
|
31
31
|
to_h[:max_send_rate]
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
# @return [Integer] Returns the number of emails sent during the
|
|
34
|
+
# @return [Integer] Returns the number of emails sent during the
|
|
35
35
|
# previous 24 hours.
|
|
36
36
|
def sent_last_24_hours
|
|
37
37
|
to_h[:sent_last_24_hours]
|
|
@@ -39,17 +39,19 @@ module AWS
|
|
|
39
39
|
|
|
40
40
|
# Returns a hash of the SES quotas.
|
|
41
41
|
#
|
|
42
|
-
#
|
|
42
|
+
# @example
|
|
43
|
+
#
|
|
44
|
+
# ses.quotas.to_hash
|
|
43
45
|
# # {:max_24_hour_send=>200, :max_send_rate=>1.0, :sent_last_24_hours=>22}
|
|
44
46
|
#
|
|
45
|
-
# @return [Hash]
|
|
47
|
+
# @return [Hash]
|
|
46
48
|
#
|
|
47
49
|
def to_hash
|
|
48
50
|
response = client.get_send_quota
|
|
49
51
|
{
|
|
50
52
|
:max_24_hour_send => response.max_24_hour_send.to_i,
|
|
51
53
|
:max_send_rate => response.max_send_rate.to_f,
|
|
52
|
-
:sent_last_24_hours => response.sent_last_24_hours.to_i,
|
|
54
|
+
:sent_last_24_hours => response.sent_last_24_hours.to_i,
|
|
53
55
|
}
|
|
54
56
|
end
|
|
55
57
|
alias_method :to_h, :to_hash
|
|
@@ -58,7 +60,7 @@ module AWS
|
|
|
58
60
|
def inspect
|
|
59
61
|
"<#{self.class} #{to_hash.inspect}>"
|
|
60
62
|
end
|
|
61
|
-
|
|
63
|
+
|
|
62
64
|
end
|
|
63
65
|
end
|
|
64
66
|
end
|
data/lib/aws/simple_workflow.rb
CHANGED
|
@@ -18,21 +18,21 @@ module AWS
|
|
|
18
18
|
|
|
19
19
|
# This is the starting point for working with Amazon Simple Workflow Service.
|
|
20
20
|
#
|
|
21
|
-
#
|
|
21
|
+
# # Domains
|
|
22
22
|
#
|
|
23
|
-
# To get started, you need to first create a domain. Domains are used to
|
|
24
|
-
# organize related tasks and activities.
|
|
23
|
+
# To get started, you need to first create a domain. Domains are used to
|
|
24
|
+
# organize related tasks and activities.
|
|
25
25
|
#
|
|
26
|
-
#
|
|
26
|
+
# swf = AWS::SimpleWorkflow.new
|
|
27
27
|
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
28
|
+
# # name the domain and specify the retention period (in days)
|
|
29
|
+
# domain = swf.domains.create('my-domain', 10)
|
|
30
30
|
#
|
|
31
31
|
# You can reference existing domains as well.
|
|
32
32
|
#
|
|
33
|
-
#
|
|
33
|
+
# domain = swf.domains['my-domain']
|
|
34
34
|
#
|
|
35
|
-
#
|
|
35
|
+
# # Workflow and Activity Types
|
|
36
36
|
#
|
|
37
37
|
# Once you have a domain you can create a workflow and
|
|
38
38
|
# activity types. Both types (workflow and activity) are templates that
|
|
@@ -44,44 +44,44 @@ module AWS
|
|
|
44
44
|
# the actual values when starting a workflow execution or scheduling
|
|
45
45
|
# an activity task.
|
|
46
46
|
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
47
|
+
# ## Sample Workflow type and activity type
|
|
48
|
+
#
|
|
49
|
+
# # register an workflow type with the version id '1'
|
|
50
|
+
# workflow_type = domain.workflow_types.create('my-long-processes', '1',
|
|
51
|
+
# :default_task_list => 'my-task-list',
|
|
52
|
+
# :default_child_policy => :request_cancel,
|
|
53
|
+
# :default_task_start_to_close_timeout => 3600,
|
|
54
|
+
# :default_execution_start_to_close_timeout => 24 * 3600)
|
|
55
|
+
#
|
|
56
|
+
# # register an activity type, with the version id '1'
|
|
57
|
+
# activity_type = domain.activity_types.create('do-something', '1',
|
|
58
|
+
# :default_task_list => 'my-task-list',
|
|
59
|
+
# :default_task_heartbeat_timeout => 900,
|
|
60
|
+
# :default_task_schedule_to_start_timeout => 60,
|
|
61
|
+
# :default_task_schedule_to_close_timeout => 3660,
|
|
62
|
+
# :default_task_start_to_close_timeout => 3600)
|
|
63
|
+
#
|
|
64
|
+
# # Starting a Workflow Execution
|
|
65
65
|
#
|
|
66
66
|
# Once you have a domain and at least one workflow type you can
|
|
67
67
|
# start a workflow execution. You may provide a workflow id, or a
|
|
68
68
|
# random one will be generated. You may also provide optional
|
|
69
|
-
# input and override any of the defaults registered with the
|
|
69
|
+
# input and override any of the defaults registered with the
|
|
70
70
|
# workflow type.
|
|
71
71
|
#
|
|
72
|
-
#
|
|
72
|
+
# workflow_execution = workflow_type.start_execution :input => '...'
|
|
73
73
|
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
74
|
+
# workflow_execution.workflow_id #=> "5abbdd75-70c7-4af3-a324-742cd29267c2"
|
|
75
|
+
# workflow_execution.run_id #=> "325a8c34-d133-479e-9ecf-5a61286d165f"
|
|
76
76
|
#
|
|
77
|
-
#
|
|
77
|
+
# # Decision Tasks
|
|
78
78
|
#
|
|
79
79
|
# Once a workflow execution has been started, it will start to generate
|
|
80
80
|
# decision tasks. You poll for decision tasks from a task list.
|
|
81
81
|
# Yielded decision tasks provide access to the history of events
|
|
82
82
|
# for the workflow execution. You can also enumerate only new
|
|
83
83
|
# events since the last decision.
|
|
84
|
-
#
|
|
84
|
+
#
|
|
85
85
|
# To make decisions you call methods from the list below. You can call
|
|
86
86
|
# any number of decision methods any number of times.
|
|
87
87
|
#
|
|
@@ -101,90 +101,90 @@ module AWS
|
|
|
101
101
|
# This sample gets a decision task and responds based on the events
|
|
102
102
|
# by scheduling an activity task or completing the workflow execution.
|
|
103
103
|
#
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
#
|
|
112
|
-
#
|
|
113
|
-
#
|
|
104
|
+
# # poll for decision tasks from 'my-task-list'
|
|
105
|
+
# domain.decision_tasks.poll('my-task-list') do |task|
|
|
106
|
+
#
|
|
107
|
+
# # investigate new events and make decisions
|
|
108
|
+
# task.new_events.each do |event|
|
|
109
|
+
# case event.event_type
|
|
110
|
+
# when 'WorkflowExecutionStarted'
|
|
111
|
+
# task.schedule_activity_task 'do-something', :input => 'abc xyz'
|
|
112
|
+
# when 'ActivityTaskCompleted'
|
|
113
|
+
# task.complete_workflow_execution :result => event.attributes.result
|
|
114
|
+
# end
|
|
114
115
|
# end
|
|
115
|
-
# end
|
|
116
116
|
#
|
|
117
|
-
#
|
|
117
|
+
# end # decision task is completed here
|
|
118
118
|
#
|
|
119
119
|
# When you are done calling decision methods, you need to complete the
|
|
120
120
|
# decision task. This is done by default if you pass a block to
|
|
121
|
-
#
|
|
121
|
+
# `poll` or `poll_for_single_task`.
|
|
122
122
|
#
|
|
123
|
-
#
|
|
123
|
+
# # Activity Tasks
|
|
124
124
|
#
|
|
125
|
-
# The only way to spawn activity tasks is to call
|
|
125
|
+
# The only way to spawn activity tasks is to call `schedule_activity_task`
|
|
126
126
|
# on a decision task. Scheduled activity tasks are returned when you
|
|
127
127
|
# poll for activity tasks.
|
|
128
128
|
#
|
|
129
|
-
#
|
|
130
|
-
#
|
|
129
|
+
# # poll 'my-task-list' for activities
|
|
130
|
+
# domain.activity_tasks.poll('my-task-list') do |activity_task|
|
|
131
|
+
#
|
|
132
|
+
# case activity_task.activity_type.name
|
|
133
|
+
# when 'do-something'
|
|
134
|
+
# # ...
|
|
135
|
+
# else
|
|
136
|
+
# activity_task.fail! :reason => 'unknown activity task type'
|
|
137
|
+
# end
|
|
131
138
|
#
|
|
132
|
-
# case activity_task.activity_type.name
|
|
133
|
-
# when 'do-something'
|
|
134
|
-
# # ...
|
|
135
|
-
# else
|
|
136
|
-
# activity_task.fail! :reason => 'unknown activity task type'
|
|
137
139
|
# end
|
|
138
|
-
#
|
|
139
|
-
# end
|
|
140
140
|
#
|
|
141
|
-
#
|
|
141
|
+
# ## Activity Task Heartbeats
|
|
142
142
|
#
|
|
143
143
|
# When you receive an activity task, you need to update the service
|
|
144
144
|
# with status messages. This is called recording a heartbeat.#
|
|
145
|
-
# To record a heartbeat, just call {ActivityTask#record_heartbeat!}.
|
|
146
|
-
# When you call
|
|
145
|
+
# To record a heartbeat, just call {ActivityTask#record_heartbeat!}.
|
|
146
|
+
# When you call `record_heartbeat` you should rescue
|
|
147
147
|
# {ActivityTask::CancelRequestedError}. These are thrown when a task
|
|
148
|
-
# should be canceled. You can cleanup the task and then call
|
|
149
|
-
#
|
|
148
|
+
# should be canceled. You can cleanup the task and then call
|
|
149
|
+
# `cancel!` when you are finished.
|
|
150
150
|
#
|
|
151
|
-
#
|
|
152
|
-
#
|
|
153
|
-
#
|
|
151
|
+
# # poll 'my-task-list' for activities
|
|
152
|
+
# domain.activity_tasks.poll('my-task-list') do |activity_task|
|
|
153
|
+
# begin
|
|
154
154
|
#
|
|
155
|
-
#
|
|
155
|
+
# # do stuff ...
|
|
156
156
|
#
|
|
157
|
-
#
|
|
157
|
+
# activity_task.record_heartbeat! :details => '25%'
|
|
158
158
|
#
|
|
159
|
-
#
|
|
159
|
+
# # do more stuff ...
|
|
160
160
|
#
|
|
161
|
-
#
|
|
161
|
+
# activity_task.record_heartbeat! :details => '50%'
|
|
162
162
|
#
|
|
163
|
-
#
|
|
163
|
+
# # do more stuff ...
|
|
164
164
|
#
|
|
165
|
-
#
|
|
165
|
+
# activity_task.record_heartbeat! :details => '75%'
|
|
166
166
|
#
|
|
167
|
-
#
|
|
167
|
+
# # do more stuff ...
|
|
168
168
|
#
|
|
169
|
-
#
|
|
170
|
-
#
|
|
171
|
-
#
|
|
169
|
+
# rescue ActivityTask::CancelRequestedError
|
|
170
|
+
# # cleanup after ourselves
|
|
171
|
+
# activity_task.cancel!
|
|
172
|
+
# end
|
|
172
173
|
# end
|
|
173
|
-
#
|
|
174
|
-
#
|
|
175
|
-
# Like decision tasks, activity tasks are auto-completed at the
|
|
174
|
+
#
|
|
175
|
+
# Like decision tasks, activity tasks are auto-completed at the
|
|
176
176
|
# end of a poll block.
|
|
177
177
|
#
|
|
178
|
-
#
|
|
178
|
+
# # History Events
|
|
179
179
|
#
|
|
180
180
|
# You might want to view the event history for a running workflow
|
|
181
181
|
# execution. You can get a workflow execution by its workflow
|
|
182
182
|
# id (you may optionally provide the run id as well).
|
|
183
183
|
#
|
|
184
|
-
#
|
|
185
|
-
#
|
|
186
|
-
#
|
|
187
|
-
#
|
|
184
|
+
# execution = domain.workflow_executions['workflow-id']
|
|
185
|
+
# execution.events.each do |event|
|
|
186
|
+
# puts event.attributes.to_h.inspect
|
|
187
|
+
# end
|
|
188
188
|
#
|
|
189
189
|
# See {HistoryEvent} and {HistoryEvent::Attributes} for more information.
|
|
190
190
|
#
|
|
@@ -192,33 +192,33 @@ module AWS
|
|
|
192
192
|
# @return [Client] the low-level SimpleWorkflow client object
|
|
193
193
|
class SimpleWorkflow
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
autoload :WorkflowTypeCollection, 'workflow_type_collection'
|
|
218
|
-
end
|
|
195
|
+
autoload :ActivityType, 'aws/simple_workflow/activity_type'
|
|
196
|
+
autoload :ActivityTypeCollection, 'aws/simple_workflow/activity_type_collection'
|
|
197
|
+
autoload :ActivityTask, 'aws/simple_workflow/activity_task'
|
|
198
|
+
autoload :ActivityTaskCollection, 'aws/simple_workflow/activity_task_collection'
|
|
199
|
+
autoload :Client, 'aws/simple_workflow/client'
|
|
200
|
+
autoload :Count, 'aws/simple_workflow/count'
|
|
201
|
+
autoload :DecisionTask, 'aws/simple_workflow/decision_task'
|
|
202
|
+
autoload :DecisionTaskCollection, 'aws/simple_workflow/decision_task_collection'
|
|
203
|
+
autoload :Domain, 'aws/simple_workflow/domain'
|
|
204
|
+
autoload :DomainCollection, 'aws/simple_workflow/domain_collection'
|
|
205
|
+
autoload :Errors, 'aws/simple_workflow/errors'
|
|
206
|
+
autoload :HistoryEvent, 'aws/simple_workflow/history_event'
|
|
207
|
+
autoload :HistoryEventCollection, 'aws/simple_workflow/history_event_collection'
|
|
208
|
+
autoload :OptionFormatters, 'aws/simple_workflow/option_formatters'
|
|
209
|
+
autoload :Request, 'aws/simple_workflow/request'
|
|
210
|
+
autoload :Resource, 'aws/simple_workflow/resource'
|
|
211
|
+
autoload :Type, 'aws/simple_workflow/type'
|
|
212
|
+
autoload :TypeCollection, 'aws/simple_workflow/type_collection'
|
|
213
|
+
autoload :WorkflowExecution, 'aws/simple_workflow/workflow_execution'
|
|
214
|
+
autoload :WorkflowExecutionCollection, 'aws/simple_workflow/workflow_execution_collection'
|
|
215
|
+
autoload :WorkflowType, 'aws/simple_workflow/workflow_type'
|
|
216
|
+
autoload :WorkflowTypeCollection, 'aws/simple_workflow/workflow_type_collection'
|
|
219
217
|
|
|
220
218
|
include Core::ServiceInterface
|
|
221
219
|
|
|
220
|
+
endpoint_prefix 'swf'
|
|
221
|
+
|
|
222
222
|
# @return [DomainCollection]
|
|
223
223
|
def domains
|
|
224
224
|
DomainCollection.new(:config => config)
|