createConfig method

Future<ConfigIdResponse> createConfig({
  1. required ConfigTypeData configData,
  2. required String name,
  3. Map<String, String>? tags,
})

Creates a Config with the specified configData parameters.

Only one type of configData can be specified.

May throw DependencyException. May throw InvalidParameterException. May throw ResourceLimitExceededException. May throw ResourceNotFoundException.

Parameter configData : Parameters of a Config.

Parameter name : Name of a Config.

Parameter tags : Tags assigned to a Config.

Implementation

Future<ConfigIdResponse> createConfig({
  required ConfigTypeData configData,
  required String name,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'configData': configData,
    'name': name,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/config',
    exceptionFnMap: _exceptionFns,
  );
  return ConfigIdResponse.fromJson(response);
}