DeviceFarm / Client / list_projects

list_projects#

DeviceFarm.Client.list_projects(**kwargs)#

Gets information about projects.

See also: AWS API Documentation

Request Syntax

response = client.list_projects(
    arn='string',
    nextToken='string'
)
Parameters:
  • arn (string) – Optional. If no Amazon Resource Name (ARN) is specified, then AWS Device Farm returns a list of all projects for the AWS account. You can also specify a project ARN.

  • 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

{
    'projects': [
        {
            'arn': 'string',
            'name': 'string',
            'defaultJobTimeoutMinutes': 123,
            'created': datetime(2015, 1, 1),
            'vpcConfig': {
                'securityGroupIds': [
                    'string',
                ],
                'subnetIds': [
                    'string',
                ],
                'vpcId': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    Represents the result of a list projects request.

    • projects (list) –

      Information about the projects.

      • (dict) –

        Represents an operating-system neutral workspace for running and managing tests.

        • arn (string) –

          The project’s ARN.

        • name (string) –

          The project’s name.

        • defaultJobTimeoutMinutes (integer) –

          The default number of minutes (at the project level) a test run executes before it times out. The default value is 150 minutes.

        • created (datetime) –

          When the project was created.

        • vpcConfig (dict) –

          The VPC security groups and subnets that are attached to a project.

          • securityGroupIds (list) –

            An array of one or more security groups IDs in your Amazon VPC.

            • (string) –

          • subnetIds (list) –

            An array of one or more subnet IDs in your Amazon VPC.

            • (string) –

          • vpcId (string) –

            The ID of the Amazon VPC.

    • 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 the specified project in Device Farm.

response = client.list_projects(
    arn='arn:aws:devicefarm:us-west-2:123456789101:project:7ad300ed-8183-41a7-bf94-12345EXAMPLE',
    # A dynamically generated value, used for paginating results.
    nextToken='RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE',
)

print(response)

Expected Output:

{
    'projects': [
        {
            'name': 'My Test Project',
            'arn': 'arn:aws:devicefarm:us-west-2:123456789101:project:7ad300ed-8183-41a7-bf94-12345EXAMPLE',
            'created': datetime(2016, 1, 19, 0, 27, 42, 1, 19, 0),
        },
        {
            'name': 'Hello World',
            'arn': 'arn:aws:devicefarm:us-west-2:123456789101:project:d6b087d9-56db-4e44-b9ec-12345EXAMPLE',
            'created': datetime(2016, 8, 4, 22, 35, 12, 3, 217, 0),
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}