updateGatewayInformation method

Future<UpdateGatewayInformationOutput> updateGatewayInformation({
  1. required String gatewayArn,
  2. String? gatewayDisplayName,
})

Updates a gateway's name. Specify which gateway to update using the Amazon Resource Name (ARN) of the gateway in your request.

May throw ConflictException. May throw ResourceNotFoundException.

Parameter gatewayArn : The Amazon Resource Name (ARN) of the gateway to update.

Parameter gatewayDisplayName : The updated display name of the gateway.

Implementation

Future<UpdateGatewayInformationOutput> updateGatewayInformation({
  required String gatewayArn,
  String? gatewayDisplayName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'BackupOnPremises_v20210101.UpdateGatewayInformation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GatewayArn': gatewayArn,
      if (gatewayDisplayName != null)
        'GatewayDisplayName': gatewayDisplayName,
    },
  );

  return UpdateGatewayInformationOutput.fromJson(jsonResponse.body);
}