KEMBAR78
Storage: support customTime metadata and custom timestamp based OLM · Issue #395 · googleapis/java-storage · GitHub
Skip to content

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

@jkwlui

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();

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