associateDomain method
Specifies a domain to be associated to Amazon WorkLink.
May throw UnauthorizedException. May throw InternalServerErrorException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ResourceAlreadyExistsException. May throw TooManyRequestsException.
Parameter acmCertificateArn :
The ARN of an issued ACM certificate that is valid for the domain being
associated.
Parameter domainName :
The fully qualified domain name (FQDN).
Parameter fleetArn :
The Amazon Resource Name (ARN) of the fleet.
Parameter displayName :
The name to display.
Implementation
Future<void> associateDomain({
  required String acmCertificateArn,
  required String domainName,
  required String fleetArn,
  String? displayName,
}) async {
  ArgumentError.checkNotNull(acmCertificateArn, 'acmCertificateArn');
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    1,
    253,
    isRequired: true,
  );
  ArgumentError.checkNotNull(fleetArn, 'fleetArn');
  _s.validateStringLength(
    'fleetArn',
    fleetArn,
    20,
    2048,
    isRequired: true,
  );
  _s.validateStringLength(
    'displayName',
    displayName,
    0,
    100,
  );
  final $payload = <String, dynamic>{
    'AcmCertificateArn': acmCertificateArn,
    'DomainName': domainName,
    'FleetArn': fleetArn,
    if (displayName != null) 'DisplayName': displayName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/associateDomain',
    exceptionFnMap: _exceptionFns,
  );
}