@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
205 lines • 8.59 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.AgentAgentActionGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Agents for Amazon Bedrock Agent Action Group.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as std from "@pulumi/std";
*
* const example = new aws.bedrock.AgentAgentActionGroup("example", {
* actionGroupName: "example",
* agentId: "GGRRAED6JP",
* agentVersion: "DRAFT",
* skipResourceInUseCheck: true,
* actionGroupExecutor: {
* lambda: "arn:aws:lambda:us-west-2:123456789012:function:example-function",
* },
* apiSchema: {
* payload: std.file({
* input: "path/to/schema.yaml",
* }).then(invoke => invoke.result),
* },
* });
* ```
*
* ### API Schema in S3 Bucket
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.bedrock.AgentAgentActionGroup("example", {
* actionGroupName: "example",
* agentId: "GGRRAED6JP",
* agentVersion: "DRAFT",
* skipResourceInUseCheck: true,
* actionGroupExecutor: {
* lambda: "arn:aws:lambda:us-west-2:123456789012:function:example-function",
* },
* apiSchema: {
* s3: {
* s3BucketName: "example-bucket",
* s3ObjectKey: "path/to/schema.json",
* },
* },
* });
* ```
*
* ### Function Schema (Simplified Schema)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.bedrock.AgentAgentActionGroup("example", {
* actionGroupName: "example",
* agentId: "GGRRAED6JP",
* agentVersion: "DRAFT",
* skipResourceInUseCheck: true,
* actionGroupExecutor: {
* lambda: "arn:aws:lambda:us-west-2:123456789012:function:example-function",
* },
* functionSchema: {
* memberFunctions: {
* functions: [{
* name: "example-function",
* description: "Example function",
* parameters: [
* {
* mapBlockKey: "param1",
* type: "string",
* description: "The first parameter",
* required: true,
* },
* {
* mapBlockKey: "param2",
* type: "integer",
* description: "The second parameter",
* required: false,
* },
* ],
* }],
* },
* },
* });
* ```
*
* ### Return of Control
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as std from "@pulumi/std";
*
* const example = new aws.bedrock.AgentAgentActionGroup("example", {
* actionGroupName: "example",
* agentId: "GGRRAED6JP",
* agentVersion: "DRAFT",
* skipResourceInUseCheck: true,
* actionGroupExecutor: {
* customControl: "RETURN_CONTROL",
* },
* apiSchema: {
* payload: std.file({
* input: "path/to/schema.yaml",
* }).then(invoke => invoke.result),
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Agents for Amazon Bedrock Agent Action Group the action group ID, the agent ID, and the agent version separated by `,`. For example:
*
* ```sh
* $ pulumi import aws:bedrock/agentAgentActionGroup:AgentAgentActionGroup example MMAUDBZTH4,GGRRAED6JP,DRAFT
* ```
*/
class AgentAgentActionGroup extends pulumi.CustomResource {
/**
* Get an existing AgentAgentActionGroup 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 AgentAgentActionGroup(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AgentAgentActionGroup. 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'] === AgentAgentActionGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["actionGroupExecutor"] = state ? state.actionGroupExecutor : undefined;
resourceInputs["actionGroupId"] = state ? state.actionGroupId : undefined;
resourceInputs["actionGroupName"] = state ? state.actionGroupName : undefined;
resourceInputs["actionGroupState"] = state ? state.actionGroupState : undefined;
resourceInputs["agentId"] = state ? state.agentId : undefined;
resourceInputs["agentVersion"] = state ? state.agentVersion : undefined;
resourceInputs["apiSchema"] = state ? state.apiSchema : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["functionSchema"] = state ? state.functionSchema : undefined;
resourceInputs["parentActionGroupSignature"] = state ? state.parentActionGroupSignature : undefined;
resourceInputs["prepareAgent"] = state ? state.prepareAgent : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["skipResourceInUseCheck"] = state ? state.skipResourceInUseCheck : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
}
else {
const args = argsOrState;
if ((!args || args.actionGroupName === undefined) && !opts.urn) {
throw new Error("Missing required property 'actionGroupName'");
}
if ((!args || args.agentId === undefined) && !opts.urn) {
throw new Error("Missing required property 'agentId'");
}
if ((!args || args.agentVersion === undefined) && !opts.urn) {
throw new Error("Missing required property 'agentVersion'");
}
resourceInputs["actionGroupExecutor"] = args ? args.actionGroupExecutor : undefined;
resourceInputs["actionGroupName"] = args ? args.actionGroupName : undefined;
resourceInputs["actionGroupState"] = args ? args.actionGroupState : undefined;
resourceInputs["agentId"] = args ? args.agentId : undefined;
resourceInputs["agentVersion"] = args ? args.agentVersion : undefined;
resourceInputs["apiSchema"] = args ? args.apiSchema : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["functionSchema"] = args ? args.functionSchema : undefined;
resourceInputs["parentActionGroupSignature"] = args ? args.parentActionGroupSignature : undefined;
resourceInputs["prepareAgent"] = args ? args.prepareAgent : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["skipResourceInUseCheck"] = args ? args.skipResourceInUseCheck : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
resourceInputs["actionGroupId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AgentAgentActionGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.AgentAgentActionGroup = AgentAgentActionGroup;
/** @internal */
AgentAgentActionGroup.__pulumiType = 'aws:bedrock/agentAgentActionGroup:AgentAgentActionGroup';
//# sourceMappingURL=agentAgentActionGroup.js.map