object_lifecycle_policies
Creates, updates, deletes, gets or lists an object_lifecycle_policies resource.
Overview​
| Name | object_lifecycle_policies |
| Type | Resource |
| Id | oci.object_storage.object_lifecycle_policies |
Fields​
The following fields are returned by SELECT queries:
- get
The object lifecycle policy of the bucket.
| Name | Datatype | Description |
|---|---|---|
items | array | The live lifecycle policy on the bucket. For an example of this value, see the [PutObjectLifecyclePolicy API documentation](/iaas/api/#/en/objectstorage/20160918/ObjectLifecyclePolicy/PutObjectLifecyclePolicy). |
timeCreated | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | namespaceName, bucketName, region | opc-client-request-id | Gets the object lifecycle policy for the bucket.<br /> |
delete | delete | namespaceName, bucketName, region | opc-client-request-id, if-match | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
bucketName | string | The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1 |
namespaceName | string | The Object Storage namespace used for the request. |
region | string | OCI 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-match | string | The 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-id | string | The client request ID for tracing. |
SELECT examples​
- get
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​
- delete
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 }}'
;