list_samples

list_samples(**kwargs)

Gets information about samples, given an AWS Device Farm job ARN.

See also: AWS API Documentation

Request Syntax

response = client.list_samples(
    arn='string',
    nextToken='string'
)
Parameters
  • arn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the job used to list samples.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
Return type

dict

Returns

Response Syntax

{
    'samples': [
        {
            'arn': 'string',
            'type': 'CPU'|'MEMORY'|'THREADS'|'RX_RATE'|'TX_RATE'|'RX'|'TX'|'NATIVE_FRAMES'|'NATIVE_FPS'|'NATIVE_MIN_DRAWTIME'|'NATIVE_AVG_DRAWTIME'|'NATIVE_MAX_DRAWTIME'|'OPENGL_FRAMES'|'OPENGL_FPS'|'OPENGL_MIN_DRAWTIME'|'OPENGL_AVG_DRAWTIME'|'OPENGL_MAX_DRAWTIME',
            'url': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the result of a list samples request.

    • samples (list) --

      Information about the samples.

      • (dict) --

        Represents a sample of performance data.

        • arn (string) --

          The sample's ARN.

        • type (string) --

          The sample's type.

          Must be one of the following values:

          • CPU: A CPU sample type. This is expressed as the app processing CPU time (including child processes) as reported by process, as a percentage.
          • MEMORY: A memory usage sample type. This is expressed as the total proportional set size of an app process, in kilobytes.
          • NATIVE_AVG_DRAWTIME
          • NATIVE_FPS
          • NATIVE_FRAMES
          • NATIVE_MAX_DRAWTIME
          • NATIVE_MIN_DRAWTIME
          • OPENGL_AVG_DRAWTIME
          • OPENGL_FPS
          • OPENGL_FRAMES
          • OPENGL_MAX_DRAWTIME
          • OPENGL_MIN_DRAWTIME
          • RX
          • RX_RATE: The total number of bytes per second (TCP and UDP) that are sent, by app process.
          • THREADS: A threads sample type. This is expressed as the total number of threads per app process.
          • TX
          • TX_RATE: The total number of bytes per second (TCP and UDP) that are received, by app process.
        • url (string) --

          The presigned Amazon S3 URL that can be used with a GET request to download the sample's file.

    • nextToken (string) --

      If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

Exceptions

  • DeviceFarm.Client.exceptions.ArgumentException
  • DeviceFarm.Client.exceptions.NotFoundException
  • DeviceFarm.Client.exceptions.LimitExceededException
  • DeviceFarm.Client.exceptions.ServiceAccountException

Examples

The following example returns information about samples, given a specific Device Farm project.

response = client.list_samples(
    # You can get the Amazon Resource Name (ARN) of the project by using the list-projects CLI command.
    arn='arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456',
    # A dynamically generated value, used for paginating results.
    nextToken='RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE',
)

print(response)

Expected Output:

{
    'samples': [
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}