sendProcurementPortalValidation method

Future<SendProcurementPortalValidationResponse> sendProcurementPortalValidation({
  1. required String procurementPortalPreferenceArn,
  2. String? clientToken,
})

This feature API is subject to changing at any time. For more information, see the Amazon Web Services Service Terms (Betas and Previews).

Sends a validation request for a procurement portal preference. This operation initiates the validation process by issuing a validation code that confirms ownership and connectivity of the configured procurement portal endpoint. Use VerifyProcurementPortalValidation to submit the received code and complete validation.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter procurementPortalPreferenceArn : The Amazon Resource Name (ARN) of the procurement portal preference to validate.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

Implementation

Future<SendProcurementPortalValidationResponse>
    sendProcurementPortalValidation({
  required String procurementPortalPreferenceArn,
  String? clientToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Invoicing.SendProcurementPortalValidation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProcurementPortalPreferenceArn': procurementPortalPreferenceArn,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    },
  );

  return SendProcurementPortalValidationResponse.fromJson(jsonResponse.body);
}