updatePackageGroup method

Future<UpdatePackageGroupResult> updatePackageGroup({
  1. required String domain,
  2. required String packageGroup,
  3. String? contactInfo,
  4. String? description,
  5. String? domainOwner,
})

Updates a package group. This API cannot be used to update a package group's origin configuration or pattern. To update a package group's origin configuration, use UpdatePackageGroupOriginConfiguration.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter domain : The name of the domain which contains the package group to be updated.

Parameter packageGroup : The pattern of the package group to be updated.

Parameter contactInfo : Contact information which you want to update the requested package group with.

Parameter description : The description you want to update the requested package group with.

Parameter domainOwner : The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

Implementation

Future<UpdatePackageGroupResult> updatePackageGroup({
  required String domain,
  required String packageGroup,
  String? contactInfo,
  String? description,
  String? domainOwner,
}) async {
  final $query = <String, List<String>>{
    'domain': [domain],
    if (domainOwner != null) 'domain-owner': [domainOwner],
  };
  final $payload = <String, dynamic>{
    'packageGroup': packageGroup,
    if (contactInfo != null) 'contactInfo': contactInfo,
    if (description != null) 'description': description,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v1/package-group',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return UpdatePackageGroupResult.fromJson(response);
}