addThingToBillingGroup method

Future<void> addThingToBillingGroup({
  1. String? billingGroupArn,
  2. String? billingGroupName,
  3. String? thingArn,
  4. String? thingName,
})

Adds a thing to a billing group.

May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceNotFoundException.

Parameter billingGroupArn : The ARN of the billing group.

Parameter billingGroupName : The name of the billing group.

Parameter thingArn : The ARN of the thing to be added to the billing group.

Parameter thingName : The name of the thing to be added to the billing group.

Implementation

Future<void> addThingToBillingGroup({
  String? billingGroupArn,
  String? billingGroupName,
  String? thingArn,
  String? thingName,
}) async {
  _s.validateStringLength(
    'billingGroupName',
    billingGroupName,
    1,
    128,
  );
  _s.validateStringLength(
    'thingName',
    thingName,
    1,
    128,
  );
  final $payload = <String, dynamic>{
    if (billingGroupArn != null) 'billingGroupArn': billingGroupArn,
    if (billingGroupName != null) 'billingGroupName': billingGroupName,
    if (thingArn != null) 'thingArn': thingArn,
    if (thingName != null) 'thingName': thingName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/billing-groups/addThingToBillingGroup',
    exceptionFnMap: _exceptionFns,
  );
}