getParameters method

Future<GetParametersResult> getParameters({
  1. required List<String> names,
  2. bool? withDecryption,
})

Get details of a parameter. Don't confuse this API action with the GetParameter API action.

May throw InvalidKeyId. May throw InternalServerError.

Parameter names : Names of the parameters for which you want to query information.

Parameter withDecryption : Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.

Implementation

Future<GetParametersResult> getParameters({
  required List<String> names,
  bool? withDecryption,
}) async {
  ArgumentError.checkNotNull(names, 'names');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.GetParameters'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Names': names,
      if (withDecryption != null) 'WithDecryption': withDecryption,
    },
  );

  return GetParametersResult.fromJson(jsonResponse.body);
}