Skip to content

Bedrock Agentcore  >  Operations  >  save_browser_session_profile

save_browser_session_profile

Operation

save_browser_session_profile async

save_browser_session_profile(input: SaveBrowserSessionProfileInput, plugins: list[Plugin] | None = None) -> SaveBrowserSessionProfileOutput

Saves the current state of a browser session as a reusable profile in Amazon Bedrock AgentCore. A browser profile captures persistent browser data such as cookies and local storage from an active session, enabling you to reuse this data in future browser sessions.

To save a browser session profile, you must specify the profile identifier, browser identifier, and session ID. The session must be active when saving the profile. Once saved, the profile can be used with the StartBrowserSession operation to initialize new sessions with the stored browser state.

Browser profiles are useful for scenarios that require persistent authentication, maintaining user preferences across sessions, or continuing tasks that depend on previously stored browser data.

The following operations are related to SaveBrowserSessionProfile:

Parameters:

Name Type Description Default
input SaveBrowserSessionProfileInput

An instance of SaveBrowserSessionProfileInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
SaveBrowserSessionProfileOutput

An instance of SaveBrowserSessionProfileOutput.

Input

SaveBrowserSessionProfileInput dataclass

Dataclass for SaveBrowserSessionProfileInput structure.

Attributes

browser_identifier class-attribute instance-attribute
browser_identifier: str | None = None

The unique identifier of the browser associated with the session from which to save the profile.

client_token class-attribute instance-attribute
client_token: str | None = None

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock AgentCore ignores the request, but does not return an error.

profile_identifier class-attribute instance-attribute
profile_identifier: str | None = None

The unique identifier for the browser profile. This identifier is used to reference the profile when starting new browser sessions. The identifier must follow the pattern of an alphanumeric name (up to 48 characters) followed by a hyphen and a 10-character alphanumeric suffix.

session_id class-attribute instance-attribute
session_id: str | None = None

The unique identifier of the browser session from which to save the profile. The session must be active when saving the profile.

trace_id class-attribute instance-attribute
trace_id: str | None = None

The trace identifier for request tracking.

trace_parent class-attribute instance-attribute
trace_parent: str | None = None

The parent trace information for distributed tracing.

Output

SaveBrowserSessionProfileOutput dataclass

Dataclass for SaveBrowserSessionProfileOutput structure.

Attributes

browser_identifier instance-attribute
browser_identifier: str

The unique identifier of the browser associated with the session from which the profile was saved.

last_updated_at instance-attribute
last_updated_at: datetime

The timestamp when the browser profile was last updated. This value is in ISO 8601 format.

profile_identifier instance-attribute
profile_identifier: str

The unique identifier of the saved browser profile.

session_id instance-attribute
session_id: str

The unique identifier of the browser session from which the profile was saved.