Skip to main content

object_lifecycle_policies

Creates, updates, deletes, gets or lists an object_lifecycle_policies resource.

Overview​

Nameobject_lifecycle_policies
TypeResource
Idoci.object_storage.object_lifecycle_policies

Fields​

The following fields are returned by SELECT queries:

The object lifecycle policy of the bucket.

NameDatatypeDescription
itemsarrayThe live lifecycle policy on the bucket. For an example of this value, see the [PutObjectLifecyclePolicy API documentation](/iaas/api/#/en/objectstorage/20160918/ObjectLifecyclePolicy/PutObjectLifecyclePolicy).
timeCreatedstring (date-time)The date and time the object lifecycle policy was created, as described in [RFC 3339](https:​//tools.ietf.org/html/rfc3339).

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectnamespaceName, bucketName, regionopc-client-request-idGets the object lifecycle policy for the bucket.<br />
deletedeletenamespaceName, bucketName, regionopc-client-request-id, if-matchDeletes the object lifecycle policy for the bucket.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
bucketNamestringThe name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
namespaceNamestringThe Object Storage namespace used for the request.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
if-matchstringThe entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload the resource.
opc-client-request-idstringThe client request ID for tracing.

SELECT examples​

Gets the object lifecycle policy for the bucket.<br />

SELECT
items,
timeCreated
FROM oci.object_storage.object_lifecycle_policies
WHERE namespaceName = '{{ namespaceName }}' -- required
AND bucketName = '{{ bucketName }}' -- required
AND region = '{{ region }}' -- required
AND opc-client-request-id = '{{ opc-client-request-id }}'
;

DELETE examples​

Deletes the object lifecycle policy for the bucket.<br />

DELETE FROM oci.object_storage.object_lifecycle_policies
WHERE namespaceName = '{{ namespaceName }}' --required
AND bucketName = '{{ bucketName }}' --required
AND region = '{{ region }}' --required
AND opc-client-request-id = '{{ opc-client-request-id }}'
AND if-match = '{{ if-match }}'
;