AWS QuickSight 新 API 操作最近宣布在 CLI 1.16.200 中不可用



我找到了以下关于可用于快速查看的新 api 操作的博客: https://aws.amazon.com/blogs/big-data/evolve-your-analytics-with-amazon-quicksights-new-apis-and-theming-capabilities/

升级到上一个 cli 版本后,新命令不可用:

aws --version
aws-cli/1.16.200 Python/3.6.0 Windows/10 botocore/1.12.190
aws quicksight create-data-source --generate-cli-skeleton > create-data-source-cli-input.json
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:
create-group                             | create-group-membership
delete-group                             | delete-group-membership
delete-user                              | delete-user-by-principal-id
describe-group                           | describe-user
get-dashboard-embed-url                  | list-group-memberships
list-groups                              | list-user-groups
list-users                               | register-user
update-group                             | update-user
help

根据第一个答案,我想澄清一下,我执行了以下命令以升级到最新版本:pip3 install --upgrade --user awscli,但显然不起作用,我总是得到以下版本:aws-cli/1.16.200 Python/3.6.0 Windows/10 botocore/1.12.190

如果我第二次执行该命令,我会得到以下内容:

C:UsersAdministrator>pip3 install --upgrade --user awscli
Requirement already up-to-date: awscli in c:usersadministratorappdataroamingpythonpython37site-packages (**1.16.296**)
Requirement already satisfied, skipping upgrade: botocore==1.13.32 in c:usersadministratorappdataroamingpythonpython37site-packages (from awscli) (1.13.32)
Requirement already satisfied, skipping upgrade: colorama<0.4.2,>=0.2.5; python_version != "2.6" and python_version != "3.3" in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from awscli) (0.4.1)
Requirement already satisfied, skipping upgrade: s3transfer<0.3.0,>=0.2.0 in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from awscli) (0.2.1)
Requirement already satisfied, skipping upgrade: PyYAML<5.2,>=3.10; python_version != "2.6" and python_version != "3.3" in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from awscli) (5.1.2)
Requirement already satisfied, skipping upgrade: docutils<0.16,>=0.10 in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from awscli) (0.15.2)
Requirement already satisfied, skipping upgrade: rsa<=3.5.0,>=3.1.2 in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from awscli) (3.4.2)
Requirement already satisfied, skipping upgrade: urllib3<1.26,>=1.20; python_version >= "3.4" in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from botocore==1.13.32->awscli) (1.25.6)
Requirement already satisfied, skipping upgrade: jmespath<1.0.0,>=0.7.1 in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from botocore==1.13.32->awscli) (0.9.4)
Requirement already satisfied, skipping upgrade: python-dateutil<2.8.1,>=2.1; python_version >= "2.7" in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from botocore==1.13.32->awscli) (2.8.0)
Requirement already satisfied, skipping upgrade: pyasn1>=0.1.3 in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from rsa<=3.5.0,>=3.1.2->awscli) (0.4.8)
Requirement already satisfied, skipping upgrade: six>=1.5 in c:usersadministratorappdatalocalprogramspythonpython37-32libsite-packages (from python-dateutil<2.8.1,>=2.1; python_version >= "2.7"->botocore==1.13.32->awscli) (1.12.0)

最新版本显示在消息中,但版本保持不变:

c:usersadministratorappdataroamingpythonpython37site-packages (**1.16.296**)

我将尝试重新安装而不是执行升级。

最新版本支持这些新的 API 操作。在推出此功能之前,您可能已尝试升级。您使用的是相当旧的 aws-cli 版本 1.16.200,请尝试在安装 AWS CLI 版本 1 的帮助下手动升级或安装它。

请注意,IAM 当前不会将这些操作列为可通过联机策略生成器进行分配,您必须在 JSON 策略编辑器中手动编写这些操作。

$ aws --version
aws-cli/1.16.296 Python/3.7.3 Linux/5.0.0-36-generic botocore/1.13.32
$ aws quicksight commands
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:
cancel-ingestion                         | create-dashboard                        
create-data-set                          | create-data-source                      
create-group                             | create-group-membership                 
create-iam-policy-assignment             | create-ingestion                        
create-template                          | create-template-alias                   
delete-dashboard                         | delete-data-set                         
delete-data-source                       | delete-group                            
delete-group-membership                  | delete-iam-policy-assignment            
delete-template                          | delete-template-alias                   
delete-user                              | delete-user-by-principal-id             
describe-dashboard                       | describe-dashboard-permissions          
describe-data-set                        | describe-data-set-permissions           
describe-data-source                     | describe-data-source-permissions        
describe-group                           | describe-iam-policy-assignment          
describe-ingestion                       | describe-template                       
describe-template-alias                  | describe-template-permissions           
describe-user                            | get-dashboard-embed-url                 
list-dashboard-versions                  | list-dashboards                         
list-data-sets                           | list-data-sources                       
list-group-memberships                   | list-groups                             
list-iam-policy-assignments              | list-iam-policy-assignments-for-user    
list-ingestions                          | list-tags-for-resource                  
list-template-aliases                    | list-template-versions                  
list-templates                           | list-user-groups                        
list-users                               | register-user                           
tag-resource                             | untag-resource                          
update-dashboard                         | update-dashboard-permissions            
update-dashboard-published-version       | update-data-set                         
update-data-set-permissions              | update-data-source                      
update-data-source-permissions           | update-group                            
update-iam-policy-assignment             | update-template                         
update-template-alias                    | update-template-permissions             
update-user                              | help                                    

问题是 CLI 是使用 MSI Windows 安装程序安装的,但升级是使用 pip 执行的。删除 CLI 并使用 pip3 重新安装解决了这个问题。

相关内容

  • 没有找到相关文章

最新更新