Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Storage: support customTime metadata and custom timestamp based OLM #395

Closed

Description

@jkwlui

Request to support a new customTime metadata and associated custom timestamp based OLM conditions:

DateTime customTimeBefore = DateTime.parseRfc3339("2020-01-01T00:00:00Z");

bucket
    .toBuilder()
    .setLifecycleRules(
        ImmutableList.of(
            new LifecycleRule(
                LifecycleRule.LifecycleAction.newDeleteAction(),
                LifecycleRule.LifecycleCondition.newBuilder()
                    .setDaysSinceCustomTime(30)
                    .setCustomTimeBefore(customTimeBefore)
                    .build())))
    .build()
    .update();

// New metadata field:
Map<String, String> newMetadata = new HashMap<>();
newMetadata.put(
    "customTime", DateTime.parseRfc3339("2020-01-01T00:00:00Z"));
Blob blob = storage.get(bucketName, objectName);
blob.toBuilder().setMetadata(newMetadata).build().update();

Activity

  1. self-assigned this
    on Jun 25, 2020
  2. self-assigned this
    on Jun 26, 2020
  3. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Jun 26, 2020
  4. removed their assignment
    on Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions