forked from VarunAgw/CloudPingTest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws.php
151 lines (147 loc) · 3.45 KB
/
aws.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
require_once 'templating.php';
$name = 'AWS';
$longName = 'Amazon Web Services';
ob_start();
?>
<script>
function src(region_id) {
let cache_buster = "cache_buster=" + (+Date.now());
let code = regions[region_id].code;
return `https://ec2.${code}.amazonaws.com/ping?${cache_buster}`;
}
// https://ec2.us-east-1.amazonaws.com/ping
// https://dynamodb.us-east-1.amazonaws.com/ping
// https://us-west-1.console.aws.amazon.com/console/home?region=us-west-1#
// GovCloud list
// https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
let regions = [{
text1: "US East",
text2: "N. Virginia",
code: "us-east-1"
}, {
text1: "US East",
text2: "Ohio",
code: "us-east-2"
}, {
text1: "US West",
text2: "N. California",
code: "us-west-1"
}, {
text1: "US West",
text2: "Oregon",
code: "us-west-2"
}, {
text1: "Africa",
text2: "Cape Town",
code: "af-south-1"
}, {
text1: "Asia Pacific",
text2: "Hong Kong",
code: "ap-east-1"
}, {
text1: "Asia Pacific",
text2: "Hyderabad",
code: "ap-south-2"
}, {
text1: "Asia Pacific",
text2: "Jakarta",
code: "ap-southeast-3"
}, {
text1: "Asia Pacific",
text2: "Melbourne",
code: "ap-southeast-4",
}, {
text1: "Asia Pacific",
text2: "Mumbai",
code: "ap-south-1"
}, {
text1: "Asia Pacific",
text2: "Osaka",
code: "ap-northeast-3"
}, {
text1: "Asia Pacific",
text2: "Seoul",
code: "ap-northeast-2"
}, {
text1: "Asia Pacific",
text2: "Singapore",
code: "ap-southeast-1"
}, {
text1: "Asia Pacific",
text2: "Sydney",
code: "ap-southeast-2"
}, {
text1: "Asia Pacific",
text2: "Tokyo",
code: "ap-northeast-1"
}, {
text1: "Canada",
text2: "Central",
code: "ca-central-1"
}, {
text1: "Canada",
text2: "Calgary",
code: "ca-west-1"
}, {
text1: "Europe",
text2: "Frankfurt",
code: "eu-central-1"
}, {
text1: "Europe",
text2: "Ireland",
code: "eu-west-1"
}, {
text1: "Europe",
text2: "London",
code: "eu-west-2"
}, {
text1: "Europe",
text2: "Milan",
code: "eu-south-1"
}, {
text1: "Europe",
text2: "Paris",
code: "eu-west-3"
}, {
text1: "Europe",
text2: "Spain",
code: "eu-south-2"
}, {
text1: "Europe",
text2: "Stockholm",
code: "eu-north-1"
}, {
text1: "Europe",
text2: "Zurich",
code: "eu-central-2"
}, {
text1: "Middle East",
text2: "Bahrain",
code: "me-south-1"
}, {
text1: "Middle East",
text2: "UAE",
code: "me-central-1"
}, {
text1: "South America",
text2: "São Paulo",
code: "sa-east-1"
}, {
text1: "Israel",
text2: "Tel Aviv",
code: "il-central-1"
}, {
text1: "AWS GovCloud",
text2: "US-East",
code: "us-gov-east-1"
}, {
text1: "AWS GovCloud",
text2: "US",
code: "us-gov-west-1"
}];
</script>
<?php
$body = ob_get_clean();
viewProvider();
?>