| :py:mod:`airflow.providers.amazon.aws.hooks.elasticache_replication_group` |
| ========================================================================== |
| |
| .. py:module:: airflow.providers.amazon.aws.hooks.elasticache_replication_group |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.amazon.aws.hooks.elasticache_replication_group.ElastiCacheReplicationGroupHook |
| |
| |
| |
| |
| .. py:class:: ElastiCacheReplicationGroupHook(max_retries = 10, exponential_back_off_factor = 1, initial_poke_interval = 60, *args, **kwargs) |
| |
| Bases: :py:obj:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook` |
| |
| Interact with AWS ElastiCache |
| |
| :param max_retries: Max retries for checking availability of and deleting replication group |
| If this is not supplied then this is defaulted to 10 |
| :param exponential_back_off_factor: Multiplication factor for deciding next sleep time |
| If this is not supplied then this is defaulted to 1 |
| :param initial_poke_interval: Initial sleep time in seconds |
| If this is not supplied then this is defaulted to 60 seconds |
| |
| .. py:attribute:: TERMINAL_STATES |
| |
| |
| |
| |
| .. py:method:: create_replication_group(self, config) |
| |
| Call ElastiCache API for creating a replication group |
| |
| :param config: Configuration for creating the replication group |
| :return: Response from ElastiCache create replication group API |
| :rtype: dict |
| |
| |
| .. py:method:: delete_replication_group(self, replication_group_id) |
| |
| Call ElastiCache API for deleting a replication group |
| |
| :param replication_group_id: ID of replication group to delete |
| :return: Response from ElastiCache delete replication group API |
| :rtype: dict |
| |
| |
| .. py:method:: describe_replication_group(self, replication_group_id) |
| |
| Call ElastiCache API for describing a replication group |
| |
| :param replication_group_id: ID of replication group to describe |
| :return: Response from ElastiCache describe replication group API |
| :rtype: dict |
| |
| |
| .. py:method:: get_replication_group_status(self, replication_group_id) |
| |
| Get current status of replication group |
| |
| :param replication_group_id: ID of replication group to check for status |
| :return: Current status of replication group |
| :rtype: str |
| |
| |
| .. py:method:: is_replication_group_available(self, replication_group_id) |
| |
| Helper for checking if replication group is available or not |
| |
| :param replication_group_id: ID of replication group to check for availability |
| :return: True if available else False |
| :rtype: bool |
| |
| |
| .. py:method:: wait_for_availability(self, replication_group_id, initial_sleep_time = None, exponential_back_off_factor = None, max_retries = None) |
| |
| Check if replication group is available or not by performing a describe over it |
| |
| :param replication_group_id: ID of replication group to check for availability |
| :param initial_sleep_time: Initial sleep time in seconds |
| If this is not supplied then this is defaulted to class level value |
| :param exponential_back_off_factor: Multiplication factor for deciding next sleep time |
| If this is not supplied then this is defaulted to class level value |
| :param max_retries: Max retries for checking availability of replication group |
| If this is not supplied then this is defaulted to class level value |
| :return: True if replication is available else False |
| :rtype: bool |
| |
| |
| .. py:method:: wait_for_deletion(self, replication_group_id, initial_sleep_time = None, exponential_back_off_factor = None, max_retries = None) |
| |
| Helper for deleting a replication group ensuring it is either deleted or can't be deleted |
| |
| :param replication_group_id: ID of replication to delete |
| :param initial_sleep_time: Initial sleep time in second |
| If this is not supplied then this is defaulted to class level value |
| :param exponential_back_off_factor: Multiplication factor for deciding next sleep time |
| If this is not supplied then this is defaulted to class level value |
| :param max_retries: Max retries for checking availability of replication group |
| If this is not supplied then this is defaulted to class level value |
| :return: Response from ElastiCache delete replication group API and flag to identify if deleted or not |
| :rtype: (dict, bool) |
| |
| |
| .. py:method:: ensure_delete_replication_group(self, replication_group_id, initial_sleep_time = None, exponential_back_off_factor = None, max_retries = None) |
| |
| Delete a replication group ensuring it is either deleted or can't be deleted |
| |
| :param replication_group_id: ID of replication to delete |
| :param initial_sleep_time: Initial sleep time in second |
| If this is not supplied then this is defaulted to class level value |
| :param exponential_back_off_factor: Multiplication factor for deciding next sleep time |
| If this is not supplied then this is defaulted to class level value |
| :param max_retries: Max retries for checking availability of replication group |
| If this is not supplied then this is defaulted to class level value |
| :return: Response from ElastiCache delete replication group API |
| :rtype: dict |
| :raises AirflowException: If replication group is not deleted |
| |
| |
| |