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/v2.getDocument
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
Retrieves the specified document.
Using getDocument
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDocument(args: GetDocumentArgs, opts?: InvokeOptions): Promise<GetDocumentResult>
function getDocumentOutput(args: GetDocumentOutputArgs, opts?: InvokeOptions): Output<GetDocumentResult>
def get_document(document_id: Optional[str] = None,
knowledge_base_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDocumentResult
def get_document_output(document_id: Optional[pulumi.Input[str]] = None,
knowledge_base_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDocumentResult]
func LookupDocument(ctx *Context, args *LookupDocumentArgs, opts ...InvokeOption) (*LookupDocumentResult, error)
func LookupDocumentOutput(ctx *Context, args *LookupDocumentOutputArgs, opts ...InvokeOption) LookupDocumentResultOutput
> Note: This function is named LookupDocument
in the Go SDK.
public static class GetDocument
{
public static Task<GetDocumentResult> InvokeAsync(GetDocumentArgs args, InvokeOptions? opts = null)
public static Output<GetDocumentResult> Invoke(GetDocumentInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDocumentResult> getDocument(GetDocumentArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: google-native:dialogflow/v2:getDocument
arguments:
# arguments dictionary
The following arguments are supported:
- Document
Id string - Knowledge
Base stringId - Location string
- Project string
- Document
Id string - Knowledge
Base stringId - Location string
- Project string
- document
Id String - knowledge
Base StringId - location String
- project String
- document
Id string - knowledge
Base stringId - location string
- project string
- document_
id str - knowledge_
base_ strid - location str
- project str
- document
Id String - knowledge
Base StringId - location String
- project String
getDocument Result
The following output properties are available:
- Content
Uri 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 thegs://
format URI described above. - Display
Name string - The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- Enable
Auto boolReload - 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 inlatest_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. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocument
and clear the errors. - Knowledge
Types List<string> - The knowledge type of document content.
- Latest
Reload Pulumi.Status Google Native. Dialogflow. V2. Outputs. Google Cloud Dialogflow V2Document Reload Status Response - The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
- 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 avalue
of the metadata is 1024 bytes. - Mime
Type string - The MIME type of this document.
- Name string
- Optional. The document resource name. The name must be empty when creating a document. Format:
projects//locations//knowledgeBases//documents/
. - Raw
Content string - The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
- State string
- The current state of the document.
- Content
Uri 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 thegs://
format URI described above. - Display
Name string - The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- Enable
Auto boolReload - 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 inlatest_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. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocument
and clear the errors. - Knowledge
Types []string - The knowledge type of document content.
- Latest
Reload GoogleStatus Cloud Dialogflow V2Document Reload Status Response - The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
- 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 avalue
of the metadata is 1024 bytes. - Mime
Type string - The MIME type of this document.
- Name string
- Optional. The document resource name. The name must be empty when creating a document. Format:
projects//locations//knowledgeBases//documents/
. - Raw
Content string - The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
- State string
- The current state of the document.
- content
Uri 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 thegs://
format URI described above. - display
Name String - The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- enable
Auto BooleanReload - 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 inlatest_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. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocument
and clear the errors. - knowledge
Types List<String> - The knowledge type of document content.
- latest
Reload GoogleStatus Cloud Dialogflow V2Document Reload Status Response - The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
- 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 avalue
of the metadata is 1024 bytes. - mime
Type String - The MIME type of this document.
- name String
- Optional. The document resource name. The name must be empty when creating a document. Format:
projects//locations//knowledgeBases//documents/
. - raw
Content String - The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
- state String
- The current state of the document.
- content
Uri 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 thegs://
format URI described above. - display
Name string - The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- enable
Auto booleanReload - 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 inlatest_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. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocument
and clear the errors. - knowledge
Types string[] - The knowledge type of document content.
- latest
Reload GoogleStatus Cloud Dialogflow V2Document Reload Status Response - The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
- 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 avalue
of the metadata is 1024 bytes. - mime
Type string - The MIME type of this document.
- name string
- Optional. The document resource name. The name must be empty when creating a document. Format:
projects//locations//knowledgeBases//documents/
. - raw
Content string - The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
- state string
- The current state of the 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 thegs://
format URI described above. - display_
name str - The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- enable_
auto_ boolreload - 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 inlatest_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. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocument
and clear the errors. - knowledge_
types Sequence[str] - The knowledge type of document content.
- latest_
reload_ Googlestatus Cloud Dialogflow V2Document Reload Status Response - The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
- 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 avalue
of the metadata is 1024 bytes. - mime_
type str - The MIME type of this document.
- name str
- Optional. The document resource name. The name must be empty when creating a document. Format:
projects//locations//knowledgeBases//documents/
. - raw_
content str - The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
- state str
- The current state of the document.
- content
Uri 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 thegs://
format URI described above. - display
Name String - The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- enable
Auto BooleanReload - 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 inlatest_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. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocument
and clear the errors. - knowledge
Types List<String> - The knowledge type of document content.
- latest
Reload Property MapStatus - The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
- 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 avalue
of the metadata is 1024 bytes. - mime
Type String - The MIME type of this document.
- name String
- Optional. The document resource name. The name must be empty when creating a document. Format:
projects//locations//knowledgeBases//documents/
. - raw
Content String - The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
- state String
- The current state of the document.
Supporting Types
GoogleCloudDialogflowV2DocumentReloadStatusResponse
- Status
Pulumi.
Google Native. Dialogflow. V2. Inputs. Google Rpc Status Response - 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
Google
Rpc Status Response - 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
Google
Rpc Status Response - 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
Google
Rpc Status Response - 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
Google
Rpc Status Response - 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<Immutable
Dictionary<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
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