import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an AWS Agents for Amazon Bedrock Data Source. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentDataSource("example", { * dataSourceConfiguration: { * s3Configuration: { * bucketArn: "arn:aws:s3:::example-bucket", * }, * type: "S3", * }, * knowledgeBaseId: "EMDPPAYPZI", * name: "example", * }); * ``` * * ### Managed Knowledge Base Connector - S3 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentDataSource("example", { * dataSourceConfiguration: { * managedKnowledgeBaseConnectorConfiguration: { * mediaExtractionConfiguration: { * imageExtractionConfiguration: { * imageExtractionStatus: "ENABLED", * }, * }, * connectorParameters: JSON.stringify({ * type: "S3", * version: "1", * connectionConfiguration: { * bucketName: "my-documents-bucket", * bucketOwnerAccountId: "123456789012", * }, * aclEnabled: false, * filterConfiguration: { * maxFileSizeInMegaBytes: "500", * }, * }), * }, * type: "MANAGED_KNOWLEDGE_BASE_CONNECTOR", * }, * vectorIngestionConfiguration: { * parsingConfiguration: { * parsingStrategy: "SMART_PARSING", * }, * }, * knowledgeBaseId: exampleAwsBedrockagentKnowledgeBase.id, * name: "example-s3-managed", * }); * ``` * * ### Managed Knowledge Base Connector - SharePoint * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const sharepoint = new aws.bedrock.AgentDataSource("sharepoint", { * dataSourceConfiguration: { * managedKnowledgeBaseConnectorConfiguration: { * connectorParameters: JSON.stringify({ * type: "SHAREPOINT", * version: "1", * connectionConfiguration: { * tenantId: "your-entra-tenant-id", * authType: "ENTRA_ID_APP_ONLY", * secretArn: "arn:aws:secretsmanager:us-east-1:123456789012:secret:my-sharepoint-secret", * certificateS3Path: { * s3BucketName: "my-certs-bucket", * s3KeyName: "certs/sharepoint-cert.crt", * }, * }, * dataEntityConfiguration: { * type: "DOCUMENT", * crawlFiles: "true", * crawlPages: "true", * siteUrls: ["https://company.sharepoint.com/sites/MySite"], * }, * }), * }, * type: "MANAGED_KNOWLEDGE_BASE_CONNECTOR", * }, * knowledgeBaseId: example.id, * name: "example-sharepoint", * }); * ``` * * ### Multimodal Parsing * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentDataSource("example", { * dataSourceConfiguration: { * s3Configuration: { * bucketArn: exampleAwsS3Bucket.arn, * }, * type: "S3", * }, * vectorIngestionConfiguration: { * chunkingConfiguration: { * fixedSizeChunkingConfiguration: { * maxTokens: 512, * overlapPercentage: 20, * }, * chunkingStrategy: "FIXED_SIZE", * }, * parsingConfiguration: { * bedrockFoundationModelConfiguration: { * parsingPrompt: { * parsingPromptString: "Extract and transcribe all text and visual content from the document.", * }, * modelArn: "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-sonnet-20240229-v1:0", * parsingModality: "MULTIMODAL", * }, * parsingStrategy: "BEDROCK_FOUNDATION_MODEL", * }, * }, * knowledgeBaseId: exampleAwsBedrockagentKnowledgeBase.id, * name: "multimodal-example", * }); * ``` * * ### GraphRAG with Neptune Analytics * * Knowledge bases that use `NEPTUNE_ANALYTICS` storage require every associated data source to set `contextEnrichmentConfiguration`. * * The graph construction model must be one that GraphRAG currently supports, and the supported models are reachable only through a cross-Region [inference profile](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html). Passing a plain foundation model ARN fails with `ValidationException: Invalid graph bedrock foundation model provided`. * * The knowledge base service role needs: * * * `bedrock:GetInferenceProfile` on `*`. Scoping this to the profile ARN is not honored, and creation fails with `Not authorized to call GetInferenceProfile` even when the granted ARN matches the one in the error. * * `bedrock:InvokeModel` on the inference profile ARN. * * `bedrock:InvokeModel` on the underlying foundation model in every Region the profile routes to, which `aws bedrock get-inference-profile` reports as `models[].modelArn`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentKnowledgeBase("example", { * knowledgeBaseConfiguration: { * vectorKnowledgeBaseConfiguration: { * embeddingModelArn: "arn:aws:bedrock:us-east-1::foundation-model/cohere.embed-english-v3", * }, * type: "VECTOR", * }, * storageConfiguration: { * neptuneAnalyticsConfiguration: { * fieldMapping: { * metadataField: "metadata", * textField: "text", * }, * graphArn: exampleAwsNeptunegraphGraph.arn, * }, * type: "NEPTUNE_ANALYTICS", * }, * name: "graphrag-example", * roleArn: exampleAwsIamRole.arn, * }); * const exampleAgentDataSource = new aws.bedrock.AgentDataSource("example", { * dataSourceConfiguration: { * s3Configuration: { * bucketArn: exampleAwsS3Bucket.arn, * }, * type: "S3", * }, * vectorIngestionConfiguration: { * contextEnrichmentConfiguration: { * bedrockFoundationModelConfiguration: { * enrichmentStrategyConfiguration: { * method: "CHUNK_ENTITY_EXTRACTION", * }, * modelArn: `arn:aws:bedrock:us-east-1:${current.accountId}:inference-profile/us.anthropic.claude-haiku-4-5-20251001-v1:0`, * }, * type: "BEDROCK_FOUNDATION_MODEL", * }, * }, * knowledgeBaseId: example.id, * name: "graphrag-example", * }); * ``` * * ## Import * * Using `pulumi import`, import Agents for Amazon Bedrock Data Source using the data source ID and the knowledge base ID. For example: * * ```sh * $ pulumi import aws:bedrock/agentDataSource:AgentDataSource example GWCMFMQF6T,EMDPPAYPZI * ``` */ export declare class AgentDataSource extends pulumi.CustomResource { /** * Get an existing AgentDataSource resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AgentDataSourceState, opts?: pulumi.CustomResourceOptions): AgentDataSource; /** * Check whether an existing AgentDataSource resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: AgentDataSourceState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of AgentDataSource. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AgentDataSource; /** * Data deletion policy for a data source. Valid values: `RETAIN`, `DELETE`. */ readonly dataDeletionPolicy: pulumi.Output; /** * Details about how the data source is stored. See `dataSourceConfiguration` Block for details. */ readonly dataSourceConfiguration: pulumi.Output; /** * Unique identifier of the data source. */ readonly dataSourceId: pulumi.Output; /** * Description of the data source. */ readonly description: pulumi.Output; /** * Unique identifier of the knowledge base to which the data source belongs. */ readonly knowledgeBaseId: pulumi.Output; /** * Name of the data source. * * The following arguments are optional: */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Details about the configuration of the server-side encryption. See `serverSideEncryptionConfiguration` Block for details. */ readonly serverSideEncryptionConfiguration: pulumi.Output; readonly timeouts: pulumi.Output; /** * Details about how to ingest the documents in the data source. See `vectorIngestionConfiguration` Block for details. */ readonly vectorIngestionConfiguration: pulumi.Output; /** * Create a AgentDataSource resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AgentDataSourceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AgentDataSource resources. */ export interface AgentDataSourceState { /** * Data deletion policy for a data source. Valid values: `RETAIN`, `DELETE`. */ dataDeletionPolicy?: pulumi.Input; /** * Details about how the data source is stored. See `dataSourceConfiguration` Block for details. */ dataSourceConfiguration?: pulumi.Input; /** * Unique identifier of the data source. */ dataSourceId?: pulumi.Input; /** * Description of the data source. */ description?: pulumi.Input; /** * Unique identifier of the knowledge base to which the data source belongs. */ knowledgeBaseId?: pulumi.Input; /** * Name of the data source. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Details about the configuration of the server-side encryption. See `serverSideEncryptionConfiguration` Block for details. */ serverSideEncryptionConfiguration?: pulumi.Input; timeouts?: pulumi.Input; /** * Details about how to ingest the documents in the data source. See `vectorIngestionConfiguration` Block for details. */ vectorIngestionConfiguration?: pulumi.Input; } /** * The set of arguments for constructing a AgentDataSource resource. */ export interface AgentDataSourceArgs { /** * Data deletion policy for a data source. Valid values: `RETAIN`, `DELETE`. */ dataDeletionPolicy?: pulumi.Input; /** * Details about how the data source is stored. See `dataSourceConfiguration` Block for details. */ dataSourceConfiguration: pulumi.Input; /** * Description of the data source. */ description?: pulumi.Input; /** * Unique identifier of the knowledge base to which the data source belongs. */ knowledgeBaseId: pulumi.Input; /** * Name of the data source. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Details about the configuration of the server-side encryption. See `serverSideEncryptionConfiguration` Block for details. */ serverSideEncryptionConfiguration?: pulumi.Input; timeouts?: pulumi.Input; /** * Details about how to ingest the documents in the data source. See `vectorIngestionConfiguration` Block for details. */ vectorIngestionConfiguration?: pulumi.Input; } //# sourceMappingURL=agentDataSource.d.ts.map