Skip to content

list_browser_profiles

list_browser_profiles(
    *,
    config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    name: Optional[BrowserProfileName] = None,
) -> ListBrowserProfilesResponse

Lists all browser profiles in your account.

Parameters:

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return in the response.

  • next_token (Optional[NextToken], default: None ) –

    A token to retrieve the next page of results.

  • name (Optional[BrowserProfileName], default: None ) –

    The name of the browser profile to filter results by.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
def list_browser_profiles(
    self,
    *,
    config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
    max_results: Optional[
        "capo_bedrock_agentcore_control.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_bedrock_agentcore_control.types.next_token.NextToken"
    ] = None,
    name: Optional[
        "capo_bedrock_agentcore_control.types.browser_profile_name.BrowserProfileName"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.list_browser_profiles_response.ListBrowserProfilesResponse":
    """<p>Lists all browser profiles in your account.</p>

    Args:
        max_results: <p>The maximum number of results to return in the response.</p>
        next_token: <p>A token to retrieve the next page of results.</p>
        name: <p>The name of the browser profile to filter results by.</p>

    Raises:
        capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
        capo_bedrock_agentcore_control.errors.internal_server_exception.InternalServerException: <p>This exception is thrown if there was an unexpected error during processing of request</p>
        capo_bedrock_agentcore_control.errors.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</p>
        capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_bedrock_agentcore_control.types.list_browser_profiles_request.ListBrowserProfilesRequest]",
    ) -> OperationResponse[
        "capo_bedrock_agentcore_control.types.list_browser_profiles_response.ListBrowserProfilesResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_browser_profiles

        output, http_response = (
            capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_browser_profiles.list_browser_profiles(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_bedrock_agentcore_control.types.list_browser_profiles_response.ListBrowserProfilesResponse",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.list_browser_profiles_response

        return capo_bedrock_agentcore_control.types.list_browser_profiles_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListBrowserProfiles", redact_output=_redact_output),
    )
    input_: capo_bedrock_agentcore_control.types.list_browser_profiles_request.ListBrowserProfilesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if name is not None:
        input_["name"] = name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output