通过CLI停止RDS实例 [英] Stopping an RDS instance via CLI

查看:69
本文介绍了通过CLI停止RDS实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用AWS的一项最新功能,该功能允许您停止RDS实例.

I am trying to use one of AWS's latest features where it allows you to stop an RDS instance.

我关注了此文档,其中解释了我需要运行命令: aws rds stop-db-instance --db-instance-identifier mydbinstance但是,当我这样做时,我得到了:

I followed this doc where it explains that I need to run the command: aws rds stop-db-instance --db-instance-identifier mydbinstance however, when I do that I get this:

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:

add-role-to-db-cluster                   | add-source-identifier-to-subscription
add-tags-to-resource                     | apply-pending-maintenance-action

,它将继续列出其他RDS命令,但不包括stop-db-instance. 我更新了CLI,当前的版本是:aws-cli/1.11.11 Python/2.7.9 Windows/8 botocore/1.4.68

and it continues to list other RDS commands but not including stop-db-instance. I updated my CLI and the current version that I have is: aws-cli/1.11.11 Python/2.7.9 Windows/8 botocore/1.4.68

我想念什么?

更新

我尝试再次升级aws cli,但我得到的是一切都已更新:

I tried to upgrade the aws cli again but what I'm getting back is that everything is up to date:

C:\Users\n.ihab>aws --version
aws-cli/1.11.11 Python/2.7.9 Windows/8 botocore/1.4.68

C:\Users\n.ihab>pip install awscli --upgrade
Requirement already up-to-date: awscli in c:\python34\lib\site-packages
Requirement already up-to-date: rsa<=3.5.0,>=3.1.2 in c:\python34\lib\site-packages (from awscli)
Requirement already up-to-date: colorama<=0.3.7,>=0.2.5 in c:\users\n.ihab\appdata\roaming\python\python34\site-packages (from awscli)
Requirement already up-to-date: docutils>=0.10 in c:\users\n.ihab\appdata\roaming\python\python34\site-packages (from awscli)
Requirement already up-to-date: botocore==1.5.72 in c:\python34\lib\site-packages (from awscli)
Requirement already up-to-date: PyYAML<=3.12,>=3.10 in c:\users\n.ihab\appdata\roaming\python\python34\site-packages (from awscli)
Requirement already up-to-date: s3transfer<0.2.0,>=0.1.9 in c:\python34\lib\site-packages (from awscli)
Requirement already up-to-date: pyasn1>=0.1.3 in c:\python34\lib\site-packages (from rsa<=3.5.0,>=3.1.2->awscli)
Requirement already up-to-date: python-dateutil<3.0.0,>=2.1 in c:\users\n.ihab\appdata\roaming\python\python34\site-packages (from botocore==1.5.72->awscli)
Requirement already up-to-date: jmespath<1.0.0,>=0.7.1 in c:\users\n.ihab\appdata\roaming\python\python34\site-packages (from botocore==1.5.72->awscli)
Requirement already up-to-date: six>=1.5 in c:\users\n.ihab\appdata\roaming\python\python34\site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.5.72->awscli)

C:\Users\n.ihab>aws --version
aws-cli/1.11.11 Python/2.7.9 Windows/8 botocore/1.4.68

在执行此步骤之前,还需要升级吗?

Is there something else I need to upgrade prior to this step?

推荐答案

它是一项新功能,自CLI版本1.11.95起可用.最新版本是1.11.109.更新到最新的AWS CLI版本,您可以使用stop-db-instance

It is a new feature and available since CLI version 1.11.95. Latest version is 1.11.109. Update to the latest AWS CLI version and you can use stop-db-instance

升级前

$ aws --version
aws-cli/1.11.83 Python/2.7.10 Linux/4.1.17-22.30.amzn1.x86_64 botocore/1.5.46

$ aws rds stop-db-instance    
aws: error: argument operation: Invalid choice, valid choices are:

升级CLI并重新启动(Linux)

$ sudo pip install awscli --upgrade

升级后

$ aws --version
aws-cli/1.11.109 Python/2.6.9 Linux/4.1.17-22.30.amzn1.x86_64 botocore/1.5.72

$ aws rds stop-db-instance
aws: error: argument --db-instance-identifier is required

这篇关于通过CLI停止RDS实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆