Class PresignRequest
java.lang.Object
io.micronaut.objectstorage.request.PresignRequest
Request object for generating pre-authorized (signed) operations against the object storage.
- Since:
- 2.10.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder forPresignRequest
.static enum
Supported operations that can be pre-authorized. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PresignRequest.Builder
builder
(@NonNull String key, @NonNull PresignRequest.Operation operation) Creates a new builder.Optional expected content length (bytes) for upload operations.Optional content-type hint for upload operations.Optional expiration override for the generated request.@NonNull String
getKey()
getName()
Optional custom name for the pre-authorized request.@NonNull PresignRequest.Operation
Operation for which the pre-signed request should be generated.
-
Method Details
-
getKey
- Returns:
- The object key/path. (
/foo/bar/file
).
-
getOperation
Operation for which the pre-signed request should be generated.- Returns:
- The operation to pre-sign.
-
getExpiresIn
Optional expiration override for the generated request. If empty, the implementation will fall back to the configured default (typically 1 hour).- Returns:
- An Optional expiration override for the generated request.
-
getContentLength
Optional expected content length (bytes) for upload operations. Implementations may embed this as a maximum allowed size within the signature.- Returns:
- An Optional expected content length for upload operations.
-
getContentType
Optional content-type hint for upload operations.- Returns:
- An Optional content-type hint for upload operations.
-
getName
Optional custom name for the pre-authorized request. If empty, the provider will generate a default name.- Returns:
- An Optional containing the custom name for the pre-authorized request.
- Since:
- 2.10
-
builder
@NonNull public static @NonNull PresignRequest.Builder builder(@NonNull @NonNull String key, @NonNull @NonNull PresignRequest.Operation operation) Creates a new builder.- Parameters:
key
- The object key/path.operation
- The operation to pre-sign.- Returns:
- A new
PresignRequest.Builder
instance.
-