updateAppInstance method

Future<UpdateAppInstanceResponse> updateAppInstance({
  1. required String appInstanceArn,
  2. required String name,
  3. String? metadata,
})

Updates AppInstance metadata.

May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw ThrottledClientException. May throw UnauthorizedClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter appInstanceArn : The ARN of the app instance.

Parameter name : The name that you want to change.

Parameter metadata : The metadata that you want to change.

Implementation

Future<UpdateAppInstanceResponse> updateAppInstance({
  required String appInstanceArn,
  required String name,
  String? metadata,
}) async {
  ArgumentError.checkNotNull(appInstanceArn, 'appInstanceArn');
  _s.validateStringLength(
    'appInstanceArn',
    appInstanceArn,
    5,
    1600,
    isRequired: true,
  );
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    256,
    isRequired: true,
  );
  _s.validateStringLength(
    'metadata',
    metadata,
    0,
    1024,
  );
  final $payload = <String, dynamic>{
    'Name': name,
    if (metadata != null) 'Metadata': metadata,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/app-instances/${Uri.encodeComponent(appInstanceArn)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAppInstanceResponse.fromJson(response);
}