pulumi-snowflake 0.58.0a1726035035__py3-none-any.whl → 0.59.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_snowflake/_inputs.py +8587 -2022
- pulumi_snowflake/account.py +28 -50
- pulumi_snowflake/account_parameter.py +0 -28
- pulumi_snowflake/account_password_policy_attachment.py +2 -30
- pulumi_snowflake/account_role.py +41 -36
- pulumi_snowflake/alert.py +28 -40
- pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +35 -15
- pulumi_snowflake/api_authentication_integration_with_client_credentials.py +35 -15
- pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +35 -15
- pulumi_snowflake/api_integration.py +28 -54
- pulumi_snowflake/cortex_search_service.py +28 -76
- pulumi_snowflake/database.py +82 -15
- pulumi_snowflake/database_old.py +0 -72
- pulumi_snowflake/database_role.py +76 -42
- pulumi_snowflake/dynamic_table.py +28 -38
- pulumi_snowflake/email_notification_integration.py +28 -26
- pulumi_snowflake/external_function.py +28 -52
- pulumi_snowflake/external_oauth_integration.py +35 -15
- pulumi_snowflake/external_table.py +28 -48
- pulumi_snowflake/failover_group.py +28 -72
- pulumi_snowflake/file_format.py +28 -26
- pulumi_snowflake/function.py +28 -4
- pulumi_snowflake/get_database_roles.py +63 -36
- pulumi_snowflake/get_masking_policies.py +73 -48
- pulumi_snowflake/get_resource_monitors.py +28 -16
- pulumi_snowflake/get_row_access_policies.py +73 -48
- pulumi_snowflake/get_users.py +96 -33
- pulumi_snowflake/get_views.py +94 -51
- pulumi_snowflake/grant_account_role.py +0 -4
- pulumi_snowflake/grant_application_role.py +0 -4
- pulumi_snowflake/grant_database_role.py +0 -4
- pulumi_snowflake/grant_privileges_to_account_role.py +4 -4
- pulumi_snowflake/grant_privileges_to_database_role.py +6 -2
- pulumi_snowflake/grant_privileges_to_share.py +49 -2
- pulumi_snowflake/managed_account.py +28 -4
- pulumi_snowflake/masking_policy.py +208 -306
- pulumi_snowflake/materialized_view.py +28 -34
- pulumi_snowflake/network_policy.py +35 -15
- pulumi_snowflake/network_policy_attachment.py +0 -30
- pulumi_snowflake/network_rule.py +28 -66
- pulumi_snowflake/notification_integration.py +28 -34
- pulumi_snowflake/oauth_integration.py +0 -34
- pulumi_snowflake/oauth_integration_for_custom_clients.py +35 -101
- pulumi_snowflake/oauth_integration_for_partner_applications.py +35 -15
- pulumi_snowflake/object_parameter.py +0 -98
- pulumi_snowflake/outputs.py +13035 -4202
- pulumi_snowflake/password_policy.py +28 -28
- pulumi_snowflake/pipe.py +28 -4
- pulumi_snowflake/procedure.py +28 -4
- pulumi_snowflake/pulumi-plugin.json +1 -1
- pulumi_snowflake/resource_monitor.py +111 -307
- pulumi_snowflake/role.py +41 -36
- pulumi_snowflake/row_access_policy.py +195 -147
- pulumi_snowflake/saml2_integration.py +35 -15
- pulumi_snowflake/saml_integration.py +0 -34
- pulumi_snowflake/schema.py +39 -19
- pulumi_snowflake/scim_integration.py +35 -15
- pulumi_snowflake/secondary_database.py +35 -19
- pulumi_snowflake/sequence.py +4 -36
- pulumi_snowflake/session_parameter.py +0 -32
- pulumi_snowflake/share.py +28 -28
- pulumi_snowflake/shared_database.py +35 -15
- pulumi_snowflake/stage.py +28 -28
- pulumi_snowflake/storage_integration.py +28 -4
- pulumi_snowflake/stream.py +28 -4
- pulumi_snowflake/streamlit.py +36 -16
- pulumi_snowflake/table.py +28 -32
- pulumi_snowflake/table_column_masking_policy_application.py +2 -14
- pulumi_snowflake/table_constraint.py +0 -152
- pulumi_snowflake/tag.py +28 -40
- pulumi_snowflake/tag_association.py +0 -120
- pulumi_snowflake/tag_masking_policy_association.py +0 -4
- pulumi_snowflake/task.py +28 -92
- pulumi_snowflake/unsafe_execute.py +2 -20
- pulumi_snowflake/user.py +3341 -368
- pulumi_snowflake/user_password_policy_attachment.py +0 -46
- pulumi_snowflake/view.py +465 -185
- pulumi_snowflake/warehouse.py +39 -43
- {pulumi_snowflake-0.58.0a1726035035.dist-info → pulumi_snowflake-0.59.0.dist-info}/METADATA +1 -1
- pulumi_snowflake-0.59.0.dist-info/RECORD +129 -0
- {pulumi_snowflake-0.58.0a1726035035.dist-info → pulumi_snowflake-0.59.0.dist-info}/WHEEL +1 -1
- pulumi_snowflake-0.58.0a1726035035.dist-info/RECORD +0 -129
- {pulumi_snowflake-0.58.0a1726035035.dist-info → pulumi_snowflake-0.59.0.dist-info}/top_level.txt +0 -0
|
@@ -8,6 +8,8 @@ import pulumi
|
|
|
8
8
|
import pulumi.runtime
|
|
9
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
10
|
from . import _utilities
|
|
11
|
+
from . import outputs
|
|
12
|
+
from ._inputs import *
|
|
11
13
|
|
|
12
14
|
__all__ = ['ResourceMonitorArgs', 'ResourceMonitor']
|
|
13
15
|
|
|
@@ -20,28 +22,20 @@ class ResourceMonitorArgs:
|
|
|
20
22
|
name: Optional[pulumi.Input[str]] = None,
|
|
21
23
|
notify_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
22
24
|
notify_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
23
|
-
set_for_account: Optional[pulumi.Input[bool]] = None,
|
|
24
25
|
start_timestamp: Optional[pulumi.Input[str]] = None,
|
|
25
26
|
suspend_immediate_trigger: Optional[pulumi.Input[int]] = None,
|
|
26
|
-
|
|
27
|
-
suspend_trigger: Optional[pulumi.Input[int]] = None,
|
|
28
|
-
suspend_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
29
|
-
warehouses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
27
|
+
suspend_trigger: Optional[pulumi.Input[int]] = None):
|
|
30
28
|
"""
|
|
31
29
|
The set of arguments for constructing a ResourceMonitor resource.
|
|
32
|
-
:param pulumi.Input[int] credit_quota: The number of credits allocated
|
|
30
|
+
:param pulumi.Input[int] credit_quota: The number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.
|
|
33
31
|
:param pulumi.Input[str] end_timestamp: The date and time when the resource monitor suspends the assigned warehouses.
|
|
34
|
-
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. If you set a frequency for a resource monitor, you must also set
|
|
35
|
-
:param pulumi.Input[str] name: Identifier for the resource monitor; must be unique for your account.
|
|
36
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] notify_triggers:
|
|
37
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] notify_users: Specifies the list of users to receive email notifications on resource monitors.
|
|
38
|
-
:param pulumi.Input[
|
|
39
|
-
:param pulumi.Input[
|
|
40
|
-
:param pulumi.Input[int]
|
|
41
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] suspend_immediate_triggers: A list of percentage thresholds at which to suspend all warehouses.
|
|
42
|
-
:param pulumi.Input[int] suspend_trigger: The number that represents the percentage threshold at which to suspend all warehouses.
|
|
43
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] suspend_triggers: A list of percentage thresholds at which to suspend all warehouses.
|
|
44
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] warehouses: A list of warehouses to apply the resource monitor to.
|
|
32
|
+
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. Valid values are (case-insensitive): `MONTHLY` | `DAILY` | `WEEKLY` | `YEARLY` | `NEVER`. If you set a `frequency` for a resource monitor, you must also set `start_timestamp`. If you specify `NEVER` for the frequency, the credit usage for the warehouse does not reset. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
33
|
+
:param pulumi.Input[str] name: Identifier for the resource monitor; must be unique for your account. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
|
|
34
|
+
:param pulumi.Input[Sequence[pulumi.Input[int]]] notify_triggers: Specifies a list of percentages of the credit quota. After reaching any of the values the users passed in the notify_users field will be notified (to receive the notification they should have notifications enabled). Values over 100 are supported.
|
|
35
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] notify_users: Specifies the list of users (their identifiers) to receive email notifications on resource monitors.
|
|
36
|
+
:param pulumi.Input[str] start_timestamp: The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses. If you set a `start_timestamp` for a resource monitor, you must also set `frequency`. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
37
|
+
:param pulumi.Input[int] suspend_immediate_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses immediately cancel any currently running queries or statements. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
38
|
+
:param pulumi.Input[int] suspend_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses while allowing currently running queries to complete will be suspended. No new queries can be executed by the warehouses until the credit quota for the resource monitor is increased. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
45
39
|
"""
|
|
46
40
|
if credit_quota is not None:
|
|
47
41
|
pulumi.set(__self__, "credit_quota", credit_quota)
|
|
@@ -55,32 +49,18 @@ class ResourceMonitorArgs:
|
|
|
55
49
|
pulumi.set(__self__, "notify_triggers", notify_triggers)
|
|
56
50
|
if notify_users is not None:
|
|
57
51
|
pulumi.set(__self__, "notify_users", notify_users)
|
|
58
|
-
if set_for_account is not None:
|
|
59
|
-
pulumi.set(__self__, "set_for_account", set_for_account)
|
|
60
52
|
if start_timestamp is not None:
|
|
61
53
|
pulumi.set(__self__, "start_timestamp", start_timestamp)
|
|
62
54
|
if suspend_immediate_trigger is not None:
|
|
63
55
|
pulumi.set(__self__, "suspend_immediate_trigger", suspend_immediate_trigger)
|
|
64
|
-
if suspend_immediate_triggers is not None:
|
|
65
|
-
warnings.warn("""Use suspend_immediate_trigger instead""", DeprecationWarning)
|
|
66
|
-
pulumi.log.warn("""suspend_immediate_triggers is deprecated: Use suspend_immediate_trigger instead""")
|
|
67
|
-
if suspend_immediate_triggers is not None:
|
|
68
|
-
pulumi.set(__self__, "suspend_immediate_triggers", suspend_immediate_triggers)
|
|
69
56
|
if suspend_trigger is not None:
|
|
70
57
|
pulumi.set(__self__, "suspend_trigger", suspend_trigger)
|
|
71
|
-
if suspend_triggers is not None:
|
|
72
|
-
warnings.warn("""Use suspend_trigger instead""", DeprecationWarning)
|
|
73
|
-
pulumi.log.warn("""suspend_triggers is deprecated: Use suspend_trigger instead""")
|
|
74
|
-
if suspend_triggers is not None:
|
|
75
|
-
pulumi.set(__self__, "suspend_triggers", suspend_triggers)
|
|
76
|
-
if warehouses is not None:
|
|
77
|
-
pulumi.set(__self__, "warehouses", warehouses)
|
|
78
58
|
|
|
79
59
|
@property
|
|
80
60
|
@pulumi.getter(name="creditQuota")
|
|
81
61
|
def credit_quota(self) -> Optional[pulumi.Input[int]]:
|
|
82
62
|
"""
|
|
83
|
-
The number of credits allocated
|
|
63
|
+
The number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.
|
|
84
64
|
"""
|
|
85
65
|
return pulumi.get(self, "credit_quota")
|
|
86
66
|
|
|
@@ -104,7 +84,7 @@ class ResourceMonitorArgs:
|
|
|
104
84
|
@pulumi.getter
|
|
105
85
|
def frequency(self) -> Optional[pulumi.Input[str]]:
|
|
106
86
|
"""
|
|
107
|
-
The frequency interval at which the credit usage resets to 0. If you set a frequency for a resource monitor, you must also set
|
|
87
|
+
The frequency interval at which the credit usage resets to 0. Valid values are (case-insensitive): `MONTHLY` | `DAILY` | `WEEKLY` | `YEARLY` | `NEVER`. If you set a `frequency` for a resource monitor, you must also set `start_timestamp`. If you specify `NEVER` for the frequency, the credit usage for the warehouse does not reset. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
108
88
|
"""
|
|
109
89
|
return pulumi.get(self, "frequency")
|
|
110
90
|
|
|
@@ -116,7 +96,7 @@ class ResourceMonitorArgs:
|
|
|
116
96
|
@pulumi.getter
|
|
117
97
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
118
98
|
"""
|
|
119
|
-
Identifier for the resource monitor; must be unique for your account.
|
|
99
|
+
Identifier for the resource monitor; must be unique for your account. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
|
|
120
100
|
"""
|
|
121
101
|
return pulumi.get(self, "name")
|
|
122
102
|
|
|
@@ -128,7 +108,7 @@ class ResourceMonitorArgs:
|
|
|
128
108
|
@pulumi.getter(name="notifyTriggers")
|
|
129
109
|
def notify_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
|
|
130
110
|
"""
|
|
131
|
-
|
|
111
|
+
Specifies a list of percentages of the credit quota. After reaching any of the values the users passed in the notify_users field will be notified (to receive the notification they should have notifications enabled). Values over 100 are supported.
|
|
132
112
|
"""
|
|
133
113
|
return pulumi.get(self, "notify_triggers")
|
|
134
114
|
|
|
@@ -140,7 +120,7 @@ class ResourceMonitorArgs:
|
|
|
140
120
|
@pulumi.getter(name="notifyUsers")
|
|
141
121
|
def notify_users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
142
122
|
"""
|
|
143
|
-
Specifies the list of users to receive email notifications on resource monitors.
|
|
123
|
+
Specifies the list of users (their identifiers) to receive email notifications on resource monitors.
|
|
144
124
|
"""
|
|
145
125
|
return pulumi.get(self, "notify_users")
|
|
146
126
|
|
|
@@ -148,23 +128,11 @@ class ResourceMonitorArgs:
|
|
|
148
128
|
def notify_users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
149
129
|
pulumi.set(self, "notify_users", value)
|
|
150
130
|
|
|
151
|
-
@property
|
|
152
|
-
@pulumi.getter(name="setForAccount")
|
|
153
|
-
def set_for_account(self) -> Optional[pulumi.Input[bool]]:
|
|
154
|
-
"""
|
|
155
|
-
Specifies whether the resource monitor should be applied globally to your Snowflake account (defaults to false).
|
|
156
|
-
"""
|
|
157
|
-
return pulumi.get(self, "set_for_account")
|
|
158
|
-
|
|
159
|
-
@set_for_account.setter
|
|
160
|
-
def set_for_account(self, value: Optional[pulumi.Input[bool]]):
|
|
161
|
-
pulumi.set(self, "set_for_account", value)
|
|
162
|
-
|
|
163
131
|
@property
|
|
164
132
|
@pulumi.getter(name="startTimestamp")
|
|
165
133
|
def start_timestamp(self) -> Optional[pulumi.Input[str]]:
|
|
166
134
|
"""
|
|
167
|
-
The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses.
|
|
135
|
+
The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses. If you set a `start_timestamp` for a resource monitor, you must also set `frequency`. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
168
136
|
"""
|
|
169
137
|
return pulumi.get(self, "start_timestamp")
|
|
170
138
|
|
|
@@ -176,7 +144,7 @@ class ResourceMonitorArgs:
|
|
|
176
144
|
@pulumi.getter(name="suspendImmediateTrigger")
|
|
177
145
|
def suspend_immediate_trigger(self) -> Optional[pulumi.Input[int]]:
|
|
178
146
|
"""
|
|
179
|
-
|
|
147
|
+
Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses immediately cancel any currently running queries or statements. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
180
148
|
"""
|
|
181
149
|
return pulumi.get(self, "suspend_immediate_trigger")
|
|
182
150
|
|
|
@@ -184,24 +152,11 @@ class ResourceMonitorArgs:
|
|
|
184
152
|
def suspend_immediate_trigger(self, value: Optional[pulumi.Input[int]]):
|
|
185
153
|
pulumi.set(self, "suspend_immediate_trigger", value)
|
|
186
154
|
|
|
187
|
-
@property
|
|
188
|
-
@pulumi.getter(name="suspendImmediateTriggers")
|
|
189
|
-
@_utilities.deprecated("""Use suspend_immediate_trigger instead""")
|
|
190
|
-
def suspend_immediate_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
|
|
191
|
-
"""
|
|
192
|
-
A list of percentage thresholds at which to suspend all warehouses.
|
|
193
|
-
"""
|
|
194
|
-
return pulumi.get(self, "suspend_immediate_triggers")
|
|
195
|
-
|
|
196
|
-
@suspend_immediate_triggers.setter
|
|
197
|
-
def suspend_immediate_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]):
|
|
198
|
-
pulumi.set(self, "suspend_immediate_triggers", value)
|
|
199
|
-
|
|
200
155
|
@property
|
|
201
156
|
@pulumi.getter(name="suspendTrigger")
|
|
202
157
|
def suspend_trigger(self) -> Optional[pulumi.Input[int]]:
|
|
203
158
|
"""
|
|
204
|
-
|
|
159
|
+
Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses while allowing currently running queries to complete will be suspended. No new queries can be executed by the warehouses until the credit quota for the resource monitor is increased. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
205
160
|
"""
|
|
206
161
|
return pulumi.get(self, "suspend_trigger")
|
|
207
162
|
|
|
@@ -209,31 +164,6 @@ class ResourceMonitorArgs:
|
|
|
209
164
|
def suspend_trigger(self, value: Optional[pulumi.Input[int]]):
|
|
210
165
|
pulumi.set(self, "suspend_trigger", value)
|
|
211
166
|
|
|
212
|
-
@property
|
|
213
|
-
@pulumi.getter(name="suspendTriggers")
|
|
214
|
-
@_utilities.deprecated("""Use suspend_trigger instead""")
|
|
215
|
-
def suspend_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
|
|
216
|
-
"""
|
|
217
|
-
A list of percentage thresholds at which to suspend all warehouses.
|
|
218
|
-
"""
|
|
219
|
-
return pulumi.get(self, "suspend_triggers")
|
|
220
|
-
|
|
221
|
-
@suspend_triggers.setter
|
|
222
|
-
def suspend_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]):
|
|
223
|
-
pulumi.set(self, "suspend_triggers", value)
|
|
224
|
-
|
|
225
|
-
@property
|
|
226
|
-
@pulumi.getter
|
|
227
|
-
def warehouses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
228
|
-
"""
|
|
229
|
-
A list of warehouses to apply the resource monitor to.
|
|
230
|
-
"""
|
|
231
|
-
return pulumi.get(self, "warehouses")
|
|
232
|
-
|
|
233
|
-
@warehouses.setter
|
|
234
|
-
def warehouses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
235
|
-
pulumi.set(self, "warehouses", value)
|
|
236
|
-
|
|
237
167
|
|
|
238
168
|
@pulumi.input_type
|
|
239
169
|
class _ResourceMonitorState:
|
|
@@ -241,31 +171,27 @@ class _ResourceMonitorState:
|
|
|
241
171
|
credit_quota: Optional[pulumi.Input[int]] = None,
|
|
242
172
|
end_timestamp: Optional[pulumi.Input[str]] = None,
|
|
243
173
|
frequency: Optional[pulumi.Input[str]] = None,
|
|
174
|
+
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
244
175
|
name: Optional[pulumi.Input[str]] = None,
|
|
245
176
|
notify_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
246
177
|
notify_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
247
|
-
|
|
178
|
+
show_outputs: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceMonitorShowOutputArgs']]]] = None,
|
|
248
179
|
start_timestamp: Optional[pulumi.Input[str]] = None,
|
|
249
180
|
suspend_immediate_trigger: Optional[pulumi.Input[int]] = None,
|
|
250
|
-
|
|
251
|
-
suspend_trigger: Optional[pulumi.Input[int]] = None,
|
|
252
|
-
suspend_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
253
|
-
warehouses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
181
|
+
suspend_trigger: Optional[pulumi.Input[int]] = None):
|
|
254
182
|
"""
|
|
255
183
|
Input properties used for looking up and filtering ResourceMonitor resources.
|
|
256
|
-
:param pulumi.Input[int] credit_quota: The number of credits allocated
|
|
184
|
+
:param pulumi.Input[int] credit_quota: The number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.
|
|
257
185
|
:param pulumi.Input[str] end_timestamp: The date and time when the resource monitor suspends the assigned warehouses.
|
|
258
|
-
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. If you set a frequency for a resource monitor, you must also set
|
|
259
|
-
:param pulumi.Input[str]
|
|
260
|
-
:param pulumi.Input[
|
|
261
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
262
|
-
:param pulumi.Input[
|
|
263
|
-
:param pulumi.Input[
|
|
264
|
-
:param pulumi.Input[
|
|
265
|
-
:param pulumi.Input[
|
|
266
|
-
:param pulumi.Input[int] suspend_trigger:
|
|
267
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] suspend_triggers: A list of percentage thresholds at which to suspend all warehouses.
|
|
268
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] warehouses: A list of warehouses to apply the resource monitor to.
|
|
186
|
+
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. Valid values are (case-insensitive): `MONTHLY` | `DAILY` | `WEEKLY` | `YEARLY` | `NEVER`. If you set a `frequency` for a resource monitor, you must also set `start_timestamp`. If you specify `NEVER` for the frequency, the credit usage for the warehouse does not reset. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
187
|
+
:param pulumi.Input[str] fully_qualified_name: Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
188
|
+
:param pulumi.Input[str] name: Identifier for the resource monitor; must be unique for your account. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
|
|
189
|
+
:param pulumi.Input[Sequence[pulumi.Input[int]]] notify_triggers: Specifies a list of percentages of the credit quota. After reaching any of the values the users passed in the notify_users field will be notified (to receive the notification they should have notifications enabled). Values over 100 are supported.
|
|
190
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] notify_users: Specifies the list of users (their identifiers) to receive email notifications on resource monitors.
|
|
191
|
+
:param pulumi.Input[Sequence[pulumi.Input['ResourceMonitorShowOutputArgs']]] show_outputs: Outputs the result of `SHOW RESOURCE MONITORS` for the given resource monitor.
|
|
192
|
+
:param pulumi.Input[str] start_timestamp: The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses. If you set a `start_timestamp` for a resource monitor, you must also set `frequency`. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
193
|
+
:param pulumi.Input[int] suspend_immediate_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses immediately cancel any currently running queries or statements. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
194
|
+
:param pulumi.Input[int] suspend_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses while allowing currently running queries to complete will be suspended. No new queries can be executed by the warehouses until the credit quota for the resource monitor is increased. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
269
195
|
"""
|
|
270
196
|
if credit_quota is not None:
|
|
271
197
|
pulumi.set(__self__, "credit_quota", credit_quota)
|
|
@@ -273,38 +199,28 @@ class _ResourceMonitorState:
|
|
|
273
199
|
pulumi.set(__self__, "end_timestamp", end_timestamp)
|
|
274
200
|
if frequency is not None:
|
|
275
201
|
pulumi.set(__self__, "frequency", frequency)
|
|
202
|
+
if fully_qualified_name is not None:
|
|
203
|
+
pulumi.set(__self__, "fully_qualified_name", fully_qualified_name)
|
|
276
204
|
if name is not None:
|
|
277
205
|
pulumi.set(__self__, "name", name)
|
|
278
206
|
if notify_triggers is not None:
|
|
279
207
|
pulumi.set(__self__, "notify_triggers", notify_triggers)
|
|
280
208
|
if notify_users is not None:
|
|
281
209
|
pulumi.set(__self__, "notify_users", notify_users)
|
|
282
|
-
if
|
|
283
|
-
pulumi.set(__self__, "
|
|
210
|
+
if show_outputs is not None:
|
|
211
|
+
pulumi.set(__self__, "show_outputs", show_outputs)
|
|
284
212
|
if start_timestamp is not None:
|
|
285
213
|
pulumi.set(__self__, "start_timestamp", start_timestamp)
|
|
286
214
|
if suspend_immediate_trigger is not None:
|
|
287
215
|
pulumi.set(__self__, "suspend_immediate_trigger", suspend_immediate_trigger)
|
|
288
|
-
if suspend_immediate_triggers is not None:
|
|
289
|
-
warnings.warn("""Use suspend_immediate_trigger instead""", DeprecationWarning)
|
|
290
|
-
pulumi.log.warn("""suspend_immediate_triggers is deprecated: Use suspend_immediate_trigger instead""")
|
|
291
|
-
if suspend_immediate_triggers is not None:
|
|
292
|
-
pulumi.set(__self__, "suspend_immediate_triggers", suspend_immediate_triggers)
|
|
293
216
|
if suspend_trigger is not None:
|
|
294
217
|
pulumi.set(__self__, "suspend_trigger", suspend_trigger)
|
|
295
|
-
if suspend_triggers is not None:
|
|
296
|
-
warnings.warn("""Use suspend_trigger instead""", DeprecationWarning)
|
|
297
|
-
pulumi.log.warn("""suspend_triggers is deprecated: Use suspend_trigger instead""")
|
|
298
|
-
if suspend_triggers is not None:
|
|
299
|
-
pulumi.set(__self__, "suspend_triggers", suspend_triggers)
|
|
300
|
-
if warehouses is not None:
|
|
301
|
-
pulumi.set(__self__, "warehouses", warehouses)
|
|
302
218
|
|
|
303
219
|
@property
|
|
304
220
|
@pulumi.getter(name="creditQuota")
|
|
305
221
|
def credit_quota(self) -> Optional[pulumi.Input[int]]:
|
|
306
222
|
"""
|
|
307
|
-
The number of credits allocated
|
|
223
|
+
The number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.
|
|
308
224
|
"""
|
|
309
225
|
return pulumi.get(self, "credit_quota")
|
|
310
226
|
|
|
@@ -328,7 +244,7 @@ class _ResourceMonitorState:
|
|
|
328
244
|
@pulumi.getter
|
|
329
245
|
def frequency(self) -> Optional[pulumi.Input[str]]:
|
|
330
246
|
"""
|
|
331
|
-
The frequency interval at which the credit usage resets to 0. If you set a frequency for a resource monitor, you must also set
|
|
247
|
+
The frequency interval at which the credit usage resets to 0. Valid values are (case-insensitive): `MONTHLY` | `DAILY` | `WEEKLY` | `YEARLY` | `NEVER`. If you set a `frequency` for a resource monitor, you must also set `start_timestamp`. If you specify `NEVER` for the frequency, the credit usage for the warehouse does not reset. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
332
248
|
"""
|
|
333
249
|
return pulumi.get(self, "frequency")
|
|
334
250
|
|
|
@@ -336,11 +252,23 @@ class _ResourceMonitorState:
|
|
|
336
252
|
def frequency(self, value: Optional[pulumi.Input[str]]):
|
|
337
253
|
pulumi.set(self, "frequency", value)
|
|
338
254
|
|
|
255
|
+
@property
|
|
256
|
+
@pulumi.getter(name="fullyQualifiedName")
|
|
257
|
+
def fully_qualified_name(self) -> Optional[pulumi.Input[str]]:
|
|
258
|
+
"""
|
|
259
|
+
Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
260
|
+
"""
|
|
261
|
+
return pulumi.get(self, "fully_qualified_name")
|
|
262
|
+
|
|
263
|
+
@fully_qualified_name.setter
|
|
264
|
+
def fully_qualified_name(self, value: Optional[pulumi.Input[str]]):
|
|
265
|
+
pulumi.set(self, "fully_qualified_name", value)
|
|
266
|
+
|
|
339
267
|
@property
|
|
340
268
|
@pulumi.getter
|
|
341
269
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
342
270
|
"""
|
|
343
|
-
Identifier for the resource monitor; must be unique for your account.
|
|
271
|
+
Identifier for the resource monitor; must be unique for your account. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
|
|
344
272
|
"""
|
|
345
273
|
return pulumi.get(self, "name")
|
|
346
274
|
|
|
@@ -352,7 +280,7 @@ class _ResourceMonitorState:
|
|
|
352
280
|
@pulumi.getter(name="notifyTriggers")
|
|
353
281
|
def notify_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
|
|
354
282
|
"""
|
|
355
|
-
|
|
283
|
+
Specifies a list of percentages of the credit quota. After reaching any of the values the users passed in the notify_users field will be notified (to receive the notification they should have notifications enabled). Values over 100 are supported.
|
|
356
284
|
"""
|
|
357
285
|
return pulumi.get(self, "notify_triggers")
|
|
358
286
|
|
|
@@ -364,7 +292,7 @@ class _ResourceMonitorState:
|
|
|
364
292
|
@pulumi.getter(name="notifyUsers")
|
|
365
293
|
def notify_users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
366
294
|
"""
|
|
367
|
-
Specifies the list of users to receive email notifications on resource monitors.
|
|
295
|
+
Specifies the list of users (their identifiers) to receive email notifications on resource monitors.
|
|
368
296
|
"""
|
|
369
297
|
return pulumi.get(self, "notify_users")
|
|
370
298
|
|
|
@@ -373,22 +301,22 @@ class _ResourceMonitorState:
|
|
|
373
301
|
pulumi.set(self, "notify_users", value)
|
|
374
302
|
|
|
375
303
|
@property
|
|
376
|
-
@pulumi.getter(name="
|
|
377
|
-
def
|
|
304
|
+
@pulumi.getter(name="showOutputs")
|
|
305
|
+
def show_outputs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ResourceMonitorShowOutputArgs']]]]:
|
|
378
306
|
"""
|
|
379
|
-
|
|
307
|
+
Outputs the result of `SHOW RESOURCE MONITORS` for the given resource monitor.
|
|
380
308
|
"""
|
|
381
|
-
return pulumi.get(self, "
|
|
309
|
+
return pulumi.get(self, "show_outputs")
|
|
382
310
|
|
|
383
|
-
@
|
|
384
|
-
def
|
|
385
|
-
pulumi.set(self, "
|
|
311
|
+
@show_outputs.setter
|
|
312
|
+
def show_outputs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceMonitorShowOutputArgs']]]]):
|
|
313
|
+
pulumi.set(self, "show_outputs", value)
|
|
386
314
|
|
|
387
315
|
@property
|
|
388
316
|
@pulumi.getter(name="startTimestamp")
|
|
389
317
|
def start_timestamp(self) -> Optional[pulumi.Input[str]]:
|
|
390
318
|
"""
|
|
391
|
-
The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses.
|
|
319
|
+
The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses. If you set a `start_timestamp` for a resource monitor, you must also set `frequency`. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
392
320
|
"""
|
|
393
321
|
return pulumi.get(self, "start_timestamp")
|
|
394
322
|
|
|
@@ -400,7 +328,7 @@ class _ResourceMonitorState:
|
|
|
400
328
|
@pulumi.getter(name="suspendImmediateTrigger")
|
|
401
329
|
def suspend_immediate_trigger(self) -> Optional[pulumi.Input[int]]:
|
|
402
330
|
"""
|
|
403
|
-
|
|
331
|
+
Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses immediately cancel any currently running queries or statements. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
404
332
|
"""
|
|
405
333
|
return pulumi.get(self, "suspend_immediate_trigger")
|
|
406
334
|
|
|
@@ -408,24 +336,11 @@ class _ResourceMonitorState:
|
|
|
408
336
|
def suspend_immediate_trigger(self, value: Optional[pulumi.Input[int]]):
|
|
409
337
|
pulumi.set(self, "suspend_immediate_trigger", value)
|
|
410
338
|
|
|
411
|
-
@property
|
|
412
|
-
@pulumi.getter(name="suspendImmediateTriggers")
|
|
413
|
-
@_utilities.deprecated("""Use suspend_immediate_trigger instead""")
|
|
414
|
-
def suspend_immediate_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
|
|
415
|
-
"""
|
|
416
|
-
A list of percentage thresholds at which to suspend all warehouses.
|
|
417
|
-
"""
|
|
418
|
-
return pulumi.get(self, "suspend_immediate_triggers")
|
|
419
|
-
|
|
420
|
-
@suspend_immediate_triggers.setter
|
|
421
|
-
def suspend_immediate_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]):
|
|
422
|
-
pulumi.set(self, "suspend_immediate_triggers", value)
|
|
423
|
-
|
|
424
339
|
@property
|
|
425
340
|
@pulumi.getter(name="suspendTrigger")
|
|
426
341
|
def suspend_trigger(self) -> Optional[pulumi.Input[int]]:
|
|
427
342
|
"""
|
|
428
|
-
|
|
343
|
+
Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses while allowing currently running queries to complete will be suspended. No new queries can be executed by the warehouses until the credit quota for the resource monitor is increased. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
429
344
|
"""
|
|
430
345
|
return pulumi.get(self, "suspend_trigger")
|
|
431
346
|
|
|
@@ -433,31 +348,6 @@ class _ResourceMonitorState:
|
|
|
433
348
|
def suspend_trigger(self, value: Optional[pulumi.Input[int]]):
|
|
434
349
|
pulumi.set(self, "suspend_trigger", value)
|
|
435
350
|
|
|
436
|
-
@property
|
|
437
|
-
@pulumi.getter(name="suspendTriggers")
|
|
438
|
-
@_utilities.deprecated("""Use suspend_trigger instead""")
|
|
439
|
-
def suspend_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
|
|
440
|
-
"""
|
|
441
|
-
A list of percentage thresholds at which to suspend all warehouses.
|
|
442
|
-
"""
|
|
443
|
-
return pulumi.get(self, "suspend_triggers")
|
|
444
|
-
|
|
445
|
-
@suspend_triggers.setter
|
|
446
|
-
def suspend_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]):
|
|
447
|
-
pulumi.set(self, "suspend_triggers", value)
|
|
448
|
-
|
|
449
|
-
@property
|
|
450
|
-
@pulumi.getter
|
|
451
|
-
def warehouses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
452
|
-
"""
|
|
453
|
-
A list of warehouses to apply the resource monitor to.
|
|
454
|
-
"""
|
|
455
|
-
return pulumi.get(self, "warehouses")
|
|
456
|
-
|
|
457
|
-
@warehouses.setter
|
|
458
|
-
def warehouses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
459
|
-
pulumi.set(self, "warehouses", value)
|
|
460
|
-
|
|
461
351
|
|
|
462
352
|
class ResourceMonitor(pulumi.CustomResource):
|
|
463
353
|
@overload
|
|
@@ -470,39 +360,11 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
470
360
|
name: Optional[pulumi.Input[str]] = None,
|
|
471
361
|
notify_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
472
362
|
notify_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
473
|
-
set_for_account: Optional[pulumi.Input[bool]] = None,
|
|
474
363
|
start_timestamp: Optional[pulumi.Input[str]] = None,
|
|
475
364
|
suspend_immediate_trigger: Optional[pulumi.Input[int]] = None,
|
|
476
|
-
suspend_immediate_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
477
365
|
suspend_trigger: Optional[pulumi.Input[int]] = None,
|
|
478
|
-
suspend_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
479
|
-
warehouses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
480
366
|
__props__=None):
|
|
481
367
|
"""
|
|
482
|
-
## Example Usage
|
|
483
|
-
|
|
484
|
-
```python
|
|
485
|
-
import pulumi
|
|
486
|
-
import pulumi_snowflake as snowflake
|
|
487
|
-
|
|
488
|
-
monitor = snowflake.ResourceMonitor("monitor",
|
|
489
|
-
name="monitor",
|
|
490
|
-
credit_quota=100,
|
|
491
|
-
frequency="DAILY",
|
|
492
|
-
start_timestamp="2020-12-07 00:00",
|
|
493
|
-
end_timestamp="2021-12-07 00:00",
|
|
494
|
-
notify_triggers=[
|
|
495
|
-
40,
|
|
496
|
-
50,
|
|
497
|
-
],
|
|
498
|
-
suspend_triggers=50,
|
|
499
|
-
suspend_immediate_triggers=90,
|
|
500
|
-
notify_users=[
|
|
501
|
-
"USERONE",
|
|
502
|
-
"USERTWO",
|
|
503
|
-
])
|
|
504
|
-
```
|
|
505
|
-
|
|
506
368
|
## Import
|
|
507
369
|
|
|
508
370
|
format is the resource monitor name
|
|
@@ -513,19 +375,15 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
513
375
|
|
|
514
376
|
:param str resource_name: The name of the resource.
|
|
515
377
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
516
|
-
:param pulumi.Input[int] credit_quota: The number of credits allocated
|
|
378
|
+
:param pulumi.Input[int] credit_quota: The number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.
|
|
517
379
|
:param pulumi.Input[str] end_timestamp: The date and time when the resource monitor suspends the assigned warehouses.
|
|
518
|
-
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. If you set a frequency for a resource monitor, you must also set
|
|
519
|
-
:param pulumi.Input[str] name: Identifier for the resource monitor; must be unique for your account.
|
|
520
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] notify_triggers:
|
|
521
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] notify_users: Specifies the list of users to receive email notifications on resource monitors.
|
|
522
|
-
:param pulumi.Input[
|
|
523
|
-
:param pulumi.Input[
|
|
524
|
-
:param pulumi.Input[int]
|
|
525
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] suspend_immediate_triggers: A list of percentage thresholds at which to suspend all warehouses.
|
|
526
|
-
:param pulumi.Input[int] suspend_trigger: The number that represents the percentage threshold at which to suspend all warehouses.
|
|
527
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] suspend_triggers: A list of percentage thresholds at which to suspend all warehouses.
|
|
528
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] warehouses: A list of warehouses to apply the resource monitor to.
|
|
380
|
+
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. Valid values are (case-insensitive): `MONTHLY` | `DAILY` | `WEEKLY` | `YEARLY` | `NEVER`. If you set a `frequency` for a resource monitor, you must also set `start_timestamp`. If you specify `NEVER` for the frequency, the credit usage for the warehouse does not reset. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
381
|
+
:param pulumi.Input[str] name: Identifier for the resource monitor; must be unique for your account. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
|
|
382
|
+
:param pulumi.Input[Sequence[pulumi.Input[int]]] notify_triggers: Specifies a list of percentages of the credit quota. After reaching any of the values the users passed in the notify_users field will be notified (to receive the notification they should have notifications enabled). Values over 100 are supported.
|
|
383
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] notify_users: Specifies the list of users (their identifiers) to receive email notifications on resource monitors.
|
|
384
|
+
:param pulumi.Input[str] start_timestamp: The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses. If you set a `start_timestamp` for a resource monitor, you must also set `frequency`. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
385
|
+
:param pulumi.Input[int] suspend_immediate_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses immediately cancel any currently running queries or statements. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
386
|
+
:param pulumi.Input[int] suspend_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses while allowing currently running queries to complete will be suspended. No new queries can be executed by the warehouses until the credit quota for the resource monitor is increased. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
529
387
|
"""
|
|
530
388
|
...
|
|
531
389
|
@overload
|
|
@@ -534,30 +392,6 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
534
392
|
args: Optional[ResourceMonitorArgs] = None,
|
|
535
393
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
536
394
|
"""
|
|
537
|
-
## Example Usage
|
|
538
|
-
|
|
539
|
-
```python
|
|
540
|
-
import pulumi
|
|
541
|
-
import pulumi_snowflake as snowflake
|
|
542
|
-
|
|
543
|
-
monitor = snowflake.ResourceMonitor("monitor",
|
|
544
|
-
name="monitor",
|
|
545
|
-
credit_quota=100,
|
|
546
|
-
frequency="DAILY",
|
|
547
|
-
start_timestamp="2020-12-07 00:00",
|
|
548
|
-
end_timestamp="2021-12-07 00:00",
|
|
549
|
-
notify_triggers=[
|
|
550
|
-
40,
|
|
551
|
-
50,
|
|
552
|
-
],
|
|
553
|
-
suspend_triggers=50,
|
|
554
|
-
suspend_immediate_triggers=90,
|
|
555
|
-
notify_users=[
|
|
556
|
-
"USERONE",
|
|
557
|
-
"USERTWO",
|
|
558
|
-
])
|
|
559
|
-
```
|
|
560
|
-
|
|
561
395
|
## Import
|
|
562
396
|
|
|
563
397
|
format is the resource monitor name
|
|
@@ -587,13 +421,9 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
587
421
|
name: Optional[pulumi.Input[str]] = None,
|
|
588
422
|
notify_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
589
423
|
notify_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
590
|
-
set_for_account: Optional[pulumi.Input[bool]] = None,
|
|
591
424
|
start_timestamp: Optional[pulumi.Input[str]] = None,
|
|
592
425
|
suspend_immediate_trigger: Optional[pulumi.Input[int]] = None,
|
|
593
|
-
suspend_immediate_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
594
426
|
suspend_trigger: Optional[pulumi.Input[int]] = None,
|
|
595
|
-
suspend_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
596
|
-
warehouses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
597
427
|
__props__=None):
|
|
598
428
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
599
429
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -609,13 +439,11 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
609
439
|
__props__.__dict__["name"] = name
|
|
610
440
|
__props__.__dict__["notify_triggers"] = notify_triggers
|
|
611
441
|
__props__.__dict__["notify_users"] = notify_users
|
|
612
|
-
__props__.__dict__["set_for_account"] = set_for_account
|
|
613
442
|
__props__.__dict__["start_timestamp"] = start_timestamp
|
|
614
443
|
__props__.__dict__["suspend_immediate_trigger"] = suspend_immediate_trigger
|
|
615
|
-
__props__.__dict__["suspend_immediate_triggers"] = suspend_immediate_triggers
|
|
616
444
|
__props__.__dict__["suspend_trigger"] = suspend_trigger
|
|
617
|
-
__props__.__dict__["
|
|
618
|
-
__props__.__dict__["
|
|
445
|
+
__props__.__dict__["fully_qualified_name"] = None
|
|
446
|
+
__props__.__dict__["show_outputs"] = None
|
|
619
447
|
super(ResourceMonitor, __self__).__init__(
|
|
620
448
|
'snowflake:index/resourceMonitor:ResourceMonitor',
|
|
621
449
|
resource_name,
|
|
@@ -629,16 +457,14 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
629
457
|
credit_quota: Optional[pulumi.Input[int]] = None,
|
|
630
458
|
end_timestamp: Optional[pulumi.Input[str]] = None,
|
|
631
459
|
frequency: Optional[pulumi.Input[str]] = None,
|
|
460
|
+
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
632
461
|
name: Optional[pulumi.Input[str]] = None,
|
|
633
462
|
notify_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
634
463
|
notify_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
635
|
-
|
|
464
|
+
show_outputs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ResourceMonitorShowOutputArgs', 'ResourceMonitorShowOutputArgsDict']]]]] = None,
|
|
636
465
|
start_timestamp: Optional[pulumi.Input[str]] = None,
|
|
637
466
|
suspend_immediate_trigger: Optional[pulumi.Input[int]] = None,
|
|
638
|
-
|
|
639
|
-
suspend_trigger: Optional[pulumi.Input[int]] = None,
|
|
640
|
-
suspend_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
|
|
641
|
-
warehouses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'ResourceMonitor':
|
|
467
|
+
suspend_trigger: Optional[pulumi.Input[int]] = None) -> 'ResourceMonitor':
|
|
642
468
|
"""
|
|
643
469
|
Get an existing ResourceMonitor resource's state with the given name, id, and optional extra
|
|
644
470
|
properties used to qualify the lookup.
|
|
@@ -646,19 +472,17 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
646
472
|
:param str resource_name: The unique name of the resulting resource.
|
|
647
473
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
648
474
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
649
|
-
:param pulumi.Input[int] credit_quota: The number of credits allocated
|
|
475
|
+
:param pulumi.Input[int] credit_quota: The number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.
|
|
650
476
|
:param pulumi.Input[str] end_timestamp: The date and time when the resource monitor suspends the assigned warehouses.
|
|
651
|
-
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. If you set a frequency for a resource monitor, you must also set
|
|
652
|
-
:param pulumi.Input[str]
|
|
653
|
-
:param pulumi.Input[
|
|
654
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
655
|
-
:param pulumi.Input[
|
|
656
|
-
:param pulumi.Input[
|
|
657
|
-
:param pulumi.Input[
|
|
658
|
-
:param pulumi.Input[
|
|
659
|
-
:param pulumi.Input[int] suspend_trigger:
|
|
660
|
-
:param pulumi.Input[Sequence[pulumi.Input[int]]] suspend_triggers: A list of percentage thresholds at which to suspend all warehouses.
|
|
661
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] warehouses: A list of warehouses to apply the resource monitor to.
|
|
477
|
+
:param pulumi.Input[str] frequency: The frequency interval at which the credit usage resets to 0. Valid values are (case-insensitive): `MONTHLY` | `DAILY` | `WEEKLY` | `YEARLY` | `NEVER`. If you set a `frequency` for a resource monitor, you must also set `start_timestamp`. If you specify `NEVER` for the frequency, the credit usage for the warehouse does not reset. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
478
|
+
:param pulumi.Input[str] fully_qualified_name: Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
479
|
+
:param pulumi.Input[str] name: Identifier for the resource monitor; must be unique for your account. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
|
|
480
|
+
:param pulumi.Input[Sequence[pulumi.Input[int]]] notify_triggers: Specifies a list of percentages of the credit quota. After reaching any of the values the users passed in the notify_users field will be notified (to receive the notification they should have notifications enabled). Values over 100 are supported.
|
|
481
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] notify_users: Specifies the list of users (their identifiers) to receive email notifications on resource monitors.
|
|
482
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['ResourceMonitorShowOutputArgs', 'ResourceMonitorShowOutputArgsDict']]]] show_outputs: Outputs the result of `SHOW RESOURCE MONITORS` for the given resource monitor.
|
|
483
|
+
:param pulumi.Input[str] start_timestamp: The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses. If you set a `start_timestamp` for a resource monitor, you must also set `frequency`. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
484
|
+
:param pulumi.Input[int] suspend_immediate_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses immediately cancel any currently running queries or statements. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
485
|
+
:param pulumi.Input[int] suspend_trigger: Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses while allowing currently running queries to complete will be suspended. No new queries can be executed by the warehouses until the credit quota for the resource monitor is increased. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
662
486
|
"""
|
|
663
487
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
664
488
|
|
|
@@ -667,23 +491,21 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
667
491
|
__props__.__dict__["credit_quota"] = credit_quota
|
|
668
492
|
__props__.__dict__["end_timestamp"] = end_timestamp
|
|
669
493
|
__props__.__dict__["frequency"] = frequency
|
|
494
|
+
__props__.__dict__["fully_qualified_name"] = fully_qualified_name
|
|
670
495
|
__props__.__dict__["name"] = name
|
|
671
496
|
__props__.__dict__["notify_triggers"] = notify_triggers
|
|
672
497
|
__props__.__dict__["notify_users"] = notify_users
|
|
673
|
-
__props__.__dict__["
|
|
498
|
+
__props__.__dict__["show_outputs"] = show_outputs
|
|
674
499
|
__props__.__dict__["start_timestamp"] = start_timestamp
|
|
675
500
|
__props__.__dict__["suspend_immediate_trigger"] = suspend_immediate_trigger
|
|
676
|
-
__props__.__dict__["suspend_immediate_triggers"] = suspend_immediate_triggers
|
|
677
501
|
__props__.__dict__["suspend_trigger"] = suspend_trigger
|
|
678
|
-
__props__.__dict__["suspend_triggers"] = suspend_triggers
|
|
679
|
-
__props__.__dict__["warehouses"] = warehouses
|
|
680
502
|
return ResourceMonitor(resource_name, opts=opts, __props__=__props__)
|
|
681
503
|
|
|
682
504
|
@property
|
|
683
505
|
@pulumi.getter(name="creditQuota")
|
|
684
|
-
def credit_quota(self) -> pulumi.Output[int]:
|
|
506
|
+
def credit_quota(self) -> pulumi.Output[Optional[int]]:
|
|
685
507
|
"""
|
|
686
|
-
The number of credits allocated
|
|
508
|
+
The number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.
|
|
687
509
|
"""
|
|
688
510
|
return pulumi.get(self, "credit_quota")
|
|
689
511
|
|
|
@@ -697,17 +519,25 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
697
519
|
|
|
698
520
|
@property
|
|
699
521
|
@pulumi.getter
|
|
700
|
-
def frequency(self) -> pulumi.Output[str]:
|
|
522
|
+
def frequency(self) -> pulumi.Output[Optional[str]]:
|
|
701
523
|
"""
|
|
702
|
-
The frequency interval at which the credit usage resets to 0. If you set a frequency for a resource monitor, you must also set
|
|
524
|
+
The frequency interval at which the credit usage resets to 0. Valid values are (case-insensitive): `MONTHLY` | `DAILY` | `WEEKLY` | `YEARLY` | `NEVER`. If you set a `frequency` for a resource monitor, you must also set `start_timestamp`. If you specify `NEVER` for the frequency, the credit usage for the warehouse does not reset. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
703
525
|
"""
|
|
704
526
|
return pulumi.get(self, "frequency")
|
|
705
527
|
|
|
528
|
+
@property
|
|
529
|
+
@pulumi.getter(name="fullyQualifiedName")
|
|
530
|
+
def fully_qualified_name(self) -> pulumi.Output[str]:
|
|
531
|
+
"""
|
|
532
|
+
Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
533
|
+
"""
|
|
534
|
+
return pulumi.get(self, "fully_qualified_name")
|
|
535
|
+
|
|
706
536
|
@property
|
|
707
537
|
@pulumi.getter
|
|
708
538
|
def name(self) -> pulumi.Output[str]:
|
|
709
539
|
"""
|
|
710
|
-
Identifier for the resource monitor; must be unique for your account.
|
|
540
|
+
Identifier for the resource monitor; must be unique for your account. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
|
|
711
541
|
"""
|
|
712
542
|
return pulumi.get(self, "name")
|
|
713
543
|
|
|
@@ -715,7 +545,7 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
715
545
|
@pulumi.getter(name="notifyTriggers")
|
|
716
546
|
def notify_triggers(self) -> pulumi.Output[Optional[Sequence[int]]]:
|
|
717
547
|
"""
|
|
718
|
-
|
|
548
|
+
Specifies a list of percentages of the credit quota. After reaching any of the values the users passed in the notify_users field will be notified (to receive the notification they should have notifications enabled). Values over 100 are supported.
|
|
719
549
|
"""
|
|
720
550
|
return pulumi.get(self, "notify_triggers")
|
|
721
551
|
|
|
@@ -723,23 +553,23 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
723
553
|
@pulumi.getter(name="notifyUsers")
|
|
724
554
|
def notify_users(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
725
555
|
"""
|
|
726
|
-
Specifies the list of users to receive email notifications on resource monitors.
|
|
556
|
+
Specifies the list of users (their identifiers) to receive email notifications on resource monitors.
|
|
727
557
|
"""
|
|
728
558
|
return pulumi.get(self, "notify_users")
|
|
729
559
|
|
|
730
560
|
@property
|
|
731
|
-
@pulumi.getter(name="
|
|
732
|
-
def
|
|
561
|
+
@pulumi.getter(name="showOutputs")
|
|
562
|
+
def show_outputs(self) -> pulumi.Output[Sequence['outputs.ResourceMonitorShowOutput']]:
|
|
733
563
|
"""
|
|
734
|
-
|
|
564
|
+
Outputs the result of `SHOW RESOURCE MONITORS` for the given resource monitor.
|
|
735
565
|
"""
|
|
736
|
-
return pulumi.get(self, "
|
|
566
|
+
return pulumi.get(self, "show_outputs")
|
|
737
567
|
|
|
738
568
|
@property
|
|
739
569
|
@pulumi.getter(name="startTimestamp")
|
|
740
|
-
def start_timestamp(self) -> pulumi.Output[str]:
|
|
570
|
+
def start_timestamp(self) -> pulumi.Output[Optional[str]]:
|
|
741
571
|
"""
|
|
742
|
-
The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses.
|
|
572
|
+
The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses. If you set a `start_timestamp` for a resource monitor, you must also set `frequency`. After removing this field from the config, the previously set value will be preserved on the Snowflake side, not the default value. That's due to Snowflake limitation and the lack of unset functionality for this parameter.
|
|
743
573
|
"""
|
|
744
574
|
return pulumi.get(self, "start_timestamp")
|
|
745
575
|
|
|
@@ -747,41 +577,15 @@ class ResourceMonitor(pulumi.CustomResource):
|
|
|
747
577
|
@pulumi.getter(name="suspendImmediateTrigger")
|
|
748
578
|
def suspend_immediate_trigger(self) -> pulumi.Output[Optional[int]]:
|
|
749
579
|
"""
|
|
750
|
-
|
|
580
|
+
Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses immediately cancel any currently running queries or statements. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
751
581
|
"""
|
|
752
582
|
return pulumi.get(self, "suspend_immediate_trigger")
|
|
753
583
|
|
|
754
|
-
@property
|
|
755
|
-
@pulumi.getter(name="suspendImmediateTriggers")
|
|
756
|
-
@_utilities.deprecated("""Use suspend_immediate_trigger instead""")
|
|
757
|
-
def suspend_immediate_triggers(self) -> pulumi.Output[Optional[Sequence[int]]]:
|
|
758
|
-
"""
|
|
759
|
-
A list of percentage thresholds at which to suspend all warehouses.
|
|
760
|
-
"""
|
|
761
|
-
return pulumi.get(self, "suspend_immediate_triggers")
|
|
762
|
-
|
|
763
584
|
@property
|
|
764
585
|
@pulumi.getter(name="suspendTrigger")
|
|
765
586
|
def suspend_trigger(self) -> pulumi.Output[Optional[int]]:
|
|
766
587
|
"""
|
|
767
|
-
|
|
588
|
+
Represents a numeric value specified as a percentage of the credit quota. Values over 100 are supported. After reaching this value, all assigned warehouses while allowing currently running queries to complete will be suspended. No new queries can be executed by the warehouses until the credit quota for the resource monitor is increased. In addition, this action sends a notification to all users who have enabled notifications for themselves.
|
|
768
589
|
"""
|
|
769
590
|
return pulumi.get(self, "suspend_trigger")
|
|
770
591
|
|
|
771
|
-
@property
|
|
772
|
-
@pulumi.getter(name="suspendTriggers")
|
|
773
|
-
@_utilities.deprecated("""Use suspend_trigger instead""")
|
|
774
|
-
def suspend_triggers(self) -> pulumi.Output[Optional[Sequence[int]]]:
|
|
775
|
-
"""
|
|
776
|
-
A list of percentage thresholds at which to suspend all warehouses.
|
|
777
|
-
"""
|
|
778
|
-
return pulumi.get(self, "suspend_triggers")
|
|
779
|
-
|
|
780
|
-
@property
|
|
781
|
-
@pulumi.getter
|
|
782
|
-
def warehouses(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
783
|
-
"""
|
|
784
|
-
A list of warehouses to apply the resource monitor to.
|
|
785
|
-
"""
|
|
786
|
-
return pulumi.get(self, "warehouses")
|
|
787
|
-
|