| :py:mod:`airflow.providers.amazon.aws.hooks.redshift_cluster` |
| ============================================================= |
| |
| .. py:module:: airflow.providers.amazon.aws.hooks.redshift_cluster |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.amazon.aws.hooks.redshift_cluster.RedshiftHook |
| |
| |
| |
| |
| .. py:class:: RedshiftHook(*args, **kwargs) |
| |
| Bases: :py:obj:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook` |
| |
| Interact with AWS Redshift, using the boto3 library |
| |
| Additional arguments (such as ``aws_conn_id``) may be specified and |
| are passed down to the underlying AwsBaseHook. |
| |
| .. seealso:: |
| :class:`~airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook` |
| |
| :param aws_conn_id: The Airflow connection used for AWS credentials. |
| |
| .. py:method:: create_cluster(self, cluster_identifier, node_type, master_username, master_user_password, params) |
| |
| Creates a new cluster with the specified parameters |
| |
| :param cluster_identifier: A unique identifier for the cluster. |
| :param node_type: The node type to be provisioned for the cluster. |
| Valid Values: ``ds2.xlarge``, ``ds2.8xlarge``, ``dc1.large``, |
| ``dc1.8xlarge``, ``dc2.large``, ``dc2.8xlarge``, ``ra3.xlplus``, |
| ``ra3.4xlarge``, and ``ra3.16xlarge``. |
| :param master_username: The username associated with the admin user account |
| for the cluster that is being created. |
| :param master_user_password: password associated with the admin user account |
| for the cluster that is being created. |
| :param params: Remaining AWS Create cluster API params. |
| |
| |
| .. py:method:: cluster_status(self, cluster_identifier) |
| |
| Return status of a cluster |
| |
| :param cluster_identifier: unique identifier of a cluster |
| :param skip_final_cluster_snapshot: determines cluster snapshot creation |
| :param final_cluster_snapshot_identifier: Optional[str] |
| |
| |
| .. py:method:: delete_cluster(self, cluster_identifier, skip_final_cluster_snapshot = True, final_cluster_snapshot_identifier = None) |
| |
| Delete a cluster and optionally create a snapshot |
| |
| :param cluster_identifier: unique identifier of a cluster |
| :param skip_final_cluster_snapshot: determines cluster snapshot creation |
| :param final_cluster_snapshot_identifier: name of final cluster snapshot |
| |
| |
| .. py:method:: describe_cluster_snapshots(self, cluster_identifier) |
| |
| Gets a list of snapshots for a cluster |
| |
| :param cluster_identifier: unique identifier of a cluster |
| |
| |
| .. py:method:: restore_from_cluster_snapshot(self, cluster_identifier, snapshot_identifier) |
| |
| Restores a cluster from its snapshot |
| |
| :param cluster_identifier: unique identifier of a cluster |
| :param snapshot_identifier: unique identifier for a snapshot of a cluster |
| |
| |
| .. py:method:: create_cluster_snapshot(self, snapshot_identifier, cluster_identifier) |
| |
| Creates a snapshot of a cluster |
| |
| :param snapshot_identifier: unique identifier for a snapshot of a cluster |
| :param cluster_identifier: unique identifier of a cluster |
| |
| |
| |