【问题标题】:How to get all parameters used by the AWS account without providing a parameter name?如何在不提供参数名称的情况下获取 AWS 账户使用的所有参数?
【发布时间】:2019-12-25 00:45:28
【问题描述】:

当我需要获取 AWS Secrets Manager 存储在 AWS 账户中的所有秘密时,我会调用 listSecrets,并将 ListSecretsRequest 作为参数传递。

现在我正在AWS Systems Manager 中寻找类似的方法来获取存储在 AWS 账户中的所有参数。 我在 API documentation 中找到了一个 getParameterHistory 方法,但描述看起来很混乱。 Request 语法指出有一个 required 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 ManagerlistSecrets 方法获取AWS 账户使用的所有参数的正确方法是什么?

【问题讨论】:

    标签: amazon-web-services


    【解决方案1】:

    致电describeParameters(describeParametersRequest)

    【讨论】:

    • 根据文档describeParameters(describeParametersRequest) 用于Get information about a parameter. 但我需要的是获取存储在AWS账户中的所有参数。我是否正确,您建议的方法将允许获取所有参数?
    • 您是否尝试在没有过滤器的情况下调用它?
    猜你喜欢
    • 2020-03-29
    • 2021-08-02
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    • 2015-05-11
    • 2020-12-11
    • 1970-01-01
    • 2020-08-23
    相关资源
    最近更新 更多