AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Bedrock AgentCore Data Plane Fronting Layer InvokeBrowser API operation.

Syntax

Invoke-BACBrowser
-BrowserIdentifier <String>
-Action_MouseClick_Button <MouseButton>
-Action_MouseDrag_Button <MouseButton>
-Action_MouseClick_ClickCount <Int32>
-Action_MouseScroll_DeltaX <Int32>
-Action_MouseScroll_DeltaY <Int32>
-Action_MouseDrag_EndX <Int32>
-Action_MouseDrag_EndY <Int32>
-Action_Screenshot_Format <ScreenshotFormat>
-Action_KeyPress_Key <String>
-Action_KeyShortcut_Key <String[]>
-Action_KeyPress_Press <Int32>
-SessionId <String>
-Action_MouseDrag_StartX <Int32>
-Action_MouseDrag_StartY <Int32>
-Action_KeyType_Text <String>
-Action_MouseClick_X <Int32>
-Action_MouseMove_X <Int32>
-Action_MouseScroll_X <Int32>
-Action_MouseClick_Y <Int32>
-Action_MouseMove_Y <Int32>
-Action_MouseScroll_Y <Int32>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonBedrockAgentCoreConfig>

Description

Invokes an operating system-level action on a browser session in Amazon Bedrock AgentCore. This operation provides direct OS-level control over browser sessions, enabling mouse actions, keyboard input, and screenshots that the WebSocket-based Chrome DevTools Protocol (CDP) cannot handle — such as interacting with print dialogs, context menus, and JavaScript alerts. You send a request with exactly one action in the BrowserAction union, and receive a corresponding result in the BrowserActionResult union. The following operations are related to InvokeBrowser:

Parameters

-Action_KeyPress_Key <String>
The key name to press (for example, enter, tab, escape).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_KeyPress_Press <Int32>
The number of times to press the key. Valid range: 1–100. Defaults to 1.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAction_KeyPress_Presses
-Action_KeyShortcut_Key <String[]>
The key combination to press (for example, ["ctrl", "s"]). Maximum 5 keys. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAction_KeyShortcut_Keys
-Action_KeyType_Text <String>
The text string to type. Maximum length: 10,000 characters.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseClick_Button <MouseButton>
The mouse button to use. Defaults to LEFT.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseClick_ClickCount <Int32>
The number of clicks to perform. Valid range: 1–10. Defaults to 1.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseClick_X <Int32>
The X coordinate on screen where the click occurs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseClick_Y <Int32>
The Y coordinate on screen where the click occurs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseDrag_Button <MouseButton>
The mouse button to use for the drag. Defaults to LEFT.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseDrag_EndX <Int32>
The ending X coordinate for the drag.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseDrag_EndY <Int32>
The ending Y coordinate for the drag.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseDrag_StartX <Int32>
The starting X coordinate for the drag.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseDrag_StartY <Int32>
The starting Y coordinate for the drag.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseMove_X <Int32>
The target X coordinate on screen.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseMove_Y <Int32>
The target Y coordinate on screen.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseScroll_DeltaX <Int32>
The horizontal scroll delta. Valid range: -1000 to 1000.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseScroll_DeltaY <Int32>
The vertical scroll delta. Valid range: -1000 to 1000. Negative values scroll down.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseScroll_X <Int32>
The X coordinate on screen where the scroll occurs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_MouseScroll_Y <Int32>
The Y coordinate on screen where the scroll occurs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Action_Screenshot_Format <ScreenshotFormat>
The image format for the screenshot. Defaults to PNG.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-BrowserIdentifier <String>
The unique identifier of the browser associated with the session. This must match the identifier used when creating the session with StartBrowserSession.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
Amazon.PowerShell.Cmdlets.BAC.AmazonBedrockAgentCoreClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BedrockAgentCore.Model.InvokeBrowserResponse). Specifying the name of a property of type Amazon.BedrockAgentCore.Model.InvokeBrowserResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SessionId <String>
The unique identifier of the browser session on which to perform the action. This must be an active session created with StartBrowserSession.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.BedrockAgentCore.Model.InvokeBrowserResponse object containing multiple properties.

Supported Version

AWS Tools for PowerShell: 2.x.y.z