【AWS CLI 示例集】Cloud9

Cloud9

我们主要检查是否可以使用AWS Cloud9执行命令。
如果您想提供示例命令,请使用下面的表格提交。
如果列出的命令示例有任何错误,请在此处更正。

建议
建议内容可能会被修改。在提出任何建议之前请注意这一点。


创建EC2开发环境

aws cloud9 create-environment-ec2 \
--name my-demo-env \
--description "My demonstration development environment." \
--instance-type t2.micro \
--image-id amazonlinux-2023-x86_64 \
--subnet-id subnet-1fab8aEX \
--automatic-stop-time-minutes 60 \
--owner-arn arn:aws:iam::123456789012:user/MyDemoUser

输出

{
    "environmentId": "8a34f51ce1e04a08882f1e811bd706EX"
}

by doc

将环境成员添加到您的开发环境

aws cloud9 create-environment-membership \
--environment-id 8a34f51ce1e04a08882f1e811bd706EX \
--user-arn arn:aws:iam::123456789012:user/AnotherDemoUser \
--permissions read-write

输出

{
  "membership": {
    "environmentId": "8a34f51ce1e04a08882f1e811bd706EX",
    "userId": "AIDAJ3LOROMOUXTBSU6EX",
    "userArn": "arn:aws:iam::123456789012:user/AnotherDemoUser",
    "permissions": "read-write"
  }
}

by doc

从开发环境中删除环境成员

aws cloud9 delete-environment-membership \
--environment-id 8a34f51ce1e04a08882f1e811bd706EX \
--user-arn arn:aws:iam::123456789012:user/AnotherDemoUser

输出

None

by doc

删除开发环境

aws cloud9 delete-environment \
--environment-id 8a34f51ce1e04a08882f1e811bd706EX

输出

None

by doc

タイトルとURLをコピーしました