updateGatewayGroup method

Future<void> updateGatewayGroup({
  1. required String gatewayGroupArn,
  2. String? description,
  3. String? name,
})

Updates the details of a gateway group. If any optional field is not provided, the existing corresponding value is left unmodified.

May throw NotFoundException. May throw NameInUseException.

Parameter gatewayGroupArn : The ARN of the gateway group to update.

Parameter description : The updated description of the gateway group.

Parameter name : The updated name of the gateway group.

Implementation

Future<void> updateGatewayGroup({
  required String gatewayGroupArn,
  String? description,
  String? name,
}) async {
  ArgumentError.checkNotNull(gatewayGroupArn, 'gatewayGroupArn');
  _s.validateStringLength(
    'description',
    description,
    0,
    200,
  );
  _s.validateStringLength(
    'name',
    name,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.UpdateGatewayGroup'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GatewayGroupArn': gatewayGroupArn,
      if (description != null) 'Description': description,
      if (name != null) 'Name': name,
    },
  );
}