updateWorldTemplate method

Future<UpdateWorldTemplateResponse> updateWorldTemplate({
  1. required String template,
  2. String? name,
  3. String? templateBody,
  4. TemplateLocation? templateLocation,
})

Updates a world template.

May throw InvalidParameterException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalServerException.

Parameter template : The Amazon Resource Name (arn) of the world template to update.

Parameter name : The name of the template.

Parameter templateBody : The world template body.

Parameter templateLocation : The location of the world template.

Implementation

Future<UpdateWorldTemplateResponse> updateWorldTemplate({
  required String template,
  String? name,
  String? templateBody,
  TemplateLocation? templateLocation,
}) async {
  ArgumentError.checkNotNull(template, 'template');
  _s.validateStringLength(
    'template',
    template,
    1,
    1224,
    isRequired: true,
  );
  _s.validateStringLength(
    'name',
    name,
    0,
    255,
  );
  _s.validateStringLength(
    'templateBody',
    templateBody,
    1,
    262144,
  );
  final $payload = <String, dynamic>{
    'template': template,
    if (name != null) 'name': name,
    if (templateBody != null) 'templateBody': templateBody,
    if (templateLocation != null) 'templateLocation': templateLocation,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/updateWorldTemplate',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateWorldTemplateResponse.fromJson(response);
}