[英]HTTPSConnectionPool(host='s3-us-west-1b.amazonaws.com', port=443): Max retries exceeded with url
[英]aws product api: what is the correct regional location and url for us west 2
我正在使用boto3定價客戶端來獲得按需定價,因為boto3 ec2客戶端沒有按需定價,而是現貨定價。
這給了我一個錯誤,提示Could not connect to the endpoint URL: "https://api.pricing.us-west-2.amazonaws.com/
。
以下是我們西2的正確區域名稱或位置值是多少。我檢查了這些區域,這是正確的區域。 定價API是否不在俄勒岡州地區?
pricing = boto3.client('pricing', region_name='us-west-2')
response = pricing.get_products(
ServiceCode='AmazonEC2',
Filters=[
{'Type': 'TERM_MATCH', 'Field': 'operatingSystem', 'Value': 'Linux'},
{'Type':'TERM_MATCH', 'Field': 'location', 'Value': 'US West (Oregon)'}
],
MaxResults=20
)
for price in response['PriceList']:
resp = json.loads(price)
on_demand = resp['terms']['OnDemand']
print len(on_demand)
print(on_demand)
AWS Price List Service API僅支持兩個服務終端節點:
您將需要從其中之一中進行選擇。 不支持us-west-2。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.