Class IdempotencyPolicy (2.20.0)

Define the interface for the idempotency policy.

The idempotency policy controls which requests are treated as idempotent and therefore safe to retry on a transient failure. Non-idempotent operations can result in data loss. For example, consider DeleteObject(), if this operation is called without pre-conditions retrying this operation may delete more than one version of an object, which may not have the desired effect. Even operations that "add" data can result in data loss, consider InsertObjectMedia(), if called without pre-conditions retrying this operation will insert multiple new versions, possibly deleting old data if the bucket is configured to keep only N versions of each object.

Some applications are designed to handle duplicate requests without data loss, or the library may be used in an environment where the risk of data loss due to duplicate requests is negligible or zero.

This policy allows application developers to control the behavior of the library with respect to retrying non-idempotent operations. Application developers can configure the library to only retry operations that are known to be idempotent (that is, they will succeed only once). Application may also configure the library to retry all operations, regardless of whether the operations are idempotent or not.

Functions

IsIdempotent(internal::ListBucketsRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::ListBucketsRequest const &
Returns
Type Description
bool

IsIdempotent(internal::CreateBucketRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::CreateBucketRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetBucketMetadataRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::GetBucketMetadataRequest const &
Returns
Type Description
bool

IsIdempotent(internal::DeleteBucketRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::DeleteBucketRequest const &
Returns
Type Description
bool

IsIdempotent(internal::UpdateBucketRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::UpdateBucketRequest const &
Returns
Type Description
bool

IsIdempotent(internal::PatchBucketRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::PatchBucketRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetBucketIamPolicyRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::GetBucketIamPolicyRequest const &
Returns
Type Description
bool

IsIdempotent(internal::SetNativeBucketIamPolicyRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::SetNativeBucketIamPolicyRequest const &
Returns
Type Description
bool

IsIdempotent(internal::TestBucketIamPermissionsRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::TestBucketIamPermissionsRequest const &
Returns
Type Description
bool

IsIdempotent(internal::LockBucketRetentionPolicyRequest const &) const

Bucket resource operations

Parameter
Name Description
request internal::LockBucketRetentionPolicyRequest const &
Returns
Type Description
bool

IsIdempotent(internal::InsertObjectMediaRequest const &) const

Object resource operations

Parameter
Name Description
request internal::InsertObjectMediaRequest const &
Returns
Type Description
bool

IsIdempotent(internal::CopyObjectRequest const &) const

Object resource operations

Parameter
Name Description
request internal::CopyObjectRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetObjectMetadataRequest const &) const

Object resource operations

Parameter
Name Description
request internal::GetObjectMetadataRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ReadObjectRangeRequest const &) const

Object resource operations

Parameter
Name Description
request internal::ReadObjectRangeRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ListObjectsRequest const &) const

Object resource operations

Parameter
Name Description
request internal::ListObjectsRequest const &
Returns
Type Description
bool

IsIdempotent(internal::DeleteObjectRequest const &) const

Object resource operations

Parameter
Name Description
request internal::DeleteObjectRequest const &
Returns
Type Description
bool

IsIdempotent(internal::UpdateObjectRequest const &) const

Object resource operations

Parameter
Name Description
request internal::UpdateObjectRequest const &
Returns
Type Description
bool

IsIdempotent(internal::PatchObjectRequest const &) const

Object resource operations

Parameter
Name Description
request internal::PatchObjectRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ComposeObjectRequest const &) const

Object resource operations

Parameter
Name Description
request internal::ComposeObjectRequest const &
Returns
Type Description
bool

IsIdempotent(internal::RewriteObjectRequest const &) const

Object resource operations

Parameter
Name Description
request internal::RewriteObjectRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ResumableUploadRequest const &) const

Object resource operations

Parameter
Name Description
request internal::ResumableUploadRequest const &
Returns
Type Description
bool

IsIdempotent(internal::UploadChunkRequest const &) const

Object resource operations

Parameter
Name Description
request internal::UploadChunkRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ListBucketAclRequest const &) const

BucketAccessControls resource operations

Parameter
Name Description
request internal::ListBucketAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::CreateBucketAclRequest const &) const

BucketAccessControls resource operations

Parameter
Name Description
request internal::CreateBucketAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::DeleteBucketAclRequest const &) const

BucketAccessControls resource operations

Parameter
Name Description
request internal::DeleteBucketAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetBucketAclRequest const &) const

BucketAccessControls resource operations

Parameter
Name Description
request internal::GetBucketAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::UpdateBucketAclRequest const &) const

BucketAccessControls resource operations

Parameter
Name Description
request internal::UpdateBucketAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::PatchBucketAclRequest const &) const

BucketAccessControls resource operations

Parameter
Name Description
request internal::PatchBucketAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ListObjectAclRequest const &) const

ObjectAccessControls operations

Parameter
Name Description
request internal::ListObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::CreateObjectAclRequest const &) const

ObjectAccessControls operations

Parameter
Name Description
request internal::CreateObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::DeleteObjectAclRequest const &) const

ObjectAccessControls operations

Parameter
Name Description
request internal::DeleteObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetObjectAclRequest const &) const

ObjectAccessControls operations

Parameter
Name Description
request internal::GetObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::UpdateObjectAclRequest const &) const

ObjectAccessControls operations

Parameter
Name Description
request internal::UpdateObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::PatchObjectAclRequest const &) const

ObjectAccessControls operations

Parameter
Name Description
request internal::PatchObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ListDefaultObjectAclRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::ListDefaultObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::CreateDefaultObjectAclRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::CreateDefaultObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::DeleteDefaultObjectAclRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::DeleteDefaultObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetDefaultObjectAclRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::GetDefaultObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::UpdateDefaultObjectAclRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::UpdateDefaultObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::PatchDefaultObjectAclRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::PatchDefaultObjectAclRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetProjectServiceAccountRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::GetProjectServiceAccountRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ListHmacKeysRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::ListHmacKeysRequest const &
Returns
Type Description
bool

IsIdempotent(internal::CreateHmacKeyRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::CreateHmacKeyRequest const &
Returns
Type Description
bool

IsIdempotent(internal::DeleteHmacKeyRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::DeleteHmacKeyRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetHmacKeyRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::GetHmacKeyRequest const &
Returns
Type Description
bool

IsIdempotent(internal::UpdateHmacKeyRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::UpdateHmacKeyRequest const &
Returns
Type Description
bool

IsIdempotent(internal::SignBlobRequest const &) const

DefaultObjectAccessControls operations.

Parameter
Name Description
request internal::SignBlobRequest const &
Returns
Type Description
bool

IsIdempotent(internal::ListNotificationsRequest const &) const

Parameter
Name Description
request internal::ListNotificationsRequest const &
Returns
Type Description
bool

IsIdempotent(internal::CreateNotificationRequest const &) const

Parameter
Name Description
request internal::CreateNotificationRequest const &
Returns
Type Description
bool

IsIdempotent(internal::GetNotificationRequest const &) const

Parameter
Name Description
request internal::GetNotificationRequest const &
Returns
Type Description
bool

IsIdempotent(internal::DeleteNotificationRequest const &) const

Parameter
Name Description
request internal::DeleteNotificationRequest const &
Returns
Type Description
bool

clone() const

Create a new copy of this object.

Returns
Type Description
std::unique_ptr< IdempotencyPolicy >