Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

129 Commits

Repository files navigation

product / feature regional availability

Azure services per region
frombs4importBeautifulSoup# save webpage locally to ensure table has fully loadedsoup=BeautifulSoup(open('https://azure.microsoft.com/en-us/global-infrastructure/services/?products=all&regions=all'), 'html.parser')
forrowinsoup.find_all('tr', class_='service-row', attrs={'data-product-slug' : True}):
forcellinrow.find_all(attrs={'data-region-slug' : True}):
if'Not available'notincell.text:
print(cell['data-region-slug'])
python3 azure.py | sort | uniq -c | sort -nr | grep -v 'non-regional'# Azure services per region

instance type regional availability

forREGIONin$(aws ec2 describe-regions --query "Regions[*].RegionName" --output text)doecho$REGION# /cn/ instead of /aws/ for cn- regions: https://github.com/vantage-sh/ec2instances.info/issues/330#issuecomment-518730823
curl -s https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/$REGION/index.json | jq -r '.products[].attributes["instanceType"]'| sort -u | grep '\.'| sed 's/\..*//'| sort -u
done# tl;dr: new regions do not offer old instance types
cmr5 t3 (post-Feb 2018 regions without previous generation instance types):
us-gov-east-1
eu-north-1
ap-east-1
...
------------
r4-5:
eu-west-[23]
ca-central-1
cn-northwest-1
r3-5:
ap-south-1
eu-west-1
ap-northeast-[123]
ap-southeast-[12]
eu-central-1
sa-east-1
us-(east|west)-[12]
us-gov-west-1
cn-north-1
----------------
cm4-5:
ap-south-1
eu-west-[23]
us-east-2
ca-central-1
cn-northwest-1
cm3-5:
eu-central-1
ap-northeast-[23]
c3-5 m1-5:
cn-north-1
-------------
t2-t3:
ap-south-1
eu-west-[23]
ap-northeast-[23]
ca-central-1
eu-central-1
us-east-2
cn-north(west)-1
---------------
cm1-5 t1-3 (9 oldest pre-2013 regions with all previous generation instance types):
eu-west-1
ap-northeast-1
sa-east-1
ap-southeast-[12]
us-east-1
us-west-[12]
us-gov-west-1

$ curl -s -N --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | pcregrep -o1 '^( {6}( {4})?".*?")'| sort | uniq -c | sort -nr
# missing a few https://github.com/awsdocs/aws-cloudformation-user-guide/issues/4#issuecomment-503828259
30933 "UpdateType"# property fields
30933 "Required"
30933 "Documentation"
21961 "PrimitiveType"
12121 "Type"
4123 "DuplicatesAllowed"
3097 "ItemType"
1795 "PrimitiveItemType"
8413 "Documentation"# resource fields
8398 "Properties"
1070 "Attributes"
15 "UpdateType"
15 "Required"
11 "Type"
11 "ItemType"
4 "PrimitiveType"
1 "AdditionalProperties"
$ curl -s -N --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | pcregrep -o1 '("(DuplicatesAllowed|(Primitive(Item)?|Update)Type|Required)": .*?),'| sort | uniq -c | sort -k2,2 -k1nr
121 "DuplicatesAllowed": false
24 "DuplicatesAllowed": true
1452 "PrimitiveItemType": "String"
23 "PrimitiveItemType": "Double"
19 "PrimitiveItemType": "Integer"
5 "PrimitiveItemType": "Json"
2519 "PrimitiveType": "String"
521 "PrimitiveType": "Integer"
309 "PrimitiveType": "Boolean"
81 "PrimitiveType": "Json"
68 "PrimitiveType": "Double"
1 "PrimitiveType": "Long"
22523 "Required": false
8425 "Required": true
21192 "UpdateType": "Mutable"
4518 "UpdateType": "Immutable"
303 "UpdateType": "Conditional"
$ curl -s -N --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | pcregrep -o1 '("(Item)?Type": .*?),'| sort | uniq -c | sort -nr | head
4583 "Type": "List"
729 "ItemType": "Tag"
307 "Type": "Map"
...
$ curl -s --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | jq '.ResourceTypes'| jq 'with_entries(.value |= .Attributes)'| grep -v ': null'| grep -v 'Type": "'# GetAtt attributes
$ curl -s -N --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | pcregrep -o1 '::(.*)::'| sort | uniq -c | wc -l
# services
$ curl -s --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | jq '.ResourceTypes, .PropertyTypes | length'
1371 # resource types
7042 # property types
$ curl -s -N --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | pcregrep -o1 '::(.*)::[^.]*"'| sort | uniq -c | sort -nr | head
# resource types per service
$ diff -u <(curl -s https://s3.eu-west-1.amazonaws.com/cfn-resource-specifications-eu-west-1-prod/latest/CloudFormationResourceSpecification.json | jq '.ResourceTypes | keys'| jq -S)<(curl -s https://s3.us-west-2.amazonaws.com/cfn-resource-specifications-us-west-2-prod/latest/CloudFormationResourceSpecification.json | jq '.ResourceTypes | keys'| jq -S)# resource type difference between two regions
$ forREGIONin$(aws ec2 describe-regions --query "Regions[*].RegionName" --output text)do# .com.cn for cn- regions
curl -s -N https://s3.$REGION.amazonaws.com/cfn-resource-specifications-$REGION-prod/latest/CloudFormationResourceSpecification.json | pcregrep -o1 '::(.*)::'| sort | uniq -c | wc -l | xargs echo -n;echo"$REGION"done# CloudFormation services per region
$ forREGIONin$(aws ec2 describe-regions --query "Regions[*].RegionName" --output text)do# .com.cn for cn- regions
curl -s -N https://s3.$REGION.amazonaws.com/cfn-resource-specifications-$REGION-prod/latest/CloudFormationResourceSpecification.json | pcregrep -o1 '::(.*)::[^.]*"'| wc -l | xargs echo -n;echo"$REGION"done# resource types per region
$ curl -s -N --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json | pcregrep -o1 '^( {8}".*?")'| sort | uniq -c | sort -nr | head
915 "Name"
860 "Tags"
482 "Arn"
471 "Description"
367 "Type"
..
terraform providers schema -json | jq '.provider_schemas ."registry.terraform.io/hashicorp/aws" .resource_schemas | length'# resource types

About

cloud region / instance type data

Topics

Resources

Stars

63 stars

Watchers

1 watching

Forks

Sponsor this project

Contributors