Module aws_lambda_powertools.utilities.data_classes.aws_config_rule_event
Expand source code
from __future__ import annotations
import json
from typing import Any, Dict, List, Optional
from aws_lambda_powertools.utilities.data_classes.common import DictWrapper
def get_invoke_event(
invoking_event: dict,
) -> AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration:
"""
Returns the corresponding event object based on the messageType in the invoking event.
Parameters
----------
invoking_event: dict
The invoking event received.
Returns
-------
AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration:
The event object based on the messageType in the invoking event.
"""
message_type = invoking_event.get("messageType")
if message_type == "ScheduledNotification":
return AWSConfigScheduledNotification(invoking_event)
if message_type == "OversizedConfigurationItemChangeNotification":
return AWSConfigOversizedConfiguration(invoking_event)
# Default return is AWSConfigConfigurationChanged event
return AWSConfigConfigurationChanged(invoking_event)
class AWSConfigConfigurationChanged(DictWrapper):
@property
def configuration_item_diff(self) -> Dict:
"""The configuration item diff of the ConfigurationItemChangeNotification event."""
return self["configurationItemDiff"]
@property
def configuration_item(self) -> AWSConfigConfigurationItemChanged:
"""The configuration item of the ConfigurationItemChangeNotification event."""
return AWSConfigConfigurationItemChanged(self["configurationItem"])
@property
def raw_configuration_item(self) -> Dict:
"""The raw configuration item of the ConfigurationItemChangeNotification event."""
return self["configurationItem"]
@property
def record_version(self) -> str:
"""The record version of the ConfigurationItemChangeNotification event."""
return self["recordVersion"]
@property
def message_type(self) -> str:
"""The message type of the ConfigurationItemChangeNotification event."""
return self["messageType"]
@property
def notification_creation_time(self) -> str:
"""The notification creation time of the ConfigurationItemChangeNotification event."""
return self["notificationCreationTime"]
class AWSConfigConfigurationItemChanged(DictWrapper):
@property
def related_events(self) -> List:
"""The related events of the ConfigurationItemChangeNotification event."""
return self["relatedEvents"]
@property
def relationships(self) -> List:
"""The relationships of the ConfigurationItemChangeNotification event."""
return self["relationships"]
@property
def configuration(self) -> Dict:
"""The configuration of the ConfigurationItemChangeNotification event."""
return self["configuration"]
@property
def supplementary_configuration(self) -> Dict:
"""The supplementary configuration of the ConfigurationItemChangeNotification event."""
return self["supplementaryConfiguration"]
@property
def tags(self) -> Dict:
"""The tags of the ConfigurationItemChangeNotification event."""
return self["tags"]
@property
def configuration_item_version(self) -> str:
"""The configuration item version of the ConfigurationItemChangeNotification event."""
return self["configurationItemVersion"]
@property
def configuration_item_capture_time(self) -> str:
"""The configuration item capture time of the ConfigurationItemChangeNotification event."""
return self["configurationItemCaptureTime"]
@property
def configuration_state_id(self) -> str:
"""The configuration state id of the ConfigurationItemChangeNotification event."""
return self["configurationStateId"]
@property
def accountid(self) -> str:
"""The accountid of the ConfigurationItemChangeNotification event."""
return self["awsAccountId"]
@property
def configuration_item_status(self) -> str:
"""The configuration item status of the ConfigurationItemChangeNotification event."""
return self["configurationItemStatus"]
@property
def resource_type(self) -> str:
"""The resource type of the ConfigurationItemChangeNotification event."""
return self["resourceType"]
@property
def resource_id(self) -> str:
"""The resource id of the ConfigurationItemChangeNotification event."""
return self["resourceId"]
@property
def resource_name(self) -> str:
"""The resource name of the ConfigurationItemChangeNotification event."""
return self["resourceName"]
@property
def resource_arn(self) -> str:
"""The resource arn of the ConfigurationItemChangeNotification event."""
return self["ARN"]
@property
def region(self) -> str:
"""The region of the ConfigurationItemChangeNotification event."""
return self["awsRegion"]
@property
def availability_zone(self) -> str:
"""The availability zone of the ConfigurationItemChangeNotification event."""
return self["availabilityZone"]
@property
def configuration_state_md5_hash(self) -> str:
"""The md5 hash of the state of the ConfigurationItemChangeNotification event."""
return self["configurationStateMd5Hash"]
@property
def resource_creation_time(self) -> str:
"""The resource creation time of the ConfigurationItemChangeNotification event."""
return self["resourceCreationTime"]
class AWSConfigScheduledNotification(DictWrapper):
@property
def accountid(self) -> str:
"""The accountid of the ScheduledNotification event."""
return self["awsAccountId"]
@property
def notification_creation_time(self) -> str:
"""The notification creation time of the ScheduledNotification event."""
return self["notificationCreationTime"]
@property
def record_version(self) -> str:
"""The record version of the ScheduledNotification event."""
return self["recordVersion"]
@property
def message_type(self) -> str:
"""The message type of the ScheduledNotification event."""
return self["messageType"]
class AWSConfigOversizedConfiguration(DictWrapper):
@property
def configuration_item_summary(self) -> AWSConfigOversizedConfigurationItemSummary:
"""The configuration item summary of the OversizedConfiguration event."""
return AWSConfigOversizedConfigurationItemSummary(self["configurationItemSummary"])
@property
def raw_configuration_item_summary(self) -> str:
"""The raw configuration item summary of the OversizedConfiguration event."""
return self["configurationItemSummary"]
@property
def message_type(self) -> str:
"""The message type of the OversizedConfiguration event."""
return self["messageType"]
@property
def notification_creation_time(self) -> str:
"""The notification creation time of the OversizedConfiguration event."""
return self["notificationCreationTime"]
@property
def record_version(self) -> str:
"""The record version of the OversizedConfiguration event."""
return self["recordVersion"]
class AWSConfigOversizedConfigurationItemSummary(DictWrapper):
@property
def change_type(self) -> str:
"""The change type of the OversizedConfiguration event."""
return self["changeType"]
@property
def configuration_item_version(self) -> str:
"""The configuration item version of the OversizedConfiguration event."""
return self["configurationItemVersion"]
@property
def configuration_item_capture_time(self) -> str:
"""The configuration item capture time of the OversizedConfiguration event."""
return self["configurationItemCaptureTime"]
@property
def configuration_state_id(self) -> str:
"""The configuration state id of the OversizedConfiguration event."""
return self["configurationStateId"]
@property
def accountid(self) -> str:
"""The accountid of the OversizedConfiguration event."""
return self["awsAccountId"]
@property
def configuration_item_status(self) -> str:
"""The configuration item status of the OversizedConfiguration event."""
return self["configurationItemStatus"]
@property
def resource_type(self) -> str:
"""The resource type of the OversizedConfiguration event."""
return self["resourceType"]
@property
def resource_id(self) -> str:
"""The resource id of the OversizedConfiguration event."""
return self["resourceId"]
@property
def resource_name(self) -> str:
"""The resource name of the OversizedConfiguration event."""
return self["resourceName"]
@property
def resource_arn(self) -> str:
"""The resource arn of the OversizedConfiguration event."""
return self["ARN"]
@property
def region(self) -> str:
"""The region of the OversizedConfiguration event."""
return self["awsRegion"]
@property
def availability_zone(self) -> str:
"""The availability zone of the OversizedConfiguration event."""
return self["availabilityZone"]
@property
def configuration_state_md5_hash(self) -> str:
"""The state md5 hash of the OversizedConfiguration event."""
return self["configurationStateMd5Hash"]
@property
def resource_creation_time(self) -> str:
"""The resource creation time of the OversizedConfiguration event."""
return self["resourceCreationTime"]
class AWSConfigRuleEvent(DictWrapper):
"""Events for AWS Config Rules
Documentation:
--------------
- https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_lambda-functions.html
"""
def __init__(self, data: Dict[str, Any]):
super().__init__(data)
self._invoking_event: Optional[Any] = None
self._rule_parameters: Optional[Any] = None
@property
def version(self) -> str:
"""The version of the event."""
return self["version"]
@property
def invoking_event(
self,
) -> AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration:
"""The invoking payload of the event."""
if self._invoking_event is None:
self._invoking_event = self["invokingEvent"]
return get_invoke_event(json.loads(self._invoking_event))
@property
def raw_invoking_event(self) -> str:
"""The raw invoking payload of the event."""
return self["invokingEvent"]
@property
def rule_parameters(self) -> Dict:
"""The parameters of the event."""
if self._rule_parameters is None:
self._rule_parameters = self["ruleParameters"]
return json.loads(self._rule_parameters)
@property
def result_token(self) -> str:
"""The result token of the event."""
return self["resultToken"]
@property
def event_left_scope(self) -> bool:
"""The left scope of the event."""
return self["eventLeftScope"]
@property
def execution_role_arn(self) -> str:
"""The execution role arn of the event."""
return self["executionRoleArn"]
@property
def config_rule_arn(self) -> str:
"""The arn of the rule of the event."""
return self["configRuleArn"]
@property
def config_rule_name(self) -> str:
"""The name of the rule of the event."""
return self["configRuleName"]
@property
def config_rule_id(self) -> str:
"""The id of the rule of the event."""
return self["configRuleId"]
@property
def accountid(self) -> str:
"""The accountid of the event."""
return self["accountId"]
@property
def evalution_mode(self) -> Optional[str]:
"""The evalution mode of the event."""
return self.get("evaluationMode")
Functions
def get_invoke_event(invoking_event: dict) ‑> AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration
-
Returns the corresponding event object based on the messageType in the invoking event.
Parameters
invoking_event
:dict
- The invoking event received.
Returns
AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration:
- The event object based on the messageType in the invoking event.
Expand source code
def get_invoke_event( invoking_event: dict, ) -> AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration: """ Returns the corresponding event object based on the messageType in the invoking event. Parameters ---------- invoking_event: dict The invoking event received. Returns ------- AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration: The event object based on the messageType in the invoking event. """ message_type = invoking_event.get("messageType") if message_type == "ScheduledNotification": return AWSConfigScheduledNotification(invoking_event) if message_type == "OversizedConfigurationItemChangeNotification": return AWSConfigOversizedConfiguration(invoking_event) # Default return is AWSConfigConfigurationChanged event return AWSConfigConfigurationChanged(invoking_event)
Classes
class AWSConfigConfigurationChanged (data: Dict[str, Any], json_deserializer: Optional[Callable] = None)
-
Provides a single read only access to a wrapper dict
Parameters
data
:Dict[str, Any]
- Lambda Event Source Event payload
json_deserializer
:Callable
, optional- function to deserialize
str
,bytes
,bytearray
containing a JSON document to a Pythonobj
, by default json.loads
Expand source code
class AWSConfigConfigurationChanged(DictWrapper): @property def configuration_item_diff(self) -> Dict: """The configuration item diff of the ConfigurationItemChangeNotification event.""" return self["configurationItemDiff"] @property def configuration_item(self) -> AWSConfigConfigurationItemChanged: """The configuration item of the ConfigurationItemChangeNotification event.""" return AWSConfigConfigurationItemChanged(self["configurationItem"]) @property def raw_configuration_item(self) -> Dict: """The raw configuration item of the ConfigurationItemChangeNotification event.""" return self["configurationItem"] @property def record_version(self) -> str: """The record version of the ConfigurationItemChangeNotification event.""" return self["recordVersion"] @property def message_type(self) -> str: """The message type of the ConfigurationItemChangeNotification event.""" return self["messageType"] @property def notification_creation_time(self) -> str: """The notification creation time of the ConfigurationItemChangeNotification event.""" return self["notificationCreationTime"]
Ancestors
- DictWrapper
- collections.abc.Mapping
- collections.abc.Collection
- collections.abc.Sized
- collections.abc.Iterable
- collections.abc.Container
Instance variables
var configuration_item : AWSConfigConfigurationItemChanged
-
The configuration item of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration_item(self) -> AWSConfigConfigurationItemChanged: """The configuration item of the ConfigurationItemChangeNotification event.""" return AWSConfigConfigurationItemChanged(self["configurationItem"])
var configuration_item_diff : Dict
-
The configuration item diff of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration_item_diff(self) -> Dict: """The configuration item diff of the ConfigurationItemChangeNotification event.""" return self["configurationItemDiff"]
var message_type : str
-
The message type of the ConfigurationItemChangeNotification event.
Expand source code
@property def message_type(self) -> str: """The message type of the ConfigurationItemChangeNotification event.""" return self["messageType"]
var notification_creation_time : str
-
The notification creation time of the ConfigurationItemChangeNotification event.
Expand source code
@property def notification_creation_time(self) -> str: """The notification creation time of the ConfigurationItemChangeNotification event.""" return self["notificationCreationTime"]
var raw_configuration_item : Dict
-
The raw configuration item of the ConfigurationItemChangeNotification event.
Expand source code
@property def raw_configuration_item(self) -> Dict: """The raw configuration item of the ConfigurationItemChangeNotification event.""" return self["configurationItem"]
var record_version : str
-
The record version of the ConfigurationItemChangeNotification event.
Expand source code
@property def record_version(self) -> str: """The record version of the ConfigurationItemChangeNotification event.""" return self["recordVersion"]
Inherited members
class AWSConfigConfigurationItemChanged (data: Dict[str, Any], json_deserializer: Optional[Callable] = None)
-
Provides a single read only access to a wrapper dict
Parameters
data
:Dict[str, Any]
- Lambda Event Source Event payload
json_deserializer
:Callable
, optional- function to deserialize
str
,bytes
,bytearray
containing a JSON document to a Pythonobj
, by default json.loads
Expand source code
class AWSConfigConfigurationItemChanged(DictWrapper): @property def related_events(self) -> List: """The related events of the ConfigurationItemChangeNotification event.""" return self["relatedEvents"] @property def relationships(self) -> List: """The relationships of the ConfigurationItemChangeNotification event.""" return self["relationships"] @property def configuration(self) -> Dict: """The configuration of the ConfigurationItemChangeNotification event.""" return self["configuration"] @property def supplementary_configuration(self) -> Dict: """The supplementary configuration of the ConfigurationItemChangeNotification event.""" return self["supplementaryConfiguration"] @property def tags(self) -> Dict: """The tags of the ConfigurationItemChangeNotification event.""" return self["tags"] @property def configuration_item_version(self) -> str: """The configuration item version of the ConfigurationItemChangeNotification event.""" return self["configurationItemVersion"] @property def configuration_item_capture_time(self) -> str: """The configuration item capture time of the ConfigurationItemChangeNotification event.""" return self["configurationItemCaptureTime"] @property def configuration_state_id(self) -> str: """The configuration state id of the ConfigurationItemChangeNotification event.""" return self["configurationStateId"] @property def accountid(self) -> str: """The accountid of the ConfigurationItemChangeNotification event.""" return self["awsAccountId"] @property def configuration_item_status(self) -> str: """The configuration item status of the ConfigurationItemChangeNotification event.""" return self["configurationItemStatus"] @property def resource_type(self) -> str: """The resource type of the ConfigurationItemChangeNotification event.""" return self["resourceType"] @property def resource_id(self) -> str: """The resource id of the ConfigurationItemChangeNotification event.""" return self["resourceId"] @property def resource_name(self) -> str: """The resource name of the ConfigurationItemChangeNotification event.""" return self["resourceName"] @property def resource_arn(self) -> str: """The resource arn of the ConfigurationItemChangeNotification event.""" return self["ARN"] @property def region(self) -> str: """The region of the ConfigurationItemChangeNotification event.""" return self["awsRegion"] @property def availability_zone(self) -> str: """The availability zone of the ConfigurationItemChangeNotification event.""" return self["availabilityZone"] @property def configuration_state_md5_hash(self) -> str: """The md5 hash of the state of the ConfigurationItemChangeNotification event.""" return self["configurationStateMd5Hash"] @property def resource_creation_time(self) -> str: """The resource creation time of the ConfigurationItemChangeNotification event.""" return self["resourceCreationTime"]
Ancestors
- DictWrapper
- collections.abc.Mapping
- collections.abc.Collection
- collections.abc.Sized
- collections.abc.Iterable
- collections.abc.Container
Instance variables
var accountid : str
-
The accountid of the ConfigurationItemChangeNotification event.
Expand source code
@property def accountid(self) -> str: """The accountid of the ConfigurationItemChangeNotification event.""" return self["awsAccountId"]
var availability_zone : str
-
The availability zone of the ConfigurationItemChangeNotification event.
Expand source code
@property def availability_zone(self) -> str: """The availability zone of the ConfigurationItemChangeNotification event.""" return self["availabilityZone"]
var configuration : Dict
-
The configuration of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration(self) -> Dict: """The configuration of the ConfigurationItemChangeNotification event.""" return self["configuration"]
var configuration_item_capture_time : str
-
The configuration item capture time of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration_item_capture_time(self) -> str: """The configuration item capture time of the ConfigurationItemChangeNotification event.""" return self["configurationItemCaptureTime"]
var configuration_item_status : str
-
The configuration item status of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration_item_status(self) -> str: """The configuration item status of the ConfigurationItemChangeNotification event.""" return self["configurationItemStatus"]
var configuration_item_version : str
-
The configuration item version of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration_item_version(self) -> str: """The configuration item version of the ConfigurationItemChangeNotification event.""" return self["configurationItemVersion"]
var configuration_state_id : str
-
The configuration state id of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration_state_id(self) -> str: """The configuration state id of the ConfigurationItemChangeNotification event.""" return self["configurationStateId"]
var configuration_state_md5_hash : str
-
The md5 hash of the state of the ConfigurationItemChangeNotification event.
Expand source code
@property def configuration_state_md5_hash(self) -> str: """The md5 hash of the state of the ConfigurationItemChangeNotification event.""" return self["configurationStateMd5Hash"]
var region : str
-
The region of the ConfigurationItemChangeNotification event.
Expand source code
@property def region(self) -> str: """The region of the ConfigurationItemChangeNotification event.""" return self["awsRegion"]
-
The related events of the ConfigurationItemChangeNotification event.
Expand source code
@property def related_events(self) -> List: """The related events of the ConfigurationItemChangeNotification event.""" return self["relatedEvents"]
var relationships : List
-
The relationships of the ConfigurationItemChangeNotification event.
Expand source code
@property def relationships(self) -> List: """The relationships of the ConfigurationItemChangeNotification event.""" return self["relationships"]
var resource_arn : str
-
The resource arn of the ConfigurationItemChangeNotification event.
Expand source code
@property def resource_arn(self) -> str: """The resource arn of the ConfigurationItemChangeNotification event.""" return self["ARN"]
var resource_creation_time : str
-
The resource creation time of the ConfigurationItemChangeNotification event.
Expand source code
@property def resource_creation_time(self) -> str: """The resource creation time of the ConfigurationItemChangeNotification event.""" return self["resourceCreationTime"]
var resource_id : str
-
The resource id of the ConfigurationItemChangeNotification event.
Expand source code
@property def resource_id(self) -> str: """The resource id of the ConfigurationItemChangeNotification event.""" return self["resourceId"]
var resource_name : str
-
The resource name of the ConfigurationItemChangeNotification event.
Expand source code
@property def resource_name(self) -> str: """The resource name of the ConfigurationItemChangeNotification event.""" return self["resourceName"]
var resource_type : str
-
The resource type of the ConfigurationItemChangeNotification event.
Expand source code
@property def resource_type(self) -> str: """The resource type of the ConfigurationItemChangeNotification event.""" return self["resourceType"]
var supplementary_configuration : Dict
-
The supplementary configuration of the ConfigurationItemChangeNotification event.
Expand source code
@property def supplementary_configuration(self) -> Dict: """The supplementary configuration of the ConfigurationItemChangeNotification event.""" return self["supplementaryConfiguration"]
-
The tags of the ConfigurationItemChangeNotification event.
Expand source code
@property def tags(self) -> Dict: """The tags of the ConfigurationItemChangeNotification event.""" return self["tags"]
Inherited members
class AWSConfigOversizedConfiguration (data: Dict[str, Any], json_deserializer: Optional[Callable] = None)
-
Provides a single read only access to a wrapper dict
Parameters
data
:Dict[str, Any]
- Lambda Event Source Event payload
json_deserializer
:Callable
, optional- function to deserialize
str
,bytes
,bytearray
containing a JSON document to a Pythonobj
, by default json.loads
Expand source code
class AWSConfigOversizedConfiguration(DictWrapper): @property def configuration_item_summary(self) -> AWSConfigOversizedConfigurationItemSummary: """The configuration item summary of the OversizedConfiguration event.""" return AWSConfigOversizedConfigurationItemSummary(self["configurationItemSummary"]) @property def raw_configuration_item_summary(self) -> str: """The raw configuration item summary of the OversizedConfiguration event.""" return self["configurationItemSummary"] @property def message_type(self) -> str: """The message type of the OversizedConfiguration event.""" return self["messageType"] @property def notification_creation_time(self) -> str: """The notification creation time of the OversizedConfiguration event.""" return self["notificationCreationTime"] @property def record_version(self) -> str: """The record version of the OversizedConfiguration event.""" return self["recordVersion"]
Ancestors
- DictWrapper
- collections.abc.Mapping
- collections.abc.Collection
- collections.abc.Sized
- collections.abc.Iterable
- collections.abc.Container
Instance variables
var configuration_item_summary : AWSConfigOversizedConfigurationItemSummary
-
The configuration item summary of the OversizedConfiguration event.
Expand source code
@property def configuration_item_summary(self) -> AWSConfigOversizedConfigurationItemSummary: """The configuration item summary of the OversizedConfiguration event.""" return AWSConfigOversizedConfigurationItemSummary(self["configurationItemSummary"])
var message_type : str
-
The message type of the OversizedConfiguration event.
Expand source code
@property def message_type(self) -> str: """The message type of the OversizedConfiguration event.""" return self["messageType"]
var notification_creation_time : str
-
The notification creation time of the OversizedConfiguration event.
Expand source code
@property def notification_creation_time(self) -> str: """The notification creation time of the OversizedConfiguration event.""" return self["notificationCreationTime"]
var raw_configuration_item_summary : str
-
The raw configuration item summary of the OversizedConfiguration event.
Expand source code
@property def raw_configuration_item_summary(self) -> str: """The raw configuration item summary of the OversizedConfiguration event.""" return self["configurationItemSummary"]
var record_version : str
-
The record version of the OversizedConfiguration event.
Expand source code
@property def record_version(self) -> str: """The record version of the OversizedConfiguration event.""" return self["recordVersion"]
Inherited members
class AWSConfigOversizedConfigurationItemSummary (data: Dict[str, Any], json_deserializer: Optional[Callable] = None)
-
Provides a single read only access to a wrapper dict
Parameters
data
:Dict[str, Any]
- Lambda Event Source Event payload
json_deserializer
:Callable
, optional- function to deserialize
str
,bytes
,bytearray
containing a JSON document to a Pythonobj
, by default json.loads
Expand source code
class AWSConfigOversizedConfigurationItemSummary(DictWrapper): @property def change_type(self) -> str: """The change type of the OversizedConfiguration event.""" return self["changeType"] @property def configuration_item_version(self) -> str: """The configuration item version of the OversizedConfiguration event.""" return self["configurationItemVersion"] @property def configuration_item_capture_time(self) -> str: """The configuration item capture time of the OversizedConfiguration event.""" return self["configurationItemCaptureTime"] @property def configuration_state_id(self) -> str: """The configuration state id of the OversizedConfiguration event.""" return self["configurationStateId"] @property def accountid(self) -> str: """The accountid of the OversizedConfiguration event.""" return self["awsAccountId"] @property def configuration_item_status(self) -> str: """The configuration item status of the OversizedConfiguration event.""" return self["configurationItemStatus"] @property def resource_type(self) -> str: """The resource type of the OversizedConfiguration event.""" return self["resourceType"] @property def resource_id(self) -> str: """The resource id of the OversizedConfiguration event.""" return self["resourceId"] @property def resource_name(self) -> str: """The resource name of the OversizedConfiguration event.""" return self["resourceName"] @property def resource_arn(self) -> str: """The resource arn of the OversizedConfiguration event.""" return self["ARN"] @property def region(self) -> str: """The region of the OversizedConfiguration event.""" return self["awsRegion"] @property def availability_zone(self) -> str: """The availability zone of the OversizedConfiguration event.""" return self["availabilityZone"] @property def configuration_state_md5_hash(self) -> str: """The state md5 hash of the OversizedConfiguration event.""" return self["configurationStateMd5Hash"] @property def resource_creation_time(self) -> str: """The resource creation time of the OversizedConfiguration event.""" return self["resourceCreationTime"]
Ancestors
- DictWrapper
- collections.abc.Mapping
- collections.abc.Collection
- collections.abc.Sized
- collections.abc.Iterable
- collections.abc.Container
Instance variables
var accountid : str
-
The accountid of the OversizedConfiguration event.
Expand source code
@property def accountid(self) -> str: """The accountid of the OversizedConfiguration event.""" return self["awsAccountId"]
var availability_zone : str
-
The availability zone of the OversizedConfiguration event.
Expand source code
@property def availability_zone(self) -> str: """The availability zone of the OversizedConfiguration event.""" return self["availabilityZone"]
var change_type : str
-
The change type of the OversizedConfiguration event.
Expand source code
@property def change_type(self) -> str: """The change type of the OversizedConfiguration event.""" return self["changeType"]
var configuration_item_capture_time : str
-
The configuration item capture time of the OversizedConfiguration event.
Expand source code
@property def configuration_item_capture_time(self) -> str: """The configuration item capture time of the OversizedConfiguration event.""" return self["configurationItemCaptureTime"]
var configuration_item_status : str
-
The configuration item status of the OversizedConfiguration event.
Expand source code
@property def configuration_item_status(self) -> str: """The configuration item status of the OversizedConfiguration event.""" return self["configurationItemStatus"]
var configuration_item_version : str
-
The configuration item version of the OversizedConfiguration event.
Expand source code
@property def configuration_item_version(self) -> str: """The configuration item version of the OversizedConfiguration event.""" return self["configurationItemVersion"]
var configuration_state_id : str
-
The configuration state id of the OversizedConfiguration event.
Expand source code
@property def configuration_state_id(self) -> str: """The configuration state id of the OversizedConfiguration event.""" return self["configurationStateId"]
var configuration_state_md5_hash : str
-
The state md5 hash of the OversizedConfiguration event.
Expand source code
@property def configuration_state_md5_hash(self) -> str: """The state md5 hash of the OversizedConfiguration event.""" return self["configurationStateMd5Hash"]
var region : str
-
The region of the OversizedConfiguration event.
Expand source code
@property def region(self) -> str: """The region of the OversizedConfiguration event.""" return self["awsRegion"]
var resource_arn : str
-
The resource arn of the OversizedConfiguration event.
Expand source code
@property def resource_arn(self) -> str: """The resource arn of the OversizedConfiguration event.""" return self["ARN"]
var resource_creation_time : str
-
The resource creation time of the OversizedConfiguration event.
Expand source code
@property def resource_creation_time(self) -> str: """The resource creation time of the OversizedConfiguration event.""" return self["resourceCreationTime"]
var resource_id : str
-
The resource id of the OversizedConfiguration event.
Expand source code
@property def resource_id(self) -> str: """The resource id of the OversizedConfiguration event.""" return self["resourceId"]
var resource_name : str
-
The resource name of the OversizedConfiguration event.
Expand source code
@property def resource_name(self) -> str: """The resource name of the OversizedConfiguration event.""" return self["resourceName"]
var resource_type : str
-
The resource type of the OversizedConfiguration event.
Expand source code
@property def resource_type(self) -> str: """The resource type of the OversizedConfiguration event.""" return self["resourceType"]
Inherited members
class AWSConfigRuleEvent (data: Dict[str, Any])
-
Events for AWS Config Rules Documentation:
Parameters
data
:Dict[str, Any]
- Lambda Event Source Event payload
json_deserializer
:Callable
, optional- function to deserialize
str
,bytes
,bytearray
containing a JSON document to a Pythonobj
, by default json.loads
Expand source code
class AWSConfigRuleEvent(DictWrapper): """Events for AWS Config Rules Documentation: -------------- - https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_lambda-functions.html """ def __init__(self, data: Dict[str, Any]): super().__init__(data) self._invoking_event: Optional[Any] = None self._rule_parameters: Optional[Any] = None @property def version(self) -> str: """The version of the event.""" return self["version"] @property def invoking_event( self, ) -> AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration: """The invoking payload of the event.""" if self._invoking_event is None: self._invoking_event = self["invokingEvent"] return get_invoke_event(json.loads(self._invoking_event)) @property def raw_invoking_event(self) -> str: """The raw invoking payload of the event.""" return self["invokingEvent"] @property def rule_parameters(self) -> Dict: """The parameters of the event.""" if self._rule_parameters is None: self._rule_parameters = self["ruleParameters"] return json.loads(self._rule_parameters) @property def result_token(self) -> str: """The result token of the event.""" return self["resultToken"] @property def event_left_scope(self) -> bool: """The left scope of the event.""" return self["eventLeftScope"] @property def execution_role_arn(self) -> str: """The execution role arn of the event.""" return self["executionRoleArn"] @property def config_rule_arn(self) -> str: """The arn of the rule of the event.""" return self["configRuleArn"] @property def config_rule_name(self) -> str: """The name of the rule of the event.""" return self["configRuleName"] @property def config_rule_id(self) -> str: """The id of the rule of the event.""" return self["configRuleId"] @property def accountid(self) -> str: """The accountid of the event.""" return self["accountId"] @property def evalution_mode(self) -> Optional[str]: """The evalution mode of the event.""" return self.get("evaluationMode")
Ancestors
- DictWrapper
- collections.abc.Mapping
- collections.abc.Collection
- collections.abc.Sized
- collections.abc.Iterable
- collections.abc.Container
Instance variables
var accountid : str
-
The accountid of the event.
Expand source code
@property def accountid(self) -> str: """The accountid of the event.""" return self["accountId"]
var config_rule_arn : str
-
The arn of the rule of the event.
Expand source code
@property def config_rule_arn(self) -> str: """The arn of the rule of the event.""" return self["configRuleArn"]
var config_rule_id : str
-
The id of the rule of the event.
Expand source code
@property def config_rule_id(self) -> str: """The id of the rule of the event.""" return self["configRuleId"]
var config_rule_name : str
-
The name of the rule of the event.
Expand source code
@property def config_rule_name(self) -> str: """The name of the rule of the event.""" return self["configRuleName"]
var evalution_mode : Optional[str]
-
The evalution mode of the event.
Expand source code
@property def evalution_mode(self) -> Optional[str]: """The evalution mode of the event.""" return self.get("evaluationMode")
var event_left_scope : bool
-
The left scope of the event.
Expand source code
@property def event_left_scope(self) -> bool: """The left scope of the event.""" return self["eventLeftScope"]
var execution_role_arn : str
-
The execution role arn of the event.
Expand source code
@property def execution_role_arn(self) -> str: """The execution role arn of the event.""" return self["executionRoleArn"]
var invoking_event : AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration
-
The invoking payload of the event.
Expand source code
@property def invoking_event( self, ) -> AWSConfigConfigurationChanged | AWSConfigScheduledNotification | AWSConfigOversizedConfiguration: """The invoking payload of the event.""" if self._invoking_event is None: self._invoking_event = self["invokingEvent"] return get_invoke_event(json.loads(self._invoking_event))
var raw_invoking_event : str
-
The raw invoking payload of the event.
Expand source code
@property def raw_invoking_event(self) -> str: """The raw invoking payload of the event.""" return self["invokingEvent"]
var result_token : str
-
The result token of the event.
Expand source code
@property def result_token(self) -> str: """The result token of the event.""" return self["resultToken"]
var rule_parameters : Dict
-
The parameters of the event.
Expand source code
@property def rule_parameters(self) -> Dict: """The parameters of the event.""" if self._rule_parameters is None: self._rule_parameters = self["ruleParameters"] return json.loads(self._rule_parameters)
var version : str
-
The version of the event.
Expand source code
@property def version(self) -> str: """The version of the event.""" return self["version"]
Inherited members
class AWSConfigScheduledNotification (data: Dict[str, Any], json_deserializer: Optional[Callable] = None)
-
Provides a single read only access to a wrapper dict
Parameters
data
:Dict[str, Any]
- Lambda Event Source Event payload
json_deserializer
:Callable
, optional- function to deserialize
str
,bytes
,bytearray
containing a JSON document to a Pythonobj
, by default json.loads
Expand source code
class AWSConfigScheduledNotification(DictWrapper): @property def accountid(self) -> str: """The accountid of the ScheduledNotification event.""" return self["awsAccountId"] @property def notification_creation_time(self) -> str: """The notification creation time of the ScheduledNotification event.""" return self["notificationCreationTime"] @property def record_version(self) -> str: """The record version of the ScheduledNotification event.""" return self["recordVersion"] @property def message_type(self) -> str: """The message type of the ScheduledNotification event.""" return self["messageType"]
Ancestors
- DictWrapper
- collections.abc.Mapping
- collections.abc.Collection
- collections.abc.Sized
- collections.abc.Iterable
- collections.abc.Container
Instance variables
var accountid : str
-
The accountid of the ScheduledNotification event.
Expand source code
@property def accountid(self) -> str: """The accountid of the ScheduledNotification event.""" return self["awsAccountId"]
var message_type : str
-
The message type of the ScheduledNotification event.
Expand source code
@property def message_type(self) -> str: """The message type of the ScheduledNotification event.""" return self["messageType"]
var notification_creation_time : str
-
The notification creation time of the ScheduledNotification event.
Expand source code
@property def notification_creation_time(self) -> str: """The notification creation time of the ScheduledNotification event.""" return self["notificationCreationTime"]
var record_version : str
-
The record version of the ScheduledNotification event.
Expand source code
@property def record_version(self) -> str: """The record version of the ScheduledNotification event.""" return self["recordVersion"]
Inherited members