Skip to content

describe_parameters async

describe_parameters(
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    filters: Optional[ParametersFilterList] = None,
    parameter_filters: Optional[ParameterStringFilterList] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    shared: Optional[Boolean] = None,
) -> DescribeParametersResult

Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable the Shared option.

Request results are returned on a best-effort basis. If you specify MaxResults in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of MaxResults. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a NextToken. You can specify the NextToken in a subsequent call to get the next set of results.

Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a ValidationException error.

If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must also update the key alias the parameter uses to reference KMS. Otherwise, DescribeParameters retrieves whatever the original key alias was referencing.

Parameters:

  • filters (Optional[ParametersFilterList], default: None ) –

    This data type is deprecated. Instead, use ParameterFilters.

  • parameter_filters (Optional[ParameterStringFilterList], default: None ) –

    Filters to limit the request results.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of items to return. (You received this token from a previous call.)

  • shared (Optional[Boolean], default: None ) –

    Lists parameters that are shared with you.

    By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the PutResourcePolicy command to be returned, the associated RAM Resource Share Created From Policy must have been promoted to a standard Resource Share using the RAM PromoteResourceShareCreatedFromPolicy API operation.

    For more information about sharing parameters, see Working with shared parameters in the Amazon Web Services Systems Manager User Guide.

Raises:

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def describe_parameters(
    self,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    filters: Optional[
        "capo_ssm.types.parameters_filter_list.ParametersFilterList"
    ] = None,
    parameter_filters: Optional[
        "capo_ssm.types.parameter_string_filter_list.ParameterStringFilterList"
    ] = None,
    max_results: Optional["capo_ssm.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
    shared: Optional["capo_ssm.types.boolean.Boolean"] = None,
) -> "capo_ssm.types.describe_parameters_result.DescribeParametersResult":
    """<p>Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable the <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribeParameters.html#systemsmanager-DescribeParameters-request-Shared">Shared</a> option.</p> <p>Request results are returned on a best-effort basis. If you specify <code>MaxResults</code> in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of <code>MaxResults</code>. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a <code>NextToken</code>. You can specify the <code>NextToken</code> in a subsequent call to get the next set of results.</p> <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p> <important> <p>If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must also update the key alias the parameter uses to reference KMS. Otherwise, <code>DescribeParameters</code> retrieves whatever the original key alias was referencing.</p> </important>

    Args:
        filters: <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
        parameter_filters: <p>Filters to limit the request results.</p>
        max_results: <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        shared: <p>Lists parameters that are shared with you.</p> <note> <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <a>PutResourcePolicy</a> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p> <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p> </note>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_filter_key.InvalidFilterKey: <p>The specified key isn't valid.</p>
        capo_ssm.errors.invalid_filter_option.InvalidFilterOption: <p>The specified filter option isn't valid. Valid options are Equals and BeginsWith. For Path filter, valid options are Recursive and OneLevel.</p>
        capo_ssm.errors.invalid_filter_value.InvalidFilterValue: <p>The filter value isn't valid. Verify the value and try again.</p>
        capo_ssm.errors.invalid_next_token.InvalidNextToken: <p>The specified token isn't valid.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.describe_parameters_request.DescribeParametersRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.describe_parameters_result.DescribeParametersResult"
    ]:
        import capo_ssm._operations.amazon_ssm.describe_parameters

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.describe_parameters.async_describe_parameters(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeParameters")
    )
    input_: capo_ssm.types.describe_parameters_request.DescribeParametersRequest = {}
    if filters is not None:
        input_["filters"] = filters
    if parameter_filters is not None:
        input_["parameter_filters"] = parameter_filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if shared is not None:
        input_["shared"] = shared

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output