pulumi-gcp 8.23.0a1742538920__py3-none-any.whl → 8.24.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.
Files changed (106) hide show
  1. pulumi_gcp/__init__.py +59 -0
  2. pulumi_gcp/alloydb/_inputs.py +27 -1
  3. pulumi_gcp/alloydb/outputs.py +33 -2
  4. pulumi_gcp/applicationintegration/client.py +18 -24
  5. pulumi_gcp/bigquery/_inputs.py +178 -0
  6. pulumi_gcp/bigquery/outputs.py +127 -0
  7. pulumi_gcp/bigquery/reservation.py +189 -1
  8. pulumi_gcp/bigquery/table.py +61 -0
  9. pulumi_gcp/bigqueryanalyticshub/listing_subscription.py +11 -7
  10. pulumi_gcp/bigtable/table.py +7 -7
  11. pulumi_gcp/chronicle/data_access_label.py +16 -0
  12. pulumi_gcp/clouddeploy/_inputs.py +20 -0
  13. pulumi_gcp/clouddeploy/outputs.py +15 -1
  14. pulumi_gcp/cloudfunctions/function.py +11 -11
  15. pulumi_gcp/cloudfunctionsv2/function.py +24 -24
  16. pulumi_gcp/cloudidentity/get_group_transitive_memberships.py +41 -2
  17. pulumi_gcp/cloudidentity/outputs.py +18 -38
  18. pulumi_gcp/cloudrunv2/service.py +14 -14
  19. pulumi_gcp/compute/__init__.py +1 -0
  20. pulumi_gcp/compute/_inputs.py +616 -18
  21. pulumi_gcp/compute/firewall_policy.py +20 -0
  22. pulumi_gcp/compute/get_images.py +172 -0
  23. pulumi_gcp/compute/get_resource_policy.py +15 -4
  24. pulumi_gcp/compute/image.py +54 -0
  25. pulumi_gcp/compute/interconnect.py +14 -7
  26. pulumi_gcp/compute/outputs.py +710 -18
  27. pulumi_gcp/compute/region_network_endpoint_group.py +2 -2
  28. pulumi_gcp/compute/resource_policy.py +169 -3
  29. pulumi_gcp/compute/router_route_policy.py +16 -0
  30. pulumi_gcp/compute/subnetwork.py +109 -1
  31. pulumi_gcp/compute/target_https_proxy.py +7 -7
  32. pulumi_gcp/config/__init__.pyi +8 -0
  33. pulumi_gcp/config/vars.py +16 -0
  34. pulumi_gcp/container/_inputs.py +265 -4
  35. pulumi_gcp/container/cluster.py +54 -0
  36. pulumi_gcp/container/get_attached_versions.py +2 -2
  37. pulumi_gcp/container/get_cluster.py +12 -1
  38. pulumi_gcp/container/outputs.py +301 -6
  39. pulumi_gcp/dataform/repository.py +49 -0
  40. pulumi_gcp/dataproc/_inputs.py +23 -0
  41. pulumi_gcp/dataproc/get_metastore_service.py +26 -4
  42. pulumi_gcp/dataproc/metastore_federation.py +56 -0
  43. pulumi_gcp/dataproc/metastore_service.py +58 -2
  44. pulumi_gcp/dataproc/outputs.py +27 -0
  45. pulumi_gcp/eventarc/__init__.py +1 -0
  46. pulumi_gcp/eventarc/_inputs.py +1758 -0
  47. pulumi_gcp/eventarc/outputs.py +1337 -0
  48. pulumi_gcp/eventarc/pipeline.py +1596 -0
  49. pulumi_gcp/firebase/__init__.py +1 -0
  50. pulumi_gcp/firebase/_inputs.py +154 -0
  51. pulumi_gcp/firebase/app_hosting_backend.py +1303 -0
  52. pulumi_gcp/firebase/hosting_version.py +2 -2
  53. pulumi_gcp/firebase/outputs.py +127 -0
  54. pulumi_gcp/kms/get_key_rings.py +39 -2
  55. pulumi_gcp/lustre/__init__.py +8 -0
  56. pulumi_gcp/lustre/instance.py +983 -0
  57. pulumi_gcp/managedkafka/__init__.py +2 -0
  58. pulumi_gcp/managedkafka/_inputs.py +263 -0
  59. pulumi_gcp/managedkafka/connect_cluster.py +795 -0
  60. pulumi_gcp/managedkafka/connector.py +695 -0
  61. pulumi_gcp/managedkafka/outputs.py +248 -0
  62. pulumi_gcp/memorystore/_inputs.py +419 -0
  63. pulumi_gcp/memorystore/get_instance.py +23 -1
  64. pulumi_gcp/memorystore/instance.py +144 -14
  65. pulumi_gcp/memorystore/outputs.py +544 -0
  66. pulumi_gcp/monitoring/uptime_check_config.py +2 -2
  67. pulumi_gcp/networkmanagement/_inputs.py +422 -91
  68. pulumi_gcp/networkmanagement/connectivity_test.py +233 -211
  69. pulumi_gcp/networkmanagement/outputs.py +280 -61
  70. pulumi_gcp/networksecurity/_inputs.py +1277 -242
  71. pulumi_gcp/networksecurity/gateway_security_policy.py +0 -7
  72. pulumi_gcp/networksecurity/intercept_deployment_group.py +44 -16
  73. pulumi_gcp/networksecurity/intercept_endpoint_group.py +90 -36
  74. pulumi_gcp/networksecurity/intercept_endpoint_group_association.py +53 -8
  75. pulumi_gcp/networksecurity/mirroring_deployment.py +22 -0
  76. pulumi_gcp/networksecurity/mirroring_deployment_group.py +20 -0
  77. pulumi_gcp/networksecurity/mirroring_endpoint_group.py +24 -0
  78. pulumi_gcp/networksecurity/mirroring_endpoint_group_association.py +28 -0
  79. pulumi_gcp/networksecurity/outputs.py +723 -8
  80. pulumi_gcp/networksecurity/tls_inspection_policy.py +14 -0
  81. pulumi_gcp/networkservices/gateway.py +242 -120
  82. pulumi_gcp/organizations/__init__.py +1 -0
  83. pulumi_gcp/organizations/get_iam_custom_role.py +198 -0
  84. pulumi_gcp/osconfig/__init__.py +1 -0
  85. pulumi_gcp/osconfig/_inputs.py +5413 -0
  86. pulumi_gcp/osconfig/outputs.py +3962 -0
  87. pulumi_gcp/osconfig/v2_policy_orchestrator.py +971 -0
  88. pulumi_gcp/projects/__init__.py +2 -0
  89. pulumi_gcp/projects/get_iam_custom_role.py +198 -0
  90. pulumi_gcp/projects/get_iam_custom_roles.py +164 -0
  91. pulumi_gcp/projects/outputs.py +96 -0
  92. pulumi_gcp/provider.py +80 -0
  93. pulumi_gcp/pulumi-plugin.json +1 -1
  94. pulumi_gcp/servicenetworking/peered_dns_domain.py +4 -0
  95. pulumi_gcp/sql/outputs.py +8 -8
  96. pulumi_gcp/storage/__init__.py +2 -0
  97. pulumi_gcp/storage/_inputs.py +740 -6
  98. pulumi_gcp/storage/control_project_intelligence_config.py +366 -0
  99. pulumi_gcp/storage/get_control_project_intelligence_config.py +130 -0
  100. pulumi_gcp/storage/insights_report_config.py +121 -20
  101. pulumi_gcp/storage/outputs.py +723 -4
  102. pulumi_gcp/workflows/workflow.py +75 -7
  103. {pulumi_gcp-8.23.0a1742538920.dist-info → pulumi_gcp-8.24.0.dist-info}/METADATA +1 -1
  104. {pulumi_gcp-8.23.0a1742538920.dist-info → pulumi_gcp-8.24.0.dist-info}/RECORD +106 -93
  105. {pulumi_gcp-8.23.0a1742538920.dist-info → pulumi_gcp-8.24.0.dist-info}/WHEEL +1 -1
  106. {pulumi_gcp-8.23.0a1742538920.dist-info → pulumi_gcp-8.24.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,695 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from .. import _utilities
16
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = ['ConnectorArgs', 'Connector']
20
+
21
+ @pulumi.input_type
22
+ class ConnectorArgs:
23
+ def __init__(__self__, *,
24
+ connect_cluster: pulumi.Input[str],
25
+ connector_id: pulumi.Input[str],
26
+ location: pulumi.Input[str],
27
+ configs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
28
+ project: Optional[pulumi.Input[str]] = None,
29
+ task_restart_policy: Optional[pulumi.Input['ConnectorTaskRestartPolicyArgs']] = None):
30
+ """
31
+ The set of arguments for constructing a Connector resource.
32
+ :param pulumi.Input[str] connect_cluster: The connect cluster name.
33
+ :param pulumi.Input[str] connector_id: The ID to use for the connector, which will become the final component of the connector's name. This value is structured like: `my-connector-id`.
34
+
35
+
36
+ - - -
37
+ :param pulumi.Input[str] location: ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
38
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] configs: Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
39
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
40
+ If it is not provided, the provider project is used.
41
+ :param pulumi.Input['ConnectorTaskRestartPolicyArgs'] task_restart_policy: A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won't be restarted.
42
+ Structure is documented below.
43
+ """
44
+ pulumi.set(__self__, "connect_cluster", connect_cluster)
45
+ pulumi.set(__self__, "connector_id", connector_id)
46
+ pulumi.set(__self__, "location", location)
47
+ if configs is not None:
48
+ pulumi.set(__self__, "configs", configs)
49
+ if project is not None:
50
+ pulumi.set(__self__, "project", project)
51
+ if task_restart_policy is not None:
52
+ pulumi.set(__self__, "task_restart_policy", task_restart_policy)
53
+
54
+ @property
55
+ @pulumi.getter(name="connectCluster")
56
+ def connect_cluster(self) -> pulumi.Input[str]:
57
+ """
58
+ The connect cluster name.
59
+ """
60
+ return pulumi.get(self, "connect_cluster")
61
+
62
+ @connect_cluster.setter
63
+ def connect_cluster(self, value: pulumi.Input[str]):
64
+ pulumi.set(self, "connect_cluster", value)
65
+
66
+ @property
67
+ @pulumi.getter(name="connectorId")
68
+ def connector_id(self) -> pulumi.Input[str]:
69
+ """
70
+ The ID to use for the connector, which will become the final component of the connector's name. This value is structured like: `my-connector-id`.
71
+
72
+
73
+ - - -
74
+ """
75
+ return pulumi.get(self, "connector_id")
76
+
77
+ @connector_id.setter
78
+ def connector_id(self, value: pulumi.Input[str]):
79
+ pulumi.set(self, "connector_id", value)
80
+
81
+ @property
82
+ @pulumi.getter
83
+ def location(self) -> pulumi.Input[str]:
84
+ """
85
+ ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
86
+ """
87
+ return pulumi.get(self, "location")
88
+
89
+ @location.setter
90
+ def location(self, value: pulumi.Input[str]):
91
+ pulumi.set(self, "location", value)
92
+
93
+ @property
94
+ @pulumi.getter
95
+ def configs(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
96
+ """
97
+ Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
98
+ """
99
+ return pulumi.get(self, "configs")
100
+
101
+ @configs.setter
102
+ def configs(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
103
+ pulumi.set(self, "configs", value)
104
+
105
+ @property
106
+ @pulumi.getter
107
+ def project(self) -> Optional[pulumi.Input[str]]:
108
+ """
109
+ The ID of the project in which the resource belongs.
110
+ If it is not provided, the provider project is used.
111
+ """
112
+ return pulumi.get(self, "project")
113
+
114
+ @project.setter
115
+ def project(self, value: Optional[pulumi.Input[str]]):
116
+ pulumi.set(self, "project", value)
117
+
118
+ @property
119
+ @pulumi.getter(name="taskRestartPolicy")
120
+ def task_restart_policy(self) -> Optional[pulumi.Input['ConnectorTaskRestartPolicyArgs']]:
121
+ """
122
+ A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won't be restarted.
123
+ Structure is documented below.
124
+ """
125
+ return pulumi.get(self, "task_restart_policy")
126
+
127
+ @task_restart_policy.setter
128
+ def task_restart_policy(self, value: Optional[pulumi.Input['ConnectorTaskRestartPolicyArgs']]):
129
+ pulumi.set(self, "task_restart_policy", value)
130
+
131
+
132
+ @pulumi.input_type
133
+ class _ConnectorState:
134
+ def __init__(__self__, *,
135
+ configs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
136
+ connect_cluster: Optional[pulumi.Input[str]] = None,
137
+ connector_id: Optional[pulumi.Input[str]] = None,
138
+ location: Optional[pulumi.Input[str]] = None,
139
+ name: Optional[pulumi.Input[str]] = None,
140
+ project: Optional[pulumi.Input[str]] = None,
141
+ state: Optional[pulumi.Input[str]] = None,
142
+ task_restart_policy: Optional[pulumi.Input['ConnectorTaskRestartPolicyArgs']] = None):
143
+ """
144
+ Input properties used for looking up and filtering Connector resources.
145
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] configs: Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
146
+ :param pulumi.Input[str] connect_cluster: The connect cluster name.
147
+ :param pulumi.Input[str] connector_id: The ID to use for the connector, which will become the final component of the connector's name. This value is structured like: `my-connector-id`.
148
+
149
+
150
+ - - -
151
+ :param pulumi.Input[str] location: ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
152
+ :param pulumi.Input[str] name: The name of the connector. The `connector` segment is used when connecting directly to the connect cluster. Structured like: `projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER/connectors/CONNECTOR_ID`.
153
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
154
+ If it is not provided, the provider project is used.
155
+ :param pulumi.Input[str] state: The current state of the connect. Possible values: `STATE_UNSPECIFIED`, `UNASSIGNED`, `RUNNING`, `PAUSED`, `FAILED`, `RESTARTING`, and `STOPPED`.
156
+ :param pulumi.Input['ConnectorTaskRestartPolicyArgs'] task_restart_policy: A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won't be restarted.
157
+ Structure is documented below.
158
+ """
159
+ if configs is not None:
160
+ pulumi.set(__self__, "configs", configs)
161
+ if connect_cluster is not None:
162
+ pulumi.set(__self__, "connect_cluster", connect_cluster)
163
+ if connector_id is not None:
164
+ pulumi.set(__self__, "connector_id", connector_id)
165
+ if location is not None:
166
+ pulumi.set(__self__, "location", location)
167
+ if name is not None:
168
+ pulumi.set(__self__, "name", name)
169
+ if project is not None:
170
+ pulumi.set(__self__, "project", project)
171
+ if state is not None:
172
+ pulumi.set(__self__, "state", state)
173
+ if task_restart_policy is not None:
174
+ pulumi.set(__self__, "task_restart_policy", task_restart_policy)
175
+
176
+ @property
177
+ @pulumi.getter
178
+ def configs(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
179
+ """
180
+ Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
181
+ """
182
+ return pulumi.get(self, "configs")
183
+
184
+ @configs.setter
185
+ def configs(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
186
+ pulumi.set(self, "configs", value)
187
+
188
+ @property
189
+ @pulumi.getter(name="connectCluster")
190
+ def connect_cluster(self) -> Optional[pulumi.Input[str]]:
191
+ """
192
+ The connect cluster name.
193
+ """
194
+ return pulumi.get(self, "connect_cluster")
195
+
196
+ @connect_cluster.setter
197
+ def connect_cluster(self, value: Optional[pulumi.Input[str]]):
198
+ pulumi.set(self, "connect_cluster", value)
199
+
200
+ @property
201
+ @pulumi.getter(name="connectorId")
202
+ def connector_id(self) -> Optional[pulumi.Input[str]]:
203
+ """
204
+ The ID to use for the connector, which will become the final component of the connector's name. This value is structured like: `my-connector-id`.
205
+
206
+
207
+ - - -
208
+ """
209
+ return pulumi.get(self, "connector_id")
210
+
211
+ @connector_id.setter
212
+ def connector_id(self, value: Optional[pulumi.Input[str]]):
213
+ pulumi.set(self, "connector_id", value)
214
+
215
+ @property
216
+ @pulumi.getter
217
+ def location(self) -> Optional[pulumi.Input[str]]:
218
+ """
219
+ ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
220
+ """
221
+ return pulumi.get(self, "location")
222
+
223
+ @location.setter
224
+ def location(self, value: Optional[pulumi.Input[str]]):
225
+ pulumi.set(self, "location", value)
226
+
227
+ @property
228
+ @pulumi.getter
229
+ def name(self) -> Optional[pulumi.Input[str]]:
230
+ """
231
+ The name of the connector. The `connector` segment is used when connecting directly to the connect cluster. Structured like: `projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER/connectors/CONNECTOR_ID`.
232
+ """
233
+ return pulumi.get(self, "name")
234
+
235
+ @name.setter
236
+ def name(self, value: Optional[pulumi.Input[str]]):
237
+ pulumi.set(self, "name", value)
238
+
239
+ @property
240
+ @pulumi.getter
241
+ def project(self) -> Optional[pulumi.Input[str]]:
242
+ """
243
+ The ID of the project in which the resource belongs.
244
+ If it is not provided, the provider project is used.
245
+ """
246
+ return pulumi.get(self, "project")
247
+
248
+ @project.setter
249
+ def project(self, value: Optional[pulumi.Input[str]]):
250
+ pulumi.set(self, "project", value)
251
+
252
+ @property
253
+ @pulumi.getter
254
+ def state(self) -> Optional[pulumi.Input[str]]:
255
+ """
256
+ The current state of the connect. Possible values: `STATE_UNSPECIFIED`, `UNASSIGNED`, `RUNNING`, `PAUSED`, `FAILED`, `RESTARTING`, and `STOPPED`.
257
+ """
258
+ return pulumi.get(self, "state")
259
+
260
+ @state.setter
261
+ def state(self, value: Optional[pulumi.Input[str]]):
262
+ pulumi.set(self, "state", value)
263
+
264
+ @property
265
+ @pulumi.getter(name="taskRestartPolicy")
266
+ def task_restart_policy(self) -> Optional[pulumi.Input['ConnectorTaskRestartPolicyArgs']]:
267
+ """
268
+ A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won't be restarted.
269
+ Structure is documented below.
270
+ """
271
+ return pulumi.get(self, "task_restart_policy")
272
+
273
+ @task_restart_policy.setter
274
+ def task_restart_policy(self, value: Optional[pulumi.Input['ConnectorTaskRestartPolicyArgs']]):
275
+ pulumi.set(self, "task_restart_policy", value)
276
+
277
+
278
+ class Connector(pulumi.CustomResource):
279
+ @overload
280
+ def __init__(__self__,
281
+ resource_name: str,
282
+ opts: Optional[pulumi.ResourceOptions] = None,
283
+ configs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
284
+ connect_cluster: Optional[pulumi.Input[str]] = None,
285
+ connector_id: Optional[pulumi.Input[str]] = None,
286
+ location: Optional[pulumi.Input[str]] = None,
287
+ project: Optional[pulumi.Input[str]] = None,
288
+ task_restart_policy: Optional[pulumi.Input[Union['ConnectorTaskRestartPolicyArgs', 'ConnectorTaskRestartPolicyArgsDict']]] = None,
289
+ __props__=None):
290
+ """
291
+ ## Example Usage
292
+
293
+ ### Managedkafka Connector Basic
294
+
295
+ ```python
296
+ import pulumi
297
+ import pulumi_gcp as gcp
298
+
299
+ mkc_network = gcp.compute.Network("mkc_network",
300
+ name="my-network-0",
301
+ auto_create_subnetworks=False)
302
+ mkc_subnet = gcp.compute.Subnetwork("mkc_subnet",
303
+ name="my-subnetwork-0",
304
+ ip_cidr_range="10.4.0.0/16",
305
+ region="us-central1",
306
+ network=mkc_network.id)
307
+ mkc_additional_subnet = gcp.compute.Subnetwork("mkc_additional_subnet",
308
+ name="my-additional-subnetwork-0",
309
+ ip_cidr_range="10.5.0.0/16",
310
+ region="us-central1",
311
+ network=mkc_network.id)
312
+ cps_topic = gcp.pubsub.Topic("cps_topic",
313
+ name="my-cps-topic",
314
+ message_retention_duration="86600s")
315
+ project = gcp.organizations.get_project()
316
+ gmk_cluster = gcp.managedkafka.Cluster("gmk_cluster",
317
+ cluster_id="my-cluster",
318
+ location="us-central1",
319
+ capacity_config={
320
+ "vcpu_count": "3",
321
+ "memory_bytes": "3221225472",
322
+ },
323
+ gcp_config={
324
+ "access_config": {
325
+ "network_configs": [{
326
+ "subnet": mkc_subnet.id.apply(lambda id: f"projects/{project.project_id}/regions/us-central1/subnetworks/{id}"),
327
+ }],
328
+ },
329
+ })
330
+ gmk_topic = gcp.managedkafka.Topic("gmk_topic",
331
+ topic_id="my-topic",
332
+ cluster=gmk_cluster.cluster_id,
333
+ location="us-central1",
334
+ partition_count=2,
335
+ replication_factor=3)
336
+ mkc_cluster = gcp.managedkafka.ConnectCluster("mkc_cluster",
337
+ connect_cluster_id="my-connect-cluster",
338
+ kafka_cluster=gmk_cluster.cluster_id.apply(lambda cluster_id: f"projects/{project.project_id}/locations/us-central1/clusters/{cluster_id}"),
339
+ location="us-central1",
340
+ capacity_config={
341
+ "vcpu_count": "12",
342
+ "memory_bytes": "21474836480",
343
+ },
344
+ gcp_config={
345
+ "access_config": {
346
+ "network_configs": [{
347
+ "primary_subnet": mkc_subnet.id.apply(lambda id: f"projects/{project.project_id}/regions/us-central1/subnetworks/{id}"),
348
+ "additional_subnets": [mkc_additional_subnet.id],
349
+ "dns_domain_names": [gmk_cluster.cluster_id.apply(lambda cluster_id: f"{cluster_id}.us-central1.managedkafka-staging.{project.project_id}.cloud-staging.goog")],
350
+ }],
351
+ },
352
+ },
353
+ labels={
354
+ "key": "value",
355
+ })
356
+ example = gcp.managedkafka.Connector("example",
357
+ connector_id="my-connector",
358
+ connect_cluster=mkc_cluster.connect_cluster_id,
359
+ location="us-central1",
360
+ configs={
361
+ "connector.class": "com.google.pubsub.kafka.sink.CloudPubSubSinkConnector",
362
+ "name": "my-connector",
363
+ "tasks.max": "1",
364
+ "topics": gmk_topic.topic_id,
365
+ "cps.topic": cps_topic.name,
366
+ "cps.project": project.project_id,
367
+ "value.converter": "org.apache.kafka.connect.storage.StringConverter",
368
+ "key.converter": "org.apache.kafka.connect.storage.StringConverter",
369
+ },
370
+ task_restart_policy={
371
+ "minimum_backoff": "60s",
372
+ "maximum_backoff": "1800s",
373
+ })
374
+ ```
375
+
376
+ ## Import
377
+
378
+ Connector can be imported using any of these accepted formats:
379
+
380
+ * `projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster}}/connectors/{{connector_id}}`
381
+
382
+ * `{{project}}/{{location}}/{{connect_cluster}}/{{connector_id}}`
383
+
384
+ * `{{location}}/{{connect_cluster}}/{{connector_id}}`
385
+
386
+ When using the `pulumi import` command, Connector can be imported using one of the formats above. For example:
387
+
388
+ ```sh
389
+ $ pulumi import gcp:managedkafka/connector:Connector default projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster}}/connectors/{{connector_id}}
390
+ ```
391
+
392
+ ```sh
393
+ $ pulumi import gcp:managedkafka/connector:Connector default {{project}}/{{location}}/{{connect_cluster}}/{{connector_id}}
394
+ ```
395
+
396
+ ```sh
397
+ $ pulumi import gcp:managedkafka/connector:Connector default {{location}}/{{connect_cluster}}/{{connector_id}}
398
+ ```
399
+
400
+ :param str resource_name: The name of the resource.
401
+ :param pulumi.ResourceOptions opts: Options for the resource.
402
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] configs: Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
403
+ :param pulumi.Input[str] connect_cluster: The connect cluster name.
404
+ :param pulumi.Input[str] connector_id: The ID to use for the connector, which will become the final component of the connector's name. This value is structured like: `my-connector-id`.
405
+
406
+
407
+ - - -
408
+ :param pulumi.Input[str] location: ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
409
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
410
+ If it is not provided, the provider project is used.
411
+ :param pulumi.Input[Union['ConnectorTaskRestartPolicyArgs', 'ConnectorTaskRestartPolicyArgsDict']] task_restart_policy: A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won't be restarted.
412
+ Structure is documented below.
413
+ """
414
+ ...
415
+ @overload
416
+ def __init__(__self__,
417
+ resource_name: str,
418
+ args: ConnectorArgs,
419
+ opts: Optional[pulumi.ResourceOptions] = None):
420
+ """
421
+ ## Example Usage
422
+
423
+ ### Managedkafka Connector Basic
424
+
425
+ ```python
426
+ import pulumi
427
+ import pulumi_gcp as gcp
428
+
429
+ mkc_network = gcp.compute.Network("mkc_network",
430
+ name="my-network-0",
431
+ auto_create_subnetworks=False)
432
+ mkc_subnet = gcp.compute.Subnetwork("mkc_subnet",
433
+ name="my-subnetwork-0",
434
+ ip_cidr_range="10.4.0.0/16",
435
+ region="us-central1",
436
+ network=mkc_network.id)
437
+ mkc_additional_subnet = gcp.compute.Subnetwork("mkc_additional_subnet",
438
+ name="my-additional-subnetwork-0",
439
+ ip_cidr_range="10.5.0.0/16",
440
+ region="us-central1",
441
+ network=mkc_network.id)
442
+ cps_topic = gcp.pubsub.Topic("cps_topic",
443
+ name="my-cps-topic",
444
+ message_retention_duration="86600s")
445
+ project = gcp.organizations.get_project()
446
+ gmk_cluster = gcp.managedkafka.Cluster("gmk_cluster",
447
+ cluster_id="my-cluster",
448
+ location="us-central1",
449
+ capacity_config={
450
+ "vcpu_count": "3",
451
+ "memory_bytes": "3221225472",
452
+ },
453
+ gcp_config={
454
+ "access_config": {
455
+ "network_configs": [{
456
+ "subnet": mkc_subnet.id.apply(lambda id: f"projects/{project.project_id}/regions/us-central1/subnetworks/{id}"),
457
+ }],
458
+ },
459
+ })
460
+ gmk_topic = gcp.managedkafka.Topic("gmk_topic",
461
+ topic_id="my-topic",
462
+ cluster=gmk_cluster.cluster_id,
463
+ location="us-central1",
464
+ partition_count=2,
465
+ replication_factor=3)
466
+ mkc_cluster = gcp.managedkafka.ConnectCluster("mkc_cluster",
467
+ connect_cluster_id="my-connect-cluster",
468
+ kafka_cluster=gmk_cluster.cluster_id.apply(lambda cluster_id: f"projects/{project.project_id}/locations/us-central1/clusters/{cluster_id}"),
469
+ location="us-central1",
470
+ capacity_config={
471
+ "vcpu_count": "12",
472
+ "memory_bytes": "21474836480",
473
+ },
474
+ gcp_config={
475
+ "access_config": {
476
+ "network_configs": [{
477
+ "primary_subnet": mkc_subnet.id.apply(lambda id: f"projects/{project.project_id}/regions/us-central1/subnetworks/{id}"),
478
+ "additional_subnets": [mkc_additional_subnet.id],
479
+ "dns_domain_names": [gmk_cluster.cluster_id.apply(lambda cluster_id: f"{cluster_id}.us-central1.managedkafka-staging.{project.project_id}.cloud-staging.goog")],
480
+ }],
481
+ },
482
+ },
483
+ labels={
484
+ "key": "value",
485
+ })
486
+ example = gcp.managedkafka.Connector("example",
487
+ connector_id="my-connector",
488
+ connect_cluster=mkc_cluster.connect_cluster_id,
489
+ location="us-central1",
490
+ configs={
491
+ "connector.class": "com.google.pubsub.kafka.sink.CloudPubSubSinkConnector",
492
+ "name": "my-connector",
493
+ "tasks.max": "1",
494
+ "topics": gmk_topic.topic_id,
495
+ "cps.topic": cps_topic.name,
496
+ "cps.project": project.project_id,
497
+ "value.converter": "org.apache.kafka.connect.storage.StringConverter",
498
+ "key.converter": "org.apache.kafka.connect.storage.StringConverter",
499
+ },
500
+ task_restart_policy={
501
+ "minimum_backoff": "60s",
502
+ "maximum_backoff": "1800s",
503
+ })
504
+ ```
505
+
506
+ ## Import
507
+
508
+ Connector can be imported using any of these accepted formats:
509
+
510
+ * `projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster}}/connectors/{{connector_id}}`
511
+
512
+ * `{{project}}/{{location}}/{{connect_cluster}}/{{connector_id}}`
513
+
514
+ * `{{location}}/{{connect_cluster}}/{{connector_id}}`
515
+
516
+ When using the `pulumi import` command, Connector can be imported using one of the formats above. For example:
517
+
518
+ ```sh
519
+ $ pulumi import gcp:managedkafka/connector:Connector default projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster}}/connectors/{{connector_id}}
520
+ ```
521
+
522
+ ```sh
523
+ $ pulumi import gcp:managedkafka/connector:Connector default {{project}}/{{location}}/{{connect_cluster}}/{{connector_id}}
524
+ ```
525
+
526
+ ```sh
527
+ $ pulumi import gcp:managedkafka/connector:Connector default {{location}}/{{connect_cluster}}/{{connector_id}}
528
+ ```
529
+
530
+ :param str resource_name: The name of the resource.
531
+ :param ConnectorArgs args: The arguments to use to populate this resource's properties.
532
+ :param pulumi.ResourceOptions opts: Options for the resource.
533
+ """
534
+ ...
535
+ def __init__(__self__, resource_name: str, *args, **kwargs):
536
+ resource_args, opts = _utilities.get_resource_args_opts(ConnectorArgs, pulumi.ResourceOptions, *args, **kwargs)
537
+ if resource_args is not None:
538
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
539
+ else:
540
+ __self__._internal_init(resource_name, *args, **kwargs)
541
+
542
+ def _internal_init(__self__,
543
+ resource_name: str,
544
+ opts: Optional[pulumi.ResourceOptions] = None,
545
+ configs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
546
+ connect_cluster: Optional[pulumi.Input[str]] = None,
547
+ connector_id: Optional[pulumi.Input[str]] = None,
548
+ location: Optional[pulumi.Input[str]] = None,
549
+ project: Optional[pulumi.Input[str]] = None,
550
+ task_restart_policy: Optional[pulumi.Input[Union['ConnectorTaskRestartPolicyArgs', 'ConnectorTaskRestartPolicyArgsDict']]] = None,
551
+ __props__=None):
552
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
553
+ if not isinstance(opts, pulumi.ResourceOptions):
554
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
555
+ if opts.id is None:
556
+ if __props__ is not None:
557
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
558
+ __props__ = ConnectorArgs.__new__(ConnectorArgs)
559
+
560
+ __props__.__dict__["configs"] = configs
561
+ if connect_cluster is None and not opts.urn:
562
+ raise TypeError("Missing required property 'connect_cluster'")
563
+ __props__.__dict__["connect_cluster"] = connect_cluster
564
+ if connector_id is None and not opts.urn:
565
+ raise TypeError("Missing required property 'connector_id'")
566
+ __props__.__dict__["connector_id"] = connector_id
567
+ if location is None and not opts.urn:
568
+ raise TypeError("Missing required property 'location'")
569
+ __props__.__dict__["location"] = location
570
+ __props__.__dict__["project"] = project
571
+ __props__.__dict__["task_restart_policy"] = task_restart_policy
572
+ __props__.__dict__["name"] = None
573
+ __props__.__dict__["state"] = None
574
+ super(Connector, __self__).__init__(
575
+ 'gcp:managedkafka/connector:Connector',
576
+ resource_name,
577
+ __props__,
578
+ opts)
579
+
580
+ @staticmethod
581
+ def get(resource_name: str,
582
+ id: pulumi.Input[str],
583
+ opts: Optional[pulumi.ResourceOptions] = None,
584
+ configs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
585
+ connect_cluster: Optional[pulumi.Input[str]] = None,
586
+ connector_id: Optional[pulumi.Input[str]] = None,
587
+ location: Optional[pulumi.Input[str]] = None,
588
+ name: Optional[pulumi.Input[str]] = None,
589
+ project: Optional[pulumi.Input[str]] = None,
590
+ state: Optional[pulumi.Input[str]] = None,
591
+ task_restart_policy: Optional[pulumi.Input[Union['ConnectorTaskRestartPolicyArgs', 'ConnectorTaskRestartPolicyArgsDict']]] = None) -> 'Connector':
592
+ """
593
+ Get an existing Connector resource's state with the given name, id, and optional extra
594
+ properties used to qualify the lookup.
595
+
596
+ :param str resource_name: The unique name of the resulting resource.
597
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
598
+ :param pulumi.ResourceOptions opts: Options for the resource.
599
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] configs: Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
600
+ :param pulumi.Input[str] connect_cluster: The connect cluster name.
601
+ :param pulumi.Input[str] connector_id: The ID to use for the connector, which will become the final component of the connector's name. This value is structured like: `my-connector-id`.
602
+
603
+
604
+ - - -
605
+ :param pulumi.Input[str] location: ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
606
+ :param pulumi.Input[str] name: The name of the connector. The `connector` segment is used when connecting directly to the connect cluster. Structured like: `projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER/connectors/CONNECTOR_ID`.
607
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
608
+ If it is not provided, the provider project is used.
609
+ :param pulumi.Input[str] state: The current state of the connect. Possible values: `STATE_UNSPECIFIED`, `UNASSIGNED`, `RUNNING`, `PAUSED`, `FAILED`, `RESTARTING`, and `STOPPED`.
610
+ :param pulumi.Input[Union['ConnectorTaskRestartPolicyArgs', 'ConnectorTaskRestartPolicyArgsDict']] task_restart_policy: A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won't be restarted.
611
+ Structure is documented below.
612
+ """
613
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
614
+
615
+ __props__ = _ConnectorState.__new__(_ConnectorState)
616
+
617
+ __props__.__dict__["configs"] = configs
618
+ __props__.__dict__["connect_cluster"] = connect_cluster
619
+ __props__.__dict__["connector_id"] = connector_id
620
+ __props__.__dict__["location"] = location
621
+ __props__.__dict__["name"] = name
622
+ __props__.__dict__["project"] = project
623
+ __props__.__dict__["state"] = state
624
+ __props__.__dict__["task_restart_policy"] = task_restart_policy
625
+ return Connector(resource_name, opts=opts, __props__=__props__)
626
+
627
+ @property
628
+ @pulumi.getter
629
+ def configs(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
630
+ """
631
+ Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`.
632
+ """
633
+ return pulumi.get(self, "configs")
634
+
635
+ @property
636
+ @pulumi.getter(name="connectCluster")
637
+ def connect_cluster(self) -> pulumi.Output[str]:
638
+ """
639
+ The connect cluster name.
640
+ """
641
+ return pulumi.get(self, "connect_cluster")
642
+
643
+ @property
644
+ @pulumi.getter(name="connectorId")
645
+ def connector_id(self) -> pulumi.Output[str]:
646
+ """
647
+ The ID to use for the connector, which will become the final component of the connector's name. This value is structured like: `my-connector-id`.
648
+
649
+
650
+ - - -
651
+ """
652
+ return pulumi.get(self, "connector_id")
653
+
654
+ @property
655
+ @pulumi.getter
656
+ def location(self) -> pulumi.Output[str]:
657
+ """
658
+ ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
659
+ """
660
+ return pulumi.get(self, "location")
661
+
662
+ @property
663
+ @pulumi.getter
664
+ def name(self) -> pulumi.Output[str]:
665
+ """
666
+ The name of the connector. The `connector` segment is used when connecting directly to the connect cluster. Structured like: `projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER/connectors/CONNECTOR_ID`.
667
+ """
668
+ return pulumi.get(self, "name")
669
+
670
+ @property
671
+ @pulumi.getter
672
+ def project(self) -> pulumi.Output[str]:
673
+ """
674
+ The ID of the project in which the resource belongs.
675
+ If it is not provided, the provider project is used.
676
+ """
677
+ return pulumi.get(self, "project")
678
+
679
+ @property
680
+ @pulumi.getter
681
+ def state(self) -> pulumi.Output[str]:
682
+ """
683
+ The current state of the connect. Possible values: `STATE_UNSPECIFIED`, `UNASSIGNED`, `RUNNING`, `PAUSED`, `FAILED`, `RESTARTING`, and `STOPPED`.
684
+ """
685
+ return pulumi.get(self, "state")
686
+
687
+ @property
688
+ @pulumi.getter(name="taskRestartPolicy")
689
+ def task_restart_policy(self) -> pulumi.Output[Optional['outputs.ConnectorTaskRestartPolicy']]:
690
+ """
691
+ A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won't be restarted.
692
+ Structure is documented below.
693
+ """
694
+ return pulumi.get(self, "task_restart_policy")
695
+