@Generated(value="com.ibm.cos.v2:codegen") public final class CreateSessionRequest extends S3Request implements ToCopyableBuilder<CreateSessionRequest.Builder,CreateSessionRequest>
| Modifier and Type | Class and Description |
|---|---|
static interface |
CreateSessionRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
bucket()
The name of the bucket that you create a session for.
|
Boolean |
bucketKeyEnabled()
Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using
KMS keys (SSE-KMS).
|
static CreateSessionRequest.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest. |
int |
hashCode() |
Map<String,SdkField<?>> |
sdkFieldNameToField() |
List<SdkField<?>> |
sdkFields() |
static Class<? extends CreateSessionRequest.Builder> |
serializableBuilderClass() |
ServerSideEncryption |
serverSideEncryption()
The server-side encryption algorithm to use when you store objects in the directory bucket.
|
String |
serverSideEncryptionAsString()
The server-side encryption algorithm to use when you store objects in the directory bucket.
|
SessionMode |
sessionMode()
Specifies the mode of the session that will be created, either
ReadWrite or ReadOnly. |
String |
sessionModeAsString()
Specifies the mode of the session that will be created, either
ReadWrite or ReadOnly. |
String |
ssekmsEncryptionContext()
Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object
encryption.
|
String |
ssekmsKeyId()
If you specify
x-amz-server-side-encryption with aws:kms, you must specify the
x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS
symmetric encryption customer managed key to use. |
CreateSessionRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
overrideConfigurationclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final SessionMode sessionMode()
Specifies the mode of the session that will be created, either ReadWrite or ReadOnly.
By default, a ReadWrite session is created. A ReadWrite session is capable of executing
all the Zonal endpoint API operations on a directory bucket. A ReadOnly session is constrained to
execute the following Zonal endpoint API operations: GetObject, HeadObject,
ListObjectsV2, GetObjectAttributes, ListParts, and
ListMultipartUploads.
If the service returns an enum value that is not available in the current SDK version, sessionMode will
return SessionMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
sessionModeAsString().
ReadWrite or
ReadOnly. By default, a ReadWrite session is created. A ReadWrite
session is capable of executing all the Zonal endpoint API operations on a directory bucket. A
ReadOnly session is constrained to execute the following Zonal endpoint API operations:
GetObject, HeadObject, ListObjectsV2,
GetObjectAttributes, ListParts, and ListMultipartUploads.SessionModepublic final String sessionModeAsString()
Specifies the mode of the session that will be created, either ReadWrite or ReadOnly.
By default, a ReadWrite session is created. A ReadWrite session is capable of executing
all the Zonal endpoint API operations on a directory bucket. A ReadOnly session is constrained to
execute the following Zonal endpoint API operations: GetObject, HeadObject,
ListObjectsV2, GetObjectAttributes, ListParts, and
ListMultipartUploads.
If the service returns an enum value that is not available in the current SDK version, sessionMode will
return SessionMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
sessionModeAsString().
ReadWrite or
ReadOnly. By default, a ReadWrite session is created. A ReadWrite
session is capable of executing all the Zonal endpoint API operations on a directory bucket. A
ReadOnly session is constrained to execute the following Zonal endpoint API operations:
GetObject, HeadObject, ListObjectsV2,
GetObjectAttributes, ListParts, and ListMultipartUploads.SessionModepublic final String bucket()
The name of the bucket that you create a session for.
public final ServerSideEncryption serverSideEncryption()
The server-side encryption algorithm to use when you store objects in the directory bucket.
For directory buckets, there are only two supported options for server-side encryption: server-side encryption
with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (
aws:kms). By default, Amazon S3 encrypts data with SSE-S3. For more information, see Protecting data with
server-side encryption in the Amazon S3 User Guide.
If the service returns an enum value that is not available in the current SDK version,
serverSideEncryption will return ServerSideEncryption.UNKNOWN_TO_SDK_VERSION. The raw value
returned by the service is available from serverSideEncryptionAsString().
For directory buckets, there are only two supported options for server-side encryption: server-side
encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS
keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. For more
information, see Protecting data
with server-side encryption in the Amazon S3 User Guide.
ServerSideEncryptionpublic final String serverSideEncryptionAsString()
The server-side encryption algorithm to use when you store objects in the directory bucket.
For directory buckets, there are only two supported options for server-side encryption: server-side encryption
with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (
aws:kms). By default, Amazon S3 encrypts data with SSE-S3. For more information, see Protecting data with
server-side encryption in the Amazon S3 User Guide.
If the service returns an enum value that is not available in the current SDK version,
serverSideEncryption will return ServerSideEncryption.UNKNOWN_TO_SDK_VERSION. The raw value
returned by the service is available from serverSideEncryptionAsString().
For directory buckets, there are only two supported options for server-side encryption: server-side
encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS
keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. For more
information, see Protecting data
with server-side encryption in the Amazon S3 User Guide.
ServerSideEncryptionpublic final String ssekmsKeyId()
If you specify x-amz-server-side-encryption with aws:kms, you must specify the
x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS
symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error.
Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't
exist in the same account that't issuing the command, you must use the full Key ARN not the Key ID.
Your SSE-KMS configuration can only support 1 customer managed key
per directory bucket's lifetime. The Amazon Web Services
managed key (aws/s3) isn't supported.
x-amz-server-side-encryption with aws:kms, you must specify the
x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the
KMS symmetric encryption customer managed key to use. Otherwise, you get an HTTP
400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key
isn't supported. Also, if the KMS key doesn't exist in the same account that't issuing the command, you
must use the full Key ARN not the Key ID.
Your SSE-KMS configuration can only support 1 customer managed
key per directory bucket's lifetime. The Amazon Web
Services managed key (aws/s3) isn't supported.
public final String ssekmsEncryptionContext()
Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object
encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the
encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on
to Amazon Web Services KMS for future GetObject operations on this object.
General purpose buckets - This value must be explicitly added during CopyObject operations if
you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.
Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.
GetObject operations on
this object.
General purpose buckets - This value must be explicitly added during CopyObject
operations if you want an additional encryption context for your object. For more information, see
Encryption context in the Amazon S3 User Guide.
Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.
public final Boolean bucketKeyEnabled()
Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using KMS keys (SSE-KMS).
S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and
can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose
buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets,
through CopyObject, UploadPartCopy, the Copy
operation in Batch Operations, or the import jobs. In this case,
Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.
S3 Bucket Keys are always enabled for GET and PUT operations in a directory
bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or
between directory buckets, through CopyObject, UploadPartCopy, the Copy
operation in Batch Operations, or the import jobs. In
this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.
public CreateSessionRequest.Builder toBuilder()
ToCopyableBuildertoBuilder in interface ToCopyableBuilder<CreateSessionRequest.Builder,CreateSessionRequest>toBuilder in class S3Requestpublic static CreateSessionRequest.Builder builder()
public static Class<? extends CreateSessionRequest.Builder> serializableBuilderClass()
public final int hashCode()
hashCode in class AwsRequestpublic final boolean equals(Object obj)
equals in class AwsRequestpublic final boolean equalsBySdkFields(Object obj)
SdkPojoSdkPojo class,
and is generated based on a service model.
If an SdkPojo class does not have any inherited fields, equalsBySdkFields
and equals are essentially the same.
equalsBySdkFields in interface SdkPojoobj - the object to be compared withpublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequestSdkRequest. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class) method will
again be available.getValueForField in class SdkRequestfieldName - The name of the member to be retrieved.clazz - The class to cast the returned object to.public final Map<String,SdkField<?>> sdkFieldNameToField()
sdkFieldNameToField in interface SdkPojoCopyright © 2026. All rights reserved.