createWorldGenerationJob method
Creates worlds using the specified template.
May throw ResourceNotFoundException. May throw InvalidParameterException. May throw InternalServerException. May throw ThrottlingException. May throw LimitExceededException. May throw IdempotentParameterMismatchException. May throw ServiceUnavailableException.
Parameter template
:
The Amazon Resource Name (arn) of the world template describing the worlds
you want to create.
Parameter worldCount
:
Information about the world count.
Parameter clientRequestToken
:
Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter tags
:
A map that contains tag keys and tag values that are attached to the world
generator job.
Parameter worldTags
:
A map that contains tag keys and tag values that are attached to the
generated worlds.
Implementation
Future<CreateWorldGenerationJobResponse> createWorldGenerationJob({
required String template,
required WorldCount worldCount,
String? clientRequestToken,
Map<String, String>? tags,
Map<String, String>? worldTags,
}) async {
ArgumentError.checkNotNull(template, 'template');
_s.validateStringLength(
'template',
template,
1,
1224,
isRequired: true,
);
ArgumentError.checkNotNull(worldCount, 'worldCount');
_s.validateStringLength(
'clientRequestToken',
clientRequestToken,
1,
64,
);
final $payload = <String, dynamic>{
'template': template,
'worldCount': worldCount,
'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'tags': tags,
if (worldTags != null) 'worldTags': worldTags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/createWorldGenerationJob',
exceptionFnMap: _exceptionFns,
);
return CreateWorldGenerationJobResponse.fromJson(response);
}