Skip to content

aws.fms.get_compliance_detail

Example SQL Queries

SELECT * FROM
aws.fms.get_compliance_detail
WHERE
"policy_id" = 'VALUE'
AND "member_account" = 'VALUE';

Description

Returns detailed compliance information about the specified member account. Details include resources that are in and out of compliance with the specified policy.

The reasons for resources being considered compliant depend on the Firewall Manager policy type.

Table Definition

Column NameColumn Data Type
member_account Required Input Column

The Amazon Web Services account that owns the resources that you want to get the details for.

VARCHAR
policy_id Required Input Column

The ID of the policy that you want to get the details for. PolicyId is returned by PutPolicy and by ListPolicies.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
policy_compliance_detail

Information about the resources and the policy that you specified in the GetComplianceDetail request.

STRUCT(
"policy_owner" VARCHAR,
"policy_id" VARCHAR,
"member_account" VARCHAR,
"violators" STRUCT(
"resource_id" VARCHAR,
"violation_reason" VARCHAR,
"resource_type" VARCHAR,
"metadata" MAP(VARCHAR, VARCHAR)
)[],
"evaluation_limit_exceeded" BOOLEAN,
"expired_at" TIMESTAMP_S,
"issue_info_map" MAP(VARCHAR, VARCHAR)
)
Show child fields
policy_compliance_detail.evaluation_limit_exceeded

Indicates if over 100 resources are noncompliant with the Firewall Manager policy.

policy_compliance_detail.expired_at

A timestamp that indicates when the returned information should be considered out of date.

policy_compliance_detail.issue_info_map

Details about problems with dependent services, such as WAF or Config, and the error message received that indicates the problem with the service.

policy_compliance_detail.member_account

The Amazon Web Services account ID.

policy_compliance_detail.policy_id

The ID of the Firewall Manager policy.

policy_compliance_detail.policy_owner

The Amazon Web Services account that created the Firewall Manager policy.

policy_compliance_detail.violators[]
Show child fields
policy_compliance_detail.violators[].metadata

Metadata about the resource that doesn't comply with the policy scope.

policy_compliance_detail.violators[].resource_id

The resource ID.

policy_compliance_detail.violators[].resource_type

The resource type. This is in the format shown in the Amazon Web Services Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::CloudFront::Distribution, or AWS::NetworkFirewall::FirewallPolicy.

policy_compliance_detail.violators[].violation_reason

The reason that the resource is not protected by the policy.