1. Packages
  2. Google Cloud Native
  3. API Docs
  4. dialogflow
  5. dialogflow/v2beta1
  6. Context

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.dialogflow/v2beta1.Context

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Creates a context. If the specified context already exists, overrides the context. Auto-naming is currently not supported for this resource.

Create Context Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Context(name: string, args: ContextArgs, opts?: CustomResourceOptions);
@overload
def Context(resource_name: str,
            args: ContextArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Context(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            environment_id: Optional[str] = None,
            name: Optional[str] = None,
            session_id: Optional[str] = None,
            user_id: Optional[str] = None,
            lifespan_count: Optional[int] = None,
            location: Optional[str] = None,
            parameters: Optional[Mapping[str, str]] = None,
            project: Optional[str] = None)
func NewContext(ctx *Context, name string, args ContextArgs, opts ...ResourceOption) (*Context, error)
public Context(string name, ContextArgs args, CustomResourceOptions? opts = null)
public Context(String name, ContextArgs args)
public Context(String name, ContextArgs args, CustomResourceOptions options)
type: google-native:dialogflow/v2beta1:Context
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ContextArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ContextArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ContextArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ContextArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ContextArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var examplecontextResourceResourceFromDialogflowv2beta1 = new GoogleNative.Dialogflow.V2Beta1.Context("examplecontextResourceResourceFromDialogflowv2beta1", new()
{
    EnvironmentId = "string",
    Name = "string",
    SessionId = "string",
    UserId = "string",
    LifespanCount = 0,
    Location = "string",
    Parameters = 
    {
        { "string", "string" },
    },
    Project = "string",
});
Copy
example, err := dialogflowv2beta1.NewContext(ctx, "examplecontextResourceResourceFromDialogflowv2beta1", &dialogflowv2beta1.ContextArgs{
	EnvironmentId: pulumi.String("string"),
	Name:          pulumi.String("string"),
	SessionId:     pulumi.String("string"),
	UserId:        pulumi.String("string"),
	LifespanCount: pulumi.Int(0),
	Location:      pulumi.String("string"),
	Parameters: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Project: pulumi.String("string"),
})
Copy
var examplecontextResourceResourceFromDialogflowv2beta1 = new Context("examplecontextResourceResourceFromDialogflowv2beta1", ContextArgs.builder()
    .environmentId("string")
    .name("string")
    .sessionId("string")
    .userId("string")
    .lifespanCount(0)
    .location("string")
    .parameters(Map.of("string", "string"))
    .project("string")
    .build());
Copy
examplecontext_resource_resource_from_dialogflowv2beta1 = google_native.dialogflow.v2beta1.Context("examplecontextResourceResourceFromDialogflowv2beta1",
    environment_id="string",
    name="string",
    session_id="string",
    user_id="string",
    lifespan_count=0,
    location="string",
    parameters={
        "string": "string",
    },
    project="string")
Copy
const examplecontextResourceResourceFromDialogflowv2beta1 = new google_native.dialogflow.v2beta1.Context("examplecontextResourceResourceFromDialogflowv2beta1", {
    environmentId: "string",
    name: "string",
    sessionId: "string",
    userId: "string",
    lifespanCount: 0,
    location: "string",
    parameters: {
        string: "string",
    },
    project: "string",
});
Copy
type: google-native:dialogflow/v2beta1:Context
properties:
    environmentId: string
    lifespanCount: 0
    location: string
    name: string
    parameters:
        string: string
    project: string
    sessionId: string
    userId: string
Copy

Context Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Context resource accepts the following input properties:

EnvironmentId
This property is required.
Changes to this property will trigger replacement.
string
Name This property is required. string
The unique identifier of the context. Supported formats: - projects//agent/sessions//contexts/, - projects//locations//agent/sessions//contexts/, - projects//agent/environments//users//sessions//contexts/, - projects//locations//agent/environments//users//sessions//contexts/, The Context ID is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * __system_counters__ * *_id_dialog_context * *_dialog_params_size
SessionId
This property is required.
Changes to this property will trigger replacement.
string
UserId
This property is required.
Changes to this property will trigger replacement.
string
LifespanCount int
Optional. The number of conversational query requests after which the context expires. The default is 0. If set to 0, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
Location Changes to this property will trigger replacement. string
Parameters Dictionary<string, string>
Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
Project Changes to this property will trigger replacement. string
EnvironmentId
This property is required.
Changes to this property will trigger replacement.
string
Name This property is required. string
The unique identifier of the context. Supported formats: - projects//agent/sessions//contexts/, - projects//locations//agent/sessions//contexts/, - projects//agent/environments//users//sessions//contexts/, - projects//locations//agent/environments//users//sessions//contexts/, The Context ID is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * __system_counters__ * *_id_dialog_context * *_dialog_params_size
SessionId
This property is required.
Changes to this property will trigger replacement.
string
UserId
This property is required.
Changes to this property will trigger replacement.
string
LifespanCount int
Optional. The number of conversational query requests after which the context expires. The default is 0. If set to 0, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
Location Changes to this property will trigger replacement. string
Parameters map[string]string
Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
Project Changes to this property will trigger replacement. string
environmentId
This property is required.
Changes to this property will trigger replacement.
String
name This property is required. String
The unique identifier of the context. Supported formats: - projects//agent/sessions//contexts/, - projects//locations//agent/sessions//contexts/, - projects//agent/environments//users//sessions//contexts/, - projects//locations//agent/environments//users//sessions//contexts/, The Context ID is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * __system_counters__ * *_id_dialog_context * *_dialog_params_size
sessionId
This property is required.
Changes to this property will trigger replacement.
String
userId
This property is required.
Changes to this property will trigger replacement.
String
lifespanCount Integer
Optional. The number of conversational query requests after which the context expires. The default is 0. If set to 0, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
location Changes to this property will trigger replacement. String
parameters Map<String,String>
Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
project Changes to this property will trigger replacement. String
environmentId
This property is required.
Changes to this property will trigger replacement.
string
name This property is required. string
The unique identifier of the context. Supported formats: - projects//agent/sessions//contexts/, - projects//locations//agent/sessions//contexts/, - projects//agent/environments//users//sessions//contexts/, - projects//locations//agent/environments//users//sessions//contexts/, The Context ID is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * __system_counters__ * *_id_dialog_context * *_dialog_params_size
sessionId
This property is required.
Changes to this property will trigger replacement.
string
userId
This property is required.
Changes to this property will trigger replacement.
string
lifespanCount number
Optional. The number of conversational query requests after which the context expires. The default is 0. If set to 0, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
location Changes to this property will trigger replacement. string
parameters {[key: string]: string}
Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
project Changes to this property will trigger replacement. string
environment_id
This property is required.
Changes to this property will trigger replacement.
str
name This property is required. str
The unique identifier of the context. Supported formats: - projects//agent/sessions//contexts/, - projects//locations//agent/sessions//contexts/, - projects//agent/environments//users//sessions//contexts/, - projects//locations//agent/environments//users//sessions//contexts/, The Context ID is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * __system_counters__ * *_id_dialog_context * *_dialog_params_size
session_id
This property is required.
Changes to this property will trigger replacement.
str
user_id
This property is required.
Changes to this property will trigger replacement.
str
lifespan_count int
Optional. The number of conversational query requests after which the context expires. The default is 0. If set to 0, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
location Changes to this property will trigger replacement. str
parameters Mapping[str, str]
Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
project Changes to this property will trigger replacement. str
environmentId
This property is required.
Changes to this property will trigger replacement.
String
name This property is required. String
The unique identifier of the context. Supported formats: - projects//agent/sessions//contexts/, - projects//locations//agent/sessions//contexts/, - projects//agent/environments//users//sessions//contexts/, - projects//locations//agent/environments//users//sessions//contexts/, The Context ID is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * __system_counters__ * *_id_dialog_context * *_dialog_params_size
sessionId
This property is required.
Changes to this property will trigger replacement.
String
userId
This property is required.
Changes to this property will trigger replacement.
String
lifespanCount Number
Optional. The number of conversational query requests after which the context expires. The default is 0. If set to 0, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
location Changes to this property will trigger replacement. String
parameters Map<String>
Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
project Changes to this property will trigger replacement. String

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi