createConfig method
Future<ConfigIdResponse>
createConfig({
- required ConfigTypeData configData,
- required String name,
- Map<
String, String> ? tags,
Creates a Config
with the specified configData
parameters.
Only one type of configData
can be specified.
May throw InvalidParameterException. May throw DependencyException. 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 {
ArgumentError.checkNotNull(configData, 'configData');
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
256,
isRequired: true,
);
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);
}