pulumiverse-scaleway 1.16.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.

Potentially problematic release.


This version of pulumiverse-scaleway might be problematic. Click here for more details.

Files changed (205) hide show
  1. pulumiverse_scaleway/__init__.py +1073 -0
  2. pulumiverse_scaleway/_inputs.py +8665 -0
  3. pulumiverse_scaleway/_utilities.py +327 -0
  4. pulumiverse_scaleway/account_project.py +316 -0
  5. pulumiverse_scaleway/account_ssh_key.py +450 -0
  6. pulumiverse_scaleway/apple_silicon_server.py +564 -0
  7. pulumiverse_scaleway/baremetal_server.py +1390 -0
  8. pulumiverse_scaleway/block_snapshot.py +391 -0
  9. pulumiverse_scaleway/block_volume.py +521 -0
  10. pulumiverse_scaleway/cockpit.py +299 -0
  11. pulumiverse_scaleway/cockpit_alert_manager.py +345 -0
  12. pulumiverse_scaleway/cockpit_grafana_user.py +326 -0
  13. pulumiverse_scaleway/cockpit_source.py +481 -0
  14. pulumiverse_scaleway/cockpit_token.py +461 -0
  15. pulumiverse_scaleway/config/__init__.py +8 -0
  16. pulumiverse_scaleway/config/__init__.pyi +56 -0
  17. pulumiverse_scaleway/config/vars.py +78 -0
  18. pulumiverse_scaleway/container.py +1387 -0
  19. pulumiverse_scaleway/container_cron.py +493 -0
  20. pulumiverse_scaleway/container_domain.py +400 -0
  21. pulumiverse_scaleway/container_namespace.py +589 -0
  22. pulumiverse_scaleway/container_token.py +454 -0
  23. pulumiverse_scaleway/container_trigger.py +478 -0
  24. pulumiverse_scaleway/database.py +407 -0
  25. pulumiverse_scaleway/database_acl.py +332 -0
  26. pulumiverse_scaleway/database_backup.py +574 -0
  27. pulumiverse_scaleway/database_instance.py +1636 -0
  28. pulumiverse_scaleway/database_privilege.py +422 -0
  29. pulumiverse_scaleway/database_read_replica.py +528 -0
  30. pulumiverse_scaleway/database_user.py +446 -0
  31. pulumiverse_scaleway/documentdb_database.py +450 -0
  32. pulumiverse_scaleway/documentdb_instance.py +812 -0
  33. pulumiverse_scaleway/documentdb_private_network_endpoint.py +352 -0
  34. pulumiverse_scaleway/documentdb_privilege.py +402 -0
  35. pulumiverse_scaleway/documentdb_read_replica.py +405 -0
  36. pulumiverse_scaleway/documentdb_user.py +442 -0
  37. pulumiverse_scaleway/domain_record.py +1074 -0
  38. pulumiverse_scaleway/domain_zone.py +458 -0
  39. pulumiverse_scaleway/flexible_ip.py +702 -0
  40. pulumiverse_scaleway/flexible_ip_mac_address.py +510 -0
  41. pulumiverse_scaleway/function.py +1145 -0
  42. pulumiverse_scaleway/function_cron.py +480 -0
  43. pulumiverse_scaleway/function_domain.py +361 -0
  44. pulumiverse_scaleway/function_namespace.py +533 -0
  45. pulumiverse_scaleway/function_token.py +462 -0
  46. pulumiverse_scaleway/function_trigger.py +478 -0
  47. pulumiverse_scaleway/get_account_project.py +164 -0
  48. pulumiverse_scaleway/get_account_ssh_key.py +201 -0
  49. pulumiverse_scaleway/get_availability_zones.py +131 -0
  50. pulumiverse_scaleway/get_baremetal_offer.py +245 -0
  51. pulumiverse_scaleway/get_baremetal_option.py +168 -0
  52. pulumiverse_scaleway/get_baremetal_os.py +174 -0
  53. pulumiverse_scaleway/get_baremetal_server.py +411 -0
  54. pulumiverse_scaleway/get_billing_consumptions.py +134 -0
  55. pulumiverse_scaleway/get_billing_invoices.py +154 -0
  56. pulumiverse_scaleway/get_block_snapshot.py +170 -0
  57. pulumiverse_scaleway/get_block_volume.py +186 -0
  58. pulumiverse_scaleway/get_cockpit.py +179 -0
  59. pulumiverse_scaleway/get_cockpit_plan.py +113 -0
  60. pulumiverse_scaleway/get_config.py +180 -0
  61. pulumiverse_scaleway/get_container.py +502 -0
  62. pulumiverse_scaleway/get_container_namespace.py +262 -0
  63. pulumiverse_scaleway/get_database.py +187 -0
  64. pulumiverse_scaleway/get_database_acl.py +143 -0
  65. pulumiverse_scaleway/get_database_backup.py +253 -0
  66. pulumiverse_scaleway/get_database_instance.py +404 -0
  67. pulumiverse_scaleway/get_database_privilege.py +181 -0
  68. pulumiverse_scaleway/get_documentdb_database.py +198 -0
  69. pulumiverse_scaleway/get_documentdb_instance.py +245 -0
  70. pulumiverse_scaleway/get_documentdb_load_balancer_endpoint.py +198 -0
  71. pulumiverse_scaleway/get_domain_record.py +334 -0
  72. pulumiverse_scaleway/get_domain_zone.py +225 -0
  73. pulumiverse_scaleway/get_flexible_ip.py +247 -0
  74. pulumiverse_scaleway/get_flexible_ips.py +240 -0
  75. pulumiverse_scaleway/get_function.py +357 -0
  76. pulumiverse_scaleway/get_function_namespace.py +227 -0
  77. pulumiverse_scaleway/get_iam_api_key.py +210 -0
  78. pulumiverse_scaleway/get_iam_application.py +210 -0
  79. pulumiverse_scaleway/get_iam_group.py +236 -0
  80. pulumiverse_scaleway/get_iam_ssh_key.py +212 -0
  81. pulumiverse_scaleway/get_iam_user.py +157 -0
  82. pulumiverse_scaleway/get_instance_image.py +305 -0
  83. pulumiverse_scaleway/get_instance_ip.py +204 -0
  84. pulumiverse_scaleway/get_instance_placement_group.py +212 -0
  85. pulumiverse_scaleway/get_instance_private_nic.py +215 -0
  86. pulumiverse_scaleway/get_instance_security_group.py +268 -0
  87. pulumiverse_scaleway/get_instance_server.py +502 -0
  88. pulumiverse_scaleway/get_instance_servers.py +187 -0
  89. pulumiverse_scaleway/get_instance_snapshot.py +248 -0
  90. pulumiverse_scaleway/get_instance_volume.py +215 -0
  91. pulumiverse_scaleway/get_iot_device.py +257 -0
  92. pulumiverse_scaleway/get_iot_hub.py +322 -0
  93. pulumiverse_scaleway/get_ipam_ip.py +419 -0
  94. pulumiverse_scaleway/get_ipam_ips.py +358 -0
  95. pulumiverse_scaleway/get_k8s_version.py +196 -0
  96. pulumiverse_scaleway/get_kubernetes_cluster.py +417 -0
  97. pulumiverse_scaleway/get_kubernetes_node_pool.py +436 -0
  98. pulumiverse_scaleway/get_lb_acls.py +198 -0
  99. pulumiverse_scaleway/get_lb_backend.py +486 -0
  100. pulumiverse_scaleway/get_lb_backends.py +196 -0
  101. pulumiverse_scaleway/get_lb_frontend.py +274 -0
  102. pulumiverse_scaleway/get_lb_frontends.py +196 -0
  103. pulumiverse_scaleway/get_lb_ips.py +198 -0
  104. pulumiverse_scaleway/get_lb_route.py +217 -0
  105. pulumiverse_scaleway/get_lb_routes.py +179 -0
  106. pulumiverse_scaleway/get_lbs.py +187 -0
  107. pulumiverse_scaleway/get_loadbalancer.py +339 -0
  108. pulumiverse_scaleway/get_loadbalancer_certificate.py +230 -0
  109. pulumiverse_scaleway/get_loadbalancer_ip.py +222 -0
  110. pulumiverse_scaleway/get_marketplace_image.py +147 -0
  111. pulumiverse_scaleway/get_mnq_sqs.py +150 -0
  112. pulumiverse_scaleway/get_object_bucket.py +278 -0
  113. pulumiverse_scaleway/get_object_bucket_policy.py +157 -0
  114. pulumiverse_scaleway/get_redis_cluster.py +347 -0
  115. pulumiverse_scaleway/get_registry_image.py +239 -0
  116. pulumiverse_scaleway/get_registry_namespace.py +199 -0
  117. pulumiverse_scaleway/get_secret.py +290 -0
  118. pulumiverse_scaleway/get_secret_version.py +303 -0
  119. pulumiverse_scaleway/get_tem_domain.py +367 -0
  120. pulumiverse_scaleway/get_vpc.py +246 -0
  121. pulumiverse_scaleway/get_vpc_gateway_network.py +287 -0
  122. pulumiverse_scaleway/get_vpc_private_network.py +282 -0
  123. pulumiverse_scaleway/get_vpc_public_gateway.py +304 -0
  124. pulumiverse_scaleway/get_vpc_public_gateway_dhcp.py +305 -0
  125. pulumiverse_scaleway/get_vpc_public_gateway_dhcp_reservation.py +382 -0
  126. pulumiverse_scaleway/get_vpc_public_gateway_ip.py +199 -0
  127. pulumiverse_scaleway/get_vpc_public_pat_rule.py +313 -0
  128. pulumiverse_scaleway/get_vpc_routes.py +208 -0
  129. pulumiverse_scaleway/get_vpcs.py +174 -0
  130. pulumiverse_scaleway/get_web_host_offer.py +192 -0
  131. pulumiverse_scaleway/get_webhosting.py +332 -0
  132. pulumiverse_scaleway/iam_api_key.py +620 -0
  133. pulumiverse_scaleway/iam_application.py +417 -0
  134. pulumiverse_scaleway/iam_group.py +566 -0
  135. pulumiverse_scaleway/iam_group_membership.py +323 -0
  136. pulumiverse_scaleway/iam_policy.py +727 -0
  137. pulumiverse_scaleway/iam_ssh_key.py +455 -0
  138. pulumiverse_scaleway/iam_user.py +466 -0
  139. pulumiverse_scaleway/instance_image.py +750 -0
  140. pulumiverse_scaleway/instance_ip.py +483 -0
  141. pulumiverse_scaleway/instance_ip_reverse_dns.py +308 -0
  142. pulumiverse_scaleway/instance_placement_group.py +479 -0
  143. pulumiverse_scaleway/instance_private_nic.py +454 -0
  144. pulumiverse_scaleway/instance_security_group.py +720 -0
  145. pulumiverse_scaleway/instance_security_group_rules.py +439 -0
  146. pulumiverse_scaleway/instance_server.py +1907 -0
  147. pulumiverse_scaleway/instance_snapshot.py +669 -0
  148. pulumiverse_scaleway/instance_user_data.py +435 -0
  149. pulumiverse_scaleway/instance_volume.py +535 -0
  150. pulumiverse_scaleway/iot_device.py +750 -0
  151. pulumiverse_scaleway/iot_hub.py +896 -0
  152. pulumiverse_scaleway/iot_network.py +425 -0
  153. pulumiverse_scaleway/iot_route.py +660 -0
  154. pulumiverse_scaleway/ipam_ip.py +666 -0
  155. pulumiverse_scaleway/ipam_ip_reverse_dns.py +318 -0
  156. pulumiverse_scaleway/job_definition.py +692 -0
  157. pulumiverse_scaleway/kubernetes_cluster.py +1538 -0
  158. pulumiverse_scaleway/kubernetes_node_pool.py +1255 -0
  159. pulumiverse_scaleway/loadbalancer.py +1095 -0
  160. pulumiverse_scaleway/loadbalancer_acl.py +520 -0
  161. pulumiverse_scaleway/loadbalancer_backend.py +1588 -0
  162. pulumiverse_scaleway/loadbalancer_certificate.py +460 -0
  163. pulumiverse_scaleway/loadbalancer_frontend.py +829 -0
  164. pulumiverse_scaleway/loadbalancer_ip.py +514 -0
  165. pulumiverse_scaleway/loadbalancer_route.py +523 -0
  166. pulumiverse_scaleway/mnq_nats_account.py +334 -0
  167. pulumiverse_scaleway/mnq_nats_credentials.py +328 -0
  168. pulumiverse_scaleway/mnq_sns.py +306 -0
  169. pulumiverse_scaleway/mnq_sns_credentials.py +413 -0
  170. pulumiverse_scaleway/mnq_sns_topic.py +659 -0
  171. pulumiverse_scaleway/mnq_sns_topic_subscription.py +699 -0
  172. pulumiverse_scaleway/mnq_sqs.py +304 -0
  173. pulumiverse_scaleway/mnq_sqs_credentials.py +413 -0
  174. pulumiverse_scaleway/mnq_sqs_queue.py +800 -0
  175. pulumiverse_scaleway/object_bucket.py +888 -0
  176. pulumiverse_scaleway/object_bucket_acl.py +592 -0
  177. pulumiverse_scaleway/object_bucket_lock_configuration.py +393 -0
  178. pulumiverse_scaleway/object_bucket_policy.py +671 -0
  179. pulumiverse_scaleway/object_bucket_website_configuration.py +532 -0
  180. pulumiverse_scaleway/object_item.py +711 -0
  181. pulumiverse_scaleway/outputs.py +11663 -0
  182. pulumiverse_scaleway/provider.py +327 -0
  183. pulumiverse_scaleway/pulumi-plugin.json +6 -0
  184. pulumiverse_scaleway/py.typed +0 -0
  185. pulumiverse_scaleway/redis_cluster.py +1166 -0
  186. pulumiverse_scaleway/registry_namespace.py +458 -0
  187. pulumiverse_scaleway/sdb_database.py +428 -0
  188. pulumiverse_scaleway/secret.py +560 -0
  189. pulumiverse_scaleway/secret_version.py +482 -0
  190. pulumiverse_scaleway/tem_domain.py +950 -0
  191. pulumiverse_scaleway/tem_domain_validation.py +303 -0
  192. pulumiverse_scaleway/vpc.py +536 -0
  193. pulumiverse_scaleway/vpc_gateway_network.py +866 -0
  194. pulumiverse_scaleway/vpc_private_network.py +734 -0
  195. pulumiverse_scaleway/vpc_public_gateway.py +789 -0
  196. pulumiverse_scaleway/vpc_public_gateway_dhcp.py +933 -0
  197. pulumiverse_scaleway/vpc_public_gateway_dhcp_reservation.py +514 -0
  198. pulumiverse_scaleway/vpc_public_gateway_ip.py +457 -0
  199. pulumiverse_scaleway/vpc_public_gateway_ip_reverse_dns.py +306 -0
  200. pulumiverse_scaleway/vpc_public_gateway_pat_rule.py +591 -0
  201. pulumiverse_scaleway/webhosting.py +805 -0
  202. pulumiverse_scaleway-1.16.0.dist-info/METADATA +69 -0
  203. pulumiverse_scaleway-1.16.0.dist-info/RECORD +205 -0
  204. pulumiverse_scaleway-1.16.0.dist-info/WHEEL +5 -0
  205. pulumiverse_scaleway-1.16.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1636 @@
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__ = ['DatabaseInstanceArgs', 'DatabaseInstance']
20
+
21
+ @pulumi.input_type
22
+ class DatabaseInstanceArgs:
23
+ def __init__(__self__, *,
24
+ engine: pulumi.Input[str],
25
+ node_type: pulumi.Input[str],
26
+ backup_same_region: Optional[pulumi.Input[bool]] = None,
27
+ backup_schedule_frequency: Optional[pulumi.Input[int]] = None,
28
+ backup_schedule_retention: Optional[pulumi.Input[int]] = None,
29
+ disable_backup: Optional[pulumi.Input[bool]] = None,
30
+ encryption_at_rest: Optional[pulumi.Input[bool]] = None,
31
+ init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
32
+ is_ha_cluster: Optional[pulumi.Input[bool]] = None,
33
+ load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]]] = None,
34
+ logs_policy: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']] = None,
35
+ name: Optional[pulumi.Input[str]] = None,
36
+ password: Optional[pulumi.Input[str]] = None,
37
+ private_network: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']] = None,
38
+ project_id: Optional[pulumi.Input[str]] = None,
39
+ region: Optional[pulumi.Input[str]] = None,
40
+ settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
41
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
42
+ user_name: Optional[pulumi.Input[str]] = None,
43
+ volume_size_in_gb: Optional[pulumi.Input[int]] = None,
44
+ volume_type: Optional[pulumi.Input[str]] = None):
45
+ """
46
+ The set of arguments for constructing a DatabaseInstance resource.
47
+ :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `PostgreSQL-11`).
48
+
49
+ > **Important** Updates to `engine` will recreate the Database Instance.
50
+ :param pulumi.Input[str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
51
+
52
+ > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
53
+ interruption.
54
+
55
+ > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
56
+ :param pulumi.Input[bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
57
+ :param pulumi.Input[int] backup_schedule_frequency: Backup schedule frequency in hours
58
+ :param pulumi.Input[int] backup_schedule_retention: Backup schedule retention in days
59
+ :param pulumi.Input[bool] disable_backup: Disable automated backup for the database instance
60
+ :param pulumi.Input[bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
61
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] init_settings: Map of engine settings to be set at database initialisation.
62
+ :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
63
+
64
+ > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
65
+ :param pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]] load_balancers: List of Load Balancer endpoints of the Database Instance.
66
+ :param pulumi.Input['DatabaseInstanceLogsPolicyArgs'] logs_policy: Logs policy configuration
67
+ :param pulumi.Input[str] name: The name of the Database Instance.
68
+ :param pulumi.Input[str] password: Password for the first user of the Database Instance.
69
+ :param pulumi.Input['DatabaseInstancePrivateNetworkArgs'] private_network: List of Private Networks endpoints of the Database Instance.
70
+ :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
71
+ Instance is associated with.
72
+ :param pulumi.Input[str] region: `region`) The region
73
+ in which the Database Instance should be created.
74
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] settings: Map of engine settings to be set on a running instance.
75
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
76
+ :param pulumi.Input[str] user_name: Identifier for the first user of the Database Instance.
77
+
78
+ > **Important** Updates to `user_name` will recreate the Database Instance.
79
+ :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
80
+
81
+ > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
82
+ :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd`, `lssd`, `sbs_5k` or `sbs_15k`).
83
+ """
84
+ pulumi.set(__self__, "engine", engine)
85
+ pulumi.set(__self__, "node_type", node_type)
86
+ if backup_same_region is not None:
87
+ pulumi.set(__self__, "backup_same_region", backup_same_region)
88
+ if backup_schedule_frequency is not None:
89
+ pulumi.set(__self__, "backup_schedule_frequency", backup_schedule_frequency)
90
+ if backup_schedule_retention is not None:
91
+ pulumi.set(__self__, "backup_schedule_retention", backup_schedule_retention)
92
+ if disable_backup is not None:
93
+ pulumi.set(__self__, "disable_backup", disable_backup)
94
+ if encryption_at_rest is not None:
95
+ pulumi.set(__self__, "encryption_at_rest", encryption_at_rest)
96
+ if init_settings is not None:
97
+ pulumi.set(__self__, "init_settings", init_settings)
98
+ if is_ha_cluster is not None:
99
+ pulumi.set(__self__, "is_ha_cluster", is_ha_cluster)
100
+ if load_balancers is not None:
101
+ pulumi.set(__self__, "load_balancers", load_balancers)
102
+ if logs_policy is not None:
103
+ pulumi.set(__self__, "logs_policy", logs_policy)
104
+ if name is not None:
105
+ pulumi.set(__self__, "name", name)
106
+ if password is not None:
107
+ pulumi.set(__self__, "password", password)
108
+ if private_network is not None:
109
+ pulumi.set(__self__, "private_network", private_network)
110
+ if project_id is not None:
111
+ pulumi.set(__self__, "project_id", project_id)
112
+ if region is not None:
113
+ pulumi.set(__self__, "region", region)
114
+ if settings is not None:
115
+ pulumi.set(__self__, "settings", settings)
116
+ if tags is not None:
117
+ pulumi.set(__self__, "tags", tags)
118
+ if user_name is not None:
119
+ pulumi.set(__self__, "user_name", user_name)
120
+ if volume_size_in_gb is not None:
121
+ pulumi.set(__self__, "volume_size_in_gb", volume_size_in_gb)
122
+ if volume_type is not None:
123
+ pulumi.set(__self__, "volume_type", volume_type)
124
+
125
+ @property
126
+ @pulumi.getter
127
+ def engine(self) -> pulumi.Input[str]:
128
+ """
129
+ Database Instance's engine version (e.g. `PostgreSQL-11`).
130
+
131
+ > **Important** Updates to `engine` will recreate the Database Instance.
132
+ """
133
+ return pulumi.get(self, "engine")
134
+
135
+ @engine.setter
136
+ def engine(self, value: pulumi.Input[str]):
137
+ pulumi.set(self, "engine", value)
138
+
139
+ @property
140
+ @pulumi.getter(name="nodeType")
141
+ def node_type(self) -> pulumi.Input[str]:
142
+ """
143
+ The type of Database Instance you want to create (e.g. `db-dev-s`).
144
+
145
+ > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
146
+ interruption.
147
+
148
+ > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
149
+ """
150
+ return pulumi.get(self, "node_type")
151
+
152
+ @node_type.setter
153
+ def node_type(self, value: pulumi.Input[str]):
154
+ pulumi.set(self, "node_type", value)
155
+
156
+ @property
157
+ @pulumi.getter(name="backupSameRegion")
158
+ def backup_same_region(self) -> Optional[pulumi.Input[bool]]:
159
+ """
160
+ Boolean to store logical backups in the same region as the database instance
161
+ """
162
+ return pulumi.get(self, "backup_same_region")
163
+
164
+ @backup_same_region.setter
165
+ def backup_same_region(self, value: Optional[pulumi.Input[bool]]):
166
+ pulumi.set(self, "backup_same_region", value)
167
+
168
+ @property
169
+ @pulumi.getter(name="backupScheduleFrequency")
170
+ def backup_schedule_frequency(self) -> Optional[pulumi.Input[int]]:
171
+ """
172
+ Backup schedule frequency in hours
173
+ """
174
+ return pulumi.get(self, "backup_schedule_frequency")
175
+
176
+ @backup_schedule_frequency.setter
177
+ def backup_schedule_frequency(self, value: Optional[pulumi.Input[int]]):
178
+ pulumi.set(self, "backup_schedule_frequency", value)
179
+
180
+ @property
181
+ @pulumi.getter(name="backupScheduleRetention")
182
+ def backup_schedule_retention(self) -> Optional[pulumi.Input[int]]:
183
+ """
184
+ Backup schedule retention in days
185
+ """
186
+ return pulumi.get(self, "backup_schedule_retention")
187
+
188
+ @backup_schedule_retention.setter
189
+ def backup_schedule_retention(self, value: Optional[pulumi.Input[int]]):
190
+ pulumi.set(self, "backup_schedule_retention", value)
191
+
192
+ @property
193
+ @pulumi.getter(name="disableBackup")
194
+ def disable_backup(self) -> Optional[pulumi.Input[bool]]:
195
+ """
196
+ Disable automated backup for the database instance
197
+ """
198
+ return pulumi.get(self, "disable_backup")
199
+
200
+ @disable_backup.setter
201
+ def disable_backup(self, value: Optional[pulumi.Input[bool]]):
202
+ pulumi.set(self, "disable_backup", value)
203
+
204
+ @property
205
+ @pulumi.getter(name="encryptionAtRest")
206
+ def encryption_at_rest(self) -> Optional[pulumi.Input[bool]]:
207
+ """
208
+ Enable or disable encryption at rest for the Database Instance.
209
+ """
210
+ return pulumi.get(self, "encryption_at_rest")
211
+
212
+ @encryption_at_rest.setter
213
+ def encryption_at_rest(self, value: Optional[pulumi.Input[bool]]):
214
+ pulumi.set(self, "encryption_at_rest", value)
215
+
216
+ @property
217
+ @pulumi.getter(name="initSettings")
218
+ def init_settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
219
+ """
220
+ Map of engine settings to be set at database initialisation.
221
+ """
222
+ return pulumi.get(self, "init_settings")
223
+
224
+ @init_settings.setter
225
+ def init_settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
226
+ pulumi.set(self, "init_settings", value)
227
+
228
+ @property
229
+ @pulumi.getter(name="isHaCluster")
230
+ def is_ha_cluster(self) -> Optional[pulumi.Input[bool]]:
231
+ """
232
+ Enable or disable high availability for the Database Instance.
233
+
234
+ > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
235
+ """
236
+ return pulumi.get(self, "is_ha_cluster")
237
+
238
+ @is_ha_cluster.setter
239
+ def is_ha_cluster(self, value: Optional[pulumi.Input[bool]]):
240
+ pulumi.set(self, "is_ha_cluster", value)
241
+
242
+ @property
243
+ @pulumi.getter(name="loadBalancers")
244
+ def load_balancers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]]]:
245
+ """
246
+ List of Load Balancer endpoints of the Database Instance.
247
+ """
248
+ return pulumi.get(self, "load_balancers")
249
+
250
+ @load_balancers.setter
251
+ def load_balancers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]]]):
252
+ pulumi.set(self, "load_balancers", value)
253
+
254
+ @property
255
+ @pulumi.getter(name="logsPolicy")
256
+ def logs_policy(self) -> Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]:
257
+ """
258
+ Logs policy configuration
259
+ """
260
+ return pulumi.get(self, "logs_policy")
261
+
262
+ @logs_policy.setter
263
+ def logs_policy(self, value: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]):
264
+ pulumi.set(self, "logs_policy", value)
265
+
266
+ @property
267
+ @pulumi.getter
268
+ def name(self) -> Optional[pulumi.Input[str]]:
269
+ """
270
+ The name of the Database Instance.
271
+ """
272
+ return pulumi.get(self, "name")
273
+
274
+ @name.setter
275
+ def name(self, value: Optional[pulumi.Input[str]]):
276
+ pulumi.set(self, "name", value)
277
+
278
+ @property
279
+ @pulumi.getter
280
+ def password(self) -> Optional[pulumi.Input[str]]:
281
+ """
282
+ Password for the first user of the Database Instance.
283
+ """
284
+ return pulumi.get(self, "password")
285
+
286
+ @password.setter
287
+ def password(self, value: Optional[pulumi.Input[str]]):
288
+ pulumi.set(self, "password", value)
289
+
290
+ @property
291
+ @pulumi.getter(name="privateNetwork")
292
+ def private_network(self) -> Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]:
293
+ """
294
+ List of Private Networks endpoints of the Database Instance.
295
+ """
296
+ return pulumi.get(self, "private_network")
297
+
298
+ @private_network.setter
299
+ def private_network(self, value: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]):
300
+ pulumi.set(self, "private_network", value)
301
+
302
+ @property
303
+ @pulumi.getter(name="projectId")
304
+ def project_id(self) -> Optional[pulumi.Input[str]]:
305
+ """
306
+ `project_id`) The ID of the project the Database
307
+ Instance is associated with.
308
+ """
309
+ return pulumi.get(self, "project_id")
310
+
311
+ @project_id.setter
312
+ def project_id(self, value: Optional[pulumi.Input[str]]):
313
+ pulumi.set(self, "project_id", value)
314
+
315
+ @property
316
+ @pulumi.getter
317
+ def region(self) -> Optional[pulumi.Input[str]]:
318
+ """
319
+ `region`) The region
320
+ in which the Database Instance should be created.
321
+ """
322
+ return pulumi.get(self, "region")
323
+
324
+ @region.setter
325
+ def region(self, value: Optional[pulumi.Input[str]]):
326
+ pulumi.set(self, "region", value)
327
+
328
+ @property
329
+ @pulumi.getter
330
+ def settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
331
+ """
332
+ Map of engine settings to be set on a running instance.
333
+ """
334
+ return pulumi.get(self, "settings")
335
+
336
+ @settings.setter
337
+ def settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
338
+ pulumi.set(self, "settings", value)
339
+
340
+ @property
341
+ @pulumi.getter
342
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
343
+ """
344
+ The tags associated with the Database Instance.
345
+ """
346
+ return pulumi.get(self, "tags")
347
+
348
+ @tags.setter
349
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
350
+ pulumi.set(self, "tags", value)
351
+
352
+ @property
353
+ @pulumi.getter(name="userName")
354
+ def user_name(self) -> Optional[pulumi.Input[str]]:
355
+ """
356
+ Identifier for the first user of the Database Instance.
357
+
358
+ > **Important** Updates to `user_name` will recreate the Database Instance.
359
+ """
360
+ return pulumi.get(self, "user_name")
361
+
362
+ @user_name.setter
363
+ def user_name(self, value: Optional[pulumi.Input[str]]):
364
+ pulumi.set(self, "user_name", value)
365
+
366
+ @property
367
+ @pulumi.getter(name="volumeSizeInGb")
368
+ def volume_size_in_gb(self) -> Optional[pulumi.Input[int]]:
369
+ """
370
+ Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
371
+
372
+ > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
373
+ """
374
+ return pulumi.get(self, "volume_size_in_gb")
375
+
376
+ @volume_size_in_gb.setter
377
+ def volume_size_in_gb(self, value: Optional[pulumi.Input[int]]):
378
+ pulumi.set(self, "volume_size_in_gb", value)
379
+
380
+ @property
381
+ @pulumi.getter(name="volumeType")
382
+ def volume_type(self) -> Optional[pulumi.Input[str]]:
383
+ """
384
+ Type of volume where data are stored (`bssd`, `lssd`, `sbs_5k` or `sbs_15k`).
385
+ """
386
+ return pulumi.get(self, "volume_type")
387
+
388
+ @volume_type.setter
389
+ def volume_type(self, value: Optional[pulumi.Input[str]]):
390
+ pulumi.set(self, "volume_type", value)
391
+
392
+
393
+ @pulumi.input_type
394
+ class _DatabaseInstanceState:
395
+ def __init__(__self__, *,
396
+ backup_same_region: Optional[pulumi.Input[bool]] = None,
397
+ backup_schedule_frequency: Optional[pulumi.Input[int]] = None,
398
+ backup_schedule_retention: Optional[pulumi.Input[int]] = None,
399
+ certificate: Optional[pulumi.Input[str]] = None,
400
+ disable_backup: Optional[pulumi.Input[bool]] = None,
401
+ encryption_at_rest: Optional[pulumi.Input[bool]] = None,
402
+ endpoint_ip: Optional[pulumi.Input[str]] = None,
403
+ endpoint_port: Optional[pulumi.Input[int]] = None,
404
+ engine: Optional[pulumi.Input[str]] = None,
405
+ init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
406
+ is_ha_cluster: Optional[pulumi.Input[bool]] = None,
407
+ load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]]] = None,
408
+ logs_policy: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']] = None,
409
+ name: Optional[pulumi.Input[str]] = None,
410
+ node_type: Optional[pulumi.Input[str]] = None,
411
+ organization_id: Optional[pulumi.Input[str]] = None,
412
+ password: Optional[pulumi.Input[str]] = None,
413
+ private_network: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']] = None,
414
+ project_id: Optional[pulumi.Input[str]] = None,
415
+ read_replicas: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]]] = None,
416
+ region: Optional[pulumi.Input[str]] = None,
417
+ settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
418
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
419
+ user_name: Optional[pulumi.Input[str]] = None,
420
+ volume_size_in_gb: Optional[pulumi.Input[int]] = None,
421
+ volume_type: Optional[pulumi.Input[str]] = None):
422
+ """
423
+ Input properties used for looking up and filtering DatabaseInstance resources.
424
+ :param pulumi.Input[bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
425
+ :param pulumi.Input[int] backup_schedule_frequency: Backup schedule frequency in hours
426
+ :param pulumi.Input[int] backup_schedule_retention: Backup schedule retention in days
427
+ :param pulumi.Input[str] certificate: Certificate of the Database Instance.
428
+ :param pulumi.Input[bool] disable_backup: Disable automated backup for the database instance
429
+ :param pulumi.Input[bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
430
+ :param pulumi.Input[str] endpoint_ip: (Deprecated) The IP of the Database Instance.
431
+ :param pulumi.Input[int] endpoint_port: (Deprecated) The port of the Database Instance.
432
+ :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `PostgreSQL-11`).
433
+
434
+ > **Important** Updates to `engine` will recreate the Database Instance.
435
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] init_settings: Map of engine settings to be set at database initialisation.
436
+ :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
437
+
438
+ > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
439
+ :param pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]] load_balancers: List of Load Balancer endpoints of the Database Instance.
440
+ :param pulumi.Input['DatabaseInstanceLogsPolicyArgs'] logs_policy: Logs policy configuration
441
+ :param pulumi.Input[str] name: The name of the Database Instance.
442
+ :param pulumi.Input[str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
443
+
444
+ > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
445
+ interruption.
446
+
447
+ > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
448
+ :param pulumi.Input[str] organization_id: The organization ID the Database Instance is associated with.
449
+ :param pulumi.Input[str] password: Password for the first user of the Database Instance.
450
+ :param pulumi.Input['DatabaseInstancePrivateNetworkArgs'] private_network: List of Private Networks endpoints of the Database Instance.
451
+ :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
452
+ Instance is associated with.
453
+ :param pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]] read_replicas: List of read replicas of the Database Instance.
454
+ :param pulumi.Input[str] region: `region`) The region
455
+ in which the Database Instance should be created.
456
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] settings: Map of engine settings to be set on a running instance.
457
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
458
+ :param pulumi.Input[str] user_name: Identifier for the first user of the Database Instance.
459
+
460
+ > **Important** Updates to `user_name` will recreate the Database Instance.
461
+ :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
462
+
463
+ > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
464
+ :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd`, `lssd`, `sbs_5k` or `sbs_15k`).
465
+ """
466
+ if backup_same_region is not None:
467
+ pulumi.set(__self__, "backup_same_region", backup_same_region)
468
+ if backup_schedule_frequency is not None:
469
+ pulumi.set(__self__, "backup_schedule_frequency", backup_schedule_frequency)
470
+ if backup_schedule_retention is not None:
471
+ pulumi.set(__self__, "backup_schedule_retention", backup_schedule_retention)
472
+ if certificate is not None:
473
+ pulumi.set(__self__, "certificate", certificate)
474
+ if disable_backup is not None:
475
+ pulumi.set(__self__, "disable_backup", disable_backup)
476
+ if encryption_at_rest is not None:
477
+ pulumi.set(__self__, "encryption_at_rest", encryption_at_rest)
478
+ if endpoint_ip is not None:
479
+ warnings.warn("""Please use the private_network or the load_balancer attribute""", DeprecationWarning)
480
+ pulumi.log.warn("""endpoint_ip is deprecated: Please use the private_network or the load_balancer attribute""")
481
+ if endpoint_ip is not None:
482
+ pulumi.set(__self__, "endpoint_ip", endpoint_ip)
483
+ if endpoint_port is not None:
484
+ pulumi.set(__self__, "endpoint_port", endpoint_port)
485
+ if engine is not None:
486
+ pulumi.set(__self__, "engine", engine)
487
+ if init_settings is not None:
488
+ pulumi.set(__self__, "init_settings", init_settings)
489
+ if is_ha_cluster is not None:
490
+ pulumi.set(__self__, "is_ha_cluster", is_ha_cluster)
491
+ if load_balancers is not None:
492
+ pulumi.set(__self__, "load_balancers", load_balancers)
493
+ if logs_policy is not None:
494
+ pulumi.set(__self__, "logs_policy", logs_policy)
495
+ if name is not None:
496
+ pulumi.set(__self__, "name", name)
497
+ if node_type is not None:
498
+ pulumi.set(__self__, "node_type", node_type)
499
+ if organization_id is not None:
500
+ pulumi.set(__self__, "organization_id", organization_id)
501
+ if password is not None:
502
+ pulumi.set(__self__, "password", password)
503
+ if private_network is not None:
504
+ pulumi.set(__self__, "private_network", private_network)
505
+ if project_id is not None:
506
+ pulumi.set(__self__, "project_id", project_id)
507
+ if read_replicas is not None:
508
+ pulumi.set(__self__, "read_replicas", read_replicas)
509
+ if region is not None:
510
+ pulumi.set(__self__, "region", region)
511
+ if settings is not None:
512
+ pulumi.set(__self__, "settings", settings)
513
+ if tags is not None:
514
+ pulumi.set(__self__, "tags", tags)
515
+ if user_name is not None:
516
+ pulumi.set(__self__, "user_name", user_name)
517
+ if volume_size_in_gb is not None:
518
+ pulumi.set(__self__, "volume_size_in_gb", volume_size_in_gb)
519
+ if volume_type is not None:
520
+ pulumi.set(__self__, "volume_type", volume_type)
521
+
522
+ @property
523
+ @pulumi.getter(name="backupSameRegion")
524
+ def backup_same_region(self) -> Optional[pulumi.Input[bool]]:
525
+ """
526
+ Boolean to store logical backups in the same region as the database instance
527
+ """
528
+ return pulumi.get(self, "backup_same_region")
529
+
530
+ @backup_same_region.setter
531
+ def backup_same_region(self, value: Optional[pulumi.Input[bool]]):
532
+ pulumi.set(self, "backup_same_region", value)
533
+
534
+ @property
535
+ @pulumi.getter(name="backupScheduleFrequency")
536
+ def backup_schedule_frequency(self) -> Optional[pulumi.Input[int]]:
537
+ """
538
+ Backup schedule frequency in hours
539
+ """
540
+ return pulumi.get(self, "backup_schedule_frequency")
541
+
542
+ @backup_schedule_frequency.setter
543
+ def backup_schedule_frequency(self, value: Optional[pulumi.Input[int]]):
544
+ pulumi.set(self, "backup_schedule_frequency", value)
545
+
546
+ @property
547
+ @pulumi.getter(name="backupScheduleRetention")
548
+ def backup_schedule_retention(self) -> Optional[pulumi.Input[int]]:
549
+ """
550
+ Backup schedule retention in days
551
+ """
552
+ return pulumi.get(self, "backup_schedule_retention")
553
+
554
+ @backup_schedule_retention.setter
555
+ def backup_schedule_retention(self, value: Optional[pulumi.Input[int]]):
556
+ pulumi.set(self, "backup_schedule_retention", value)
557
+
558
+ @property
559
+ @pulumi.getter
560
+ def certificate(self) -> Optional[pulumi.Input[str]]:
561
+ """
562
+ Certificate of the Database Instance.
563
+ """
564
+ return pulumi.get(self, "certificate")
565
+
566
+ @certificate.setter
567
+ def certificate(self, value: Optional[pulumi.Input[str]]):
568
+ pulumi.set(self, "certificate", value)
569
+
570
+ @property
571
+ @pulumi.getter(name="disableBackup")
572
+ def disable_backup(self) -> Optional[pulumi.Input[bool]]:
573
+ """
574
+ Disable automated backup for the database instance
575
+ """
576
+ return pulumi.get(self, "disable_backup")
577
+
578
+ @disable_backup.setter
579
+ def disable_backup(self, value: Optional[pulumi.Input[bool]]):
580
+ pulumi.set(self, "disable_backup", value)
581
+
582
+ @property
583
+ @pulumi.getter(name="encryptionAtRest")
584
+ def encryption_at_rest(self) -> Optional[pulumi.Input[bool]]:
585
+ """
586
+ Enable or disable encryption at rest for the Database Instance.
587
+ """
588
+ return pulumi.get(self, "encryption_at_rest")
589
+
590
+ @encryption_at_rest.setter
591
+ def encryption_at_rest(self, value: Optional[pulumi.Input[bool]]):
592
+ pulumi.set(self, "encryption_at_rest", value)
593
+
594
+ @property
595
+ @pulumi.getter(name="endpointIp")
596
+ @_utilities.deprecated("""Please use the private_network or the load_balancer attribute""")
597
+ def endpoint_ip(self) -> Optional[pulumi.Input[str]]:
598
+ """
599
+ (Deprecated) The IP of the Database Instance.
600
+ """
601
+ return pulumi.get(self, "endpoint_ip")
602
+
603
+ @endpoint_ip.setter
604
+ def endpoint_ip(self, value: Optional[pulumi.Input[str]]):
605
+ pulumi.set(self, "endpoint_ip", value)
606
+
607
+ @property
608
+ @pulumi.getter(name="endpointPort")
609
+ def endpoint_port(self) -> Optional[pulumi.Input[int]]:
610
+ """
611
+ (Deprecated) The port of the Database Instance.
612
+ """
613
+ return pulumi.get(self, "endpoint_port")
614
+
615
+ @endpoint_port.setter
616
+ def endpoint_port(self, value: Optional[pulumi.Input[int]]):
617
+ pulumi.set(self, "endpoint_port", value)
618
+
619
+ @property
620
+ @pulumi.getter
621
+ def engine(self) -> Optional[pulumi.Input[str]]:
622
+ """
623
+ Database Instance's engine version (e.g. `PostgreSQL-11`).
624
+
625
+ > **Important** Updates to `engine` will recreate the Database Instance.
626
+ """
627
+ return pulumi.get(self, "engine")
628
+
629
+ @engine.setter
630
+ def engine(self, value: Optional[pulumi.Input[str]]):
631
+ pulumi.set(self, "engine", value)
632
+
633
+ @property
634
+ @pulumi.getter(name="initSettings")
635
+ def init_settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
636
+ """
637
+ Map of engine settings to be set at database initialisation.
638
+ """
639
+ return pulumi.get(self, "init_settings")
640
+
641
+ @init_settings.setter
642
+ def init_settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
643
+ pulumi.set(self, "init_settings", value)
644
+
645
+ @property
646
+ @pulumi.getter(name="isHaCluster")
647
+ def is_ha_cluster(self) -> Optional[pulumi.Input[bool]]:
648
+ """
649
+ Enable or disable high availability for the Database Instance.
650
+
651
+ > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
652
+ """
653
+ return pulumi.get(self, "is_ha_cluster")
654
+
655
+ @is_ha_cluster.setter
656
+ def is_ha_cluster(self, value: Optional[pulumi.Input[bool]]):
657
+ pulumi.set(self, "is_ha_cluster", value)
658
+
659
+ @property
660
+ @pulumi.getter(name="loadBalancers")
661
+ def load_balancers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]]]:
662
+ """
663
+ List of Load Balancer endpoints of the Database Instance.
664
+ """
665
+ return pulumi.get(self, "load_balancers")
666
+
667
+ @load_balancers.setter
668
+ def load_balancers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceLoadBalancerArgs']]]]):
669
+ pulumi.set(self, "load_balancers", value)
670
+
671
+ @property
672
+ @pulumi.getter(name="logsPolicy")
673
+ def logs_policy(self) -> Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]:
674
+ """
675
+ Logs policy configuration
676
+ """
677
+ return pulumi.get(self, "logs_policy")
678
+
679
+ @logs_policy.setter
680
+ def logs_policy(self, value: Optional[pulumi.Input['DatabaseInstanceLogsPolicyArgs']]):
681
+ pulumi.set(self, "logs_policy", value)
682
+
683
+ @property
684
+ @pulumi.getter
685
+ def name(self) -> Optional[pulumi.Input[str]]:
686
+ """
687
+ The name of the Database Instance.
688
+ """
689
+ return pulumi.get(self, "name")
690
+
691
+ @name.setter
692
+ def name(self, value: Optional[pulumi.Input[str]]):
693
+ pulumi.set(self, "name", value)
694
+
695
+ @property
696
+ @pulumi.getter(name="nodeType")
697
+ def node_type(self) -> Optional[pulumi.Input[str]]:
698
+ """
699
+ The type of Database Instance you want to create (e.g. `db-dev-s`).
700
+
701
+ > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
702
+ interruption.
703
+
704
+ > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
705
+ """
706
+ return pulumi.get(self, "node_type")
707
+
708
+ @node_type.setter
709
+ def node_type(self, value: Optional[pulumi.Input[str]]):
710
+ pulumi.set(self, "node_type", value)
711
+
712
+ @property
713
+ @pulumi.getter(name="organizationId")
714
+ def organization_id(self) -> Optional[pulumi.Input[str]]:
715
+ """
716
+ The organization ID the Database Instance is associated with.
717
+ """
718
+ return pulumi.get(self, "organization_id")
719
+
720
+ @organization_id.setter
721
+ def organization_id(self, value: Optional[pulumi.Input[str]]):
722
+ pulumi.set(self, "organization_id", value)
723
+
724
+ @property
725
+ @pulumi.getter
726
+ def password(self) -> Optional[pulumi.Input[str]]:
727
+ """
728
+ Password for the first user of the Database Instance.
729
+ """
730
+ return pulumi.get(self, "password")
731
+
732
+ @password.setter
733
+ def password(self, value: Optional[pulumi.Input[str]]):
734
+ pulumi.set(self, "password", value)
735
+
736
+ @property
737
+ @pulumi.getter(name="privateNetwork")
738
+ def private_network(self) -> Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]:
739
+ """
740
+ List of Private Networks endpoints of the Database Instance.
741
+ """
742
+ return pulumi.get(self, "private_network")
743
+
744
+ @private_network.setter
745
+ def private_network(self, value: Optional[pulumi.Input['DatabaseInstancePrivateNetworkArgs']]):
746
+ pulumi.set(self, "private_network", value)
747
+
748
+ @property
749
+ @pulumi.getter(name="projectId")
750
+ def project_id(self) -> Optional[pulumi.Input[str]]:
751
+ """
752
+ `project_id`) The ID of the project the Database
753
+ Instance is associated with.
754
+ """
755
+ return pulumi.get(self, "project_id")
756
+
757
+ @project_id.setter
758
+ def project_id(self, value: Optional[pulumi.Input[str]]):
759
+ pulumi.set(self, "project_id", value)
760
+
761
+ @property
762
+ @pulumi.getter(name="readReplicas")
763
+ def read_replicas(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]]]:
764
+ """
765
+ List of read replicas of the Database Instance.
766
+ """
767
+ return pulumi.get(self, "read_replicas")
768
+
769
+ @read_replicas.setter
770
+ def read_replicas(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseInstanceReadReplicaArgs']]]]):
771
+ pulumi.set(self, "read_replicas", value)
772
+
773
+ @property
774
+ @pulumi.getter
775
+ def region(self) -> Optional[pulumi.Input[str]]:
776
+ """
777
+ `region`) The region
778
+ in which the Database Instance should be created.
779
+ """
780
+ return pulumi.get(self, "region")
781
+
782
+ @region.setter
783
+ def region(self, value: Optional[pulumi.Input[str]]):
784
+ pulumi.set(self, "region", value)
785
+
786
+ @property
787
+ @pulumi.getter
788
+ def settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
789
+ """
790
+ Map of engine settings to be set on a running instance.
791
+ """
792
+ return pulumi.get(self, "settings")
793
+
794
+ @settings.setter
795
+ def settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
796
+ pulumi.set(self, "settings", value)
797
+
798
+ @property
799
+ @pulumi.getter
800
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
801
+ """
802
+ The tags associated with the Database Instance.
803
+ """
804
+ return pulumi.get(self, "tags")
805
+
806
+ @tags.setter
807
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
808
+ pulumi.set(self, "tags", value)
809
+
810
+ @property
811
+ @pulumi.getter(name="userName")
812
+ def user_name(self) -> Optional[pulumi.Input[str]]:
813
+ """
814
+ Identifier for the first user of the Database Instance.
815
+
816
+ > **Important** Updates to `user_name` will recreate the Database Instance.
817
+ """
818
+ return pulumi.get(self, "user_name")
819
+
820
+ @user_name.setter
821
+ def user_name(self, value: Optional[pulumi.Input[str]]):
822
+ pulumi.set(self, "user_name", value)
823
+
824
+ @property
825
+ @pulumi.getter(name="volumeSizeInGb")
826
+ def volume_size_in_gb(self) -> Optional[pulumi.Input[int]]:
827
+ """
828
+ Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
829
+
830
+ > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
831
+ """
832
+ return pulumi.get(self, "volume_size_in_gb")
833
+
834
+ @volume_size_in_gb.setter
835
+ def volume_size_in_gb(self, value: Optional[pulumi.Input[int]]):
836
+ pulumi.set(self, "volume_size_in_gb", value)
837
+
838
+ @property
839
+ @pulumi.getter(name="volumeType")
840
+ def volume_type(self) -> Optional[pulumi.Input[str]]:
841
+ """
842
+ Type of volume where data are stored (`bssd`, `lssd`, `sbs_5k` or `sbs_15k`).
843
+ """
844
+ return pulumi.get(self, "volume_type")
845
+
846
+ @volume_type.setter
847
+ def volume_type(self, value: Optional[pulumi.Input[str]]):
848
+ pulumi.set(self, "volume_type", value)
849
+
850
+
851
+ class DatabaseInstance(pulumi.CustomResource):
852
+ @overload
853
+ def __init__(__self__,
854
+ resource_name: str,
855
+ opts: Optional[pulumi.ResourceOptions] = None,
856
+ backup_same_region: Optional[pulumi.Input[bool]] = None,
857
+ backup_schedule_frequency: Optional[pulumi.Input[int]] = None,
858
+ backup_schedule_retention: Optional[pulumi.Input[int]] = None,
859
+ disable_backup: Optional[pulumi.Input[bool]] = None,
860
+ encryption_at_rest: Optional[pulumi.Input[bool]] = None,
861
+ engine: Optional[pulumi.Input[str]] = None,
862
+ init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
863
+ is_ha_cluster: Optional[pulumi.Input[bool]] = None,
864
+ load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]]]] = None,
865
+ logs_policy: Optional[pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']]] = None,
866
+ name: Optional[pulumi.Input[str]] = None,
867
+ node_type: Optional[pulumi.Input[str]] = None,
868
+ password: Optional[pulumi.Input[str]] = None,
869
+ private_network: Optional[pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']]] = None,
870
+ project_id: Optional[pulumi.Input[str]] = None,
871
+ region: Optional[pulumi.Input[str]] = None,
872
+ settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
873
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
874
+ user_name: Optional[pulumi.Input[str]] = None,
875
+ volume_size_in_gb: Optional[pulumi.Input[int]] = None,
876
+ volume_type: Optional[pulumi.Input[str]] = None,
877
+ __props__=None):
878
+ """
879
+ Creates and manages Scaleway Database Instances.
880
+ For more information, see refer to [the API documentation](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/).
881
+
882
+ ## Example Usage
883
+
884
+ ### Example Basic
885
+
886
+ ```python
887
+ import pulumi
888
+ import pulumiverse_scaleway as scaleway
889
+
890
+ main = scaleway.DatabaseInstance("main",
891
+ name="test-rdb",
892
+ node_type="DB-DEV-S",
893
+ engine="PostgreSQL-15",
894
+ is_ha_cluster=True,
895
+ disable_backup=True,
896
+ user_name="my_initial_user",
897
+ password="thiZ_is_v&ry_s3cret",
898
+ encryption_at_rest=True)
899
+ ```
900
+
901
+ ### Example Block Storage Low Latency
902
+
903
+ ```python
904
+ import pulumi
905
+ import pulumiverse_scaleway as scaleway
906
+
907
+ main = scaleway.DatabaseInstance("main",
908
+ name="test-rdb-sbs",
909
+ node_type="db-play2-pico",
910
+ engine="PostgreSQL-15",
911
+ is_ha_cluster=True,
912
+ disable_backup=True,
913
+ user_name="my_initial_user",
914
+ password="thiZ_is_v&ry_s3cret",
915
+ volume_type="sbs_15k",
916
+ volume_size_in_gb=10)
917
+ ```
918
+
919
+ ### Example with Settings
920
+
921
+ ```python
922
+ import pulumi
923
+ import pulumiverse_scaleway as scaleway
924
+
925
+ main = scaleway.DatabaseInstance("main",
926
+ name="test-rdb",
927
+ node_type="db-dev-s",
928
+ disable_backup=True,
929
+ engine="MySQL-8",
930
+ user_name="my_initial_user",
931
+ password="thiZ_is_v&ry_s3cret",
932
+ init_settings={
933
+ "lower_case_table_names": "1",
934
+ },
935
+ settings={
936
+ "max_connections": "350",
937
+ })
938
+ ```
939
+
940
+ ### Example with backup schedule
941
+
942
+ ```python
943
+ import pulumi
944
+ import pulumiverse_scaleway as scaleway
945
+
946
+ main = scaleway.DatabaseInstance("main",
947
+ name="test-rdb",
948
+ node_type="DB-DEV-S",
949
+ engine="PostgreSQL-15",
950
+ is_ha_cluster=True,
951
+ user_name="my_initial_user",
952
+ password="thiZ_is_v&ry_s3cret",
953
+ disable_backup=False,
954
+ backup_schedule_frequency=24,
955
+ backup_schedule_retention=7)
956
+ ```
957
+
958
+ ### Examples of endpoint configuration
959
+
960
+ Database Instances can have a maximum of 1 public endpoint and 1 private endpoint. They can have both, or none.
961
+
962
+ ### 1 static Private Network endpoint
963
+
964
+ ```python
965
+ import pulumi
966
+ import pulumiverse_scaleway as scaleway
967
+
968
+ pn = scaleway.VpcPrivateNetwork("pn", ipv4_subnet={
969
+ "subnet": "172.16.20.0/22",
970
+ })
971
+ main = scaleway.DatabaseInstance("main",
972
+ node_type="db-dev-s",
973
+ engine="PostgreSQL-15",
974
+ private_network={
975
+ "pn_id": pn.id,
976
+ "ip_net": "172.16.20.4/22",
977
+ })
978
+ ```
979
+
980
+ ### 1 IPAM Private Network endpoint + 1 public endpoint
981
+
982
+ ```python
983
+ import pulumi
984
+ import pulumiverse_scaleway as scaleway
985
+
986
+ pn = scaleway.VpcPrivateNetwork("pn")
987
+ main = scaleway.DatabaseInstance("main",
988
+ load_balancers=[{}],
989
+ node_type="DB-DEV-S",
990
+ engine="PostgreSQL-15",
991
+ private_network={
992
+ "pn_id": pn.id,
993
+ "enable_ipam": True,
994
+ })
995
+ ```
996
+
997
+ ### Default: 1 public endpoint
998
+
999
+ ```python
1000
+ import pulumi
1001
+ import pulumiverse_scaleway as scaleway
1002
+
1003
+ main = scaleway.DatabaseInstance("main",
1004
+ node_type="db-dev-s",
1005
+ engine="PostgreSQL-15")
1006
+ ```
1007
+
1008
+ > **Note** If nothing is defined, your Database Instance will have a default public load-balancer endpoint.
1009
+
1010
+ ## Limitations
1011
+
1012
+ The Managed Database product is only compliant with the Private Network in the default availability zone (AZ).
1013
+ i.e. `fr-par-1`, `nl-ams-1`, `pl-waw-1`. To learn more, read our
1014
+ section [How to connect a PostgreSQL and MySQL Database Instance to a Private Network](https://www.scaleway.com/en/docs/managed-databases/postgresql-and-mysql/how-to/connect-database-private-network/)
1015
+
1016
+ ## Import
1017
+
1018
+ Database Instance can be imported using the `{region}/{id}`, e.g.
1019
+
1020
+ bash
1021
+
1022
+ ```sh
1023
+ $ pulumi import scaleway:index/databaseInstance:DatabaseInstance rdb01 fr-par/11111111-1111-1111-1111-111111111111
1024
+ ```
1025
+
1026
+ :param str resource_name: The name of the resource.
1027
+ :param pulumi.ResourceOptions opts: Options for the resource.
1028
+ :param pulumi.Input[bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
1029
+ :param pulumi.Input[int] backup_schedule_frequency: Backup schedule frequency in hours
1030
+ :param pulumi.Input[int] backup_schedule_retention: Backup schedule retention in days
1031
+ :param pulumi.Input[bool] disable_backup: Disable automated backup for the database instance
1032
+ :param pulumi.Input[bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
1033
+ :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `PostgreSQL-11`).
1034
+
1035
+ > **Important** Updates to `engine` will recreate the Database Instance.
1036
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] init_settings: Map of engine settings to be set at database initialisation.
1037
+ :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
1038
+
1039
+ > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
1040
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]]] load_balancers: List of Load Balancer endpoints of the Database Instance.
1041
+ :param pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']] logs_policy: Logs policy configuration
1042
+ :param pulumi.Input[str] name: The name of the Database Instance.
1043
+ :param pulumi.Input[str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
1044
+
1045
+ > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
1046
+ interruption.
1047
+
1048
+ > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
1049
+ :param pulumi.Input[str] password: Password for the first user of the Database Instance.
1050
+ :param pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']] private_network: List of Private Networks endpoints of the Database Instance.
1051
+ :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
1052
+ Instance is associated with.
1053
+ :param pulumi.Input[str] region: `region`) The region
1054
+ in which the Database Instance should be created.
1055
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] settings: Map of engine settings to be set on a running instance.
1056
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
1057
+ :param pulumi.Input[str] user_name: Identifier for the first user of the Database Instance.
1058
+
1059
+ > **Important** Updates to `user_name` will recreate the Database Instance.
1060
+ :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
1061
+
1062
+ > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
1063
+ :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd`, `lssd`, `sbs_5k` or `sbs_15k`).
1064
+ """
1065
+ ...
1066
+ @overload
1067
+ def __init__(__self__,
1068
+ resource_name: str,
1069
+ args: DatabaseInstanceArgs,
1070
+ opts: Optional[pulumi.ResourceOptions] = None):
1071
+ """
1072
+ Creates and manages Scaleway Database Instances.
1073
+ For more information, see refer to [the API documentation](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/).
1074
+
1075
+ ## Example Usage
1076
+
1077
+ ### Example Basic
1078
+
1079
+ ```python
1080
+ import pulumi
1081
+ import pulumiverse_scaleway as scaleway
1082
+
1083
+ main = scaleway.DatabaseInstance("main",
1084
+ name="test-rdb",
1085
+ node_type="DB-DEV-S",
1086
+ engine="PostgreSQL-15",
1087
+ is_ha_cluster=True,
1088
+ disable_backup=True,
1089
+ user_name="my_initial_user",
1090
+ password="thiZ_is_v&ry_s3cret",
1091
+ encryption_at_rest=True)
1092
+ ```
1093
+
1094
+ ### Example Block Storage Low Latency
1095
+
1096
+ ```python
1097
+ import pulumi
1098
+ import pulumiverse_scaleway as scaleway
1099
+
1100
+ main = scaleway.DatabaseInstance("main",
1101
+ name="test-rdb-sbs",
1102
+ node_type="db-play2-pico",
1103
+ engine="PostgreSQL-15",
1104
+ is_ha_cluster=True,
1105
+ disable_backup=True,
1106
+ user_name="my_initial_user",
1107
+ password="thiZ_is_v&ry_s3cret",
1108
+ volume_type="sbs_15k",
1109
+ volume_size_in_gb=10)
1110
+ ```
1111
+
1112
+ ### Example with Settings
1113
+
1114
+ ```python
1115
+ import pulumi
1116
+ import pulumiverse_scaleway as scaleway
1117
+
1118
+ main = scaleway.DatabaseInstance("main",
1119
+ name="test-rdb",
1120
+ node_type="db-dev-s",
1121
+ disable_backup=True,
1122
+ engine="MySQL-8",
1123
+ user_name="my_initial_user",
1124
+ password="thiZ_is_v&ry_s3cret",
1125
+ init_settings={
1126
+ "lower_case_table_names": "1",
1127
+ },
1128
+ settings={
1129
+ "max_connections": "350",
1130
+ })
1131
+ ```
1132
+
1133
+ ### Example with backup schedule
1134
+
1135
+ ```python
1136
+ import pulumi
1137
+ import pulumiverse_scaleway as scaleway
1138
+
1139
+ main = scaleway.DatabaseInstance("main",
1140
+ name="test-rdb",
1141
+ node_type="DB-DEV-S",
1142
+ engine="PostgreSQL-15",
1143
+ is_ha_cluster=True,
1144
+ user_name="my_initial_user",
1145
+ password="thiZ_is_v&ry_s3cret",
1146
+ disable_backup=False,
1147
+ backup_schedule_frequency=24,
1148
+ backup_schedule_retention=7)
1149
+ ```
1150
+
1151
+ ### Examples of endpoint configuration
1152
+
1153
+ Database Instances can have a maximum of 1 public endpoint and 1 private endpoint. They can have both, or none.
1154
+
1155
+ ### 1 static Private Network endpoint
1156
+
1157
+ ```python
1158
+ import pulumi
1159
+ import pulumiverse_scaleway as scaleway
1160
+
1161
+ pn = scaleway.VpcPrivateNetwork("pn", ipv4_subnet={
1162
+ "subnet": "172.16.20.0/22",
1163
+ })
1164
+ main = scaleway.DatabaseInstance("main",
1165
+ node_type="db-dev-s",
1166
+ engine="PostgreSQL-15",
1167
+ private_network={
1168
+ "pn_id": pn.id,
1169
+ "ip_net": "172.16.20.4/22",
1170
+ })
1171
+ ```
1172
+
1173
+ ### 1 IPAM Private Network endpoint + 1 public endpoint
1174
+
1175
+ ```python
1176
+ import pulumi
1177
+ import pulumiverse_scaleway as scaleway
1178
+
1179
+ pn = scaleway.VpcPrivateNetwork("pn")
1180
+ main = scaleway.DatabaseInstance("main",
1181
+ load_balancers=[{}],
1182
+ node_type="DB-DEV-S",
1183
+ engine="PostgreSQL-15",
1184
+ private_network={
1185
+ "pn_id": pn.id,
1186
+ "enable_ipam": True,
1187
+ })
1188
+ ```
1189
+
1190
+ ### Default: 1 public endpoint
1191
+
1192
+ ```python
1193
+ import pulumi
1194
+ import pulumiverse_scaleway as scaleway
1195
+
1196
+ main = scaleway.DatabaseInstance("main",
1197
+ node_type="db-dev-s",
1198
+ engine="PostgreSQL-15")
1199
+ ```
1200
+
1201
+ > **Note** If nothing is defined, your Database Instance will have a default public load-balancer endpoint.
1202
+
1203
+ ## Limitations
1204
+
1205
+ The Managed Database product is only compliant with the Private Network in the default availability zone (AZ).
1206
+ i.e. `fr-par-1`, `nl-ams-1`, `pl-waw-1`. To learn more, read our
1207
+ section [How to connect a PostgreSQL and MySQL Database Instance to a Private Network](https://www.scaleway.com/en/docs/managed-databases/postgresql-and-mysql/how-to/connect-database-private-network/)
1208
+
1209
+ ## Import
1210
+
1211
+ Database Instance can be imported using the `{region}/{id}`, e.g.
1212
+
1213
+ bash
1214
+
1215
+ ```sh
1216
+ $ pulumi import scaleway:index/databaseInstance:DatabaseInstance rdb01 fr-par/11111111-1111-1111-1111-111111111111
1217
+ ```
1218
+
1219
+ :param str resource_name: The name of the resource.
1220
+ :param DatabaseInstanceArgs args: The arguments to use to populate this resource's properties.
1221
+ :param pulumi.ResourceOptions opts: Options for the resource.
1222
+ """
1223
+ ...
1224
+ def __init__(__self__, resource_name: str, *args, **kwargs):
1225
+ resource_args, opts = _utilities.get_resource_args_opts(DatabaseInstanceArgs, pulumi.ResourceOptions, *args, **kwargs)
1226
+ if resource_args is not None:
1227
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
1228
+ else:
1229
+ __self__._internal_init(resource_name, *args, **kwargs)
1230
+
1231
+ def _internal_init(__self__,
1232
+ resource_name: str,
1233
+ opts: Optional[pulumi.ResourceOptions] = None,
1234
+ backup_same_region: Optional[pulumi.Input[bool]] = None,
1235
+ backup_schedule_frequency: Optional[pulumi.Input[int]] = None,
1236
+ backup_schedule_retention: Optional[pulumi.Input[int]] = None,
1237
+ disable_backup: Optional[pulumi.Input[bool]] = None,
1238
+ encryption_at_rest: Optional[pulumi.Input[bool]] = None,
1239
+ engine: Optional[pulumi.Input[str]] = None,
1240
+ init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1241
+ is_ha_cluster: Optional[pulumi.Input[bool]] = None,
1242
+ load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]]]] = None,
1243
+ logs_policy: Optional[pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']]] = None,
1244
+ name: Optional[pulumi.Input[str]] = None,
1245
+ node_type: Optional[pulumi.Input[str]] = None,
1246
+ password: Optional[pulumi.Input[str]] = None,
1247
+ private_network: Optional[pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']]] = None,
1248
+ project_id: Optional[pulumi.Input[str]] = None,
1249
+ region: Optional[pulumi.Input[str]] = None,
1250
+ settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1251
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
1252
+ user_name: Optional[pulumi.Input[str]] = None,
1253
+ volume_size_in_gb: Optional[pulumi.Input[int]] = None,
1254
+ volume_type: Optional[pulumi.Input[str]] = None,
1255
+ __props__=None):
1256
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
1257
+ if not isinstance(opts, pulumi.ResourceOptions):
1258
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
1259
+ if opts.id is None:
1260
+ if __props__ is not None:
1261
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
1262
+ __props__ = DatabaseInstanceArgs.__new__(DatabaseInstanceArgs)
1263
+
1264
+ __props__.__dict__["backup_same_region"] = backup_same_region
1265
+ __props__.__dict__["backup_schedule_frequency"] = backup_schedule_frequency
1266
+ __props__.__dict__["backup_schedule_retention"] = backup_schedule_retention
1267
+ __props__.__dict__["disable_backup"] = disable_backup
1268
+ __props__.__dict__["encryption_at_rest"] = encryption_at_rest
1269
+ if engine is None and not opts.urn:
1270
+ raise TypeError("Missing required property 'engine'")
1271
+ __props__.__dict__["engine"] = engine
1272
+ __props__.__dict__["init_settings"] = init_settings
1273
+ __props__.__dict__["is_ha_cluster"] = is_ha_cluster
1274
+ __props__.__dict__["load_balancers"] = load_balancers
1275
+ __props__.__dict__["logs_policy"] = logs_policy
1276
+ __props__.__dict__["name"] = name
1277
+ if node_type is None and not opts.urn:
1278
+ raise TypeError("Missing required property 'node_type'")
1279
+ __props__.__dict__["node_type"] = node_type
1280
+ __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
1281
+ __props__.__dict__["private_network"] = private_network
1282
+ __props__.__dict__["project_id"] = project_id
1283
+ __props__.__dict__["region"] = region
1284
+ __props__.__dict__["settings"] = settings
1285
+ __props__.__dict__["tags"] = tags
1286
+ __props__.__dict__["user_name"] = user_name
1287
+ __props__.__dict__["volume_size_in_gb"] = volume_size_in_gb
1288
+ __props__.__dict__["volume_type"] = volume_type
1289
+ __props__.__dict__["certificate"] = None
1290
+ __props__.__dict__["endpoint_ip"] = None
1291
+ __props__.__dict__["endpoint_port"] = None
1292
+ __props__.__dict__["organization_id"] = None
1293
+ __props__.__dict__["read_replicas"] = None
1294
+ secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["password"])
1295
+ opts = pulumi.ResourceOptions.merge(opts, secret_opts)
1296
+ super(DatabaseInstance, __self__).__init__(
1297
+ 'scaleway:index/databaseInstance:DatabaseInstance',
1298
+ resource_name,
1299
+ __props__,
1300
+ opts)
1301
+
1302
+ @staticmethod
1303
+ def get(resource_name: str,
1304
+ id: pulumi.Input[str],
1305
+ opts: Optional[pulumi.ResourceOptions] = None,
1306
+ backup_same_region: Optional[pulumi.Input[bool]] = None,
1307
+ backup_schedule_frequency: Optional[pulumi.Input[int]] = None,
1308
+ backup_schedule_retention: Optional[pulumi.Input[int]] = None,
1309
+ certificate: Optional[pulumi.Input[str]] = None,
1310
+ disable_backup: Optional[pulumi.Input[bool]] = None,
1311
+ encryption_at_rest: Optional[pulumi.Input[bool]] = None,
1312
+ endpoint_ip: Optional[pulumi.Input[str]] = None,
1313
+ endpoint_port: Optional[pulumi.Input[int]] = None,
1314
+ engine: Optional[pulumi.Input[str]] = None,
1315
+ init_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1316
+ is_ha_cluster: Optional[pulumi.Input[bool]] = None,
1317
+ load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]]]] = None,
1318
+ logs_policy: Optional[pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']]] = None,
1319
+ name: Optional[pulumi.Input[str]] = None,
1320
+ node_type: Optional[pulumi.Input[str]] = None,
1321
+ organization_id: Optional[pulumi.Input[str]] = None,
1322
+ password: Optional[pulumi.Input[str]] = None,
1323
+ private_network: Optional[pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']]] = None,
1324
+ project_id: Optional[pulumi.Input[str]] = None,
1325
+ read_replicas: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceReadReplicaArgs', 'DatabaseInstanceReadReplicaArgsDict']]]]] = None,
1326
+ region: Optional[pulumi.Input[str]] = None,
1327
+ settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1328
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
1329
+ user_name: Optional[pulumi.Input[str]] = None,
1330
+ volume_size_in_gb: Optional[pulumi.Input[int]] = None,
1331
+ volume_type: Optional[pulumi.Input[str]] = None) -> 'DatabaseInstance':
1332
+ """
1333
+ Get an existing DatabaseInstance resource's state with the given name, id, and optional extra
1334
+ properties used to qualify the lookup.
1335
+
1336
+ :param str resource_name: The unique name of the resulting resource.
1337
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
1338
+ :param pulumi.ResourceOptions opts: Options for the resource.
1339
+ :param pulumi.Input[bool] backup_same_region: Boolean to store logical backups in the same region as the database instance
1340
+ :param pulumi.Input[int] backup_schedule_frequency: Backup schedule frequency in hours
1341
+ :param pulumi.Input[int] backup_schedule_retention: Backup schedule retention in days
1342
+ :param pulumi.Input[str] certificate: Certificate of the Database Instance.
1343
+ :param pulumi.Input[bool] disable_backup: Disable automated backup for the database instance
1344
+ :param pulumi.Input[bool] encryption_at_rest: Enable or disable encryption at rest for the Database Instance.
1345
+ :param pulumi.Input[str] endpoint_ip: (Deprecated) The IP of the Database Instance.
1346
+ :param pulumi.Input[int] endpoint_port: (Deprecated) The port of the Database Instance.
1347
+ :param pulumi.Input[str] engine: Database Instance's engine version (e.g. `PostgreSQL-11`).
1348
+
1349
+ > **Important** Updates to `engine` will recreate the Database Instance.
1350
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] init_settings: Map of engine settings to be set at database initialisation.
1351
+ :param pulumi.Input[bool] is_ha_cluster: Enable or disable high availability for the Database Instance.
1352
+
1353
+ > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
1354
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceLoadBalancerArgs', 'DatabaseInstanceLoadBalancerArgsDict']]]] load_balancers: List of Load Balancer endpoints of the Database Instance.
1355
+ :param pulumi.Input[Union['DatabaseInstanceLogsPolicyArgs', 'DatabaseInstanceLogsPolicyArgsDict']] logs_policy: Logs policy configuration
1356
+ :param pulumi.Input[str] name: The name of the Database Instance.
1357
+ :param pulumi.Input[str] node_type: The type of Database Instance you want to create (e.g. `db-dev-s`).
1358
+
1359
+ > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
1360
+ interruption.
1361
+
1362
+ > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
1363
+ :param pulumi.Input[str] organization_id: The organization ID the Database Instance is associated with.
1364
+ :param pulumi.Input[str] password: Password for the first user of the Database Instance.
1365
+ :param pulumi.Input[Union['DatabaseInstancePrivateNetworkArgs', 'DatabaseInstancePrivateNetworkArgsDict']] private_network: List of Private Networks endpoints of the Database Instance.
1366
+ :param pulumi.Input[str] project_id: `project_id`) The ID of the project the Database
1367
+ Instance is associated with.
1368
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DatabaseInstanceReadReplicaArgs', 'DatabaseInstanceReadReplicaArgsDict']]]] read_replicas: List of read replicas of the Database Instance.
1369
+ :param pulumi.Input[str] region: `region`) The region
1370
+ in which the Database Instance should be created.
1371
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] settings: Map of engine settings to be set on a running instance.
1372
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The tags associated with the Database Instance.
1373
+ :param pulumi.Input[str] user_name: Identifier for the first user of the Database Instance.
1374
+
1375
+ > **Important** Updates to `user_name` will recreate the Database Instance.
1376
+ :param pulumi.Input[int] volume_size_in_gb: Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
1377
+
1378
+ > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
1379
+ :param pulumi.Input[str] volume_type: Type of volume where data are stored (`bssd`, `lssd`, `sbs_5k` or `sbs_15k`).
1380
+ """
1381
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
1382
+
1383
+ __props__ = _DatabaseInstanceState.__new__(_DatabaseInstanceState)
1384
+
1385
+ __props__.__dict__["backup_same_region"] = backup_same_region
1386
+ __props__.__dict__["backup_schedule_frequency"] = backup_schedule_frequency
1387
+ __props__.__dict__["backup_schedule_retention"] = backup_schedule_retention
1388
+ __props__.__dict__["certificate"] = certificate
1389
+ __props__.__dict__["disable_backup"] = disable_backup
1390
+ __props__.__dict__["encryption_at_rest"] = encryption_at_rest
1391
+ __props__.__dict__["endpoint_ip"] = endpoint_ip
1392
+ __props__.__dict__["endpoint_port"] = endpoint_port
1393
+ __props__.__dict__["engine"] = engine
1394
+ __props__.__dict__["init_settings"] = init_settings
1395
+ __props__.__dict__["is_ha_cluster"] = is_ha_cluster
1396
+ __props__.__dict__["load_balancers"] = load_balancers
1397
+ __props__.__dict__["logs_policy"] = logs_policy
1398
+ __props__.__dict__["name"] = name
1399
+ __props__.__dict__["node_type"] = node_type
1400
+ __props__.__dict__["organization_id"] = organization_id
1401
+ __props__.__dict__["password"] = password
1402
+ __props__.__dict__["private_network"] = private_network
1403
+ __props__.__dict__["project_id"] = project_id
1404
+ __props__.__dict__["read_replicas"] = read_replicas
1405
+ __props__.__dict__["region"] = region
1406
+ __props__.__dict__["settings"] = settings
1407
+ __props__.__dict__["tags"] = tags
1408
+ __props__.__dict__["user_name"] = user_name
1409
+ __props__.__dict__["volume_size_in_gb"] = volume_size_in_gb
1410
+ __props__.__dict__["volume_type"] = volume_type
1411
+ return DatabaseInstance(resource_name, opts=opts, __props__=__props__)
1412
+
1413
+ @property
1414
+ @pulumi.getter(name="backupSameRegion")
1415
+ def backup_same_region(self) -> pulumi.Output[bool]:
1416
+ """
1417
+ Boolean to store logical backups in the same region as the database instance
1418
+ """
1419
+ return pulumi.get(self, "backup_same_region")
1420
+
1421
+ @property
1422
+ @pulumi.getter(name="backupScheduleFrequency")
1423
+ def backup_schedule_frequency(self) -> pulumi.Output[int]:
1424
+ """
1425
+ Backup schedule frequency in hours
1426
+ """
1427
+ return pulumi.get(self, "backup_schedule_frequency")
1428
+
1429
+ @property
1430
+ @pulumi.getter(name="backupScheduleRetention")
1431
+ def backup_schedule_retention(self) -> pulumi.Output[int]:
1432
+ """
1433
+ Backup schedule retention in days
1434
+ """
1435
+ return pulumi.get(self, "backup_schedule_retention")
1436
+
1437
+ @property
1438
+ @pulumi.getter
1439
+ def certificate(self) -> pulumi.Output[str]:
1440
+ """
1441
+ Certificate of the Database Instance.
1442
+ """
1443
+ return pulumi.get(self, "certificate")
1444
+
1445
+ @property
1446
+ @pulumi.getter(name="disableBackup")
1447
+ def disable_backup(self) -> pulumi.Output[Optional[bool]]:
1448
+ """
1449
+ Disable automated backup for the database instance
1450
+ """
1451
+ return pulumi.get(self, "disable_backup")
1452
+
1453
+ @property
1454
+ @pulumi.getter(name="encryptionAtRest")
1455
+ def encryption_at_rest(self) -> pulumi.Output[Optional[bool]]:
1456
+ """
1457
+ Enable or disable encryption at rest for the Database Instance.
1458
+ """
1459
+ return pulumi.get(self, "encryption_at_rest")
1460
+
1461
+ @property
1462
+ @pulumi.getter(name="endpointIp")
1463
+ @_utilities.deprecated("""Please use the private_network or the load_balancer attribute""")
1464
+ def endpoint_ip(self) -> pulumi.Output[str]:
1465
+ """
1466
+ (Deprecated) The IP of the Database Instance.
1467
+ """
1468
+ return pulumi.get(self, "endpoint_ip")
1469
+
1470
+ @property
1471
+ @pulumi.getter(name="endpointPort")
1472
+ def endpoint_port(self) -> pulumi.Output[int]:
1473
+ """
1474
+ (Deprecated) The port of the Database Instance.
1475
+ """
1476
+ return pulumi.get(self, "endpoint_port")
1477
+
1478
+ @property
1479
+ @pulumi.getter
1480
+ def engine(self) -> pulumi.Output[str]:
1481
+ """
1482
+ Database Instance's engine version (e.g. `PostgreSQL-11`).
1483
+
1484
+ > **Important** Updates to `engine` will recreate the Database Instance.
1485
+ """
1486
+ return pulumi.get(self, "engine")
1487
+
1488
+ @property
1489
+ @pulumi.getter(name="initSettings")
1490
+ def init_settings(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
1491
+ """
1492
+ Map of engine settings to be set at database initialisation.
1493
+ """
1494
+ return pulumi.get(self, "init_settings")
1495
+
1496
+ @property
1497
+ @pulumi.getter(name="isHaCluster")
1498
+ def is_ha_cluster(self) -> pulumi.Output[Optional[bool]]:
1499
+ """
1500
+ Enable or disable high availability for the Database Instance.
1501
+
1502
+ > **Important** Updates to `is_ha_cluster` will recreate the Database Instance.
1503
+ """
1504
+ return pulumi.get(self, "is_ha_cluster")
1505
+
1506
+ @property
1507
+ @pulumi.getter(name="loadBalancers")
1508
+ def load_balancers(self) -> pulumi.Output[Sequence['outputs.DatabaseInstanceLoadBalancer']]:
1509
+ """
1510
+ List of Load Balancer endpoints of the Database Instance.
1511
+ """
1512
+ return pulumi.get(self, "load_balancers")
1513
+
1514
+ @property
1515
+ @pulumi.getter(name="logsPolicy")
1516
+ def logs_policy(self) -> pulumi.Output['outputs.DatabaseInstanceLogsPolicy']:
1517
+ """
1518
+ Logs policy configuration
1519
+ """
1520
+ return pulumi.get(self, "logs_policy")
1521
+
1522
+ @property
1523
+ @pulumi.getter
1524
+ def name(self) -> pulumi.Output[str]:
1525
+ """
1526
+ The name of the Database Instance.
1527
+ """
1528
+ return pulumi.get(self, "name")
1529
+
1530
+ @property
1531
+ @pulumi.getter(name="nodeType")
1532
+ def node_type(self) -> pulumi.Output[str]:
1533
+ """
1534
+ The type of Database Instance you want to create (e.g. `db-dev-s`).
1535
+
1536
+ > **Important** Updates to `node_type` will upgrade the Database Instance to the desired `node_type` without any
1537
+ interruption.
1538
+
1539
+ > **Important** Once your Database Instance reaches `disk_full` status, if you are using `lssd` storage, you should upgrade the `node_type`, and if you are using `bssd` storage, you should increase the volume size before making any other changes to your Database Instance.
1540
+ """
1541
+ return pulumi.get(self, "node_type")
1542
+
1543
+ @property
1544
+ @pulumi.getter(name="organizationId")
1545
+ def organization_id(self) -> pulumi.Output[str]:
1546
+ """
1547
+ The organization ID the Database Instance is associated with.
1548
+ """
1549
+ return pulumi.get(self, "organization_id")
1550
+
1551
+ @property
1552
+ @pulumi.getter
1553
+ def password(self) -> pulumi.Output[Optional[str]]:
1554
+ """
1555
+ Password for the first user of the Database Instance.
1556
+ """
1557
+ return pulumi.get(self, "password")
1558
+
1559
+ @property
1560
+ @pulumi.getter(name="privateNetwork")
1561
+ def private_network(self) -> pulumi.Output[Optional['outputs.DatabaseInstancePrivateNetwork']]:
1562
+ """
1563
+ List of Private Networks endpoints of the Database Instance.
1564
+ """
1565
+ return pulumi.get(self, "private_network")
1566
+
1567
+ @property
1568
+ @pulumi.getter(name="projectId")
1569
+ def project_id(self) -> pulumi.Output[str]:
1570
+ """
1571
+ `project_id`) The ID of the project the Database
1572
+ Instance is associated with.
1573
+ """
1574
+ return pulumi.get(self, "project_id")
1575
+
1576
+ @property
1577
+ @pulumi.getter(name="readReplicas")
1578
+ def read_replicas(self) -> pulumi.Output[Sequence['outputs.DatabaseInstanceReadReplica']]:
1579
+ """
1580
+ List of read replicas of the Database Instance.
1581
+ """
1582
+ return pulumi.get(self, "read_replicas")
1583
+
1584
+ @property
1585
+ @pulumi.getter
1586
+ def region(self) -> pulumi.Output[str]:
1587
+ """
1588
+ `region`) The region
1589
+ in which the Database Instance should be created.
1590
+ """
1591
+ return pulumi.get(self, "region")
1592
+
1593
+ @property
1594
+ @pulumi.getter
1595
+ def settings(self) -> pulumi.Output[Mapping[str, str]]:
1596
+ """
1597
+ Map of engine settings to be set on a running instance.
1598
+ """
1599
+ return pulumi.get(self, "settings")
1600
+
1601
+ @property
1602
+ @pulumi.getter
1603
+ def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
1604
+ """
1605
+ The tags associated with the Database Instance.
1606
+ """
1607
+ return pulumi.get(self, "tags")
1608
+
1609
+ @property
1610
+ @pulumi.getter(name="userName")
1611
+ def user_name(self) -> pulumi.Output[str]:
1612
+ """
1613
+ Identifier for the first user of the Database Instance.
1614
+
1615
+ > **Important** Updates to `user_name` will recreate the Database Instance.
1616
+ """
1617
+ return pulumi.get(self, "user_name")
1618
+
1619
+ @property
1620
+ @pulumi.getter(name="volumeSizeInGb")
1621
+ def volume_size_in_gb(self) -> pulumi.Output[int]:
1622
+ """
1623
+ Volume size (in GB). Cannot be used when `volume_type` is set to `lssd`.
1624
+
1625
+ > **Important** Once your Database Instance reaches `disk_full` status, you should increase the volume size before making any other change to your Database Instance.
1626
+ """
1627
+ return pulumi.get(self, "volume_size_in_gb")
1628
+
1629
+ @property
1630
+ @pulumi.getter(name="volumeType")
1631
+ def volume_type(self) -> pulumi.Output[Optional[str]]:
1632
+ """
1633
+ Type of volume where data are stored (`bssd`, `lssd`, `sbs_5k` or `sbs_15k`).
1634
+ """
1635
+ return pulumi.get(self, "volume_type")
1636
+