Skip to content

Commit

Permalink
cloudrunv2 and dialogflowcx (GoogleCloudPlatform#11132)
Browse files Browse the repository at this point in the history
  • Loading branch information
c2thorn authored and vijaykanthm committed Jul 22, 2024
1 parent b190a98 commit ab3597d
Show file tree
Hide file tree
Showing 38 changed files with 5,270 additions and 60 deletions.
1 change: 1 addition & 0 deletions mmv1/products/alloydb/go_Backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ timeouts:
delete_minutes: 10
autogen_async: true
async:
actions: ['create', 'delete', 'update']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
Expand Down
8 changes: 8 additions & 0 deletions mmv1/products/alloydb/go_Cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ docs:
Users can promote a secondary cluster to a primary cluster with the help of `cluster_type`.
To promote, users have to set the `cluster_type` property as `PRIMARY` and remove the `secondary_config` field from cluster configuration.
[See Example](https://github.com/hashicorp/terraform-provider-google/pull/16413).
Switchover is supported in terraform by refreshing the state of the terraform configurations.
The switchover operation still needs to be called outside of terraform.
After the switchover operation is completed successfully:
1. Refresh the state of the AlloyDB resources by running `terraform apply -refresh-only --auto-approve` .
2. Manually update the terraform configuration file(s) to match the actual state of the resources by modifying the `cluster_type` and `secondary_config` fields.
3. Verify the sync of terraform state by running `terraform plan` and ensure that the infrastructure matches the configuration and no changes are required.
base_url: 'projects/{{project}}/locations/{{location}}/clusters'
self_link: 'projects/{{project}}/locations/{{location}}/clusters/{{cluster_id}}'
create_url: 'projects/{{project}}/locations/{{location}}/clusters?clusterId={{cluster_id}}'
Expand All @@ -38,6 +45,7 @@ timeouts:
delete_minutes: 30
autogen_async: true
async:
actions: ['create', 'delete', 'update']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/alloydb/go_Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ timeouts:
delete_minutes: 120
autogen_async: true
async:
actions: ['create', 'delete', 'update']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
Expand Down
744 changes: 744 additions & 0 deletions mmv1/products/cloudrunv2/go_Job.yaml

Large diffs are not rendered by default.

1,018 changes: 1,018 additions & 0 deletions mmv1/products/cloudrunv2/go_Service.yaml

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions mmv1/products/cloudrunv2/go_product.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2024 Google Inc.
# Licensed under the Apache 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://www.apache.org/licenses/LICENSE-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.

# Warning: This is a temporary file, and should not be edited directly
---
name: 'CloudRunV2'
display_name: 'Cloud Run (v2 API)'
versions:
- name: 'ga'
base_url: 'https://run.googleapis.com/v2/'
- name: 'beta'
base_url: 'https://run.googleapis.com/v2/'
scopes:
- 'https://www.googleapis.com/auth/cloud-platform'
2 changes: 1 addition & 1 deletion mmv1/products/compute/go_NetworkAttachment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ examples:
org_id: 'ORG_ID'
billing_account: 'BILLING_ACCT'
- name: 'network_attachment_instance_usage'
min_version: beta
primary_resource_id: 'default'
min_version: 'beta'
vars:
resource_name: 'basic-network-attachment'
network_name: 'basic-network'
Expand Down
3 changes: 2 additions & 1 deletion mmv1/products/compute/go_ResourcePolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ references:
docs:
base_url: 'projects/{{project}}/regions/{{region}}/resourcePolicies'
has_self_link: true
immutable: true
update_url: 'projects/{{project}}/regions/{{region}}/resourcePolicies/{{name}}'
update_verb: 'PATCH'
timeouts:
insert_minutes: 20
update_minutes: 20
Expand Down
216 changes: 216 additions & 0 deletions mmv1/products/dialogflowcx/go_Agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
# Copyright 2024 Google Inc.
# Licensed under the Apache 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://www.apache.org/licenses/LICENSE-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.

# Warning: This is a temporary file, and should not be edited directly
---
name: 'Agent'
description: |
Agents are best described as Natural Language Understanding (NLU) modules that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.
references:
guides:
'Official Documentation': 'https://cloud.google.com/dialogflow/cx/docs'
api: 'https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents'
docs:
id_format: 'projects/{{project}}/locations/{{location}}/agents/{{name}}'
base_url: 'projects/{{project}}/locations/{{location}}/agents'
update_verb: 'PATCH'
update_mask: true
import_format:
- 'projects/{{project}}/locations/{{location}}/agents/{{name}}'
timeouts:
insert_minutes: 40
update_minutes: 40
delete_minutes: 20
custom_code:
skip_sweeper: true
examples:
- name: 'dialogflowcx_agent_full'
primary_resource_id: 'full_agent'
vars:
agent_name: 'dialogflowcx-agent'
bucket_name: 'dialogflowcx-bucket'
ignore_read_extra:
- 'git_integration_settings.0.github_settings.0.access_token'
parameters:
properties:
- name: 'name'
type: String
description: |
The unique identifier of the agent.
output: true
custom_flatten: 'templates/terraform/custom_flatten/go/name_from_self_link.tmpl'
- name: 'location'
type: String
description: |
The name of the location this agent is located in.
~> **Note:** The first time you are deploying an Agent in your project you must configure location settings.
This is a one time step but at the moment you can only [configure location settings](https://cloud.google.com/dialogflow/cx/docs/concept/region#location-settings) via the Dialogflow CX console.
Another options is to use global location so you don't need to manually configure location settings.
url_param_only: true
required: true
immutable: true
- name: 'displayName'
type: String
description: |
The human-readable name of the agent, unique within the location.
required: true
- name: 'defaultLanguageCode'
type: String
description: |
The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
for a list of the currently supported language codes. This field cannot be updated after creation.
required: true
immutable: true
- name: 'supportedLanguageCodes'
type: Array
description: |
The list of all languages supported by this agent (except for the default_language_code).
item_type:
type: String
- name: 'timeZone'
type: String
description: |
The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York,
Europe/Paris.
required: true
- name: 'description'
type: String
description: |
The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.
validation:
function: 'validation.StringLenBetween(0, 500)'
- name: 'avatarUri'
type: String
description: |
The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.
- name: 'speechToTextSettings'
type: NestedObject
description: |
Settings related to speech recognition.
properties:
- name: 'enableSpeechAdaptation'
type: Boolean
description: |
Whether to use speech adaptation for speech recognition.
- name: 'startFlow'
type: String
description: |
Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.
output: true
- name: 'securitySettings'
type: String
description: |
Name of the SecuritySettings reference for the agent. Format: projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>.
- name: 'enableStackdriverLogging'
type: Boolean
description: |
Determines whether this agent should log conversation queries.
- name: 'enableSpellCorrection'
type: Boolean
description: |
Indicates if automatic spell correction is enabled in detect intent requests.
- name: 'advancedSettings'
type: NestedObject
description: |
Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.
Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
default_from_api: true
properties:
- name: 'audioExportGcsDestination'
type: NestedObject
description: |
If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels:
* Agent level
* Flow level
properties:
- name: 'uri'
type: String
description: |
The Google Cloud Storage URI for the exported objects. Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.
Format: gs://bucket/object-name-or-prefix
- name: 'dtmfSettings'
type: NestedObject
description: |
Define behaviors for DTMF (dual tone multi frequency). DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Exposed at the following levels:
* Agent level
* Flow level
* Page level
* Parameter level
properties:
- name: 'enabled'
type: Boolean
description: |
If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a "3" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).
- name: 'maxDigits'
type: Integer
description: |
Max length of DTMF digits.
- name: 'finishDigit'
type: String
description: |
The digit that terminates a DTMF digit sequence.
- name: 'gitIntegrationSettings'
type: NestedObject
description: |
Git integration settings for this agent.
allow_empty_object: true
properties:
- name: 'githubSettings'
type: NestedObject
description: |
Settings of integration with GitHub.
custom_flatten: 'templates/terraform/custom_flatten/go/dialogflowcx_agent_git_integration_settings_github_settings.go.tmpl'
properties:
- name: 'displayName'
type: String
description: |
The unique repository display name for the GitHub repository.
- name: 'repositoryUri'
type: String
description: |
The GitHub repository URI related to the agent.
- name: 'trackingBranch'
type: String
description: |
The branch of the GitHub repository tracked for this agent.
- name: 'accessToken'
type: String
description: |
The access token used to authenticate the access to the GitHub repository.
ignore_read: true
sensitive: true
- name: 'branches'
type: Array
description: |
A list of branches configured to be used from Dialogflow.
item_type:
type: String
- name: 'textToSpeechSettings'
type: NestedObject
description: |
Settings related to speech synthesizing.
allow_empty_object: true
properties:
- name: 'synthesizeSpeechConfigs'
type: String
description: |
Configuration of how speech should be synthesized, mapping from [language](https://cloud.google.com/dialogflow/cx/docs/reference/language) to [SynthesizeSpeechConfig](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents#synthesizespeechconfig).
These settings affect:
* The phone gateway synthesize configuration set via Agent.text_to_speech_settings.
* How speech is synthesized when invoking session APIs. `Agent.text_to_speech_settings` only applies if `OutputAudioConfig.synthesize_speech_config` is not specified.
state_func: 'func(v interface{}) string { s, _ := structure.NormalizeJsonString(v); return s }'
custom_flatten: 'templates/terraform/custom_flatten/go/json_schema.tmpl'
custom_expand: 'templates/terraform/custom_expand/go/json_schema.tmpl'
validation:
function: 'validation.StringIsJSON'
Loading

0 comments on commit ab3597d

Please sign in to comment.