Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.dialogflow/v2beta1.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/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",
});
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"),
})
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());
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")
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",
});
type: google-native:dialogflow/v2beta1: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 This property is required. Changes to this property will trigger replacement.
- 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/
, 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 This property is required. Changes to this property will trigger replacement.
- User
Id This property is required. Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- 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.
- Environment
Id This property is required. Changes to this property will trigger replacement.
- 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/
, 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 This property is required. Changes to this property will trigger replacement.
- User
Id This property is required. Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- 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.
- environment
Id This property is required. Changes to this property will trigger replacement.
- 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/
, 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 This property is required. Changes to this property will trigger replacement.
- user
Id This property is required. Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- 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.
- environment
Id This property is required. Changes to this property will trigger replacement.
- 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/
, 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 This property is required. Changes to this property will trigger replacement.
- user
Id This property is required. Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- 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.
- environment_
id This property is required. Changes to this property will trigger replacement.
- 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/
, 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 This property is required. Changes to this property will trigger replacement.
- user_
id This property is required. Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- 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.
- environment
Id This property is required. Changes to this property will trigger replacement.
- 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/
, 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 This property is required. Changes to this property will trigger replacement.
- user
Id This property is required. Changes to this property will trigger replacement.
- 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
Changes to this property will trigger replacement.
- 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.
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.