associateWebsiteCertificateAuthority method

Future<AssociateWebsiteCertificateAuthorityResponse> associateWebsiteCertificateAuthority({
  1. required String certificate,
  2. required String fleetArn,
  3. String? displayName,
})

Imports the root certificate of a certificate authority (CA) used to obtain TLS certificates used by associated websites within the company network.

May throw UnauthorizedException. May throw InternalServerErrorException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ResourceAlreadyExistsException. May throw TooManyRequestsException.

Parameter certificate : The root certificate of the CA.

Parameter fleetArn : The ARN of the fleet.

Parameter displayName : The certificate name to display.

Implementation

Future<AssociateWebsiteCertificateAuthorityResponse>
    associateWebsiteCertificateAuthority({
  required String certificate,
  required String fleetArn,
  String? displayName,
}) async {
  ArgumentError.checkNotNull(certificate, 'certificate');
  _s.validateStringLength(
    'certificate',
    certificate,
    1,
    8192,
    isRequired: true,
  );
  ArgumentError.checkNotNull(fleetArn, 'fleetArn');
  _s.validateStringLength(
    'fleetArn',
    fleetArn,
    20,
    2048,
    isRequired: true,
  );
  _s.validateStringLength(
    'displayName',
    displayName,
    0,
    100,
  );
  final $payload = <String, dynamic>{
    'Certificate': certificate,
    'FleetArn': fleetArn,
    if (displayName != null) 'DisplayName': displayName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/associateWebsiteCertificateAuthority',
    exceptionFnMap: _exceptionFns,
  );
  return AssociateWebsiteCertificateAuthorityResponse.fromJson(response);
}