amazon-web-services - 如何通过 CLI 停用 AWS 中的区域
问题描述
我正在尝试通过 CLI 停用帐户区域是否可以通过 CLI 进行?
我可以通过 AWS 控制台 IAM -> Account Settings -> Region -> Deactivate
解决方案
根据AWS: Allows Enabling and Disabling AWS Regions - AWS Identity and Access Management,与启用账户相关的 IAM 权限前缀为account:
:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EnableDisableHongKong",
"Effect": "Allow",
"Action": [
"account:EnableRegion",
"account:DisableRegion"
],
"Resource": "",
"Condition": {
"StringEquals": {"account:TargetRegion": "ap-east-1"}
}
},
{
"Sid": "ViewConsole",
"Effect": "Allow",
"Action": [
"aws-portal:ViewAccount",
"account:ListRegions"
],
"Resource": ""
}
]
}
我找不到该account
类别的任何 AWS CLI 命令。(我在 boto3 中也没有看到任何东西。)
我确实设法在以下位置找到了操作的参考:AWS 账户的操作、资源和条件键 - AWS 身份和访问管理。因此,它出现在各种开发工具包和 AWS CLI 中可能只是时间问题。
这个答案是在 2019 年 6 月写的,所以以后可能会发生变化。
推荐阅读
- jquery - 如何在 JQuery Query Builder 中模拟全局运算符?
- flutter - 如何使颤动显示完整的文本
- javascript - 检查身份验证后反应组件未呈现
- java - 如何在 Nativescript-angular 中使用 Java 的内部匿名类?
- python - Python中的值错误,代码在某些地方失败
- html - 我对 numpad jquery 有疑问。我希望用户输入显示在用户单击小键盘的位置
- python - 如何将 pandas.core.series.Series 转换为 Dataframe?
- pandas - 如何从日期时间中提取一天中的时间(pd.Timedelta 或 datetime.time)?
- javascript - 将图像从直接消息媒体附加到 Twitter 状态
- javascript - 无法在反应输入中使用 onFocus 和 onBlur 选择建议列表值