Skip to content

list_studio_session_mappings

list_studio_session_mappings(
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    studio_id: Optional[XmlStringMaxLen256] = None,
    identity_type: Optional[IdentityType] = None,
    marker: Optional[Marker] = None,
) -> ListStudioSessionMappingsOutput

Returns a list of all user or group session mappings for the Amazon EMR Studio specified by StudioId.

Parameters:

  • studio_id (Optional[XmlStringMaxLen256], default: None ) –

    The ID of the Amazon EMR Studio.

  • identity_type (Optional[IdentityType], default: None ) –

    Specifies whether to return session mappings for users or groups. If not specified, the results include session mapping details for both users and groups.

  • marker (Optional[Marker], default: None ) –

    The pagination token that indicates the set of results to retrieve.

Raises:

  • InternalServerError –

    Indicates that an error occurred while processing the request and that the request was not completed.

  • InvalidRequestException –

    This exception occurs when there is something wrong with user input.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_emr/_services/emr.py
def list_studio_session_mappings(
    self,
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    studio_id: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    identity_type: Optional["capo_emr.types.identity_type.IdentityType"] = None,
    marker: Optional["capo_emr.types.marker.Marker"] = None,
) -> "capo_emr.types.list_studio_session_mappings_output.ListStudioSessionMappingsOutput":
    """<p>Returns a list of all user or group session mappings for the Amazon EMR Studio specified by <code>StudioId</code>.</p>

    Args:
        studio_id: <p>The ID of the Amazon EMR Studio.</p>
        identity_type: <p>Specifies whether to return session mappings for users or groups. If not specified, the results include session mapping details for both users and groups.</p>
        marker: <p>The pagination token that indicates the set of results to retrieve.</p>

    Raises:
        capo_emr.errors.internal_server_error.InternalServerError: <p>Indicates that an error occurred while processing the request and that the request was not completed.</p>
        capo_emr.errors.invalid_request_exception.InvalidRequestException: <p>This exception occurs when there is something wrong with user input.</p>
        capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_emr.types.list_studio_session_mappings_input.ListStudioSessionMappingsInput]",
    ) -> OperationResponse[
        "capo_emr.types.list_studio_session_mappings_output.ListStudioSessionMappingsOutput"
    ]:
        import capo_emr._operations.elastic_map_reduce.list_studio_session_mappings

        output, http_response = (
            capo_emr._operations.elastic_map_reduce.list_studio_session_mappings.list_studio_session_mappings(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListStudioSessionMappings")
    )
    input_: capo_emr.types.list_studio_session_mappings_input.ListStudioSessionMappingsInput = {}
    if studio_id is not None:
        input_["studio_id"] = studio_id
    if identity_type is not None:
        input_["identity_type"] = identity_type
    if marker is not None:
        input_["marker"] = marker

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