updateLicenseAssetRuleset method

Future<UpdateLicenseAssetRulesetResponse> updateLicenseAssetRuleset({
  1. required String clientToken,
  2. required String licenseAssetRulesetArn,
  3. required List<LicenseAssetRule> rules,
  4. String? description,
  5. String? name,
})

Updates a license asset ruleset.

May throw AccessDeniedException. May throw AuthorizationException. May throw InvalidParameterValueException. May throw RateLimitExceededException. May throw ServerInternalException. May throw ValidationException.

Parameter clientToken : Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Parameter licenseAssetRulesetArn : Amazon Resource Name (ARN) of the license asset ruleset.

Parameter rules : License asset rules.

Parameter description : License asset ruleset description.

Parameter name : License asset ruleset name.

Implementation

Future<UpdateLicenseAssetRulesetResponse> updateLicenseAssetRuleset({
  required String clientToken,
  required String licenseAssetRulesetArn,
  required List<LicenseAssetRule> rules,
  String? description,
  String? name,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLicenseManager.UpdateLicenseAssetRuleset'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ClientToken': clientToken,
      'LicenseAssetRulesetArn': licenseAssetRulesetArn,
      'Rules': rules,
      if (description != null) 'Description': description,
      if (name != null) 'Name': name,
    },
  );

  return UpdateLicenseAssetRulesetResponse.fromJson(jsonResponse.body);
}