### genesyscloud_guide Data Source Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/data-sources/guide.md Use the `genesyscloud_guide` data source to select a guide by its name. Ensure the guide exists and the Terraform principal has the necessary permissions. ```terraform data "genesyscloud_guide" "sample_guide" { name = "Cx as Code Guide" } ``` -------------------------------- ### genesyscloud_guide_version Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/guide_version.md This Terraform configuration defines a Genesys Cloud Guide Version, including its associated guide, instructions, variables, and data action resources. Ensure the referenced guide and data action resources are defined elsewhere in your configuration. ```terraform resource "genesyscloud_guide_version" "sample-guide" { guide_id = genesyscloud_guide.sample_guide.id instruction = "This is a test Instruction" variables { name = "TestVariable" type = "String" scope = "InputAndOutput" description = "This is a test Description" } resources { data_action { data_action_id = genesyscloud_integration_action.example_action.id label = "Genesys Cloud Data Actions (1)" description = "This is a test Description" } data_action { data_action_id = genesyscloud_integration_action.example_action.id label = "Genesys Cloud Data Actions (1)" description = "This is a test Description" } } } ``` -------------------------------- ### Create Guide Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Creates a new guide. ```APIDOC ## POST /api/v2/guides/{guideId} ### Description Creates a new guide. ### Method POST ### Endpoint /api/v2/guides/{guideId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide to create. ``` -------------------------------- ### Test Example Conformity Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/README.md Run tests to check if examples conform to existing resource specifications. ```bash make testexamples ``` -------------------------------- ### GET /api/v2/guides Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide/apis.md Retrieves a list of all guides. This endpoint can be used to fetch all available guides within the Genesys Cloud environment. ```APIDOC ## GET /api/v2/guides ### Description Retrieves a list of all guides. ### Method GET ### Endpoint /api/v2/guides ``` -------------------------------- ### genesyscloud_guide_version Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/guide_version.md Example usage of the genesyscloud_guide_version resource in Terraform. ```APIDOC ## genesyscloud_guide_version (Resource) ### Description Manages Genesys Cloud Guide Versions. ### API Usage The following Genesys Cloud APIs are used by this resource: * GET /api/v2/guides * GET /api/v2/guides/{guideId} * PATCH /api/v2/guides/{guideId} * POST /api/v2/guides/{guideId} * POST /api/v2/guides/{guideId}/versions * GET /api/v2/guides/{guideId}/versions/{versionId} * PATCH /api/v2/guides/{guideId}/versions/{versionId} * POST /api/v2/guides/{guideId}/versions/{versionId}/jobs * GET /api/v2/guides/{guideId}/versions/{versionId}/jobs/{jobId} ### Permissions and Scopes Required permissions: `aiStudio:guide:edit`, `aiStudio:guide:view`, `aiStudio:guideVersion:add`, `aiStudio:guideVersion:edit`, `aiStudio:guideVersion:view`, `aiStudio:guideVersionJob:add`, `aiStudio:guideVersionJob:view`. Required OAuth scopes: `ai-studio`, `ai-studio:readonly`. ### Schema #### Required - `guide_id` (String) The ID of the guide this version belongs to. - `instruction` (String) The instruction given to this version of the guide, for how it should behave when interacting with a User. #### Optional - `resources` (Block List, Max: 1) The resources associated with this version of the guide. (see [below for nested schema](#nestedblock--resources)) - `variables` (Block List) The variables associated with this version of the guide. Includes input variables (provided) and output variables (captured during execution). (see [below for nested schema](#nestedblock--variables)) #### Read-Only - `id` (String) The ID of this resource. ### Nested Schema for `resources` #### Optional - `data_action` (Block List) The data actions associated with this version of the guide. (see [below for nested schema](#nestedblock--resources--data_action)) ### Nested Schema for `resources.data_action` #### Required - `data_action_id` (String) The id of the data action. - `label` (String) The label of the GC data action as referenced in the guide instruction. #### Optional - `description` (String) The optional description of the data action. ### Nested Schema for `variables` #### Required - `name` (String) The name of the variable. - `scope` (String) The scope that determines the variable's usage context within Guides runtime. - `type` (String) The data type of the variable. #### Optional - `description` (String) The description of the variable used by Guides runtime for input/output handling. ### Example Usage ```terraform resource "genesyscloud_guide_version" "sample-guide" { guide_id = genesyscloud_guide.sample_guide.id instruction = "This is a test Instruction" variables { name = "TestVariable" type = "String" scope = "InputAndOutput" description = "This is a test Description" } resources { data_action { data_action_id = genesyscloud_integration_action.example_action.id label = "Genesys Cloud Data Actions (1)" description = "This is a test Description" } data_action { data_action_id = genesyscloud_integration_action.example_action.id label = "Genesys Cloud Data Actions (1)" description = "This is a test Description" } } } ``` ``` -------------------------------- ### Get Guide Version Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Retrieves a specific version of a guide by its IDs. ```APIDOC ## GET /api/v2/guides/{guideId}/versions/{versionId} ### Description Retrieves a specific version of a guide by its IDs. ### Method GET ### Endpoint /api/v2/guides/{guideId}/versions/{versionId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide. - **versionId** (string) - Required - The ID of the guide version. ``` -------------------------------- ### Create Guide Version Job Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Initiates a job for a specific guide version. ```APIDOC ## POST /api/v2/guides/{guideId}/versions/{versionId}/jobs ### Description Initiates a job for a specific guide version. ### Method POST ### Endpoint /api/v2/guides/{guideId}/versions/{versionId}/jobs ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide. - **versionId** (string) - Required - The ID of the guide version. ``` -------------------------------- ### Create Guide Version Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Creates a new version for a specific guide. ```APIDOC ## POST /api/v2/guides/{guideId}/versions ### Description Creates a new version for a specific guide. ### Method POST ### Endpoint /api/v2/guides/{guideId}/versions ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide for which to create a version. ``` -------------------------------- ### genesyscloud_case_management_stepplan Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/case_management_stepplan.md Example of how to configure the `genesyscloud_case_management_stepplan` resource. Replace placeholder IDs with actual resource references. ```terraform resource "genesyscloud_case_management_stepplan" "example" { caseplan_id = "00000000-0000-0000-0000-000000000001" stage_number = 1 name = "Step 1" description = "Workitem step" activity_type = "workitem" workitem_settings { worktype_id = "00000000-0000-0000-0000-000000000002" } } ``` -------------------------------- ### Example apis.md File Content Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/README.md This markdown snippet shows the required format for listing API endpoints in an `apis.md` file. Each line must start with a dash or asterisk, followed by the HTTP method and path in brackets, and a documentation link in parentheses. ```markdown - [POST /api/v2/authorization/roles](https://developer.mypurecloud.com/api/rest/v2/authorization/#post-api-v2-authorization-roles) - [GET /api/v2/authorization/roles](https://developer.mypurecloud.com/api/rest/v2/authorization/#get-api-v2-authorization-roles) - [GET /api/v2/authorization/roles/{roleId}](https://developer.mypurecloud.com/api/rest/v2/authorization/#get-api-v2-authorization-roles--roleId-) - [PUT /api/v2/authorization/roles/{roleId}](https://developer.mypurecloud.com/api/rest/v2/authorization/#put-api-v2-authorization-roles--roleId-) - [DELETE /api/v2/authorization/roles/{roleId}](https://developer.mypurecloud.com/api/rest/v2/authorization/#delete-api-v2-authorization-roles--roleId-) ``` -------------------------------- ### List Guides Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Retrieves a list of all available guides. ```APIDOC ## GET /api/v2/guides ### Description Retrieves a list of all available guides. ### Method GET ### Endpoint /api/v2/guides ``` -------------------------------- ### Example OAuth Client Creation Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/oauth_client.md This snippet demonstrates how to create an OAuth client using the `genesyscloud_oauth_client` resource. It configures the client's name, description, token validity, redirect URIs, grant type, and scopes. Note that roles are only applicable for CLIENT-CREDENTIALS grants and require specific setup. ```terraform resource "genesyscloud_oauth_client" "example_client_credential" { name = "Example OAuth Client" description = "For example purposes only" access_token_validity_seconds = 600 registered_redirect_uris = ["https://example.com/auth"] authorized_grant_type = "CODE" scopes = ["users"] state = "active" # roles { # # Roles are only applicable to CLIENT-CREDENTIALS grants # role_id = genesyscloud_auth_role.agent_role.id # division_id = data.genesyscloud_auth_division_home.home.id # } } ``` -------------------------------- ### POST /api/v2/guides Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide/apis.md Creates a new guide. Use this endpoint to programmatically create new guides in Genesys Cloud. ```APIDOC ## POST /api/v2/guides ### Description Creates a new guide. ### Method POST ### Endpoint /api/v2/guides ``` -------------------------------- ### genesyscloud_case_management_stageplan Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/case_management_stageplan.md Example of how to configure the genesyscloud_case_management_stageplan resource. Replace '00000000-0000-0000-0000-000000000001' with the actual caseplan ID. ```terraform resource "genesyscloud_case_management_stageplan" "example" { caseplan_id = "00000000-0000-0000-0000-000000000001" stage_number = 1 name = "Intake" description = "First stage" } ``` -------------------------------- ### genesyscloud_webdeployments_configuration Data Source Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/data-sources/webdeployments_configuration.md Example usage for the genesyscloud_webdeployments_configuration data source to select a configuration by name. ```terraform data "genesyscloud_webdeployments_configuration" "exampleConfiguration" { name = "Example Web Deployment Configuration" } ``` -------------------------------- ### Setup and Documentation Generation Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/tools/resource_metadata_exporter/README.md Commands for setting up the development environment and generating documentation for the resource metadata exporter. ```bash # Setup development environment make dev-setup ``` ```bash # Generate documentation make docs ``` -------------------------------- ### Get Guide by ID Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/data-sources/genesyscloud_guide/apis.md Retrieves a specific guide by its unique identifier. ```APIDOC ## GET /api/v2/guides/{guideId} ### Description Retrieves a specific guide by its unique identifier. ### Method GET ### Endpoint /api/v2/guides/{guideId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide to retrieve. ``` -------------------------------- ### Directory Structure for New Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/README.md Organize new resource examples within a dedicated directory. Include essential files like apis.md, locals.tf, and resource.tf. An optional simplest_resource.tf can be added for minimal configuration. ```bash resources/genesyscloud_new_resource/ ├── apis.md ├── locals.tf ├── resource.tf └── simplest_resource.tf (optional) ``` -------------------------------- ### Get Guide Version Job Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Retrieves the status of a job for a specific guide version. ```APIDOC ## GET /api/v2/guides/{guideId}/versions/{versionId}/jobs/{jobId} ### Description Retrieves the status of a job for a specific guide version. ### Method GET ### Endpoint /api/v2/guides/{guideId}/versions/{versionId}/jobs/{jobId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide. - **versionId** (string) - Required - The ID of the guide version. - **jobId** (string) - Required - The ID of the job. ``` -------------------------------- ### Run All Example Tests Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/README.md Execute all tests within the examples directory to ensure comprehensive coverage. Use the -v flag for verbose output. ```bash go test -v ./examples ``` -------------------------------- ### GET /api/v2/guides/{guideId} Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide/apis.md Retrieves a specific guide by its ID. This endpoint is useful for fetching the details of a single guide. ```APIDOC ## GET /api/v2/guides/{guideId} ### Description Retrieves a specific guide by its ID. ### Method GET ### Endpoint /api/v2/guides/{guideId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide to retrieve. ``` -------------------------------- ### genesyscloud_guide Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/guide.md This is a basic example of how to declare a genesyscloud_guide resource. Ensure your Terraform configuration is set up to authenticate with Genesys Cloud. ```terraform resource "genesyscloud_guide" "sample_guide" { name = "Cx as Code Guide" } ``` -------------------------------- ### Generate Documentation Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/README.md Automatically generate documentation from schema and examples. ```bash make docs ``` -------------------------------- ### GET /api/v2/guides/{guideId}/jobs/{jobId} Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide/apis.md Retrieves a specific job associated with a guide. Use this to check the status or details of a particular guide job. ```APIDOC ## GET /api/v2/guides/{guideId}/jobs/{jobId} ### Description Retrieves a specific job associated with a guide. ### Method GET ### Endpoint /api/v2/guides/{guideId}/jobs/{jobId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide. - **jobId** (string) - Required - The ID of the job. ``` -------------------------------- ### genesyscloud_authorization_product Data Source Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/data-sources/authorization_product.md Example usage of the genesyscloud_authorization_product data source to retrieve an authorization product by its name. Ensure the Terraform configuration has the necessary provider setup. ```terraform data "genesyscloud_authorization_product" "example-product" { name = "Product name" } ``` -------------------------------- ### Complete Annotated Resource Schema Example (Go) Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/tools/resource_metadata_exporter/README.md A comprehensive example of a fully annotated resource schema file, demonstrating the recommended placement of comment-based annotations and the structure of a typical Terraform provider resource file. ```go package architect_flow // @team: Platform Team // @chat: #platform-team // @description: Manages Genesys Cloud flows and their configurations import ( "strings" "github.com/mypurecloud/terraform-provider-genesyscloud/genesyscloud/validators" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/mypurecloud/terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "github.com/mypurecloud/terraform-provider-genesyscloud/genesyscloud/resource_exporter" registrar "github.com/mypurecloud/terraform-provider-genesyscloud/genesyscloud/resource_register" ) const ( ResourceType = "genesyscloud_flow" ) // SetRegistrar registers all resources, data sources and exporters in the package func SetRegistrar(l registrar.Registrar) { l.RegisterDataSource(ResourceType, DataSourceArchitectFlow()) l.RegisterResource(ResourceType, ResourceArchitectFlow()) l.RegisterExporter(ResourceType, ArchitectFlowExporter()) } // ... rest of the resource implementation ``` -------------------------------- ### Compile the Provider Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/README.md Compile the provider binary and place it in the $GOPATH/bin directory. ```bash go install ``` -------------------------------- ### genesyscloud_architect_schedules Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/architect_schedules.md This is a basic example of how to configure a Genesys Cloud Architect Schedule resource. It defines the name, description, start and end times, and a daily recurrence rule. ```terraform resource "genesyscloud_architect_schedules" "sample_schedule" { name = "CX as Code Schedule" description = "Sample Schedule by CX as Code" start = "2021-08-04T08:00:00.000000" end = "2021-08-04T17:00:00.000000" rrule = "FREQ=DAILY;INTERVAL=1" } ``` -------------------------------- ### genesyscloud_responsemanagement_library Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/responsemanagement_library.md This is a basic example of how to create a Genesys Cloud response management library using Terraform. Ensure your Terraform configuration has the necessary Genesys Cloud provider setup. ```terraform resource "genesyscloud_responsemanagement_library" "example_library" { name = "Example library name" } ``` -------------------------------- ### List Case Plans Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/data-sources/genesyscloud_case_management_caseplan/apis.md Retrieves a list of all available case plans. This endpoint can be used to get a general overview of the case management setup. ```APIDOC ## GET /api/v2/casemanagement/caseplans ### Description Retrieves a list of all available case plans. ### Method GET ### Endpoint /api/v2/casemanagement/caseplans ### Parameters #### Query Parameters - **expand** (string) - Optional - Specifies which expanded details to include in the response. ### Response #### Success Response (200) - **entities** (array) - A list of case plan objects. - **selfUri** (string) - The URI for this object. - **nextUri** (string) - The URI for the next page of results. - **previousUri** (string) - The URI for the previous page of results. - **totalUri** (integer) - The total number of results. - **pageSize** (integer) - The number of results per page. - **pageNumber** (integer) - The page number of the results. - **firstUri** (string) - The URI for the first page of results. - **lastUri** (string) - The URI for the last page of results. - **pageCount** (integer) - The total number of pages. ### Response Example { "entities": [ { "id": "string", "name": "string", "description": "string", "version": { "id": "string", "version": "integer", "dateCreated": "string", "dateModified": "string", "selfUri": "string" }, "dateCreated": "string", "dateModified": "string", "selfUri": "string" } ], "selfUri": "string", "nextUri": "string", "previousUri": "string", "totalUri": 0, "pageSize": 0, "pageNumber": 0, "firstUri": "string", "lastUri": "string", "pageCount": 0 } ``` -------------------------------- ### genesyscloud_telephony_providers_edges_extension_pool Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/telephony_providers_edges_extension_pool.md Example of how to create an extension pool with a specified start and end number, and a description. This resource is used to define a range of phone numbers for extensions within Genesys Cloud. ```terraform resource "genesyscloud_telephony_providers_edges_extension_pool" "example_extension_pool" { start_number = "1000" end_number = "1099" description = "Description of the Extension range" } ``` -------------------------------- ### Build Tag Annotation Format Example (Go) Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/tools/resource_metadata_exporter/README.md Shows the syntax for using Go build tags to embed resource metadata. This method is an alternative to comment-based annotations and is processed during the build phase. ```go //go:build team=Platform chat=#platform-team ``` -------------------------------- ### genesyscloud_telephony_providers_edges_did_pool Data Source Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/data-sources/telephony_providers_edges_did_pool.md Use this data source to select a DID pool by specifying the starting and ending phone numbers of the range. Ensure the phone numbers are in E.164 format. ```terraform data "genesyscloud_telephony_providers_edges_did_pool" "didPool" { startPhoneNumber = "+45465550001" endPhoneNumber = "+45465550333" } ``` -------------------------------- ### genesyscloud_webdeployments_deployment Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/webdeployments_deployment.md This example shows how to create a web deployment resource, specifying its name, description, allowed domains, associated flow, and configuration details. Ensure the referenced flow and configuration resources are defined elsewhere. ```terraform resource "genesyscloud_webdeployments_deployment" "example_deployment" { name = "Example Web Deployment" description = "This is an example of a web deployment" allowed_domains = ["example.com"] flow_id = genesyscloud_flow.inbound_message_flow.id configuration { id = genesyscloud_webdeployments_configuration.example_configuration.id version = genesyscloud_webdeployments_configuration.example_configuration.version } } ``` -------------------------------- ### Install the Resource Metadata Exporter Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/tools/resource_metadata_exporter/README.md Installs the built tool to the system PATH or allows manual copying to a desired location. ```bash # Install to system PATH make install # Or copy manually cp build/resource-metadata-exporter /usr/local/bin/ ``` -------------------------------- ### Run a Specific Example Test Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/README.md Execute a particular test function, such as `TestAccExampleResourcesComplete`. Use the -v flag for verbose output. ```bash go test -v ./examples -run TestAccExampleResourcesComplete ``` -------------------------------- ### Build the Resource Metadata Exporter Tool Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/tools/resource_metadata_exporter/README.md Builds the standalone command-line tool from source using Make. Ensure Go and Make are installed. ```bash git clone cd terraform-provider-genesyscloud/tools/resource_metadata_exporter make -f GNUMakefile build # Or build for all platforms make -f GNUMakefile build-all ``` -------------------------------- ### Update Guide Version Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Updates an existing version of a guide. ```APIDOC ## PATCH /api/v2/guides/{guideId}/versions/{versionId} ### Description Updates an existing version of a guide. ### Method PATCH ### Endpoint /api/v2/guides/{guideId}/versions/{versionId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide. - **versionId** (string) - Required - The ID of the guide version to update. ``` -------------------------------- ### Update Guide Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_guide_version/apis.md Updates an existing guide's information. ```APIDOC ## PATCH /api/v2/guides/{guideId} ### Description Updates an existing guide's information. ### Method PATCH ### Endpoint /api/v2/guides/{guideId} ### Parameters #### Path Parameters - **guideId** (string) - Required - The ID of the guide to update. ``` -------------------------------- ### Comment-based Annotation Format Example (Go) Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/tools/resource_metadata_exporter/README.md Illustrates the basic syntax for comment-based annotations used to provide metadata for resources. These comments are placed at the top of schema files. ```go // @team: Platform Team // @chat: #platform-team // @description: Manages Genesys Cloud flows and their configurations ``` -------------------------------- ### genesyscloud_script Data Source Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/data-sources/script.md Example of how to use the genesyscloud_script data source to select a script by its name. This snippet assumes a published script named 'example' exists. ```terraform data "genesyscloud_script" "example-script" { name = "example" } ``` -------------------------------- ### Full Web Deployments Configuration Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/webdeployments_configuration.md Defines a comprehensive web deployment configuration including languages, messenger settings, cobrowse, video, and authentication. ```terraform resource "genesyscloud_webdeployments_configuration" "example_configuration" { name = "Example Web Deployment Configuration" description = "This example configuration shows how to define a full web deployment configuration" languages = ["en-us", "ja"] default_language = "en-us" headless_mode_enabled = true custom_i18n_labels { language = "en-us" localized_labels { key = "MessengerHomeHeaderTitle" value = "Custom Header Title" } localized_labels { key = "MessengerHomeHeaderSubTitle" value = "Custom Header Subtitle" } localized_labels { key = "MessengerLauncherButtonText" value = "Chat with us" } } position { alignment = "Auto" side_space = 10 bottom_space = 20 } messenger { enabled = true launcher_button { visibility = "OnDemand" display_type = "IconAndText" icon { url = "https://my-domain/images/launcher-icon.png" } } home_screen { enabled = true logo_url = "https://my-domain/images/my-logo.png" } styles { primary_color = "#B0B0B0" } file_upload { mode { file_types = ["image/png"] max_file_size_kb = 256 } mode { file_types = ["image/jpeg"] max_file_size_kb = 128 } } apps { conversations { enabled = true show_agent_typing_indicator = true show_user_typing_indicator = true auto_start_enabled = true markdown_enabled = true conversation_disconnect { enabled = true type = "Send" } conversation_clear_enabled = true humanize { enabled = true bot { name = "Marvin" avatar_url = "https://my-domain-example.net/images/marvin.png" } } } knowledge { enabled = true knowledge_base_id = genesyscloud_knowledge_knowledgebase.example_knowledgebase.id } } } cobrowse { enabled = true allow_agent_control = true allow_agent_navigation = true allow_draw = true channels = ["Webmessaging", "Voice"] mask_selectors = [".my-class", "#my-id"] readonly_selectors = [".my-class", "#my-id"] pause_criteria { url_fragment = "/sensitive" condition = "Includes" } } video { enabled = true agent { allow_camera = true allow_screen_share = true allow_microphone = true background = "BLUR" background_image { url = "https://my-domain/images/background.png" } } user { allow_camera = true allow_screen_share = true allow_microphone = true } } authentication_settings { enabled = true integration_id = genesyscloud_integration.example_embedded_client_integration.id allow_session_upgrade = true } } ``` -------------------------------- ### List Guides Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/data-sources/genesyscloud_guide/apis.md Retrieves a list of all guides available in Genesys Cloud. ```APIDOC ## GET /api/v2/guides ### Description Retrieves a list of all guides available in Genesys Cloud. ### Method GET ### Endpoint /api/v2/guides ``` -------------------------------- ### Create Site Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/resources/genesyscloud_telephony_providers_edges_site/apis.md Creates a new site. ```APIDOC ## POST /api/v2/telephony/providers/edges/sites ### Description Creates a new site. ### Method POST ### Endpoint /api/v2/telephony/providers/edges/sites ### Parameters #### Request Body - **field1** (type) - Required/Optional - Description ``` -------------------------------- ### Get All Summary Settings Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/examples/data-sources/genesyscloud_ai_studio_summary_setting/apis.md Retrieves a list of all AI Studio summary settings. ```APIDOC ## GET /api/v2/conversations/summaries/settings ### Description Retrieves a list of all AI Studio summary settings. ### Method GET ### Endpoint /api/v2/conversations/summaries/settings ### Response #### Success Response (200) - **content** (array) - A list of summary settings. #### Response Example ```json { "content": [ { "id": "string", "name": "string", "description": "string", "enabled": true, "default": true, "selfUri": "string" } ], "pageInfo": { "page": 0, "pageSize": 25, "total": 1, "nextUri": null, "selfUri": null } } ``` ``` -------------------------------- ### genesyscloud_ai_studio_summary_setting Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/ai_studio_summary_setting.md This snippet shows how to configure a basic AI Studio summary setting. It specifies the name, language, summary type, setting type, format, PII masking, participant labels, predefined insights, and prompt. ```terraform resource "genesyscloud_ai_studio_summary_setting" "summary" { name = "user10" language = "en-au" summary_type = "Concise" setting_type = "Basic" format = "BulletPoints" mask_p_i_i { all = true } participant_labels { internal = "Advisor" external = "Member" } predefined_insights = [] prompt = "" } ``` -------------------------------- ### genesyscloud_outbound_dnclist Resource Example Source: https://github.com/mypurecloud/terraform-provider-genesyscloud/blob/main/docs/resources/outbound_dnclist.md Example of how to configure the genesyscloud_outbound_dnclist resource in Terraform to create a DNC list. ```APIDOC ## genesyscloud_outbound_dnclist (Resource) ### Description Genesys Cloud Outbound DNC List ### Schema #### Required - `dnc_source_type` (String) The type of the DNC List. Changing the dnc_source_attribute will cause the outbound_dnclist object to be dropped and recreated with new ID. - `name` (String) The name of the DncList. #### Optional - `campaign_id` (String) A dnc.com campaignId. Optional if the dncSourceType is dnc.com. - `contact_method` (String) The contact method. Required if dncSourceType is rds. - `custom_exclusion_column` (String) The column to evaluate exclusion against. Required if the dncSourceType is rds_custom. Since custom_exclusion_column cannot be updated, changing this value after deployment will cause the dnc list to be destroyed and recreated with a new GUID. - `division_id` (String) The division this DNC List belongs to. - `dnc_codes` (List of String) The list of dnc.com codes to be treated as DNC. Required if the dncSourceType is dnc.com. - `entries` (Block List) Rows to add to the DNC list. To emulate removing phone numbers, you can set expiration_date to a date in the past. (see [below for nested schema](#nestedblock--entries)) - `license_id` (String) A gryphon license number. Required if the dncSourceType is gryphon. - `login_id` (String) A dnc.com loginId. Required if the dncSourceType is dnc.com. ### Read-Only - `id` (String) The ID of this resource. ### Nested Schema for `entries` Optional: - `expiration_date` (String) Expiration date for DNC phone numbers in yyyy-MM-ddTHH:mmZ format. - `phone_numbers` (List of String) Phone numbers to add to a DNC list. Only possible if the dncSourceType is rds. Phone numbers must be in an E.164 number format. ### Example Usage ```terraform resource "genesyscloud_outbound_dnclist" "dnc_list" { name = "Example DNC List" dnc_source_type = "rds" contact_method = "Phone" # login_id = "1VC392SER23T1534DS23TGFR43JS63D7FS78G88TR9A9" dnc_codes = ["B", "F", "S"] entries { phone_numbers = [ "+353112222222", "+353112222223", ] } } ``` ```