Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.dialogflow/v2.Context
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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/v2:Context
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ContextArgs
- 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 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 string
- The unique name of the resource.
- args ContextArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContextArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 examplecontextResourceResourceFromDialogflowv2 = new GoogleNative.Dialogflow.V2.Context("examplecontextResourceResourceFromDialogflowv2", new()
{
EnvironmentId = "string",
Name = "string",
SessionId = "string",
UserId = "string",
LifespanCount = 0,
Location = "string",
Parameters =
{
{ "string", "string" },
},
Project = "string",
});
example, err := dialogflow.NewContext(ctx, "examplecontextResourceResourceFromDialogflowv2", &dialogflow.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"),
})
var examplecontextResourceResourceFromDialogflowv2 = new Context("examplecontextResourceResourceFromDialogflowv2", ContextArgs.builder()
.environmentId("string")
.name("string")
.sessionId("string")
.userId("string")
.lifespanCount(0)
.location("string")
.parameters(Map.of("string", "string"))
.project("string")
.build());
examplecontext_resource_resource_from_dialogflowv2 = google_native.dialogflow.v2.Context("examplecontextResourceResourceFromDialogflowv2",
environment_id="string",
name="string",
session_id="string",
user_id="string",
lifespan_count=0,
location="string",
parameters={
"string": "string",
},
project="string")
const examplecontextResourceResourceFromDialogflowv2 = new google_native.dialogflow.v2.Context("examplecontextResourceResourceFromDialogflowv2", {
environmentId: "string",
name: "string",
sessionId: "string",
userId: "string",
lifespanCount: 0,
location: "string",
parameters: {
string: "string",
},
project: "string",
});
type: google-native:dialogflow/v2:Context
properties:
environmentId: string
lifespanCount: 0
location: string
name: string
parameters:
string: string
project: string
sessionId: string
userId: string
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:
- Environment
Id string - Name string
- The unique identifier of the context. Format:
projects//agent/sessions//contexts/
, orprojects//agent/environments//users//sessions//contexts/
. TheContext ID
is always converted to lowercase, may only contain characters ina-zA-Z0-9_-%
and may be at most 250 bytes long. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser 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 string - User
Id string - Lifespan
Count int - Optional. The number of conversational query requests after which the context expires. The default is
0
. If set to0
, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries. - Location 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 string
- Environment
Id string - Name string
- The unique identifier of the context. Format:
projects//agent/sessions//contexts/
, orprojects//agent/environments//users//sessions//contexts/
. TheContext ID
is always converted to lowercase, may only contain characters ina-zA-Z0-9_-%
and may be at most 250 bytes long. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser 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 string - User
Id string - Lifespan
Count int - Optional. The number of conversational query requests after which the context expires. The default is
0
. If set to0
, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries. - Location 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 string
- environment
Id String - name String
- The unique identifier of the context. Format:
projects//agent/sessions//contexts/
, orprojects//agent/environments//users//sessions//contexts/
. TheContext ID
is always converted to lowercase, may only contain characters ina-zA-Z0-9_-%
and may be at most 250 bytes long. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser 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 String - user
Id String - lifespan
Count Integer - Optional. The number of conversational query requests after which the context expires. The default is
0
. If set to0
, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries. - location 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 String
- environment
Id string - name string
- The unique identifier of the context. Format:
projects//agent/sessions//contexts/
, orprojects//agent/environments//users//sessions//contexts/
. TheContext ID
is always converted to lowercase, may only contain characters ina-zA-Z0-9_-%
and may be at most 250 bytes long. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser 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 string - user
Id string - lifespan
Count number - Optional. The number of conversational query requests after which the context expires. The default is
0
. If set to0
, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries. - location 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 string
- environment_
id str - name str
- The unique identifier of the context. Format:
projects//agent/sessions//contexts/
, orprojects//agent/environments//users//sessions//contexts/
. TheContext ID
is always converted to lowercase, may only contain characters ina-zA-Z0-9_-%
and may be at most 250 bytes long. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser 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 str - user_
id str - lifespan_
count int - Optional. The number of conversational query requests after which the context expires. The default is
0
. If set to0
, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries. - location 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 str
- environment
Id String - name String
- The unique identifier of the context. Format:
projects//agent/sessions//contexts/
, orprojects//agent/environments//users//sessions//contexts/
. TheContext ID
is always converted to lowercase, may only contain characters ina-zA-Z0-9_-%
and may be at most 250 bytes long. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser 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 String - user
Id String - lifespan
Count Number - Optional. The number of conversational query requests after which the context expires. The default is
0
. If set to0
, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries. - location 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 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.