| 1 | { |
| 2 | "version": "1.3", |
| 3 | "parameters": { |
| 4 | "BucketName": { |
| 5 | "type": "string", |
| 6 | "required": true, |
| 7 | "documentation": "the input used to test isVirtualHostableS3Bucket" |
| 8 | } |
| 9 | }, |
| 10 | "rules": [ |
| 11 | { |
| 12 | "conditions": [ |
| 13 | { |
| 14 | "fn": "aws.isVirtualHostableS3Bucket", |
| 15 | "argv": [ |
| 16 | "{BucketName}", |
| 17 | false |
| 18 | ] |
| 19 | } |
| 20 | ], |
| 21 | "endpoint": { |
| 22 | "url": "https://{BucketName}.s3.amazonaws.com" |
| 23 | }, |
| 24 | "type": "endpoint" |
| 25 | }, |
| 26 | { |
| 27 | "conditions": [ |
| 28 | { |
| 29 | "fn": "aws.isVirtualHostableS3Bucket", |
| 30 | "argv": [ |
| 31 | "{BucketName}", |
| 32 | true |
| 33 | ] |
| 34 | } |
| 35 | ], |
| 36 | "endpoint": { |
| 37 | "url": "http://{BucketName}.s3.amazonaws.com" |
| 38 | }, |
| 39 | "type": "endpoint" |
| 40 | }, |
| 41 | { |
| 42 | "conditions": [ |
| 43 | ], |
| 44 | "error": "not isVirtualHostableS3Bucket", |
| 45 | "type": "error" |
| 46 | } |
| 47 | ] |
| 48 | } |