zio-aws icon indicating copy to clipboard operation
zio-aws copied to clipboard

`sourceBucket` and `sourceObject` missing from s3's `CopyObjectRequest`

Open kyri-petrou opened this issue 1 year ago • 0 comments

As discussed on Discord, the CopyObjectRequest case class doesn't have the sourceBucket and sourceKey fields.

Current workaround for anyone with the same issue is to wrap around the Java class:

import software.amazon.awssdk.services.s3.model.CopyObjectRequest as JCopyObjectRequest
import zio.aws.s3.model.*

val req =
  CopyObjectRequest.wrap(
    JCopyObjectRequest
      .builder()
      .sourceBucket("foo")
      .sourceKey("bar")
      // And so on
      .build()
  ).asEditable

kyri-petrou avatar May 18 '23 22:05 kyri-petrou