Inspector / Client / describe_rules_packages

describe_rules_packages#

Inspector.Client.describe_rules_packages(**kwargs)#

Describes the rules packages that are specified by the ARNs of the rules packages.

See also: AWS API Documentation

Request Syntax

response = client.describe_rules_packages(
    rulesPackageArns=[
        'string',
    ],
    locale='EN_US'
)
Parameters:
  • rulesPackageArns (list) –

    [REQUIRED]

    The ARN that specifies the rules package that you want to describe.

    • (string) –

  • locale (string) – The locale that you want to translate a rules package description into.

Return type:

dict

Returns:

Response Syntax

{
    'rulesPackages': [
        {
            'arn': 'string',
            'name': 'string',
            'version': 'string',
            'provider': 'string',
            'description': 'string'
        },
    ],
    'failedItems': {
        'string': {
            'failureCode': 'INVALID_ARN'|'DUPLICATE_ARN'|'ITEM_DOES_NOT_EXIST'|'ACCESS_DENIED'|'LIMIT_EXCEEDED'|'INTERNAL_ERROR',
            'retryable': True|False
        }
    }
}

Response Structure

  • (dict) –

    • rulesPackages (list) –

      Information about the rules package.

      • (dict) –

        Contains information about an Amazon Inspector rules package. This data type is used as the response element in the DescribeRulesPackages action.

        • arn (string) –

          The ARN of the rules package.

        • name (string) –

          The name of the rules package.

        • version (string) –

          The version ID of the rules package.

        • provider (string) –

          The provider of the rules package.

        • description (string) –

          The description of the rules package.

    • failedItems (dict) –

      Rules package details that cannot be described. An error code is provided for each failed item.

      • (string) –

        • (dict) –

          Includes details about the failed items.

          • failureCode (string) –

            The status code of a failed item.

          • retryable (boolean) –

            Indicates whether you can immediately retry a request for this item for a specified resource.

Exceptions

  • Inspector.Client.exceptions.InternalException

  • Inspector.Client.exceptions.InvalidInputException

Examples

Describes the rules packages that are specified by the ARNs of the rules packages.

response = client.describe_rules_packages(
    rulesPackageArns=[
        'arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ',
    ],
)

print(response)

Expected Output:

{
    'failedItems': {
    },
    'rulesPackages': [
        {
            'version': '1.1',
            'name': 'Security Best Practices',
            'arn': 'arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ',
            'description': 'The rules in this package help determine whether your systems are configured securely.',
            'provider': 'Amazon Web Services, Inc.',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}