volume_backup_policies
Creates, updates, deletes, gets or lists a volume_backup_policies resource.
Overview​
| Name | volume_backup_policies |
| Type | Resource |
| Id | oci.block_storage.volume_backup_policies |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The volume backup policy was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the volume backup policy. |
compartmentId | string | The OCID of the compartment that contains the volume backup. |
definedTags | object | Defined 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"}} |
destinationRegion | string | The 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. |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-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"} |
schedules | array | The collection of schedules that this policy will apply. |
timeCreated | string (date-time) | The date and time the volume backup policy was created. Format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). |
A policy for automatically creating volume backups according to a<br />recurring schedule. Has a set of one or more schedules that control when and<br />how backups are created.<br /><br />Warning: Oracle recommends that you avoid using any confidential information when you<br />supply string values using the API.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the volume backup policy. |
compartmentId | string | The OCID of the compartment that contains the volume backup. |
definedTags | object | Defined 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"}} |
destinationRegion | string | The 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. |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-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"} |
schedules | array | The collection of schedules that this policy will apply. |
timeCreated | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | policyId, region | Gets information for the specified volume backup policy. | |
list | select | region | limit, page, compartmentId | Lists 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 /> |
create | insert | region, compartmentId | opc-retry-token, opc-request-id | 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 /> |
update | update | policyId, region | if-match, opc-request-id, opc-retry-token | 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 /> |
delete | delete | policyId, region | opc-request-id, if-match | 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 /> |
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 |
|---|---|---|
policyId | string | The OCID of the volume backup policy. |
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) |
compartmentId | string | The OCID of the compartment. If no compartment is specified, the Oracle defined backup policies are listed. |
if-match | string | For 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. |
limit | integer | For 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-id | string | Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
opc-retry-token | string | A 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). |
page | string | For 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​
- get
- list
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
;
Lists 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 />
SELECT
id,
compartmentId,
definedTags,
destinationRegion,
displayName,
freeformTags,
schedules,
timeCreated
FROM oci.block_storage.volume_backup_policies
WHERE region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND compartmentId = '{{ compartmentId }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: volume_backup_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the volume_backup_policies resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The OCID of the compartment.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined 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"}}`
- name: destinationRegion
value: "{{ destinationRegion }}"
description: |
The 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.
- name: displayName
value: "{{ displayName }}"
description: |
A user-friendly name. Does not have to be unique, and it's changeable.
Avoid entering confidential information.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-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"}`
- name: schedules
description: |
The collection of schedules for the volume backup policy. See
see [Schedules](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#schedules) in
[Policy-Based Backups](/iaas/Content/Block/Tasks/schedulingvolumebackups.htm) for more information.
value:
- backupType: "{{ backupType }}"
dayOfMonth: {{ dayOfMonth }}
dayOfWeek: "{{ dayOfWeek }}"
hourOfDay: {{ hourOfDay }}
month: "{{ month }}"
offsetSeconds: {{ offsetSeconds }}
offsetType: "{{ offsetType }}"
period: "{{ period }}"
retentionSeconds: {{ retentionSeconds }}
timeZone: "{{ timeZone }}"
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A 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).
description: A 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).
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
UPDATE examples​
- update
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​
- delete
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 }}'
;