314
<ipProtocol>tcp</ipProtocol>
315
<fromPort>0</fromPort>
316
<toPort>65535</toPort>
319
<userId>group-user-id</userId>
320
<groupName>group-name1</groupName>
326
<ipProtocol>udp</ipProtocol>
327
<fromPort>0</fromPort>
328
<toPort>65535</toPort>
331
<userId>group-user-id</userId>
332
<groupName>group-name1</groupName>
338
<ipProtocol>icmp</ipProtocol>
339
<fromPort>-1</fromPort>
343
<userId>group-user-id</userId>
344
<groupName>group-name1</groupName>
350
<ipProtocol>tcp</ipProtocol>
351
<fromPort>0</fromPort>
352
<toPort>65535</toPort>
355
<userId>group-user-id</userId>
356
<groupName>group-name2</groupName>
362
<ipProtocol>udp</ipProtocol>
363
<fromPort>0</fromPort>
364
<toPort>65535</toPort>
367
<userId>group-user-id</userId>
368
<groupName>group-name2</groupName>
374
<ipProtocol>icmp</ipProtocol>
375
<fromPort>-1</fromPort>
379
<userId>group-user-id</userId>
380
<groupName>group-name2</groupName>
249
<ipProtocol>udp</ipProtocol>
250
<fromPort>81</fromPort>
254
<userId>group-user-id</userId>
255
<groupName>group-name</groupName>
260
<cidrIp>0.0.0.0/16</cidrIp>
387
266
</securityGroupInfo>
388
267
</DescribeSecurityGroupsResponse>
389
""" % (version.ec2_api,)
392
sample_describe_security_groups_multiple_groups = """\
393
<?xml version="1.0"?>
394
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
395
<requestId>481987ac-07e2-4f34-99b9-38bcce029ce9</requestId>
398
<ownerId>170743011661</ownerId>
399
<groupName>web/ssh</groupName>
400
<groupDescription>Web and SSH access</groupDescription>
403
<ipProtocol>icmp</ipProtocol>
404
<fromPort>-1</fromPort>
408
<userId>170723411662</userId>
409
<groupName>default</groupName>
412
<userId>175723011368</userId>
413
<groupName>test1</groupName>
419
<ipProtocol>tcp</ipProtocol>
420
<fromPort>1</fromPort>
421
<toPort>65535</toPort>
424
<userId>170723411662</userId>
425
<groupName>default</groupName>
428
<userId>175723011368</userId>
429
<groupName>test1</groupName>
435
<ipProtocol>udp</ipProtocol>
436
<fromPort>1</fromPort>
437
<toPort>65535</toPort>
440
<userId>170723411662</userId>
441
<groupName>default</groupName>
444
<userId>175723011368</userId>
445
<groupName>test1</groupName>
451
<ipProtocol>tcp</ipProtocol>
452
<fromPort>22</fromPort>
457
<cidrIp>0.0.0.0/0</cidrIp>
462
<ipProtocol>tcp</ipProtocol>
463
<fromPort>80</fromPort>
468
<cidrIp>0.0.0.0/0</cidrIp>
475
</DescribeSecurityGroupsResponse>
476
""" % (version.ec2_api,)
479
271
sample_create_security_group = """\
480
272
<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
481
273
<return>true</return>
482
<groupId>sg-1a2b3c4d</groupId>
483
274
</CreateSecurityGroupResponse>
484
""" % (version.ec2_api,)
487
278
sample_duplicate_create_security_group_result = """\
894
679
<RequestID>a99e832e-e6e0-416a-9a35-81798ea521b4</RequestID>
899
sample_server_internal_error_result = """\
900
<?xml version="1.0" encoding="UTF-8"?>
902
<Code>InternalError</Code>
903
<Message>We encountered an internal error. Please try again.</Message>
904
<RequestID>A2A7E5395E27DFBB</RequestID>
905
<HostID>f691zulHNsUqonsZkjhILnvWwD3ZnmOM4ObM1wXTc6xuS3GzPmjArp8QC/sGsn6K\
911
sample_list_buckets_result = """\
912
<?xml version="1.0" encoding="UTF-8"?>
913
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/%s/">
915
<ID>bcaf1ffd86f41caff1a493dc2ad8c2c281e37522a640e161ca5fb16fd081034f</ID>
916
<DisplayName>webfile</DisplayName>
921
<CreationDate>2006-02-03T16:45:09.000Z</CreationDate>
925
<CreationDate>2006-02-03T16:41:58.000Z</CreationDate>
928
</ListAllMyBucketsResult>
929
""" % (version.s3_api,)
932
sample_get_bucket_result = """\
933
<?xml version="1.0" encoding="UTF-8"?>
934
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/%s/">
935
<Name>mybucket</Name>
938
<MaxKeys>40</MaxKeys>
939
<IsTruncated>false</IsTruncated>
942
<LastModified>2006-01-01T12:00:00.000Z</LastModified>
943
<ETag>"828ef3fdfa96f00ad9f27c383fc9ac7f"</ETag>
945
<StorageClass>STANDARD</StorageClass>
947
<ID>bcaf1ffd86f41caff1a493dc2ad8c2c281e37522a640e161ca5fb16fd081034f</ID>
948
<DisplayName>webfile</DisplayName>
953
<LastModified>2006-01-01T12:00:00.000Z</LastModified>
954
<ETag>"828ef3fdfa96f00ad9f27c383fc9ac7f"</ETag>
956
<StorageClass>STANDARD</StorageClass>
958
<ID>bcaf1ffd86f41caff1a493dc2ad8c2c281e37522a640e161ca5fb16fd081034f</ID>
959
<DisplayName>webfile</DisplayName>
963
""" % (version.s3_api,)
966
sample_get_bucket_location_result = """\
967
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU\
968
</LocationConstraint>
971
sample_request_payment = """\
972
<?xml version="1.0" encoding="UTF-8"?>
973
<RequestPaymentConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
974
<Payer>Requester</Payer>
975
</RequestPaymentConfiguration>
978
sample_s3_signature_mismatch = """\
979
<?xml version="1.0" encoding="UTF-8"?>
981
<Code>SignatureDoesNotMatch</Code>
982
<Message>The request signature we calculated does not match the signature\
983
you provided. Check your key and signing method.</Message>
984
<StringToSignBytes>47 45 54 0a 31 42 32 4d 32 59 38 41 73 67 54 70 67 41 6d\
985
59 37 50 68 43 66 67 3d 3d 0a 0a 54 68 75 2c 20 30 35 20 4e 6f 76 20 32 30\
986
30 39 20 32 31 3a 33 33 3a 32 39 20 47 4d 54 0a 2f</StringToSignBytes>
987
<RequestId>AB9216C8640751B2</RequestId>
988
<HostId>sAPBpmFdsOsgUUwtSLsiT6KIwP1mPbmrYY0xUoahzJE263qmABkTaqzGhHddgOq5\
990
<SignatureProvided>ltowhdrbjaQ8dQc9VS5MxzJfsPJZi0BZHEzJC3r9pzU=
992
<StringToSign>GET\n1B2M2Y8AsgTpgAmY7PhCfg==\n\nThu, 05 Nov 2009 21:33:29\
993
GMT\n/</StringToSign>
994
<AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>
999
sample_s3_invalid_access_key_result = """\
1000
<?xml version="1.0" encoding="UTF-8"?>
1002
<Code>InvalidAccessKeyId</Code>
1003
<Message>The AWS Access Key Id you provided does not exist in our records.\
1005
<RequestId>0223AD81A94821CE</RequestId>
1006
<HostId>HAw5g9P1VkN8ztgLKFTK20CY5LmCfTwXcSths1O7UQV6NuJx2P4tmFnpuOsziwOE\
1008
<AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>
1012
sample_access_control_policy_result = """\
1013
<AccessControlPolicy>
1015
<ID>8a6925ce4adf588a4f21c32aa37900beef</ID>
1016
<DisplayName>baz@example.net</DisplayName>
1020
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
1021
xsi:type="CanonicalUser">
1022
<ID>8a6925ce4adf588a4f21c32aa379004fef</ID>
1023
<DisplayName>foo@example.net</DisplayName>
1025
<Permission>FULL_CONTROL</Permission>
1028
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
1029
xsi:type="CanonicalUser">
1030
<ID>8a6925ce4adf588a4f21c32aa37900feed</ID>
1031
<DisplayName>bar@example.net</DisplayName>
1033
<Permission>READ</Permission>
1035
</AccessControlList>
1036
</AccessControlPolicy>"""
1038
sample_s3_get_bucket_lifecycle_result = """\
1039
<?xml version="1.0" encoding="UTF-8"?>
1040
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1042
<ID>30-day-log-deletion-rule</ID>
1043
<Prefix>logs</Prefix>
1044
<Status>Enabled</Status>
1049
</LifecycleConfiguration>"""
1051
sample_s3_get_bucket_lifecycle_multiple_rules_result = """\
1052
<?xml version="1.0" encoding="UTF-8"?>
1053
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1055
<ID>30-day-log-deletion-rule</ID>
1056
<Prefix>logs</Prefix>
1057
<Status>Enabled</Status>
1064
<Prefix>another-logs</Prefix>
1065
<Status>Disabled</Status>
1070
</LifecycleConfiguration>"""
1072
sample_s3_get_bucket_website_result = """\
1073
<?xml version="1.0" encoding="UTF-8"?>
1074
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1076
<Suffix>index.html</Suffix>
1081
</WebsiteConfiguration>"""
1083
sample_s3_get_bucket_website_no_error_result = """\
1084
<?xml version="1.0" encoding="UTF-8"?>
1085
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1087
<Suffix>index.html</Suffix>
1089
</WebsiteConfiguration>"""
1091
sample_s3_get_bucket_notification_result = """\
1092
<NotificationConfiguration />"""
1094
sample_s3_get_bucket_notification_with_topic_result = """\
1095
<NotificationConfiguration>
1096
<TopicConfiguration>
1097
<Topic>arn:aws:sns:us-east-1:123456789012:myTopic</Topic>
1098
<Event>s3:ReducedRedundancyLostObject</Event>
1099
</TopicConfiguration>
1100
</NotificationConfiguration>"""
1102
sample_s3_get_bucket_versioning_result = """\
1103
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>"""
1105
sample_s3_get_bucket_versioning_enabled_result = """\
1106
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1107
<Status>Enabled</Status>
1108
</VersioningConfiguration>"""
1110
sample_s3_get_bucket_versioning_mfa_disabled_result = """\
1111
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1112
<Status>Enabled</Status>
1113
<MfaDelete>Disabled</MfaDelete>
1114
</VersioningConfiguration>"""
1116
sample_s3_init_multipart_upload_result = """\
1117
<InitiateMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1118
<Bucket>example-bucket</Bucket>
1119
<Key>example-object</Key>
1120
<UploadId>deadbeef</UploadId>
1121
</InitiateMultipartUploadResult>"""
1123
sample_s3_complete_multipart_upload_result = """\
1124
<?xml version="1.0" encoding="UTF-8"?>
1125
<CompleteMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
1126
<Location>http://example-bucket.s3.amazonaws.com/example-object</Location>
1127
<Bucket>example-bucket</Bucket>
1128
<Key>example-object</Key>
1129
<ETag>"3858f62230ac3c915f300c664312c11f-9"</ETag>
1130
</CompleteMultipartUploadResult>"""