mds_plugin/mysql_database_service.py
def list_db_systems(**kwargs):
    """Lists MySQL DB Systems

    Lists all users of a given compartment.

    Args:
        **kwargs: Optional parameters

    Keyword Args:
        compartment_id (str): OCID of the parent compartment.
        config (object): An OCI config object or None.
        config_profile (str): The name of an OCI config profile
        interactive (bool): Indicates whether to execute in interactive mode
        raise_exceptions (bool): If set to true exceptions are raised
        return_formatted (bool): If set to true, a list object is returned.
        return_python_object (bool): Used for internal plugin calls

    Returns:
        A list of DB Systems
    """

    compartment_id = kwargs.get("compartment_id")
    config = kwargs.get("config")
    config_profile = kwargs.get("config_profile")

    interactive = kwargs.get("interactive", core.get_interactive_default())
    raise_exceptions = kwargs.get("raise_exceptions", not interactive)
    return_formatted = kwargs.get("return_formatted", interactive)
    return_python_object = kwargs.get("return_python_object", False)

    import oci.mysql

    # Get the active config and compartment
    try:
        config = configuration.get_current_config(
            config=config, config_profile=config_profile)
        compartment_id = configuration.get_current_compartment_id(
            compartment_id=compartment_id, config=config)
        current_db_system_id = configuration.get_current_db_system_id(
            config=config)

        # Initialize the DbSystem client
        db_sys = core.get_oci_db_system_client(config=config)

        # List the DbSystems of the current compartment
        data = db_sys.list_db_systems(compartment_id=compartment_id).data

        # Filter out all deleted compartments
        data = [c for c in data if c.lifecycle_state != "DELETED"]

        return core.return_oci_object(
            oci_object=data,
            return_python_object=return_python_object,
            return_formatted=return_formatted,
            format_function=format_db_systems,
            current=current_db_system_id)

    except oci.exceptions.ServiceError as e:
        if raise_exceptions:
            raise
        print(f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})')
    except (ValueError, oci.exceptions.ClientError) as e:
        if raise_exceptions:
            raise
        print(f'ERROR: {e}')
Lists MySQL DB Systems

    Lists all users of a given compartment.

    Args:
        **kwargs: Optional parameters

    Keyword Args:
        compartment_id (str): OCID of the parent compartment.
        config (object): An OCI config object or None.
        config_profile (str): The name of an OCI config profile
        interactive (bool): Indicates whether to execute in interactive mode
        raise_exceptions (bool): If set to true exceptions are raised
        return_formatted (bool): If set to true, a list object is returned.
        return_python_object (bool): Used for internal plugin calls

    Returns:
        A list of DB Systems
    
Lists MySQL DB Systems
Lists all users of a given compartment.
Lists MySQL DB Systems Lists all users of a given compartment .
def list_db_systems(**kwargs):
    compartment_id = kwargs.get("compartment_id")
    config = kwargs.get("config")
    config_profile = kwargs.get("config_profile")
    interactive = kwargs.get("interactive", core.get_interactive_default())
    raise_exceptions = kwargs.get("raise_exceptions", not interactive)
    return_formatted = kwargs.get("return_formatted", interactive)
    return_python_object = kwargs.get("return_python_object", False)
    import oci.mysql
    try:
        config = configuration.get_current_config(
            config=config, config_profile=config_profile)
        compartment_id = configuration.get_current_compartment_id(
            compartment_id=compartment_id, config=config)
        current_db_system_id = configuration.get_current_db_system_id(
            config=config)
        db_sys = core.get_oci_db_system_client(config=config)
        data = db_sys.list_db_systems(compartment_id=compartment_id).data
        data = [c for c in data if c.lifecycle_state != "DELETED"]
        return core.return_oci_object(
            oci_object=data,
            return_python_object=return_python_object,
            return_formatted=return_formatted,
            format_function=format_db_systems,
            current=current_db_system_id)
    except oci.exceptions.ServiceError as e:
        if raise_exceptions:
            raise
        print(f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})')
    except (ValueError, oci.exceptions.ClientError) as e:
        if raise_exceptions:
            raise
        print(f'ERROR: {e}')
def list_db_systems ( ** kwargs ) : compartment_id = kwargs . get ( "compartment_id" ) config = kwargs . get ( "config" ) config_profile = kwargs . get ( "config_profile" ) interactive = kwargs . get ( "interactive" , core . get_interactive_default ( ) ) raise_exceptions = kwargs . get ( "raise_exceptions" , not interactive ) return_formatted = kwargs . get ( "return_formatted" , interactive ) return_python_object = kwargs . get ( "return_python_object" , False ) import oci . mysql try : config = configuration . get_current_config ( config = config , config_profile = config_profile ) compartment_id = configuration . get_current_compartment_id ( compartment_id = compartment_id , config = config ) current_db_system_id = configuration . get_current_db_system_id ( config = config ) db_sys = core . get_oci_db_system_client ( config = config ) data = db_sys . list_db_systems ( compartment_id = compartment_id ) . data data = [ c for c in data if c . lifecycle_state != "DELETED" ] return core . return_oci_object ( oci_object = data , return_python_object = return_python_object , return_formatted = return_formatted , format_function = format_db_systems , current = current_db_system_id ) except oci . exceptions . ServiceError as e : if raise_exceptions : raise print ( f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})' ) except ( ValueError , oci . exceptions . ClientError ) as e : if raise_exceptions : raise print ( f'ERROR: {e}' )
Lists MySQL DB Systems
Lists all users of a given compartment.
Lists MySQL DB Systems Lists all users of a given compartment .
"""Lists MySQL DB Systems

    Lists all users of a given compartment.

    Args:
        **kwargs: Optional parameters

    Keyword Args:
        compartment_id (str): OCID of the parent compartment.
        config (object): An OCI config object or None.
        config_profile (str): The name of an OCI config profile
        interactive (bool): Indicates whether to execute in interactive mode
        raise_exceptions (bool): If set to true exceptions are raised
        return_formatted (bool): If set to true, a list object is returned.
        return_python_object (bool): Used for internal plugin calls

    Returns:
        A list of DB Systems
    """ # Get the active config and compartment
 # Initialize the DbSystem client
 # List the DbSystems of the current compartment
 # Filter out all deleted compartments

A list of DB Systems
A list of DB Systems
**kwargs
None