mds_plugin/user.py
def list_groups(config=None, interactive=True, return_formatted=True):
    """Lists groups

    Lists all groups of the tenancy

    Args:
        config (object): An OCI config object or None.
        interactive (bool): If set to false exceptions are raised
        return_formatted (bool): If set to true, a list object is returned.

    Returns:
        A list of groups
    """

    # Get the current config
    try:
        config = configuration.get_current_config(config=config)

        import oci.identity

        # Initialize the identity client
        identity = core.get_oci_identity_client(config=config)

        # List the groups
        data = identity.list_groups(compartment_id=config.get("tenancy")).data

        if return_formatted:
            return format_group_listing(data)
        else:
            return oci.util.to_dict(data)
    except oci.exceptions.ServiceError as e:
        if not interactive:
            raise
        print(f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})')
        return
    except Exception as e:
        if not interactive:
            raise
        print(f'ERROR: {e}')
        return
Lists groups

    Lists all groups of the tenancy

    Args:
        config (object): An OCI config object or None.
        interactive (bool): If set to false exceptions are raised
        return_formatted (bool): If set to true, a list object is returned.

    Returns:
        A list of groups
    
Lists groups
Lists all groups of the tenancy
Lists groups Lists all groups of the tenancy
def list_groups(config=None, interactive=True, return_formatted=True):
    try:
        config = configuration.get_current_config(config=config)
        import oci.identity
        identity = core.get_oci_identity_client(config=config)
        data = identity.list_groups(compartment_id=config.get("tenancy")).data
        if return_formatted:
            return format_group_listing(data)
        else:
            return oci.util.to_dict(data)
    except oci.exceptions.ServiceError as e:
        if not interactive:
            raise
        print(f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})')
        return
    except Exception as e:
        if not interactive:
            raise
        print(f'ERROR: {e}')
        return
def list_groups ( config = None , interactive = True , return_formatted = True ) : try : config = configuration . get_current_config ( config = config ) import oci . identity identity = core . get_oci_identity_client ( config = config ) data = identity . list_groups ( compartment_id = config . get ( "tenancy" ) ) . data if return_formatted : return format_group_listing ( data ) else : return oci . util . to_dict ( data ) except oci . exceptions . ServiceError as e : if not interactive : raise print ( f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})' ) return except Exception as e : if not interactive : raise print ( f'ERROR: {e}' ) return
Lists groups
Lists all groups of the tenancy
Lists groups Lists all groups of the tenancy
"""Lists groups

    Lists all groups of the tenancy

    Args:
        config (object): An OCI config object or None.
        interactive (bool): If set to false exceptions are raised
        return_formatted (bool): If set to true, a list object is returned.

    Returns:
        A list of groups
    """ # Get the current config
 # Initialize the identity client
 # List the groups

A list of groups
A list of groups
config
An OCI config object or None.
An OCI config object or None .
interactive
If set to false exceptions are raised
If set to false exceptions are raised
return_formatted
If set to true, a list object is returned.
If set to true a list object is returned .