Skip to content

batch_get_agentic_persona_configuration

batch_get_agentic_persona_configuration(
    agentic_persona_configuration_ids: AgenticPersonaConfigurationLookupIdList,
    *,
    config_overrides: Optional[WorkSpacesClientConfig] = None,
) -> BatchGetAgenticPersonaConfigurationResult

Describes the specified agentic persona configurations. If you don't have permission to describe any one of the specified persona configurations, the operation returns AccessDeniedException and no results.

Parameters:

  • agentic_persona_configuration_ids (AgenticPersonaConfigurationLookupIdList) –

    The identifiers of the persona configurations to describe. If you specify an identifier more than once, the response includes it only once.

Raises:

Examples:

Example – Getting a persona configuration The following example gets a persona configuration.

>>> client.batch_get_agentic_persona_configuration(agentic_persona_configuration_ids=['wsapc-a1b2c3d4'])
Source code in docs_src/capo_workspaces/_services/work_spaces.py
def batch_get_agentic_persona_configuration(
    self,
    agentic_persona_configuration_ids: "capo_workspaces.types.agentic_persona_configuration_lookup_id_list.AgenticPersonaConfigurationLookupIdList",
    *,
    config_overrides: Optional[WorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.batch_get_agentic_persona_configuration_result.BatchGetAgenticPersonaConfigurationResult":
    """<p>Describes the specified agentic persona configurations. If you don't have permission to describe any one of the specified persona configurations, the operation returns <code>AccessDeniedException</code> and no results.</p>

    Args:
        agentic_persona_configuration_ids: <p>The identifiers of the persona configurations to describe. If you specify an identifier more than once, the response includes it only once.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry the request with exponential backoff.</p>
        capo_workspaces.errors.validation_exception.ValidationException: <p>Your request failed validation. Check the error message for the parameter that isn't valid.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Example – Getting a persona configuration
        The following example gets a persona configuration.

        >>> client.batch_get_agentic_persona_configuration(agentic_persona_configuration_ids=['wsapc-a1b2c3d4'])
    """

    def _handler(
        req: "OperationRequest[capo_workspaces.types.batch_get_agentic_persona_configuration_request.BatchGetAgenticPersonaConfigurationRequest]",
    ) -> OperationResponse[
        "capo_workspaces.types.batch_get_agentic_persona_configuration_result.BatchGetAgenticPersonaConfigurationResult"
    ]:
        if req.options.protocol == "awsJson1_1":
            import capo_workspaces._operations.workspaces_service.aws_json1_1.batch_get_agentic_persona_configuration

            output, http_response = (
                capo_workspaces._operations.workspaces_service.aws_json1_1.batch_get_agentic_persona_configuration.batch_get_agentic_persona_configuration(
                    req.options, req.input
                )
            )
        elif req.options.protocol == "rpcv2Cbor":
            import capo_workspaces._operations.workspaces_service.rpcv2_cbor.batch_get_agentic_persona_configuration

            output, http_response = (
                capo_workspaces._operations.workspaces_service.rpcv2_cbor.batch_get_agentic_persona_configuration.batch_get_agentic_persona_configuration(
                    req.options, req.input
                )
            )
        else:
            raise ValueError(f"unknown protocol {req.options.protocol!r}")
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetAgenticPersonaConfiguration")
    )
    input_: capo_workspaces.types.batch_get_agentic_persona_configuration_request.BatchGetAgenticPersonaConfigurationRequest = {
        "agentic_persona_configuration_ids": agentic_persona_configuration_ids
    }

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