elastic_snapshot_policies
Creates, updates, deletes, gets or lists an elastic_snapshot_policies resource.
Overview
| Name | elastic_snapshot_policies |
| Type | Resource |
| Id | azure.netapp.elastic_snapshot_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_elastic_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
dailySchedule | object | Schedule for daily snapshots. |
eTag | string | If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
hourlySchedule | object | Schedule for hourly snapshots. |
location | string | The geo-location where the resource lives. Required. |
monthlySchedule | object | Schedule for monthly snapshots. |
policyStatus | string | Configures if the snapshot policy is enabled on the volumes connected to the policy. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
provisioningState | string | Azure lifecycle management. Known values are: "Accepted", "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". (Accepted, Creating, Patching, Updating, Deleting, Moving, Failed, Succeeded) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
weeklySchedule | object | Schedule for weekly snapshots. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
dailySchedule | object | Schedule for daily snapshots. |
eTag | string | If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
hourlySchedule | object | Schedule for hourly snapshots. |
location | string | The geo-location where the resource lives. Required. |
monthlySchedule | object | Schedule for monthly snapshots. |
policyStatus | string | Configures if the snapshot policy is enabled on the volumes connected to the policy. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
provisioningState | string | Azure lifecycle management. Known values are: "Accepted", "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded". (Accepted, Creating, Patching, Updating, Deleting, Moving, Failed, Succeeded) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
weeklySchedule | object | Schedule for weekly snapshots. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, snapshot_policy_name, subscription_id | Get a ElasticSnapshotPolicy. | |
list_by_elastic_account | select | resource_group_name, account_name, subscription_id | List ElasticSnapshotPolicy resources by ElasticAccount. | |
create_or_update | insert | resource_group_name, account_name, snapshot_policy_name, subscription_id, location | Create a ElasticSnapshotPolicy. | |
update | update | resource_group_name, account_name, snapshot_policy_name, subscription_id | Update a ElasticSnapshotPolicy. | |
create_or_update | replace | resource_group_name, account_name, snapshot_policy_name, subscription_id, location | Create a ElasticSnapshotPolicy. | |
delete | delete | resource_group_name, account_name, snapshot_policy_name, subscription_id | Delete a ElasticSnapshotPolicy. | |
list_elastic_volumes | exec | resource_group_name, account_name, snapshot_policy_name, subscription_id | Get elastic volumes associated with Elastic Snapshot Policy. |
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 |
|---|---|---|
account_name | string | The name of the ElasticAccount. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
snapshot_policy_name | string | The name of the ElasticSnapshotPolicy. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_elastic_account
Get a ElasticSnapshotPolicy.
SELECT
id,
name,
dailySchedule,
eTag,
hourlySchedule,
location,
monthlySchedule,
policyStatus,
provisioningState,
systemData,
tags,
type,
weeklySchedule
FROM azure.netapp.elastic_snapshot_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND snapshot_policy_name = '{{ snapshot_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List ElasticSnapshotPolicy resources by ElasticAccount.
SELECT
id,
name,
dailySchedule,
eTag,
hourlySchedule,
location,
monthlySchedule,
policyStatus,
provisioningState,
systemData,
tags,
type,
weeklySchedule
FROM azure.netapp.elastic_snapshot_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create a ElasticSnapshotPolicy.
INSERT INTO azure.netapp.elastic_snapshot_policies (
tags,
location,
properties,
resource_group_name,
account_name,
snapshot_policy_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ snapshot_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: elastic_snapshot_policies
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the elastic_snapshot_policies resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the elastic_snapshot_policies resource.
- name: snapshot_policy_name
value: "{{ snapshot_policy_name }}"
description: Required parameter for the elastic_snapshot_policies resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the elastic_snapshot_policies resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The resource-specific properties for this resource.
value:
hourlySchedule:
snapshotsToKeep: {{ snapshotsToKeep }}
minute: {{ minute }}
dailySchedule:
snapshotsToKeep: {{ snapshotsToKeep }}
hour: {{ hour }}
minute: {{ minute }}
weeklySchedule:
snapshotsToKeep: {{ snapshotsToKeep }}
days:
- "{{ days }}"
hour: {{ hour }}
minute: {{ minute }}
monthlySchedule:
snapshotsToKeep: {{ snapshotsToKeep }}
daysOfMonth:
- {{ daysOfMonth }}
hour: {{ hour }}
minute: {{ minute }}
policyStatus: "{{ policyStatus }}"
provisioningState: "{{ provisioningState }}"
UPDATE examples
- update
Update a ElasticSnapshotPolicy.
UPDATE azure.netapp.elastic_snapshot_policies
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND snapshot_policy_name = '{{ snapshot_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Create a ElasticSnapshotPolicy.
REPLACE azure.netapp.elastic_snapshot_policies
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND snapshot_policy_name = '{{ snapshot_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete a ElasticSnapshotPolicy.
DELETE FROM azure.netapp.elastic_snapshot_policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND snapshot_policy_name = '{{ snapshot_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_elastic_volumes
Get elastic volumes associated with Elastic Snapshot Policy.
EXEC azure.netapp.elastic_snapshot_policies.list_elastic_volumes
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@snapshot_policy_name='{{ snapshot_policy_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;