Skip to main content

volume_backup_policies

Creates, updates, deletes, gets or lists a volume_backup_policies resource.

Overview​

Namevolume_backup_policies
TypeResource
Idoci.block_storage.volume_backup_policies

Fields​

The following fields are returned by SELECT queries:

The volume backup policy was retrieved.

NameDatatypeDescription
idstringThe OCID of the volume backup policy.
compartmentIdstringThe OCID of the compartment that contains the volume backup.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}}
destinationRegionstringThe paired destination region for copying scheduled backups to. Example us-ashburn-1. See [Region Pairs](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#RegionPairs) for details about paired regions.
displayNamestringA user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTagsobjectFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
schedulesarrayThe collection of schedules that this policy will apply.
timeCreatedstring (date-time)The date and time the volume backup policy was created. Format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339).

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpolicyId, regionGets information for the specified volume backup policy.
listselectregionlimit, page, compartmentIdLists all the volume backup policies available in the specified compartment.<br /><br />For more information about Oracle defined backup policies and user defined backup policies,<br />see [Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm).<br />
createinsertregion, compartmentIdopc-retry-token, opc-request-idCreates a new user defined backup policy.<br /><br />For more information about Oracle defined backup policies and user defined backup policies,<br />see [Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm).<br />
updateupdatepolicyId, regionif-match, opc-request-id, opc-retry-tokenUpdates a user defined backup policy.<br /> For more information about user defined backup policies,<br /> see [Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies).<br /><br /> Avoid entering confidential information.<br />
deletedeletepolicyId, regionopc-request-id, if-matchDeletes a user defined backup policy.<br /> For more information about user defined backup policies,<br /> see [Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies).<br /><br /> Avoid entering confidential information.<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
policyIdstringThe OCID of the volume backup policy.
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)
compartmentIdstringThe OCID of the compartment. If no compartment is specified, the Oracle defined backup policies are listed.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50
opc-request-idstringUnique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).

SELECT examples​

Gets information for the specified volume backup policy.

SELECT
id,
compartmentId,
definedTags,
destinationRegion,
displayName,
freeformTags,
schedules,
timeCreated
FROM oci.block_storage.volume_backup_policies
WHERE policyId = '{{ policyId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates a new user defined backup policy.<br /><br />For more information about Oracle defined backup policies and user defined backup policies,<br />see [Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm).<br />

INSERT INTO oci.block_storage.volume_backup_policies (
compartmentId,
definedTags,
destinationRegion,
displayName,
freeformTags,
schedules,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ destinationRegion }}',
'{{ displayName }}',
'{{ freeformTags }}',
'{{ schedules }}',
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
compartmentId,
definedTags,
destinationRegion,
displayName,
freeformTags,
schedules,
timeCreated
;

UPDATE examples​

Updates a user defined backup policy.<br /> For more information about user defined backup policies,<br /> see [Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies).<br /><br /> Avoid entering confidential information.<br />

UPDATE oci.block_storage.volume_backup_policies
SET
definedTags = '{{ definedTags }}',
destinationRegion = '{{ destinationRegion }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
schedules = '{{ schedules }}'
WHERE
policyId = '{{ policyId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
AND opc-retry-token = '{{ opc-retry-token}}'
RETURNING
id,
compartmentId,
definedTags,
destinationRegion,
displayName,
freeformTags,
schedules,
timeCreated;

DELETE examples​

Deletes a user defined backup policy.<br /> For more information about user defined backup policies,<br /> see [Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies).<br /><br /> Avoid entering confidential information.<br />

DELETE FROM oci.block_storage.volume_backup_policies
WHERE policyId = '{{ policyId }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
AND if-match = '{{ if-match }}'
;