我想通过脚本以编程方式在AWS中为我的REST API创建API密钥。
response = client.create_api_key(
name='string',
description='string',
enabled=True|False,
generateDistinctId=True|False,
value='string',
stageKeys=[
{
'restApiId': 'string',
'stageName': 'string'
},
],
customerId='string'
)
我找到了这个方法,并希望脚本看起来像这样。有谁知道我是如何成功创建API密钥的?
要使用CLI执行此操作我使用了它,它工作正常:
aws apigateway create-api-key --name 'WH1-In4m-ApiKey' --description 'development.' --enabled --stage-keys restApiId='yz50sp19a7',stageName='wh1'
如何在powershell中复制aws?
如果您正确配置了AWS凭证,则可以使用:
您可能必须为选项#1安装AWS Tools for Windows PowerShell