UNPKG

@pulumi/aws

Version:

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

157 lines 5.92 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.AgentcoreBrowser = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an AWS Bedrock AgentCore Browser. Browser provides AI agents with web browsing capabilities, allowing them to navigate websites, extract information, and interact with web content in a controlled environment. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentcoreBrowser("example", { * name: "example-browser", * description: "Browser for web data extraction", * networkConfiguration: { * networkMode: "PUBLIC", * }, * }); * ``` * * ### Browser with VPC Configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const vpcExample = new aws.bedrock.AgentcoreBrowser("vpc_example", { * name: "vpc-browser", * description: "Browser with VPC configuration", * networkConfiguration: { * networkMode: "VPC", * vpcConfig: { * securityGroups: ["sg-12345678"], * subnets: [ * "subnet-12345678", * "subnet-87654321", * ], * }, * }, * }); * ``` * * ### Browser with Execution Role and Recording * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const assumeRole = aws.iam.getPolicyDocument({ * statements: [{ * effect: "Allow", * actions: ["sts:AssumeRole"], * principals: [{ * type: "Service", * identifiers: ["bedrock-agentcore.amazonaws.com"], * }], * }], * }); * const example = new aws.iam.Role("example", { * name: "bedrock-agentcore-browser-role", * assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json), * }); * const recording = new aws.s3.Bucket("recording", {bucket: "browser-recording-bucket"}); * const exampleAgentcoreBrowser = new aws.bedrock.AgentcoreBrowser("example", { * name: "example-browser", * description: "Browser with recording enabled", * executionRoleArn: example.arn, * networkConfiguration: { * networkMode: "PUBLIC", * }, * recording: { * enabled: true, * s3Location: { * bucket: recording.bucket, * prefix: "browser-sessions/", * }, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Bedrock AgentCore Browser using the browser ID. For example: * * ```sh * $ pulumi import aws:bedrock/agentcoreBrowser:AgentcoreBrowser example BROWSER1234567890 * ``` */ class AgentcoreBrowser extends pulumi.CustomResource { /** * Get an existing AgentcoreBrowser 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 AgentcoreBrowser(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AgentcoreBrowser. 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'] === AgentcoreBrowser.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["browserArn"] = state?.browserArn; resourceInputs["browserId"] = state?.browserId; resourceInputs["description"] = state?.description; resourceInputs["executionRoleArn"] = state?.executionRoleArn; resourceInputs["name"] = state?.name; resourceInputs["networkConfiguration"] = state?.networkConfiguration; resourceInputs["recording"] = state?.recording; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; resourceInputs["description"] = args?.description; resourceInputs["executionRoleArn"] = args?.executionRoleArn; resourceInputs["name"] = args?.name; resourceInputs["networkConfiguration"] = args?.networkConfiguration; resourceInputs["recording"] = args?.recording; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["browserArn"] = undefined /*out*/; resourceInputs["browserId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AgentcoreBrowser.__pulumiType, name, resourceInputs, opts); } } exports.AgentcoreBrowser = AgentcoreBrowser; /** @internal */ AgentcoreBrowser.__pulumiType = 'aws:bedrock/agentcoreBrowser:AgentcoreBrowser'; //# sourceMappingURL=agentcoreBrowser.js.map