Skip to content

Latest commit

 

History

History
128 lines (99 loc) · 5.02 KB

snapshot_schedule.md

File metadata and controls

128 lines (99 loc) · 5.02 KB
title linkTitle page_title subcategory description
powerscale_snapshot_schedule data source
powerscale_snapshot_schedule
powerscale_snapshot_schedule Data Source - terraform-provider-powerscale
This datasource is used to query the existing Snapshot Schedules from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. Uses are able to see information like duration, path, schedule, name etc. for the existing snapshot schedules

powerscale_snapshot_schedule (Data Source)

This datasource is used to query the existing Snapshot Schedules from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. Uses are able to see information like duration, path, schedule, name etc. for the existing snapshot schedules

Example Usage

/*
Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.

Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://mozilla.org/MPL/2.0/


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

# PowerScale SMB shares provide clients network access to file system resources on the cluster

# Returns a list of all the PowerScale Snapshot schedules
data "powerscale_snapshot_schedule" "example_snapshot_schedule_all" {
  filter {

    # Used for query parameter, supported by PowerScale Platform API
    #The direction of the sort.Supported Values:ASC , DESC
    # dir = "ASC"
    # Return no more than this many results at once.
    # limit = 1
    # The field that will be used for sorting. Choices are id, name, path, pattern, schedule, duration, alias, next_run, and next_snapshot. Default is id.
    # sort = "name"
  }
}
output "powerscale_snapshot_schedule_all" {
  value = data.powerscale_snapshot_schedule.example_snapshot_schedule_all
}

# Returns a list of PowerScale Snapshot schedules based on path filter block
data "powerscale_snapshot_schedule" "example_snapshot_schedule" {
  filter {
    # Used to specify names of snapshot schedules
    names = ["Snapshot schedule 370395356"]

    # Used for query parameter, supported by PowerScale Platform API
    #The direction of the sort.Supported Values:ASC , DESC
    # dir = "ASC"
    # Return no more than this many results at once.
    # limit = 1
    # The field that will be used for sorting. Choices are id, name, path, pattern, schedule, duration, alias, next_run, and next_snapshot. Default is id.
    # sort = "name"

  }
}
output "powerscale_snapshot_schedule" {
  value = data.powerscale_snapshot_schedule.example_snapshot_schedule
}

Schema

Optional

Read-Only

Nested Schema for filter

Optional:

  • dir (String) The direction of the sort.Supported Values:ASC , DESC
  • limit (Number) Return no more than this many results at once.
  • names (Set of String) Names to filter snapshot schedules.
  • sort (String) The field that will be used for sorting. Choices are id, name, path, pattern, schedule, duration, alias, next_run, and next_snapshot. Default is id.

Nested Schema for schedules

Optional:

  • alias (String) Alias name to create for each snapshot.
  • duration (Number) Time in seconds added to creation time to construction expiration time.
  • next_run (Number) Unix Epoch time of next snapshot to be created.
  • next_snapshot (String) Formatted name (see pattern) of next snapshot to be created
  • pattern (String) Pattern expanded with strftime to create snapshot names.
  • schedule (String) The isidate compatible natural language description of the schedule.

Read-Only:

  • id (Number) The system ID given to the schedule.
  • name (String) The schedule name.
  • path (String) The /ifs path snapshotted.