createSuiteDefinition method
Creates a Device Advisor test suite.
Requires permission to access the CreateSuiteDefinition action.
May throw InternalServerException.
May throw ValidationException.
Parameter suiteDefinitionConfiguration :
Creates a Device Advisor test suite with suite definition configuration.
Parameter clientToken :
The client token for the test suite definition creation. This token is
used for tracking test suite definition creation using retries and
obtaining its status. This parameter is optional.
Parameter tags :
The tags to be attached to the suite definition.
Implementation
Future<CreateSuiteDefinitionResponse> createSuiteDefinition({
required SuiteDefinitionConfiguration suiteDefinitionConfiguration,
String? clientToken,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'suiteDefinitionConfiguration': suiteDefinitionConfiguration,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/suiteDefinitions',
exceptionFnMap: _exceptionFns,
);
return CreateSuiteDefinitionResponse.fromJson(response);
}