UNPKG

@pulumi/aws

Version:

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

205 lines • 8.03 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.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, { ...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?.actionGroupExecutor; resourceInputs["actionGroupId"] = state?.actionGroupId; resourceInputs["actionGroupName"] = state?.actionGroupName; resourceInputs["actionGroupState"] = state?.actionGroupState; resourceInputs["agentId"] = state?.agentId; resourceInputs["agentVersion"] = state?.agentVersion; resourceInputs["apiSchema"] = state?.apiSchema; resourceInputs["description"] = state?.description; resourceInputs["functionSchema"] = state?.functionSchema; resourceInputs["parentActionGroupSignature"] = state?.parentActionGroupSignature; resourceInputs["prepareAgent"] = state?.prepareAgent; resourceInputs["region"] = state?.region; resourceInputs["skipResourceInUseCheck"] = state?.skipResourceInUseCheck; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; if (args?.actionGroupName === undefined && !opts.urn) { throw new Error("Missing required property 'actionGroupName'"); } if (args?.agentId === undefined && !opts.urn) { throw new Error("Missing required property 'agentId'"); } if (args?.agentVersion === undefined && !opts.urn) { throw new Error("Missing required property 'agentVersion'"); } resourceInputs["actionGroupExecutor"] = args?.actionGroupExecutor; resourceInputs["actionGroupName"] = args?.actionGroupName; resourceInputs["actionGroupState"] = args?.actionGroupState; resourceInputs["agentId"] = args?.agentId; resourceInputs["agentVersion"] = args?.agentVersion; resourceInputs["apiSchema"] = args?.apiSchema; resourceInputs["description"] = args?.description; resourceInputs["functionSchema"] = args?.functionSchema; resourceInputs["parentActionGroupSignature"] = args?.parentActionGroupSignature; resourceInputs["prepareAgent"] = args?.prepareAgent; resourceInputs["region"] = args?.region; resourceInputs["skipResourceInUseCheck"] = args?.skipResourceInUseCheck; resourceInputs["timeouts"] = args?.timeouts; 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