createChallenge method
For general-purpose connectors. Creates a challenge password for the specified connector. The SCEP protocol uses a challenge password to authenticate a request before issuing a certificate from a certificate authority (CA). Your SCEP clients include the challenge password as part of their certificate request to Connector for SCEP. To retrieve the connector Amazon Resource Names (ARNs) for the connectors in your account, call ListConnectors.
To create additional challenge passwords for the connector, call
CreateChallenge again. We recommend frequently rotating your
challenge passwords.
May throw AccessDeniedException.
May throw BadRequestException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter connectorArn :
The Amazon Resource Name (ARN) of the connector that you want to create a
challenge for.
Parameter clientToken :
Custom string that can be used to distinguish between calls to the CreateChallenge
action. Client tokens for CreateChallenge time out after five
minutes. Therefore, if you call CreateChallenge multiple
times with the same client token within five minutes, Connector for SCEP
recognizes that you are requesting only one challenge and will only
respond with one. If you change the client token for each call, Connector
for SCEP recognizes that you are requesting multiple challenge passwords.
Parameter tags :
The key-value pairs to associate with the resource.
Implementation
Future<CreateChallengeResponse> createChallenge({
required String connectorArn,
String? clientToken,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'ConnectorArn': connectorArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/challenges',
exceptionFnMap: _exceptionFns,
);
return CreateChallengeResponse.fromJson(response);
}