google-native logo
Google Cloud Native v0.28.0, Feb 2 23

google-native.dialogflow/v2.Document

Creates a new document. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: KnowledgeOperationMetadata - response: Document

Create Document Resource

new Document(name: string, args: DocumentArgs, opts?: CustomResourceOptions);
@overload
def Document(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             content_uri: Optional[str] = None,
             display_name: Optional[str] = None,
             enable_auto_reload: Optional[bool] = None,
             knowledge_base_id: Optional[str] = None,
             knowledge_types: Optional[Sequence[DocumentKnowledgeTypesItem]] = None,
             location: Optional[str] = None,
             metadata: Optional[Mapping[str, str]] = None,
             mime_type: Optional[str] = None,
             name: Optional[str] = None,
             project: Optional[str] = None,
             raw_content: Optional[str] = None)
@overload
def Document(resource_name: str,
             args: DocumentArgs,
             opts: Optional[ResourceOptions] = None)
func NewDocument(ctx *Context, name string, args DocumentArgs, opts ...ResourceOption) (*Document, error)
public Document(string name, DocumentArgs args, CustomResourceOptions? opts = null)
public Document(String name, DocumentArgs args)
public Document(String name, DocumentArgs args, CustomResourceOptions options)
type: google-native:dialogflow/v2:Document
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DocumentArgs
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 DocumentArgs
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 DocumentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DocumentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DocumentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Document 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 Document resource accepts the following input properties:

DisplayName string

The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

KnowledgeBaseId string
KnowledgeTypes List<Pulumi.GoogleNative.Dialogflow.V2.DocumentKnowledgeTypesItem>

The knowledge type of document content.

MimeType string

The MIME type of this document.

ContentUri string

The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form gs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.

EnableAutoReload bool

Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types. Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

Location string
Metadata Dictionary<string, string>

Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

Name string

Optional. The document resource name. The name must be empty when creating a document. Format: projects//locations//knowledgeBases//documents/.

Project string
RawContent string

The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.

DisplayName string

The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

KnowledgeBaseId string
KnowledgeTypes []DocumentKnowledgeTypesItem

The knowledge type of document content.

MimeType string

The MIME type of this document.

ContentUri string

The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form gs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.

EnableAutoReload bool

Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types. Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

Location string
Metadata map[string]string

Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

Name string

Optional. The document resource name. The name must be empty when creating a document. Format: projects//locations//knowledgeBases//documents/.

Project string
RawContent string

The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.

displayName String

The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

knowledgeBaseId String
knowledgeTypes List<DocumentKnowledgeTypesItem>

The knowledge type of document content.

mimeType String

The MIME type of this document.

contentUri String

The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form gs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.

enableAutoReload Boolean

Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types. Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

location String
metadata Map<String,String>

Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

name String

Optional. The document resource name. The name must be empty when creating a document. Format: projects//locations//knowledgeBases//documents/.

project String
rawContent String

The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.

displayName string

The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

knowledgeBaseId string
knowledgeTypes DocumentKnowledgeTypesItem[]

The knowledge type of document content.

mimeType string

The MIME type of this document.

contentUri string

The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form gs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.

enableAutoReload boolean

Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types. Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

location string
metadata {[key: string]: string}

Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

name string

Optional. The document resource name. The name must be empty when creating a document. Format: projects//locations//knowledgeBases//documents/.

project string
rawContent string

The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.

display_name str

The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

knowledge_base_id str
knowledge_types Sequence[DocumentKnowledgeTypesItem]

The knowledge type of document content.

mime_type str

The MIME type of this document.

content_uri str

The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form gs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.

enable_auto_reload bool

Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types. Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

location str
metadata Mapping[str, str]

Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

name str

Optional. The document resource name. The name must be empty when creating a document. Format: projects//locations//knowledgeBases//documents/.

project str
raw_content str

The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.

displayName String

The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

knowledgeBaseId String
knowledgeTypes List<"KNOWLEDGE_TYPE_UNSPECIFIED" | "FAQ" | "EXTRACTIVE_QA" | "ARTICLE_SUGGESTION" | "AGENT_FACING_SMART_REPLY">

The knowledge type of document content.

mimeType String

The MIME type of this document.

contentUri String

The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form gs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.

enableAutoReload Boolean

Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types. Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

location String
metadata Map<String>

Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

name String

Optional. The document resource name. The name must be empty when creating a document. Format: projects//locations//knowledgeBases//documents/.

project String
rawContent String

The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

LatestReloadStatus Pulumi.GoogleNative.Dialogflow.V2.Outputs.GoogleCloudDialogflowV2DocumentReloadStatusResponse

The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.

State string

The current state of the document.

Id string

The provider-assigned unique ID for this managed resource.

LatestReloadStatus GoogleCloudDialogflowV2DocumentReloadStatusResponse

The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.

State string

The current state of the document.

id String

The provider-assigned unique ID for this managed resource.

latestReloadStatus GoogleCloudDialogflowV2DocumentReloadStatusResponse

The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.

state String

The current state of the document.

id string

The provider-assigned unique ID for this managed resource.

latestReloadStatus GoogleCloudDialogflowV2DocumentReloadStatusResponse

The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.

state string

The current state of the document.

id str

The provider-assigned unique ID for this managed resource.

latest_reload_status GoogleCloudDialogflowV2DocumentReloadStatusResponse

The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.

state str

The current state of the document.

id String

The provider-assigned unique ID for this managed resource.

latestReloadStatus Property Map

The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.

state String

The current state of the document.

Supporting Types

DocumentKnowledgeTypesItem

KnowledgeTypeUnspecified
KNOWLEDGE_TYPE_UNSPECIFIED

The type is unspecified or arbitrary.

Faq
FAQ

The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.

ExtractiveQa
EXTRACTIVE_QA

Documents for which unstructured text is extracted and used for question answering.

ArticleSuggestion
ARTICLE_SUGGESTION

The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.

AgentFacingSmartReply
AGENT_FACING_SMART_REPLY

The document contains agent-facing Smart Reply entries.

DocumentKnowledgeTypesItemKnowledgeTypeUnspecified
KNOWLEDGE_TYPE_UNSPECIFIED

The type is unspecified or arbitrary.

DocumentKnowledgeTypesItemFaq
FAQ

The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.

DocumentKnowledgeTypesItemExtractiveQa
EXTRACTIVE_QA

Documents for which unstructured text is extracted and used for question answering.

DocumentKnowledgeTypesItemArticleSuggestion
ARTICLE_SUGGESTION

The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.

DocumentKnowledgeTypesItemAgentFacingSmartReply
AGENT_FACING_SMART_REPLY

The document contains agent-facing Smart Reply entries.

KnowledgeTypeUnspecified
KNOWLEDGE_TYPE_UNSPECIFIED

The type is unspecified or arbitrary.

Faq
FAQ

The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.

ExtractiveQa
EXTRACTIVE_QA

Documents for which unstructured text is extracted and used for question answering.

ArticleSuggestion
ARTICLE_SUGGESTION

The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.

AgentFacingSmartReply
AGENT_FACING_SMART_REPLY

The document contains agent-facing Smart Reply entries.

KnowledgeTypeUnspecified
KNOWLEDGE_TYPE_UNSPECIFIED

The type is unspecified or arbitrary.

Faq
FAQ

The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.

ExtractiveQa
EXTRACTIVE_QA

Documents for which unstructured text is extracted and used for question answering.

ArticleSuggestion
ARTICLE_SUGGESTION

The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.

AgentFacingSmartReply
AGENT_FACING_SMART_REPLY

The document contains agent-facing Smart Reply entries.

KNOWLEDGE_TYPE_UNSPECIFIED
KNOWLEDGE_TYPE_UNSPECIFIED

The type is unspecified or arbitrary.

FAQ
FAQ

The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.

EXTRACTIVE_QA
EXTRACTIVE_QA

Documents for which unstructured text is extracted and used for question answering.

ARTICLE_SUGGESTION
ARTICLE_SUGGESTION

The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.

AGENT_FACING_SMART_REPLY
AGENT_FACING_SMART_REPLY

The document contains agent-facing Smart Reply entries.

"KNOWLEDGE_TYPE_UNSPECIFIED"
KNOWLEDGE_TYPE_UNSPECIFIED

The type is unspecified or arbitrary.

"FAQ"
FAQ

The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.

"EXTRACTIVE_QA"
EXTRACTIVE_QA

Documents for which unstructured text is extracted and used for question answering.

"ARTICLE_SUGGESTION"
ARTICLE_SUGGESTION

The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.

"AGENT_FACING_SMART_REPLY"
AGENT_FACING_SMART_REPLY

The document contains agent-facing Smart Reply entries.

GoogleCloudDialogflowV2DocumentReloadStatusResponse

Status Pulumi.GoogleNative.Dialogflow.V2.Inputs.GoogleRpcStatusResponse

The status of a reload attempt or the initial load.

Time string

The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.

Status GoogleRpcStatusResponse

The status of a reload attempt or the initial load.

Time string

The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.

status GoogleRpcStatusResponse

The status of a reload attempt or the initial load.

time String

The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.

status GoogleRpcStatusResponse

The status of a reload attempt or the initial load.

time string

The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.

status GoogleRpcStatusResponse

The status of a reload attempt or the initial load.

time str

The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.

status Property Map

The status of a reload attempt or the initial load.

time String

The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.

GoogleRpcStatusResponse

Code int

The status code, which should be an enum value of google.rpc.Code.

Details List<ImmutableDictionary<string, string>>

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Message string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

Code int

The status code, which should be an enum value of google.rpc.Code.

Details []map[string]string

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Message string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

code Integer

The status code, which should be an enum value of google.rpc.Code.

details List<Map<String,String>>

A list of messages that carry the error details. There is a common set of message types for APIs to use.

message String

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

code number

The status code, which should be an enum value of google.rpc.Code.

details {[key: string]: string}[]

A list of messages that carry the error details. There is a common set of message types for APIs to use.

message string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

code int

The status code, which should be an enum value of google.rpc.Code.

details Sequence[Mapping[str, str]]

A list of messages that carry the error details. There is a common set of message types for APIs to use.

message str

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

code Number

The status code, which should be an enum value of google.rpc.Code.

details List<Map<String>>

A list of messages that carry the error details. There is a common set of message types for APIs to use.

message String

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

Package Details

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