def attribute(
        self, main_type, sub_type, unique_id, attribute_id, action='GET', owner=None, params=None
    ):
        """

        Args:
            owner:
            main_type:
            sub_type:
            unique_id:
            attribute_id:
            action:
            params:

        Return:

        """
        params = params or {}
        if owner:
            params['owner'] = owner
        action = action.upper()
        if not sub_type:
            url = '/v2/{}/{}/attributes/{}'.format(main_type, unique_id, attribute_id)
        else:
            url = '/v2/{}/{}/{}/attributes/{}'.format(main_type, sub_type, unique_id, attribute_id)

        if action == 'GET':
            return self.tcex.session.get(url, params=params)

        if action == 'DELETE':
            return self.tcex.session.delete(url, params=params)

        return None
def attribute ( self , main_type , sub_type , unique_id , attribute_id , action = 'GET' , owner = None , params = None ) : params = params or { } if owner : params [ 'owner' ] = owner action = action . upper ( ) if not sub_type : url = '/v2/{}/{}/attributes/{}' . format ( main_type , unique_id , attribute_id ) else : url = '/v2/{}/{}/{}/attributes/{}' . format ( main_type , sub_type , unique_id , attribute_id ) if action == 'GET' : return self . tcex . session . get ( url , params = params ) if action == 'DELETE' : return self . tcex . session . delete ( url , params = params ) return None
Args:
            owner:
            main_type:
            sub_type:
            unique_id:
            attribute_id:
            action:
            params:

        Return: