associateApprovedOrigin method

Future<void> associateApprovedOrigin({
  1. required String instanceId,
  2. required String origin,
  3. String? clientToken,
})

This API is in preview release for Connect Customer and is subject to change.

Associates an approved origin to an Connect Customer instance.

May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceConflictException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter origin : The domain to add to your allow list.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Implementation

Future<void> associateApprovedOrigin({
  required String instanceId,
  required String origin,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'Origin': origin,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/instance/${Uri.encodeComponent(instanceId)}/approved-origin',
    exceptionFnMap: _exceptionFns,
  );
}