Skip to content

Commit ce022a3

Browse files
authored
[AIRFLOW-XXXX] Add cross-references for operators guide (#7760)
1 parent cc5376d commit ce022a3

File tree

3 files changed

+51
-12
lines changed

3 files changed

+51
-12
lines changed

β€Žairflow/providers/google/cloud/operators/natural_language.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class CloudNaturalLanguageAnalyzeEntitiesOperator(BaseOperator):
4040
For more information on how to use this operator, take a look at the guide:
4141
:ref:`howto/operator:CloudNaturalLanguageAnalyzeEntitiesOperator`
4242
43-
4443
:param document: Input document.
4544
If a dict is provided, it must be of the same form as the protobuf message Document
4645
:type document: dict or google.cloud.language_v1.types.Document

β€Žairflow/providers/google/cloud/operators/stackdriver.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class StackdriverListAlertPoliciesOperator(BaseOperator):
3333
which returns python dictionary, stringified JSON and protobuf
3434
respectively.
3535
36+
.. seealso::
37+
For more information on how to use this operator, take a look at the guide:
38+
:ref:`howto/operator:StackdriverListAlertPoliciesOperator`
39+
3640
:param format_: (Optional) Desired output format of the result. The
3741
supported formats are "dict", "json" and None which returns
3842
python dictionary, stringified JSON and protobuf respectively.
@@ -127,6 +131,10 @@ class StackdriverEnableAlertPoliciesOperator(BaseOperator):
127131
Enables one or more disabled alerting policies identified by filter
128132
parameter. Inoperative in case the policy is already enabled.
129133
134+
.. seealso::
135+
For more information on how to use this operator, take a look at the guide:
136+
:ref:`howto/operator:StackdriverEnableAlertPoliciesOperator`
137+
130138
:param filter_: If provided, this field specifies the criteria that
131139
must be met by alert policies to be enabled.
132140
For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering.
@@ -194,6 +202,10 @@ class StackdriverDisableAlertPoliciesOperator(BaseOperator):
194202
Disables one or more enabled alerting policies identified by filter
195203
parameter. Inoperative in case the policy is already disabled.
196204
205+
.. seealso::
206+
For more information on how to use this operator, take a look at the guide:
207+
:ref:`howto/operator:StackdriverDisableAlertPoliciesOperator`
208+
197209
:param filter_: If provided, this field specifies the criteria that
198210
must be met by alert policies to be disabled.
199211
For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering.
@@ -261,6 +273,10 @@ class StackdriverUpsertAlertOperator(BaseOperator):
261273
Creates a new alert or updates an existing policy identified
262274
the name field in the alerts parameter.
263275
276+
.. seealso::
277+
For more information on how to use this operator, take a look at the guide:
278+
:ref:`howto/operator:StackdriverUpsertAlertOperator`
279+
264280
:param alerts: A JSON string or file that specifies all the alerts that needs
265281
to be either created or updated. For more details, see
266282
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies#AlertPolicy.
@@ -330,6 +346,10 @@ class StackdriverDeleteAlertOperator(BaseOperator):
330346
"""
331347
Deletes an alerting policy.
332348
349+
.. seealso::
350+
For more information on how to use this operator, take a look at the guide:
351+
:ref:`howto/operator:StackdriverDeleteAlertOperator`
352+
333353
:param name: The alerting policy to delete. The format is:
334354
``projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]``.
335355
:type name: str
@@ -399,6 +419,10 @@ class StackdriverListNotificationChannelsOperator(BaseOperator):
399419
which returns python dictionary, stringified JSON and protobuf
400420
respectively.
401421
422+
.. seealso::
423+
For more information on how to use this operator, take a look at the guide:
424+
:ref:`howto/operator:StackdriverListNotificationChannelsOperator`
425+
402426
:param format_: (Optional) Desired output format of the result. The
403427
supported formats are "dict", "json" and None which returns
404428
python dictionary, stringified JSON and protobuf respectively.
@@ -495,6 +519,10 @@ class StackdriverEnableNotificationChannelsOperator(BaseOperator):
495519
Enables one or more disabled alerting policies identified by filter
496520
parameter. Inoperative in case the policy is already enabled.
497521
522+
.. seealso::
523+
For more information on how to use this operator, take a look at the guide:
524+
:ref:`howto/operator:StackdriverEnableNotificationChannelsOperator`
525+
498526
:param filter_: If provided, this field specifies the criteria that
499527
must be met by notification channels to be enabled.
500528
For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering.
@@ -564,6 +592,10 @@ class StackdriverDisableNotificationChannelsOperator(BaseOperator):
564592
Disables one or more enabled notification channels identified by filter
565593
parameter. Inoperative in case the policy is already disabled.
566594
595+
.. seealso::
596+
For more information on how to use this operator, take a look at the guide:
597+
:ref:`howto/operator:StackdriverDisableNotificationChannelsOperator`
598+
567599
:param filter_: If provided, this field specifies the criteria that
568600
must be met by alert policies to be disabled.
569601
For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering.
@@ -633,6 +665,10 @@ class StackdriverUpsertNotificationChannelOperator(BaseOperator):
633665
Creates a new notification or updates an existing notification channel
634666
identified the name field in the alerts parameter.
635667
668+
.. seealso::
669+
For more information on how to use this operator, take a look at the guide:
670+
:ref:`howto/operator:StackdriverUpsertNotificationChannelOperator`
671+
636672
:param channels: A JSON string or file that specifies all the alerts that needs
637673
to be either created or updated. For more details, see
638674
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannels.
@@ -703,6 +739,10 @@ class StackdriverDeleteNotificationChannelOperator(BaseOperator):
703739
"""
704740
Deletes a notification channel.
705741
742+
.. seealso::
743+
For more information on how to use this operator, take a look at the guide:
744+
:ref:`howto/operator:StackdriverDeleteNotificationChannelOperator`
745+
706746
:param name: The alerting policy to delete. The format is:
707747
``projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]``.
708748
:type name: str

β€Ždocs/howto/operator/gcp/stackdriver.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Prerequisite Tasks
3030
.. include:: _partials/prerequisite_tasks.rst
3131

3232

33+
.. _howto/operator:StackdriverListAlertPoliciesOperator:
34+
3335
StackdriverListAlertPoliciesOperator
3436
------------------------------------
3537

@@ -48,7 +50,7 @@ If project is is missing it wil be retrieved from GCP connection used.
4850
:start-after: [START howto_operator_gcp_stackdriver_list_alert_policy]
4951
:end-before: [END howto_operator_gcp_stackdriver_list_alert_policy]
5052

51-
.. _howto/operator:StackdriverListAlertPoliciesOperator:
53+
.. _howto/operator:StackdriverEnableAlertPoliciesOperator:
5254

5355
StackdriverEnableAlertPoliciesOperator
5456
--------------------------------------
@@ -68,7 +70,7 @@ If project is is missing it wil be retrieved from GCP connection used.
6870
:start-after: [START howto_operator_gcp_stackdriver_enable_alert_policy]
6971
:end-before: [END howto_operator_gcp_stackdriver_enable_alert_policy]
7072

71-
.. _howto/operator:StackdriverEnableAlertPoliciesOperator:
73+
.. _howto/operator:StackdriverDisableAlertPoliciesOperator:
7274

7375
StackdriverDisableAlertPoliciesOperator
7476
---------------------------------------
@@ -88,7 +90,7 @@ If project is is missing it wil be retrieved from GCP connection used.
8890
:start-after: [START howto_operator_gcp_stackdriver_disable_alert_policy]
8991
:end-before: [END howto_operator_gcp_stackdriver_disable_alert_policy]
9092

91-
.. _howto/operator:StackdriverDisableAlertPoliciesOperator:
93+
.. _howto/operator:StackdriverUpsertAlertOperator:
9294

9395
StackdriverUpsertAlertOperator
9496
------------------------------
@@ -109,7 +111,7 @@ If project is is missing it wil be retrieved from GCP connection used.
109111
:start-after: [START howto_operator_gcp_stackdriver_upsert_alert_policy]
110112
:end-before: [END howto_operator_gcp_stackdriver_upsert_alert_policy]
111113

112-
.. _howto/operator:StackdriverUpsertAlertOperator:
114+
.. _howto/operator:StackdriverDeleteAlertOperator:
113115

114116
StackdriverDeleteAlertOperator
115117
------------------------------
@@ -128,7 +130,7 @@ The name of the alert to be deleted should be given in the format projects/<PROJ
128130
:start-after: [START howto_operator_gcp_stackdriver_delete_alert_policy]
129131
:end-before: [END howto_operator_gcp_stackdriver_delete_alert_policy]
130132

131-
.. _howto/operator:StackdriverDeleteAlertOperator:
133+
.. _howto/operator:StackdriverListNotificationChannelsOperator:
132134

133135
StackdriverListNotificationChannelsOperator
134136
-------------------------------------------
@@ -148,7 +150,7 @@ If project is is missing it wil be retrieved from GCP connection used.
148150
:start-after: [START howto_operator_gcp_stackdriver_list_notification_channel]
149151
:end-before: [END howto_operator_gcp_stackdriver_list_notification_channel]
150152

151-
.. _howto/operator:StackdriverListNotificationChannelsOperator:
153+
.. _howto/operator:StackdriverEnableNotificationChannelsOperator:
152154

153155
StackdriverEnableNotificationChannelsOperator
154156
---------------------------------------------
@@ -168,7 +170,7 @@ If project is is missing it wil be retrieved from GCP connection used.
168170
:start-after: [START howto_operator_gcp_stackdriver_enable_notification_channel]
169171
:end-before: [END howto_operator_gcp_stackdriver_enable_notification_channel]
170172

171-
.. _howto/operator:StackdriverEnableNotificationChannelsOperator:
173+
.. _howto/operator:StackdriverDisableNotificationChannelsOperator:
172174

173175
StackdriverDisableNotificationChannelsOperator
174176
----------------------------------------------
@@ -188,7 +190,7 @@ If project is is missing it wil be retrieved from GCP connection used.
188190
:start-after: [START howto_operator_gcp_stackdriver_disable_notification_channel]
189191
:end-before: [END howto_operator_gcp_stackdriver_disable_notification_channel]
190192

191-
.. _howto/operator:StackdriverDisableNotificationChannelsOperator:
193+
.. _howto/operator:StackdriverUpsertNotificationChannelOperator:
192194

193195
StackdriverUpsertNotificationChannelOperator
194196
--------------------------------------------
@@ -209,7 +211,7 @@ If project is is missing it wil be retrieved from GCP connection used.
209211
:start-after: [START howto_operator_gcp_stackdriver_disable_notification_channel]
210212
:end-before: [END howto_operator_gcp_stackdriver_disable_notification_channel]
211213

212-
.. _howto/operator:StackdriverUpsertNotificationChannelOperator:
214+
.. _howto/operator:StackdriverDeleteNotificationChannelOperator:
213215

214216
StackdriverDeleteNotificationChannelOperator
215217
--------------------------------------------
@@ -227,5 +229,3 @@ If project is is missing it wil be retrieved from GCP connection used.
227229
:dedent: 4
228230
:start-after: [START howto_operator_gcp_stackdriver_delete_notification_channel]
229231
:end-before: [END howto_operator_gcp_stackdriver_delete_notification_channel]
230-
231-
.. _howto/operator:StackdriverDeleteNotificationChannelOperator:

0 commit comments

Comments
 (0)