首页 > 解决方案 > 如何在不提供参数名称的情况下获取 AWS 账户使用的所有参数?

问题描述

当我需要获取存储AWS Secrets Manager在 AWS 帐户中的所有机密时,我将其称为listSecrets传递ListSecretsRequest作为参数。

现在我正在寻找一种类似的方法AWS Systems Manager来获取存储在 AWS 账户中的所有参数。我getParameterHistory在 API文档中找到了一个方法,但描述看起来很混乱。Request 语法指出有一个必需 Name的参数(您要查询的参数的名称)。但是我需要在不提供特定名称的情况下获取所有参数。

调用该方法时出现以下错误:AWSSimpleSystemsManagementException: 1 validation error detected: Value null at 'name' failed to satisfy constraint: Member must not be null (Service: AWSSimpleSystemsManagement; Status Code: 400; Error Code: ValidationException; Request ID: 0caa3be7-9d85-4671-9515-fdcc45c641d6)

同时 API 提供了一种getParameter方法,允许Get information about a parameter by using the parameter name.

AWS Secrets Manager通过类似于AWS Secrets Manager's 的方法获取AWS 账户使用的所有参数的正确方法是什么,listSecrets而无需提供参数名称?

标签: amazon-web-services

解决方案


调用describeParameters (describeParametersRequest)


推荐阅读