pulumi-mongodbatlas 4.2.0a1769139905__py3-none-any.whl → 4.3.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.
@@ -0,0 +1,203 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
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
+
18
+ __all__ = [
19
+ 'GetLogIntegrationsResult',
20
+ 'AwaitableGetLogIntegrationsResult',
21
+ 'get_log_integrations',
22
+ 'get_log_integrations_output',
23
+ ]
24
+
25
+ @pulumi.output_type
26
+ class GetLogIntegrationsResult:
27
+ """
28
+ A collection of values returned by getLogIntegrations.
29
+ """
30
+ def __init__(__self__, id=None, integration_type=None, project_id=None, results=None):
31
+ if id and not isinstance(id, str):
32
+ raise TypeError("Expected argument 'id' to be a str")
33
+ pulumi.set(__self__, "id", id)
34
+ if integration_type and not isinstance(integration_type, str):
35
+ raise TypeError("Expected argument 'integration_type' to be a str")
36
+ pulumi.set(__self__, "integration_type", integration_type)
37
+ if project_id and not isinstance(project_id, str):
38
+ raise TypeError("Expected argument 'project_id' to be a str")
39
+ pulumi.set(__self__, "project_id", project_id)
40
+ if results and not isinstance(results, list):
41
+ raise TypeError("Expected argument 'results' to be a list")
42
+ pulumi.set(__self__, "results", results)
43
+
44
+ @_builtins.property
45
+ @pulumi.getter
46
+ def id(self) -> _builtins.str:
47
+ """
48
+ The provider-assigned unique ID for this managed resource.
49
+ """
50
+ return pulumi.get(self, "id")
51
+
52
+ @_builtins.property
53
+ @pulumi.getter(name="integrationType")
54
+ def integration_type(self) -> Optional[_builtins.str]:
55
+ """
56
+ Optional filter by integration type (e.g., 'S3*LOG*EXPORT').
57
+ """
58
+ return pulumi.get(self, "integration_type")
59
+
60
+ @_builtins.property
61
+ @pulumi.getter(name="projectId")
62
+ def project_id(self) -> _builtins.str:
63
+ """
64
+ Unique 24-hexadecimal digit string that identifies your project.
65
+ """
66
+ return pulumi.get(self, "project_id")
67
+
68
+ @_builtins.property
69
+ @pulumi.getter
70
+ def results(self) -> Sequence['outputs.GetLogIntegrationsResultResult']:
71
+ """
72
+ List of returned documents that MongoDB Cloud provides when completing this request.
73
+ """
74
+ return pulumi.get(self, "results")
75
+
76
+
77
+ class AwaitableGetLogIntegrationsResult(GetLogIntegrationsResult):
78
+ # pylint: disable=using-constant-test
79
+ def __await__(self):
80
+ if False:
81
+ yield self
82
+ return GetLogIntegrationsResult(
83
+ id=self.id,
84
+ integration_type=self.integration_type,
85
+ project_id=self.project_id,
86
+ results=self.results)
87
+
88
+
89
+ def get_log_integrations(integration_type: Optional[_builtins.str] = None,
90
+ project_id: Optional[_builtins.str] = None,
91
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLogIntegrationsResult:
92
+ """
93
+ `get_log_integrations` returns all log integrations in a project. Log integrations allow you to continually export `mongod`, `mongos`, and audit logs to an AWS S3 bucket with 1-minute log export intervals.
94
+
95
+ To use this data source, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.
96
+
97
+ ## Example Usage
98
+
99
+ ### S
100
+ ```python
101
+ import pulumi
102
+ import pulumi_mongodbatlas as mongodbatlas
103
+
104
+ project = mongodbatlas.Project("project",
105
+ name=atlas_project_name,
106
+ org_id=atlas_org_id)
107
+ # Set up cloud provider access in Atlas using the created IAM role
108
+ setup_only = mongodbatlas.CloudProviderAccessSetup("setup_only",
109
+ project_id=project.id,
110
+ provider_name="AWS")
111
+ auth_role = mongodbatlas.CloudProviderAccessAuthorization("auth_role",
112
+ project_id=project.id,
113
+ role_id=setup_only.role_id,
114
+ aws={
115
+ "iam_assumed_role_arn": atlas_role["arn"],
116
+ })
117
+ # Set up log integration with authorized IAM role
118
+ example_log_integration = mongodbatlas.LogIntegration("example",
119
+ project_id=project.id,
120
+ bucket_name=log_bucket["bucket"],
121
+ iam_role_id=auth_role.role_id,
122
+ prefix_path="atlas-logs",
123
+ type="S3_LOG_EXPORT",
124
+ log_types=["MONGOD_AUDIT"])
125
+ example = mongodbatlas.get_log_integration_output(project_id=example_log_integration.project_id,
126
+ integration_id=example_log_integration.integration_id)
127
+ example_get_log_integrations = mongodbatlas.get_log_integrations_output(project_id=example_log_integration.project_id)
128
+ pulumi.export("logIntegrationBucketName", example.bucket_name)
129
+ pulumi.export("logIntegrationsResults", example_get_log_integrations.results)
130
+ ```
131
+
132
+
133
+ :param _builtins.str integration_type: Optional filter by integration type (e.g., 'S3*LOG*EXPORT').
134
+ :param _builtins.str project_id: Unique 24-hexadecimal digit string that identifies your project.
135
+ """
136
+ __args__ = dict()
137
+ __args__['integrationType'] = integration_type
138
+ __args__['projectId'] = project_id
139
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
140
+ __ret__ = pulumi.runtime.invoke('mongodbatlas:index/getLogIntegrations:getLogIntegrations', __args__, opts=opts, typ=GetLogIntegrationsResult).value
141
+
142
+ return AwaitableGetLogIntegrationsResult(
143
+ id=pulumi.get(__ret__, 'id'),
144
+ integration_type=pulumi.get(__ret__, 'integration_type'),
145
+ project_id=pulumi.get(__ret__, 'project_id'),
146
+ results=pulumi.get(__ret__, 'results'))
147
+ def get_log_integrations_output(integration_type: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
148
+ project_id: Optional[pulumi.Input[_builtins.str]] = None,
149
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLogIntegrationsResult]:
150
+ """
151
+ `get_log_integrations` returns all log integrations in a project. Log integrations allow you to continually export `mongod`, `mongos`, and audit logs to an AWS S3 bucket with 1-minute log export intervals.
152
+
153
+ To use this data source, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.
154
+
155
+ ## Example Usage
156
+
157
+ ### S
158
+ ```python
159
+ import pulumi
160
+ import pulumi_mongodbatlas as mongodbatlas
161
+
162
+ project = mongodbatlas.Project("project",
163
+ name=atlas_project_name,
164
+ org_id=atlas_org_id)
165
+ # Set up cloud provider access in Atlas using the created IAM role
166
+ setup_only = mongodbatlas.CloudProviderAccessSetup("setup_only",
167
+ project_id=project.id,
168
+ provider_name="AWS")
169
+ auth_role = mongodbatlas.CloudProviderAccessAuthorization("auth_role",
170
+ project_id=project.id,
171
+ role_id=setup_only.role_id,
172
+ aws={
173
+ "iam_assumed_role_arn": atlas_role["arn"],
174
+ })
175
+ # Set up log integration with authorized IAM role
176
+ example_log_integration = mongodbatlas.LogIntegration("example",
177
+ project_id=project.id,
178
+ bucket_name=log_bucket["bucket"],
179
+ iam_role_id=auth_role.role_id,
180
+ prefix_path="atlas-logs",
181
+ type="S3_LOG_EXPORT",
182
+ log_types=["MONGOD_AUDIT"])
183
+ example = mongodbatlas.get_log_integration_output(project_id=example_log_integration.project_id,
184
+ integration_id=example_log_integration.integration_id)
185
+ example_get_log_integrations = mongodbatlas.get_log_integrations_output(project_id=example_log_integration.project_id)
186
+ pulumi.export("logIntegrationBucketName", example.bucket_name)
187
+ pulumi.export("logIntegrationsResults", example_get_log_integrations.results)
188
+ ```
189
+
190
+
191
+ :param _builtins.str integration_type: Optional filter by integration type (e.g., 'S3*LOG*EXPORT').
192
+ :param _builtins.str project_id: Unique 24-hexadecimal digit string that identifies your project.
193
+ """
194
+ __args__ = dict()
195
+ __args__['integrationType'] = integration_type
196
+ __args__['projectId'] = project_id
197
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
198
+ __ret__ = pulumi.runtime.invoke_output('mongodbatlas:index/getLogIntegrations:getLogIntegrations', __args__, opts=opts, typ=GetLogIntegrationsResult)
199
+ return __ret__.apply(lambda __response__: GetLogIntegrationsResult(
200
+ id=pulumi.get(__response__, 'id'),
201
+ integration_type=pulumi.get(__response__, 'integration_type'),
202
+ project_id=pulumi.get(__response__, 'project_id'),
203
+ results=pulumi.get(__response__, 'results')))
@@ -75,6 +75,16 @@ def get_private_endpoint_regional_mode(enabled: Optional[_builtins.bool] = None,
75
75
 
76
76
  > **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation.
77
77
 
78
+ ## Example Usage
79
+
80
+ ```python
81
+ import pulumi
82
+ import pulumi_private as private
83
+
84
+ test_endpoint_regional_mode = private.index.EndpointRegionalMode("test", project_id=<PROJECT-ID>)
85
+ test = private.index.endpoint_regional_mode(project_id=test_endpoint_regional_mode["projectId"])
86
+ ```
87
+
78
88
 
79
89
  :param _builtins.bool enabled: Flag that indicates whether the regionalized private endpoitn setting is enabled for the project.
80
90
  :param _builtins.str project_id: Unique identifier for the project.
@@ -97,6 +107,16 @@ def get_private_endpoint_regional_mode_output(enabled: Optional[pulumi.Input[Opt
97
107
 
98
108
  > **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation.
99
109
 
110
+ ## Example Usage
111
+
112
+ ```python
113
+ import pulumi
114
+ import pulumi_private as private
115
+
116
+ test_endpoint_regional_mode = private.index.EndpointRegionalMode("test", project_id=<PROJECT-ID>)
117
+ test = private.index.endpoint_regional_mode(project_id=test_endpoint_regional_mode["projectId"])
118
+ ```
119
+
100
120
 
101
121
  :param _builtins.bool enabled: Flag that indicates whether the regionalized private endpoitn setting is enabled for the project.
102
122
  :param _builtins.str project_id: Unique identifier for the project.
@@ -0,0 +1,147 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
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
+
18
+ __all__ = [
19
+ 'GetProjectIpAccessListsResult',
20
+ 'AwaitableGetProjectIpAccessListsResult',
21
+ 'get_project_ip_access_lists',
22
+ 'get_project_ip_access_lists_output',
23
+ ]
24
+
25
+ @pulumi.output_type
26
+ class GetProjectIpAccessListsResult:
27
+ """
28
+ A collection of values returned by getProjectIpAccessLists.
29
+ """
30
+ def __init__(__self__, id=None, project_id=None, results=None):
31
+ if id and not isinstance(id, str):
32
+ raise TypeError("Expected argument 'id' to be a str")
33
+ pulumi.set(__self__, "id", id)
34
+ if project_id and not isinstance(project_id, str):
35
+ raise TypeError("Expected argument 'project_id' to be a str")
36
+ pulumi.set(__self__, "project_id", project_id)
37
+ if results and not isinstance(results, list):
38
+ raise TypeError("Expected argument 'results' to be a list")
39
+ pulumi.set(__self__, "results", results)
40
+
41
+ @_builtins.property
42
+ @pulumi.getter
43
+ def id(self) -> _builtins.str:
44
+ """
45
+ The provider-assigned unique ID for this managed resource.
46
+ """
47
+ return pulumi.get(self, "id")
48
+
49
+ @_builtins.property
50
+ @pulumi.getter(name="projectId")
51
+ def project_id(self) -> _builtins.str:
52
+ """
53
+ Unique 24-hexadecimal digit string that identifies your project.
54
+ """
55
+ return pulumi.get(self, "project_id")
56
+
57
+ @_builtins.property
58
+ @pulumi.getter
59
+ def results(self) -> Sequence['outputs.GetProjectIpAccessListsResultResult']:
60
+ """
61
+ List of returned documents that MongoDB Cloud provides when completing this request.
62
+ """
63
+ return pulumi.get(self, "results")
64
+
65
+
66
+ class AwaitableGetProjectIpAccessListsResult(GetProjectIpAccessListsResult):
67
+ # pylint: disable=using-constant-test
68
+ def __await__(self):
69
+ if False:
70
+ yield self
71
+ return GetProjectIpAccessListsResult(
72
+ id=self.id,
73
+ project_id=self.project_id,
74
+ results=self.results)
75
+
76
+
77
+ def get_project_ip_access_lists(project_id: Optional[_builtins.str] = None,
78
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetProjectIpAccessListsResult:
79
+ """
80
+ `get_project_ip_access_lists` returns all IP Access List entries for a project. The access list grants access from IPs, CIDRs or AWS Security Groups (if VPC Peering is enabled) to clusters within the Project.
81
+
82
+ > **NOTE:** Groups and projects are synonymous terms. You may find `groupId` in the official documentation.
83
+
84
+ ## Example Usage
85
+
86
+ ```python
87
+ import pulumi
88
+ import pulumi_mongodbatlas as mongodbatlas
89
+
90
+ ip = mongodbatlas.ProjectIpAccessList("ip",
91
+ project_id=project_id,
92
+ ip_address="2.3.4.5",
93
+ comment="ip address test")
94
+ cidr = mongodbatlas.ProjectIpAccessList("cidr",
95
+ project_id=project_id,
96
+ cidr_block="1.2.3.4/32",
97
+ comment="cidr block test")
98
+ this = mongodbatlas.get_project_ip_access_lists(project_id=project_id)
99
+ ```
100
+
101
+
102
+ :param _builtins.str project_id: Unique 24-hexadecimal digit string that identifies your project.
103
+ """
104
+ __args__ = dict()
105
+ __args__['projectId'] = project_id
106
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
107
+ __ret__ = pulumi.runtime.invoke('mongodbatlas:index/getProjectIpAccessLists:getProjectIpAccessLists', __args__, opts=opts, typ=GetProjectIpAccessListsResult).value
108
+
109
+ return AwaitableGetProjectIpAccessListsResult(
110
+ id=pulumi.get(__ret__, 'id'),
111
+ project_id=pulumi.get(__ret__, 'project_id'),
112
+ results=pulumi.get(__ret__, 'results'))
113
+ def get_project_ip_access_lists_output(project_id: Optional[pulumi.Input[_builtins.str]] = None,
114
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetProjectIpAccessListsResult]:
115
+ """
116
+ `get_project_ip_access_lists` returns all IP Access List entries for a project. The access list grants access from IPs, CIDRs or AWS Security Groups (if VPC Peering is enabled) to clusters within the Project.
117
+
118
+ > **NOTE:** Groups and projects are synonymous terms. You may find `groupId` in the official documentation.
119
+
120
+ ## Example Usage
121
+
122
+ ```python
123
+ import pulumi
124
+ import pulumi_mongodbatlas as mongodbatlas
125
+
126
+ ip = mongodbatlas.ProjectIpAccessList("ip",
127
+ project_id=project_id,
128
+ ip_address="2.3.4.5",
129
+ comment="ip address test")
130
+ cidr = mongodbatlas.ProjectIpAccessList("cidr",
131
+ project_id=project_id,
132
+ cidr_block="1.2.3.4/32",
133
+ comment="cidr block test")
134
+ this = mongodbatlas.get_project_ip_access_lists(project_id=project_id)
135
+ ```
136
+
137
+
138
+ :param _builtins.str project_id: Unique 24-hexadecimal digit string that identifies your project.
139
+ """
140
+ __args__ = dict()
141
+ __args__['projectId'] = project_id
142
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
143
+ __ret__ = pulumi.runtime.invoke_output('mongodbatlas:index/getProjectIpAccessLists:getProjectIpAccessLists', __args__, opts=opts, typ=GetProjectIpAccessListsResult)
144
+ return __ret__.apply(lambda __response__: GetProjectIpAccessListsResult(
145
+ id=pulumi.get(__response__, 'id'),
146
+ project_id=pulumi.get(__response__, 'project_id'),
147
+ results=pulumi.get(__response__, 'results')))
@@ -109,6 +109,8 @@ class AwaitableGetPushBasedLogExportResult(GetPushBasedLogExportResult):
109
109
  def get_push_based_log_export(project_id: Optional[_builtins.str] = None,
110
110
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPushBasedLogExportResult:
111
111
  """
112
+ > **DEPRECATED:** This data source is deprecated and will be removed in the next major version. Please use `LogIntegration` instead. For migration instructions, see the Push-Based Log Export to Log Integration Migration Guide.
113
+
112
114
  `PushBasedLogExport` describes the configured project level settings for the push-based log export feature.
113
115
 
114
116
  ## Example Usage
@@ -160,6 +162,8 @@ def get_push_based_log_export(project_id: Optional[_builtins.str] = None,
160
162
  def get_push_based_log_export_output(project_id: Optional[pulumi.Input[_builtins.str]] = None,
161
163
  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPushBasedLogExportResult]:
162
164
  """
165
+ > **DEPRECATED:** This data source is deprecated and will be removed in the next major version. Please use `LogIntegration` instead. For migration instructions, see the Push-Based Log Export to Log Integration Migration Guide.
166
+
163
167
  `PushBasedLogExport` describes the configured project level settings for the push-based log export feature.
164
168
 
165
169
  ## Example Usage