updateBasePathMapping method

Future<BasePathMapping> updateBasePathMapping({
  1. required String basePath,
  2. required String domainName,
  3. String? domainNameId,
  4. List<PatchOperation>? patchOperations,
})

Changes information about the BasePathMapping resource.

May throw BadRequestException. May throw ConflictException. May throw LimitExceededException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter basePath : The base path of the BasePathMapping resource to change.

To specify an empty base path, set this parameter to '(none)'.

Parameter domainName : The domain name of the BasePathMapping resource to change.

Parameter domainNameId : The identifier for the domain name resource. Supported only for private custom domain names.

Parameter patchOperations : For more information about supported patch operations, see Patch Operations.

Implementation

Future<BasePathMapping> updateBasePathMapping({
  required String basePath,
  required String domainName,
  String? domainNameId,
  List<PatchOperation>? patchOperations,
}) async {
  final $query = <String, List<String>>{
    if (domainNameId != null) 'domainNameId': [domainNameId],
  };
  final $payload = <String, dynamic>{
    if (patchOperations != null) 'patchOperations': patchOperations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/domainnames/${Uri.encodeComponent(domainName)}/basepathmappings/${Uri.encodeComponent(basePath)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return BasePathMapping.fromJson(response);
}