deleteDomainAssociation method

Future<DeleteDomainAssociationResult> deleteDomainAssociation({
  1. required String appId,
  2. required String domainName,
})

Deletes a domain association for an Amplify app.

May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw InternalFailureException. May throw DependentServiceFailureException.

Parameter appId : The unique id for an Amplify app.

Parameter domainName : The name of the domain.

Implementation

Future<DeleteDomainAssociationResult> deleteDomainAssociation({
  required String appId,
  required String domainName,
}) async {
  ArgumentError.checkNotNull(appId, 'appId');
  _s.validateStringLength(
    'appId',
    appId,
    1,
    20,
    isRequired: true,
  );
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    0,
    255,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/apps/${Uri.encodeComponent(appId)}/domains/${Uri.encodeComponent(domainName)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteDomainAssociationResult.fromJson(response);
}