Skip to content

Commit

Permalink
Add device admin time and date condition resource
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Dec 1, 2023
1 parent cd238b2 commit 0a15b99
Show file tree
Hide file tree
Showing 15 changed files with 1,125 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add `ise_tacacs_profile` resource and data source
- Add `ise_device_admin_condition` resource and data source
- Add `ise_device_admin_policy_set` resource and data source
- Add `ise_device_admin_time_and_date_condition` resource and data source

## 0.1.5

Expand Down
42 changes: 42 additions & 0 deletions docs/data-sources/device_admin_time_and_date_condition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ise_device_admin_time_and_date_condition Data Source - terraform-provider-ise"
subcategory: "Policy"
description: |-
This data source can read the Device Admin Time And Date Condition.
---

# ise_device_admin_time_and_date_condition (Data Source)

This data source can read the Device Admin Time And Date Condition.

## Example Usage

```terraform
data "ise_device_admin_time_and_date_condition" "example" {
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `id` (String) The id of the object
- `name` (String) Condition name

### Read-Only

- `description` (String) Condition description
- `end_date` (String) End date
- `end_time` (String) End time
- `exception_end_date` (String) Exception end date
- `exception_end_time` (String) Exception end time
- `exception_start_date` (String) Exception start date
- `exception_start_time` (String) Exception start time
- `is_negate` (Boolean) Indicates whereas this condition is in negate mode
- `start_date` (String) Start date
- `start_time` (String) Start time
- `week_days` (List of String) Defines for which days this condition will be matched. List of weekdays - `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. Default - List of all week days.
- `week_days_exception` (List of String) Defines for which days this condition will NOT be matched. List of weekdays - `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`.
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ description: |-
- Add `ise_tacacs_profile` resource and data source
- Add `ise_device_admin_condition` resource and data source
- Add `ise_device_admin_policy_set` resource and data source
- Add `ise_device_admin_time_and_date_condition` resource and data source

## 0.1.5

Expand Down
65 changes: 65 additions & 0 deletions docs/resources/device_admin_time_and_date_condition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ise_device_admin_time_and_date_condition Resource - terraform-provider-ise"
subcategory: "Policy"
description: |-
This resource can manage a Device Admin Time And Date Condition.
---

# ise_device_admin_time_and_date_condition (Resource)

This resource can manage a Device Admin Time And Date Condition.

## Example Usage

```terraform
resource "ise_device_admin_time_and_date_condition" "example" {
name = "Cond1"
description = "My description"
is_negate = false
week_days = ["Monday"]
week_days_exception = ["Tuesday"]
start_date = "2022-05-06"
end_date = "2022-05-10"
exception_start_date = "2022-06-06"
exception_end_date = "2022-06-10"
start_time = "08:00"
end_time = "15:00"
exception_start_time = "20:00"
exception_end_time = "22:00"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Condition name

### Optional

- `description` (String) Condition description
- `end_date` (String) End date
- `end_time` (String) End time
- `exception_end_date` (String) Exception end date
- `exception_end_time` (String) Exception end time
- `exception_start_date` (String) Exception start date
- `exception_start_time` (String) Exception start time
- `is_negate` (Boolean) Indicates whereas this condition is in negate mode
- `start_date` (String) Start date
- `start_time` (String) Start time
- `week_days` (List of String) Defines for which days this condition will be matched. List of weekdays - `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. Default - List of all week days.
- `week_days_exception` (List of String) Defines for which days this condition will NOT be matched. List of weekdays - `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`.

### Read-Only

- `id` (String) The id of the object

## Import

Import is supported using the following syntax:

```shell
terraform import ise_device_admin_time_and_date_condition.example "76d24097-41c4-4558-a4d0-a8c07ac08470"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "ise_device_admin_time_and_date_condition" "example" {
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import ise_device_admin_time_and_date_condition.example "76d24097-41c4-4558-a4d0-a8c07ac08470"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "ise_device_admin_time_and_date_condition" "example" {
name = "Cond1"
description = "My description"
is_negate = false
week_days = ["Monday"]
week_days_exception = ["Tuesday"]
start_date = "2022-05-06"
end_date = "2022-05-10"
exception_start_date = "2022-06-06"
exception_end_date = "2022-06-10"
start_time = "08:00"
end_time = "15:00"
exception_start_time = "20:00"
exception_end_time = "22:00"
}
76 changes: 76 additions & 0 deletions gen/definitions/device_admin_time_and_date_condition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
name: Device Admin Time And Date Condition
rest_endpoint: /api/v1/policy/device-admin/time-condition
data_source_name_query: true
id_path: response.id
doc_category: Policy
attributes:
- model_name: name
type: String
mandatory: true
description: Condition name
example: Cond1
- model_name: description
type: String
description: Condition description
example: My description
minimum_test_value: '"My description"' # Bug in PUT, description not updated
- model_name: conditionType
type: String
value: TimeAndDateCondition
- model_name: isNegate
type: Bool
description: Indicates whereas this condition is in negate mode
example: false
- model_name: weekDays
description: Defines for which days this condition will be matched. List of weekdays - `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. Default - List of all week days.
type: StringList
example: Monday
- model_name: weekDaysException
description: Defines for which days this condition will NOT be matched. List of weekdays - `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`.
type: StringList
example: Tuesday
- model_name: startDate
data_path: [datesRange]
type: String
description: Start date
example: "2022-05-06"
- model_name: endDate
data_path: [datesRange]
type: String
description: End date
example: "2022-05-10"
- model_name: startDate
data_path: [datesRangeException]
tf_name: exception_start_date
type: String
description: Exception start date
example: "2022-06-06"
- model_name: endDate
data_path: [datesRangeException]
tf_name: exception_end_date
type: String
description: Exception end date
example: "2022-06-10"
- model_name: startTime
data_path: [hoursRange]
type: String
description: Start time
example: "08:00"
- model_name: endTime
data_path: [hoursRange]
type: String
description: End time
example: "15:00"
- model_name: startTime
data_path: [hoursRangeException]
tf_name: exception_start_time
type: String
description: Exception start time
example: "20:00"
- model_name: endTime
data_path: [hoursRangeException]
tf_name: exception_end_time
type: String
description: Exception end time
example: "22:00"
Loading

0 comments on commit 0a15b99

Please sign in to comment.