code: @SuppressWarnings("PMD.DataflowAnomalyAnalysis")
      public void putSecretValue(final String secretId, final String clientRequestToken, final Collection<? extends Key> keys,
              final Stage stage) {
          final PutSecretValueRequest putSecretValueRequest = new PutSecretValueRequest();
          putSecretValueRequest.setSecretId(secretId);
          putSecretValueRequest.setClientRequestToken(clientRequestToken);
          putSecretValueRequest.setVersionStages(singletonList(stage.getAwsName()));
          try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(32 * keys.size())) {
              for (final Key key : keys) {
                  key.writeTo(outputStream);
              }
              final ByteBuffer buffer = ByteBuffer.wrap(outputStream.toByteArray());
              putSecretValueRequest.setSecretBinary(buffer);
          } catch (final IOException ioe) {
              // this really should not happen as I/O is to memory only
              throw new IllegalStateException(ioe.getMessage(), ioe);
          }
  
          getDelegate().putSecretValue(putSecretValueRequest);
      }
docs: Store Fernet keys in the secret. This requires the permission <code>secretsmanager:PutSecretValue</code>
  
  @param secretId
  the ARN of the secret
  @param clientRequestToken
  the secret version identifier
  @param keys
  the keys to store in the secret
  @param stage
  the stage with which to tag the version