updateBillingGroup method
Future<UpdateBillingGroupResponse>
updateBillingGroup({
- required String billingGroupName,
- required BillingGroupProperties billingGroupProperties,
- int? expectedVersion,
Updates information about the billing group.
May throw InvalidRequestException. May throw VersionConflictException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceNotFoundException.
Parameter billingGroupName
:
The name of the billing group.
Parameter billingGroupProperties
:
The properties of the billing group.
Parameter expectedVersion
:
The expected version of the billing group. If the version of the billing
group does not match the expected version specified in the request, the
UpdateBillingGroup
request is rejected with a
VersionConflictException
.
Implementation
Future<UpdateBillingGroupResponse> updateBillingGroup({
required String billingGroupName,
required BillingGroupProperties billingGroupProperties,
int? expectedVersion,
}) async {
ArgumentError.checkNotNull(billingGroupName, 'billingGroupName');
_s.validateStringLength(
'billingGroupName',
billingGroupName,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(
billingGroupProperties, 'billingGroupProperties');
final $payload = <String, dynamic>{
'billingGroupProperties': billingGroupProperties,
if (expectedVersion != null) 'expectedVersion': expectedVersion,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/billing-groups/${Uri.encodeComponent(billingGroupName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateBillingGroupResponse.fromJson(response);
}