Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: support daysSinceNoncurrentTime and noncurrentTimeBefore OLM options #2208

Closed
jkwlui opened this issue May 21, 2020 · 0 comments · Fixed by #2512
Closed

storage: support daysSinceNoncurrentTime and noncurrentTimeBefore OLM options #2208

jkwlui opened this issue May 21, 2020 · 0 comments · Fixed by #2512
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jkwlui
Copy link
Member

jkwlui commented May 21, 2020

noncurrentTimeBefore := time.Now().Add(time.parseDuration('240h'))

bucketAttrsToUpdate := storage.BucketAttrsToUpdate{
    Lifecycle: &storage.Lifecycle{
        Rules: []storage.LifecycleRule{
            Action: storage.LifecycleAction{Type: "Delete"},
            Condition: storage.LifecycleCondition{
                DaysSinceNoncurrentTime: 30,
                NoncurrentTimeBefore: noncurrentTimeBefore,
            },
        }
    }
}

bucket.Update(ctx, bucketAttrsToUpdate)
@jkwlui jkwlui added the triage me I really want to be triaged. label May 21, 2020
@codyoss codyoss added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels May 21, 2020
@tritone tritone changed the title Support daysSinceNoncurrentTime and noncurrentTimeBefore OLM options storage: support daysSinceNoncurrentTime and noncurrentTimeBefore OLM options Jun 18, 2020
tritone added a commit to tritone/google-cloud-go that referenced this issue Jun 24, 2020
Support setting DaysSinceNoncurrentTime and NoncurrentTimeBefore
conditions in lifecycle rules.

Fixes googleapis#2208
tritone added a commit to tritone/google-cloud-go that referenced this issue Aug 26, 2020
Support CustomTime and NoncurrentTime OLM options. Includes
a new metadata field for CustomTime.

Fixes googleapis#2208
Fixes googleapis#2517
tritone added a commit that referenced this issue Aug 26, 2020
Support CustomTime and NoncurrentTime OLM options. Includes
a new metadata field for CustomTime.

Fixes #2208
Fixes #2517
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants