updateDimension method

Future<UpdateDimensionResponse> updateDimension({
  1. required String name,
  2. required List<String> stringValues,
})

Updates the definition for a dimension. You cannot change the type of a dimension after it is created (you can delete it and recreate it).

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter name : A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.

Parameter stringValues : Specifies the value or list of values for the dimension. For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").

Implementation

Future<UpdateDimensionResponse> updateDimension({
  required String name,
  required List<String> stringValues,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(stringValues, 'stringValues');
  final $payload = <String, dynamic>{
    'stringValues': stringValues,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/dimensions/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDimensionResponse.fromJson(response);
}