Skip to content

delete_studio_session_mapping async

delete_studio_session_mapping(
    *,
    config_overrides: Optional[AsyncEMRClientConfig] = None,
    studio_id: Optional[XmlStringMaxLen256] = None,
    identity_id: Optional[XmlStringMaxLen256] = None,
    identity_name: Optional[XmlStringMaxLen256] = None,
    identity_type: Optional[IdentityType] = None,
) -> None

Removes a user or group from an Amazon EMR Studio.

Parameters:

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

    The ID of the Amazon EMR Studio.

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

    The globally unique identifier (GUID) of the user or group to remove from the Amazon EMR Studio. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.

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

    The name of the user name or group to remove from the Amazon EMR Studio. For more information, see UserName and DisplayName in the IAM Identity Center Store API Reference. Either IdentityName or IdentityId must be specified.

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

    Specifies whether the identity to delete from the Amazon EMR Studio is a user or a group.

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/async_emr.py
async def delete_studio_session_mapping(
    self,
    *,
    config_overrides: Optional[AsyncEMRClientConfig] = None,
    studio_id: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    identity_id: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    identity_name: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    identity_type: Optional["capo_emr.types.identity_type.IdentityType"] = None,
) -> None:
    """<p>Removes a user or group from an Amazon EMR Studio.</p>

    Args:
        studio_id: <p>The ID of the Amazon EMR Studio.</p>
        identity_id: <p>The globally unique identifier (GUID) of the user or group to remove from the Amazon EMR Studio. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserId</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId">GroupId</a> in the <i>IAM Identity Center Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p>
        identity_name: <p>The name of the user name or group to remove from the Amazon EMR Studio. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserName">UserName</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName">DisplayName</a> in the <i>IAM Identity Center Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p>
        identity_type: <p>Specifies whether the identity to delete from the Amazon EMR Studio is a user or a group.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_emr.types.delete_studio_session_mapping_input.DeleteStudioSessionMappingInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_emr._operations.elastic_map_reduce.delete_studio_session_mapping

        (
            output,
            http_response,
        ) = await capo_emr._operations.elastic_map_reduce.delete_studio_session_mapping.async_delete_studio_session_mapping(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteStudioSessionMapping")
    )
    input_: capo_emr.types.delete_studio_session_mapping_input.DeleteStudioSessionMappingInput = {}
    if studio_id is not None:
        input_["studio_id"] = studio_id
    if identity_id is not None:
        input_["identity_id"] = identity_id
    if identity_name is not None:
        input_["identity_name"] = identity_name
    if identity_type is not None:
        input_["identity_type"] = identity_type

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output