UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

101 lines 4.37 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.AgentDataSource = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing 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", { * knowledgeBaseId: "EMDPPAYPZI", * name: "example", * dataSourceConfiguration: { * type: "S3", * s3Configuration: { * bucketArn: "arn:aws:s3:::example-bucket", * }, * }, * }); * ``` * * ## 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 * ``` */ 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, id, state, opts) { return new AgentDataSource(name, state, { ...opts, id: id }); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === AgentDataSource.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dataDeletionPolicy"] = state?.dataDeletionPolicy; resourceInputs["dataSourceConfiguration"] = state?.dataSourceConfiguration; resourceInputs["dataSourceId"] = state?.dataSourceId; resourceInputs["description"] = state?.description; resourceInputs["knowledgeBaseId"] = state?.knowledgeBaseId; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["serverSideEncryptionConfiguration"] = state?.serverSideEncryptionConfiguration; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["vectorIngestionConfiguration"] = state?.vectorIngestionConfiguration; } else { const args = argsOrState; if (args?.knowledgeBaseId === undefined && !opts.urn) { throw new Error("Missing required property 'knowledgeBaseId'"); } resourceInputs["dataDeletionPolicy"] = args?.dataDeletionPolicy; resourceInputs["dataSourceConfiguration"] = args?.dataSourceConfiguration; resourceInputs["description"] = args?.description; resourceInputs["knowledgeBaseId"] = args?.knowledgeBaseId; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["serverSideEncryptionConfiguration"] = args?.serverSideEncryptionConfiguration; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["vectorIngestionConfiguration"] = args?.vectorIngestionConfiguration; resourceInputs["dataSourceId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AgentDataSource.__pulumiType, name, resourceInputs, opts); } } exports.AgentDataSource = AgentDataSource; /** @internal */ AgentDataSource.__pulumiType = 'aws:bedrock/agentDataSource:AgentDataSource'; //# sourceMappingURL=agentDataSource.js.map