Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Boto3列出区域中可用的服务_Python_Amazon Web Services_Boto3 - Fatal编程技术网

Python Boto3列出区域中可用的服务

Python Boto3列出区域中可用的服务,python,amazon-web-services,boto3,Python,Amazon Web Services,Boto3,在AWS cli中,我可以在运行时获得可用服务的列表 aws help boto3中是否有命令允许我以编程方式列出在初始化boto3客户端时可以使用的可用服务 client = boto3.client('<some service>') client=boto3.client(“”) 我可以在中看到,但我希望能够用python列出服务。您可以使用会话。获取可用的\u服务(),如所示 您可以使用会话。获取可用的服务(),请参见 虽然与boto3没有具体关系,但请注意,您现在可以

在AWS cli中,我可以在运行时获得可用服务的列表

aws help
boto3
中是否有命令允许我以编程方式列出在初始化boto3客户端时可以使用的可用服务

client = boto3.client('<some service>')
client=boto3.client(“”)

我可以在中看到,但我希望能够用python列出服务。

您可以使用
会话。获取可用的\u服务()
,如所示


您可以使用会话。获取可用的服务(),请参见


虽然与boto3没有具体关系,但请注意,您现在可以查询参数存储以获得有用的信息,例如:

  • 哪些地区是活跃的
  • 在给定区域中提供哪些服务
  • 在哪些地区提供特定服务

阅读。

虽然与boto3没有具体关系,但请注意,您现在可以查询参数存储以获得有用的信息,例如:

  • 哪些地区是活跃的
  • 在给定区域中提供哪些服务
  • 在哪些地区提供特定服务

阅读。

如果您只想列出服务,则无需使用访问键即可执行此操作。使用boto version 1.14.35 services=boto3.Session().get_available_services()进行测试。如果您只想列出服务,则无需使用访问键即可使用此功能。使用boto版本1.14.35服务进行测试=boto3.Session().get\u available\u services()
session = boto3.Session(
    aws_access_key_id=MY_AWS_ACCESS_KEY_ID,
    aws_secret_access_key=MY_AWS_SECRET_ACCESS_KEY
)

services = session.get_available_services()