Skip to content

Commit 8ab1d8a

Browse files
authored
chore: Uses production API spec and SDK (#3981)
1 parent 10cc6d6 commit 8ab1d8a

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

internal/serviceapi/alertconfigurationapi/data_source_schema.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/serviceapi/logintegration/resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func checkDestroy(state *terraform.State) error {
233233
}
234234
for _, rs := range state.RootModule().Resources {
235235
if rs.Type == "mongodbatlas_push_based_log_export_api" {
236-
_, _, err := acc.ConnPreview().PushBasedLogExportApi.GetGroupLogIntegration(context.Background(), rs.Primary.Attributes["project_id"], rs.Primary.Attributes["id"]).Execute() // TODO: CLOUDP-362256 change to ConnV2() once API is in production
236+
_, _, err := acc.ConnV2().PushBasedLogExportApi.GetGroupLogIntegration(context.Background(), rs.Primary.Attributes["project_id"], rs.Primary.Attributes["id"]).Execute()
237237
if err == nil {
238238
return fmt.Errorf("push-based log export for project_id %s with id %s still exists", rs.Primary.Attributes["project_id"], rs.Primary.Attributes["id"])
239239
}

scripts/generate-autogen-api-spec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
SOURCE_SPEC_URL="${SOURCE_SPEC_URL:-https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2.yaml}" # TODO: CLOUDP-362256 change to main branch once API is in production
4+
SOURCE_SPEC_URL="${SOURCE_SPEC_URL:-https://raw.githubusercontent.com/mongodb/openapi/main/openapi/v2.yaml}"
55
SPEC_PATH="tools/codegen/atlasapispec/raw-multi-version-api-spec.yml"
66
FLATTENED_SPEC_PATH="tools/codegen/atlasapispec/multi-version-api-spec.flattened.yml"
77

tools/codegen/models/alert_configuration_api.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ data_sources:
860860
present_in_any_response: false
861861
request_only_required_on_create: false
862862
- string: {}
863-
description: Comparison operator to apply when checking the current metric value against **matcher[n].value**.
863+
description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values.
864864
computed_optional_required: computed
865865
tf_schema_name: operator
866866
tf_model_name: Operator
@@ -1330,7 +1330,7 @@ data_sources:
13301330
13311331
Atlas returns this value if you set `"notifications.[n].typeName" :"WEBHOOK"` and either:
13321332
* You set `notification.[n].webhookSecret` to a non-empty string
1333-
* You set a default webhookSecret either on the Integrations page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration)
1333+
* You set a default webhookSecret either on the Integrations page, or with the Integrations API
13341334
13351335
**NOTE**: When you view or edit the alert for a webhook notification, the secret appears completely redacted.
13361336
computed_optional_required: computed
@@ -1348,7 +1348,7 @@ data_sources:
13481348
13491349
Atlas returns this value if you set `"notifications.[n].typeName" :"WEBHOOK"` and either:
13501350
* You set `notification.[n].webhookURL` to a non-empty string
1351-
* You set a default webhookUrl either on the [Integrations](https://www.mongodb.com/docs/atlas/tutorial/third-party-service-integrations/#std-label-third-party-integrations) page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration)
1351+
* You set a default webhookUrl either on the Integrations page, or with the Integrations API
13521352
13531353
**NOTE**: When you view or edit the alert for a Webhook URL notification, the URL appears partially redacted.
13541354
computed_optional_required: computed

tools/codegen/models/log_integration.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ schema:
1010
req_body_usage: all_request_bodies
1111
sensitive: false
1212
create_only: false
13+
present_in_any_response: true
14+
request_only_required_on_create: false
1315
- string: {}
1416
description: |-
1517
Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.
@@ -22,6 +24,8 @@ schema:
2224
req_body_usage: omit_always
2325
sensitive: false
2426
create_only: true
27+
present_in_any_response: false
28+
request_only_required_on_create: false
2529
- string: {}
2630
description: Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
2731
computed_optional_required: required
@@ -31,6 +35,8 @@ schema:
3135
req_body_usage: all_request_bodies
3236
sensitive: false
3337
create_only: false
38+
present_in_any_response: true
39+
request_only_required_on_create: false
3440
- string: {}
3541
description: Unique 24-character hexadecimal digit string that identifies the log integration configuration.
3642
computed_optional_required: computed
@@ -40,6 +46,8 @@ schema:
4046
req_body_usage: omit_always
4147
sensitive: false
4248
create_only: false
49+
present_in_any_response: true
50+
request_only_required_on_create: false
4351
- string: {}
4452
description: AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
4553
computed_optional_required: optional
@@ -49,6 +57,8 @@ schema:
4957
req_body_usage: all_request_bodies
5058
sensitive: false
5159
create_only: false
60+
present_in_any_response: true
61+
request_only_required_on_create: false
5262
- set:
5363
element_type: 4
5464
description: 'Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT.'
@@ -63,6 +73,8 @@ schema:
6373
req_body_usage: all_request_bodies
6474
sensitive: false
6575
create_only: false
76+
present_in_any_response: true
77+
request_only_required_on_create: false
6678
- string: {}
6779
description: S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
6880
computed_optional_required: required
@@ -72,6 +84,8 @@ schema:
7284
req_body_usage: all_request_bodies
7385
sensitive: false
7486
create_only: false
87+
present_in_any_response: true
88+
request_only_required_on_create: false
7589
- string: {}
7690
description: Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
7791
computed_optional_required: required
@@ -81,6 +95,8 @@ schema:
8195
req_body_usage: all_request_bodies
8296
sensitive: false
8397
create_only: false
98+
present_in_any_response: true
99+
request_only_required_on_create: false
84100
operations:
85101
delete:
86102
http_method: DELETE

0 commit comments

Comments
 (0)