createConfiguration method

Future<CreateConfigurationResponse> createConfiguration({
  1. required String name,
  2. required RunConfigurations runConfigurations,
  3. String? description,
  4. String? requestId,
  5. Map<String, String>? tags,
})

Create a new configuration.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw RequestTimeoutException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter name : User-friendly name for the configuration.

Parameter runConfigurations : Required run-specific configurations.

Parameter description : Optional description for the configuration.

Parameter requestId : Optional request idempotency token. If not specified, a universally unique identifier (UUID) will be automatically generated for the request.

Parameter tags : Optional tags for the configuration.

Implementation

Future<CreateConfigurationResponse> createConfiguration({
  required String name,
  required RunConfigurations runConfigurations,
  String? description,
  String? requestId,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'runConfigurations': runConfigurations,
    if (description != null) 'description': description,
    'requestId': requestId ?? _s.generateIdempotencyToken(),
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/configuration',
    exceptionFnMap: _exceptionFns,
  );
  return CreateConfigurationResponse.fromJson(response);
}