@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
100 lines • 4.57 kB
JavaScript
;
// *** 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.AgentAgentKnowledgeBaseAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Agents for Amazon Bedrock Agent Knowledge Base Association.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.bedrock.AgentAgentKnowledgeBaseAssociation("example", {
* agentId: "GGRRAED6JP",
* description: "Example Knowledge base",
* knowledgeBaseId: "EMDPPAYPZI",
* knowledgeBaseState: "ENABLED",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Agents for Amazon Bedrock Agent Knowledge Base Association using the agent ID, the agent version, and the knowledge base ID separated by `,`. For example:
*
* ```sh
* $ pulumi import aws:bedrock/agentAgentKnowledgeBaseAssociation:AgentAgentKnowledgeBaseAssociation example GGRRAED6JP,DRAFT,EMDPPAYPZI
* ```
*/
class AgentAgentKnowledgeBaseAssociation extends pulumi.CustomResource {
/**
* Get an existing AgentAgentKnowledgeBaseAssociation 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 AgentAgentKnowledgeBaseAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AgentAgentKnowledgeBaseAssociation. 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'] === AgentAgentKnowledgeBaseAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["agentId"] = state?.agentId;
resourceInputs["agentVersion"] = state?.agentVersion;
resourceInputs["description"] = state?.description;
resourceInputs["knowledgeBaseId"] = state?.knowledgeBaseId;
resourceInputs["knowledgeBaseState"] = state?.knowledgeBaseState;
resourceInputs["region"] = state?.region;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.agentId === undefined && !opts.urn) {
throw new Error("Missing required property 'agentId'");
}
if (args?.description === undefined && !opts.urn) {
throw new Error("Missing required property 'description'");
}
if (args?.knowledgeBaseId === undefined && !opts.urn) {
throw new Error("Missing required property 'knowledgeBaseId'");
}
if (args?.knowledgeBaseState === undefined && !opts.urn) {
throw new Error("Missing required property 'knowledgeBaseState'");
}
resourceInputs["agentId"] = args?.agentId;
resourceInputs["agentVersion"] = args?.agentVersion;
resourceInputs["description"] = args?.description;
resourceInputs["knowledgeBaseId"] = args?.knowledgeBaseId;
resourceInputs["knowledgeBaseState"] = args?.knowledgeBaseState;
resourceInputs["region"] = args?.region;
resourceInputs["timeouts"] = args?.timeouts;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AgentAgentKnowledgeBaseAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.AgentAgentKnowledgeBaseAssociation = AgentAgentKnowledgeBaseAssociation;
/** @internal */
AgentAgentKnowledgeBaseAssociation.__pulumiType = 'aws:bedrock/agentAgentKnowledgeBaseAssociation:AgentAgentKnowledgeBaseAssociation';
//# sourceMappingURL=agentAgentKnowledgeBaseAssociation.js.map