forked from MyPureCloud/terraform-provider-genesyscloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug/devtooling 707 - Worktype status independent resource (MyPureClou…
…d#1164) * Refactored code * Removed statuses from worktype resource * Finished worktype status resource * Added reponse assets stuff back * Fixed workitems tests * Updated docs * Updated docs * Made requested changes * Added caching
- Loading branch information
Showing
36 changed files
with
1,422 additions
and
1,580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
page_title: "genesyscloud_task_management_worktype_status Resource - terraform-provider-genesyscloud" | ||
subcategory: "" | ||
description: |- | ||
Genesys Cloud task management worktype status | ||
--- | ||
# genesyscloud_task_management_worktype_status (Resource) | ||
|
||
Genesys Cloud task management worktype status | ||
|
||
## API Usage | ||
The following Genesys Cloud APIs are used by this resource. Ensure your OAuth Client has been granted the necessary scopes and permissions to perform these operations: | ||
|
||
* [GET /api/v2/taskmanagement/worktypes/{worktypeId}/statuses](https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-taskmanagement-worktypes--worktypeId--statuses) | ||
* [POST /api/v2/taskmanagement/worktypes/{worktypeId}/statuses](https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-taskmanagement-worktypes--worktypeId--statuses) | ||
* [GET /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId}](https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-taskmanagement-worktypes--worktypeId--statuses--statusId-) | ||
* [PATCH /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId}](https://developer.genesys.cloud/devapps/api-explorer#patch-api-v2-taskmanagement-worktypes--worktypeId--statuses--statusId-) | ||
* [DELETE /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId}](https://developer.genesys.cloud/devapps/api-explorer#delete-api-v2-taskmanagement-worktypes--worktypeId--statuses--statusId-) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "genesyscloud_task_management_worktype_status" "worktype_status" { | ||
worktype_id = genesyscloud_task_management_worktype.example.id | ||
name = "Open Status" | ||
description = "Description of open status" | ||
category = "Open" | ||
destination_status_ids = [genesyscloud_task_management_worktype_status.status1.id, genesyscloud_task_management_worktype_status.status2.id] | ||
default_destination_status_id = genesyscloud_task_management_worktype_status.status1.id | ||
status_transition_delay_seconds = 86500 | ||
status_transition_time = "04:20:00" | ||
default = false | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `category` (String) The Category of the Status. Changing the category will cause the resource to be dropped and recreated with a new id. | ||
- `name` (String) Name of the status. | ||
- `worktype_id` (String) The id of the worktype this status belongs to. Changing this attribute will cause the status to be dropped and recreated. | ||
|
||
### Optional | ||
|
||
- `default` (Boolean) This status is the default status for Workitems created from this Worktype. Only one status can be set as the default status at a time. | ||
- `default_destination_status_id` (String) Default destination status to which this Status will transition to if auto status transition enabled. | ||
- `description` (String) The description of the Status. | ||
- `destination_status_ids` (List of String) A list of destination Statuses where a Workitem with this Status can transition to. If the list is empty Workitems with this Status can transition to all other Statuses defined on the Worktype. A Status can have a maximum of 24 destinations. | ||
- `status_transition_delay_seconds` (Number) Delay in seconds for auto status transition. Required if default_destination_status_id is provided. | ||
- `status_transition_time` (String) Time is represented as an ISO-8601 string without a timezone. For example: HH:mm:ss | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
4 changes: 4 additions & 0 deletions
4
examples/data-sources/genesyscloud_task_management_worktype_status/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
data "genesyscloud_task_management_worktype_status" "status_sample" { | ||
worktype_id = genesyscloud_task_management_worktype.example.id | ||
name = "Worktype status" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
examples/resources/genesyscloud_task_management_worktype_status/apis.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
* [GET /api/v2/taskmanagement/worktypes/{worktypeId}/statuses](https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-taskmanagement-worktypes--worktypeId--statuses) | ||
* [POST /api/v2/taskmanagement/worktypes/{worktypeId}/statuses](https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-taskmanagement-worktypes--worktypeId--statuses) | ||
* [GET /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId}](https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-taskmanagement-worktypes--worktypeId--statuses--statusId-) | ||
* [PATCH /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId}](https://developer.genesys.cloud/devapps/api-explorer#patch-api-v2-taskmanagement-worktypes--worktypeId--statuses--statusId-) | ||
* [DELETE /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId}](https://developer.genesys.cloud/devapps/api-explorer#delete-api-v2-taskmanagement-worktypes--worktypeId--statuses--statusId-) | ||
|
11 changes: 11 additions & 0 deletions
11
examples/resources/genesyscloud_task_management_worktype_status/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
resource "genesyscloud_task_management_worktype_status" "worktype_status" { | ||
worktype_id = genesyscloud_task_management_worktype.example.id | ||
name = "Open Status" | ||
description = "Description of open status" | ||
category = "Open" | ||
destination_status_ids = [genesyscloud_task_management_worktype_status.status1.id, genesyscloud_task_management_worktype_status.status2.id] | ||
default_destination_status_id = genesyscloud_task_management_worktype_status.status1.id | ||
status_transition_delay_seconds = 86500 | ||
status_transition_time = "04:20:00" | ||
default = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.