unlabelParameterVersion method

Future<UnlabelParameterVersionResult> unlabelParameterVersion({
  1. required List<String> labels,
  2. required String name,
  3. required int parameterVersion,
})

Remove a label or labels from a parameter.

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.

May throw InternalServerError. May throw ParameterNotFound. May throw ParameterVersionNotFound. May throw TooManyUpdates.

Parameter labels : One or more labels to delete from the specified parameter version.

Parameter name : The name of the parameter from which you want to delete one or more labels.

Parameter parameterVersion : The specific version of the parameter which you want to delete one or more labels from. If it isn't present, the call will fail.

Implementation

Future<UnlabelParameterVersionResult> unlabelParameterVersion({
  required List<String> labels,
  required String name,
  required int parameterVersion,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.UnlabelParameterVersion'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Labels': labels,
      'Name': name,
      'ParameterVersion': parameterVersion,
    },
  );

  return UnlabelParameterVersionResult.fromJson(jsonResponse.body);
}