createLicenseAssetGroup method

Future<CreateLicenseAssetGroupResponse> createLicenseAssetGroup({
  1. required List<String> associatedLicenseAssetRulesetARNs,
  2. required String clientToken,
  3. required List<LicenseAssetGroupConfiguration> licenseAssetGroupConfigurations,
  4. required String name,
  5. String? description,
  6. List<LicenseAssetGroupProperty>? properties,
  7. List<Tag>? tags,
})

Creates a license asset group.

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

Parameter associatedLicenseAssetRulesetARNs : ARNs of associated license asset rulesets.

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

Parameter licenseAssetGroupConfigurations : License asset group configurations.

Parameter name : License asset group name.

Parameter description : License asset group description.

Parameter properties : License asset group properties.

Parameter tags : Tags to add to the license asset group.

Implementation

Future<CreateLicenseAssetGroupResponse> createLicenseAssetGroup({
  required List<String> associatedLicenseAssetRulesetARNs,
  required String clientToken,
  required List<LicenseAssetGroupConfiguration>
      licenseAssetGroupConfigurations,
  required String name,
  String? description,
  List<LicenseAssetGroupProperty>? properties,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLicenseManager.CreateLicenseAssetGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AssociatedLicenseAssetRulesetARNs': associatedLicenseAssetRulesetARNs,
      'ClientToken': clientToken,
      'LicenseAssetGroupConfigurations': licenseAssetGroupConfigurations,
      'Name': name,
      if (description != null) 'Description': description,
      if (properties != null) 'Properties': properties,
      if (tags != null) 'Tags': tags,
    },
  );

  return CreateLicenseAssetGroupResponse.fromJson(jsonResponse.body);
}