in aliyun/log/logclient.py [0:0]
def list_resource_records(self, resource_name, tag=None, record_ids=None, offset=0, size=100):
"""list resource records
Unsuccessful operation will cause an LogException.
:type resource_name: string
:param resource_name: resource name
:type tag: string
:param tag: record tag
:type offset: long int
:param offset: start location
:type size: long int
:param size: max records for each page
:type record_ids: list
:param record_ids: record id list witch need to be listed
"""
if tag and not isinstance(tag, str):
raise TypeError("tag type must be str")
if not isinstance(resource_name, str):
raise TypeError("resource_name type must be str")
if not (isinstance(size, int) and isinstance(offset, int)):
raise TypeError("size and offset type must be int")
if record_ids and not isinstance(record_ids, list):
raise TypeError("record_ids type must be list,element is record id which type is str")
headers = {}
params = {"offset": offset, "size": size}
if tag is not None:
params["tag"] = tag
if record_ids:
params["ids"] = ','.join(record_ids)
resource = "/resources/" + resource_name + "/records"
(resp, header) = self._send("GET", None, None, resource, params, headers)
return ListRecordResponse(resp, header)