1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. diagflow
  5. Fulfillment
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.diagflow.Fulfillment

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    By default, your agent responds to a matched intent with a static response. If you’re using one of the integration options, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday.

    To get more information about Fulfillment, see:

    Example Usage

    Dialogflow Fulfillment Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var basicAgent = new Gcp.Diagflow.Agent("basicAgent", new()
        {
            DisplayName = "example_agent",
            DefaultLanguageCode = "en",
            TimeZone = "America/New_York",
        });
    
        var basicFulfillment = new Gcp.Diagflow.Fulfillment("basicFulfillment", new()
        {
            DisplayName = "basic-fulfillment",
            Enabled = true,
            GenericWebService = new Gcp.Diagflow.Inputs.FulfillmentGenericWebServiceArgs
            {
                Uri = "https://google.com",
                Username = "admin",
                Password = "password",
                RequestHeaders = 
                {
                    { "name", "wrench" },
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                basicAgent,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/diagflow"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		basicAgent, err := diagflow.NewAgent(ctx, "basicAgent", &diagflow.AgentArgs{
    			DisplayName:         pulumi.String("example_agent"),
    			DefaultLanguageCode: pulumi.String("en"),
    			TimeZone:            pulumi.String("America/New_York"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = diagflow.NewFulfillment(ctx, "basicFulfillment", &diagflow.FulfillmentArgs{
    			DisplayName: pulumi.String("basic-fulfillment"),
    			Enabled:     pulumi.Bool(true),
    			GenericWebService: &diagflow.FulfillmentGenericWebServiceArgs{
    				Uri:      pulumi.String("https://google.com"),
    				Username: pulumi.String("admin"),
    				Password: pulumi.String("password"),
    				RequestHeaders: pulumi.StringMap{
    					"name": pulumi.String("wrench"),
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			basicAgent,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.diagflow.Agent;
    import com.pulumi.gcp.diagflow.AgentArgs;
    import com.pulumi.gcp.diagflow.Fulfillment;
    import com.pulumi.gcp.diagflow.FulfillmentArgs;
    import com.pulumi.gcp.diagflow.inputs.FulfillmentGenericWebServiceArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 basicAgent = new Agent("basicAgent", AgentArgs.builder()        
                .displayName("example_agent")
                .defaultLanguageCode("en")
                .timeZone("America/New_York")
                .build());
    
            var basicFulfillment = new Fulfillment("basicFulfillment", FulfillmentArgs.builder()        
                .displayName("basic-fulfillment")
                .enabled(true)
                .genericWebService(FulfillmentGenericWebServiceArgs.builder()
                    .uri("https://google.com")
                    .username("admin")
                    .password("password")
                    .requestHeaders(Map.of("name", "wrench"))
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(basicAgent)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    basic_agent = gcp.diagflow.Agent("basicAgent",
        display_name="example_agent",
        default_language_code="en",
        time_zone="America/New_York")
    basic_fulfillment = gcp.diagflow.Fulfillment("basicFulfillment",
        display_name="basic-fulfillment",
        enabled=True,
        generic_web_service=gcp.diagflow.FulfillmentGenericWebServiceArgs(
            uri="https://google.com",
            username="admin",
            password="password",
            request_headers={
                "name": "wrench",
            },
        ),
        opts=pulumi.ResourceOptions(depends_on=[basic_agent]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const basicAgent = new gcp.diagflow.Agent("basicAgent", {
        displayName: "example_agent",
        defaultLanguageCode: "en",
        timeZone: "America/New_York",
    });
    const basicFulfillment = new gcp.diagflow.Fulfillment("basicFulfillment", {
        displayName: "basic-fulfillment",
        enabled: true,
        genericWebService: {
            uri: "https://google.com",
            username: "admin",
            password: "password",
            requestHeaders: {
                name: "wrench",
            },
        },
    }, {
        dependsOn: [basicAgent],
    });
    
    resources:
      basicAgent:
        type: gcp:diagflow:Agent
        properties:
          displayName: example_agent
          defaultLanguageCode: en
          timeZone: America/New_York
      basicFulfillment:
        type: gcp:diagflow:Fulfillment
        properties:
          displayName: basic-fulfillment
          enabled: true
          genericWebService:
            uri: https://google.com
            username: admin
            password: password
            requestHeaders:
              name: wrench
        options:
          dependson:
            - ${basicAgent}
    

    Create Fulfillment Resource

    new Fulfillment(name: string, args: FulfillmentArgs, opts?: CustomResourceOptions);
    @overload
    def Fulfillment(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    display_name: Optional[str] = None,
                    enabled: Optional[bool] = None,
                    features: Optional[Sequence[FulfillmentFeatureArgs]] = None,
                    generic_web_service: Optional[FulfillmentGenericWebServiceArgs] = None,
                    project: Optional[str] = None)
    @overload
    def Fulfillment(resource_name: str,
                    args: FulfillmentArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewFulfillment(ctx *Context, name string, args FulfillmentArgs, opts ...ResourceOption) (*Fulfillment, error)
    public Fulfillment(string name, FulfillmentArgs args, CustomResourceOptions? opts = null)
    public Fulfillment(String name, FulfillmentArgs args)
    public Fulfillment(String name, FulfillmentArgs args, CustomResourceOptions options)
    
    type: gcp:diagflow:Fulfillment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args FulfillmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FulfillmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FulfillmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FulfillmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FulfillmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Fulfillment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Fulfillment resource accepts the following input properties:

    DisplayName string

    The human-readable name of the fulfillment, unique within the agent.


    Enabled bool

    Whether fulfillment is enabled.

    Features List<FulfillmentFeature>

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    GenericWebService FulfillmentGenericWebService

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    DisplayName string

    The human-readable name of the fulfillment, unique within the agent.


    Enabled bool

    Whether fulfillment is enabled.

    Features []FulfillmentFeatureArgs

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    GenericWebService FulfillmentGenericWebServiceArgs

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName String

    The human-readable name of the fulfillment, unique within the agent.


    enabled Boolean

    Whether fulfillment is enabled.

    features List<FulfillmentFeature>

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    genericWebService FulfillmentGenericWebService

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName string

    The human-readable name of the fulfillment, unique within the agent.


    enabled boolean

    Whether fulfillment is enabled.

    features FulfillmentFeature[]

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    genericWebService FulfillmentGenericWebService

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    display_name str

    The human-readable name of the fulfillment, unique within the agent.


    enabled bool

    Whether fulfillment is enabled.

    features Sequence[FulfillmentFeatureArgs]

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    generic_web_service FulfillmentGenericWebServiceArgs

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName String

    The human-readable name of the fulfillment, unique within the agent.


    enabled Boolean

    Whether fulfillment is enabled.

    features List<Property Map>

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    genericWebService Property Map

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Fulfillment resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    id string

    The provider-assigned unique ID for this managed resource.

    name string

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    id str

    The provider-assigned unique ID for this managed resource.

    name str

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    Look up Existing Fulfillment Resource

    Get an existing Fulfillment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FulfillmentState, opts?: CustomResourceOptions): Fulfillment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            enabled: Optional[bool] = None,
            features: Optional[Sequence[FulfillmentFeatureArgs]] = None,
            generic_web_service: Optional[FulfillmentGenericWebServiceArgs] = None,
            name: Optional[str] = None,
            project: Optional[str] = None) -> Fulfillment
    func GetFulfillment(ctx *Context, name string, id IDInput, state *FulfillmentState, opts ...ResourceOption) (*Fulfillment, error)
    public static Fulfillment Get(string name, Input<string> id, FulfillmentState? state, CustomResourceOptions? opts = null)
    public static Fulfillment get(String name, Output<String> id, FulfillmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DisplayName string

    The human-readable name of the fulfillment, unique within the agent.


    Enabled bool

    Whether fulfillment is enabled.

    Features List<FulfillmentFeature>

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    GenericWebService FulfillmentGenericWebService

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    Name string

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    DisplayName string

    The human-readable name of the fulfillment, unique within the agent.


    Enabled bool

    Whether fulfillment is enabled.

    Features []FulfillmentFeatureArgs

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    GenericWebService FulfillmentGenericWebServiceArgs

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    Name string

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName String

    The human-readable name of the fulfillment, unique within the agent.


    enabled Boolean

    Whether fulfillment is enabled.

    features List<FulfillmentFeature>

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    genericWebService FulfillmentGenericWebService

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    name String

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName string

    The human-readable name of the fulfillment, unique within the agent.


    enabled boolean

    Whether fulfillment is enabled.

    features FulfillmentFeature[]

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    genericWebService FulfillmentGenericWebService

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    name string

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    display_name str

    The human-readable name of the fulfillment, unique within the agent.


    enabled bool

    Whether fulfillment is enabled.

    features Sequence[FulfillmentFeatureArgs]

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    generic_web_service FulfillmentGenericWebServiceArgs

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    name str

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName String

    The human-readable name of the fulfillment, unique within the agent.


    enabled Boolean

    Whether fulfillment is enabled.

    features List<Property Map>

    The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

    genericWebService Property Map

    Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. Structure is documented below.

    name String

    The unique identifier of the fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Supporting Types

    FulfillmentFeature, FulfillmentFeatureArgs

    Type string

    The type of the feature that enabled for fulfillment.

    • SMALLTALK: Fulfillment is enabled for SmallTalk. Possible values are: SMALLTALK.
    Type string

    The type of the feature that enabled for fulfillment.

    • SMALLTALK: Fulfillment is enabled for SmallTalk. Possible values are: SMALLTALK.
    type String

    The type of the feature that enabled for fulfillment.

    • SMALLTALK: Fulfillment is enabled for SmallTalk. Possible values are: SMALLTALK.
    type string

    The type of the feature that enabled for fulfillment.

    • SMALLTALK: Fulfillment is enabled for SmallTalk. Possible values are: SMALLTALK.
    type str

    The type of the feature that enabled for fulfillment.

    • SMALLTALK: Fulfillment is enabled for SmallTalk. Possible values are: SMALLTALK.
    type String

    The type of the feature that enabled for fulfillment.

    • SMALLTALK: Fulfillment is enabled for SmallTalk. Possible values are: SMALLTALK.

    FulfillmentGenericWebService, FulfillmentGenericWebServiceArgs

    Uri string

    The fulfillment URI for receiving POST requests. It must use https protocol.

    Password string

    The password for HTTP Basic authentication.

    RequestHeaders Dictionary<string, string>

    The HTTP request headers to send together with fulfillment requests.

    Username string

    The user name for HTTP Basic authentication.

    Uri string

    The fulfillment URI for receiving POST requests. It must use https protocol.

    Password string

    The password for HTTP Basic authentication.

    RequestHeaders map[string]string

    The HTTP request headers to send together with fulfillment requests.

    Username string

    The user name for HTTP Basic authentication.

    uri String

    The fulfillment URI for receiving POST requests. It must use https protocol.

    password String

    The password for HTTP Basic authentication.

    requestHeaders Map<String,String>

    The HTTP request headers to send together with fulfillment requests.

    username String

    The user name for HTTP Basic authentication.

    uri string

    The fulfillment URI for receiving POST requests. It must use https protocol.

    password string

    The password for HTTP Basic authentication.

    requestHeaders {[key: string]: string}

    The HTTP request headers to send together with fulfillment requests.

    username string

    The user name for HTTP Basic authentication.

    uri str

    The fulfillment URI for receiving POST requests. It must use https protocol.

    password str

    The password for HTTP Basic authentication.

    request_headers Mapping[str, str]

    The HTTP request headers to send together with fulfillment requests.

    username str

    The user name for HTTP Basic authentication.

    uri String

    The fulfillment URI for receiving POST requests. It must use https protocol.

    password String

    The password for HTTP Basic authentication.

    requestHeaders Map<String>

    The HTTP request headers to send together with fulfillment requests.

    username String

    The user name for HTTP Basic authentication.

    Import

    Fulfillment can be imported using any of these accepted formats* {{name}} In Terraform v1.5.0 and later, use an import block to import Fulfillment using one of the formats above. For exampletf import {

    id = “{{name}}”

    to = google_dialogflow_fulfillment.default }

     $ pulumi import gcp:diagflow/fulfillment:Fulfillment When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Fulfillment can be imported using one of the formats above. For example
    
     $ pulumi import gcp:diagflow/fulfillment:Fulfillment default {{name}}
    

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the google-beta Terraform Provider.

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi