Package com.pulumi.gcp.diagflow
Class CxWebhook
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.diagflow.CxWebhook
-
public class CxWebhook extends com.pulumi.resources.CustomResource
Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend. To get more information about Webhook, see: * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.webhooks) * How-to Guides * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) ## Example Usage ### Dialogflowcx Webhook Full ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.diagflow.CxAgent; import com.pulumi.gcp.diagflow.CxAgentArgs; import com.pulumi.gcp.diagflow.inputs.CxAgentSpeechToTextSettingsArgs; import com.pulumi.gcp.diagflow.CxWebhook; import com.pulumi.gcp.diagflow.CxWebhookArgs; import com.pulumi.gcp.diagflow.inputs.CxWebhookGenericWebServiceArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var agent = new CxAgent("agent", CxAgentArgs.builder() .displayName("dialogflowcx-agent") .location("global") .defaultLanguageCode("en") .supportedLanguageCodes( "it", "de", "es") .timeZone("America/New_York") .description("Example description.") .avatarUri("https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png") .enableStackdriverLogging(true) .enableSpellCorrection(true) .speechToTextSettings(CxAgentSpeechToTextSettingsArgs.builder() .enableSpeechAdaptation(true) .build()) .build()); var basicWebhook = new CxWebhook("basicWebhook", CxWebhookArgs.builder() .parent(agent.id()) .displayName("MyFlow") .genericWebService(CxWebhookGenericWebServiceArgs.builder() .uri("https://example.com") .build()) .build()); } } ``` ## Import Webhook can be imported using any of these accepted formats* `{{parent}}/webhooks/{{name}}` * `{{parent}}/{{name}}` In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Webhook using one of the formats above. For exampletf import { id = "{{parent}}/webhooks/{{name}}" to = google_dialogflow_cx_webhook.default } ```sh $ pulumi import gcp:diagflow/cxWebhook:CxWebhook When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Webhook can be imported using one of the formats above. For example ``` ```sh $ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/webhooks/{{name}} ``` ```sh $ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/{{name}} ```
-
-
Constructor Summary
Constructors Constructor Description CxWebhook(java.lang.String name)
CxWebhook(java.lang.String name, CxWebhookArgs args)
CxWebhook(java.lang.String name, CxWebhookArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
disabled()
com.pulumi.core.Output<java.lang.String>
displayName()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
enableSpellCorrection()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
enableStackdriverLogging()
com.pulumi.core.Output<java.util.Optional<CxWebhookGenericWebService>>
genericWebService()
static CxWebhook
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, CxWebhookState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
parent()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
securitySettings()
com.pulumi.core.Output<java.util.Optional<CxWebhookServiceDirectory>>
serviceDirectory()
com.pulumi.core.Output<java.lang.String>
startFlow()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
timeout()
-
-
-
Constructor Detail
-
CxWebhook
public CxWebhook(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
CxWebhook
public CxWebhook(java.lang.String name, CxWebhookArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
CxWebhook
public CxWebhook(java.lang.String name, CxWebhookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
disabled
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> disabled()
- Returns:
- Indicates whether the webhook is disabled.
-
displayName
public com.pulumi.core.Output<java.lang.String> displayName()
- Returns:
- The human-readable name of the webhook, unique within the agent. ***
-
enableSpellCorrection
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enableSpellCorrection()
- Returns:
- Indicates if automatic spell correction is enabled in detect intent requests.
-
enableStackdriverLogging
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enableStackdriverLogging()
- Returns:
- Determines whether this agent should log conversation queries.
-
genericWebService
public com.pulumi.core.Output<java.util.Optional<CxWebhookGenericWebService>> genericWebService()
- Returns:
- Configuration for a generic web service. Structure is documented below.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The unique identifier of the webhook. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.
-
parent
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> parent()
- Returns:
- The agent to create a webhook for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
-
securitySettings
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> securitySettings()
- Returns:
- Name of the SecuritySettings reference for the agent. Format: projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>.
-
serviceDirectory
public com.pulumi.core.Output<java.util.Optional<CxWebhookServiceDirectory>> serviceDirectory()
- Returns:
- Configuration for a Service Directory service. Structure is documented below.
-
startFlow
public com.pulumi.core.Output<java.lang.String> startFlow()
- Returns:
- 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>.
-
timeout
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> timeout()
- Returns:
- Webhook execution timeout.
-
get
public static CxWebhook get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable CxWebhookState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-