list_rules_packages

list_rules_packages(**kwargs)

Lists all available Amazon Inspector rules packages.

See also: AWS API Documentation

Request Syntax

response = client.list_rules_packages(
    nextToken='string',
    maxResults=123
)
Parameters
  • nextToken (string) -- You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListRulesPackages action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
  • maxResults (integer) -- You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.
Return type

dict

Returns

Response Syntax

{
    'rulesPackageArns': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • rulesPackageArns (list) --

      The list of ARNs that specifies the rules packages returned by the action.

      • (string) --
    • nextToken (string) --

      When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.

Exceptions

  • Inspector.Client.exceptions.InternalException
  • Inspector.Client.exceptions.InvalidInputException
  • Inspector.Client.exceptions.AccessDeniedException

Examples

Lists all available Amazon Inspector rules packages.

response = client.list_rules_packages(
    maxResults=123,
)

print(response)

Expected Output:

{
    'nextToken': '1',
    'rulesPackageArns': [
        'arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p',
        'arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc',
        'arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ',
        'arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD',
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}