diff --git a/.apigentools-info b/.apigentools-info index 1582852087e5..deaf58eb9779 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-02 16:18:05.602948", - "spec_repo_commit": "bc53c28f" + "regenerated": "2025-01-02 17:32:11.649371", + "spec_repo_commit": "733cf3ea" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-02 16:18:05.618096", - "spec_repo_commit": "bc53c28f" + "regenerated": "2025-01-02 17:32:11.666424", + "spec_repo_commit": "733cf3ea" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 941ec65aef2c..76195d0bb3d0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -40985,6 +40985,14 @@ paths: operationId: UpdateRestrictionPolicy parameters: - $ref: '#/components/parameters/ResourceID' + - description: Allows admins (users with the `user_access_manage` permission) + to remove their own access from the resource if set to `true`. By default, + this is set to `false`, preventing admins from locking themselves out. + in: query + name: allow_self_lockout + required: false + schema: + type: string requestBody: content: application/json: diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 261588b38faf..f01c518099d3 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2021,6 +2021,7 @@ }, "v2.UpdateRestrictionPolicy" => { "resource_id" => "String", + "allow_self_lockout" => "String", "body" => "RestrictionPolicyUpdateRequest", }, "v2.AggregateRUMEvents" => { diff --git a/lib/datadog_api_client/v2/api/restriction_policies_api.rb b/lib/datadog_api_client/v2/api/restriction_policies_api.rb index f5c68c2b69a9..dde2543a4c6b 100644 --- a/lib/datadog_api_client/v2/api/restriction_policies_api.rb +++ b/lib/datadog_api_client/v2/api/restriction_policies_api.rb @@ -195,6 +195,7 @@ def update_restriction_policy(resource_id, body, opts = {}) # @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `reference-table`, `security-rule`, `slo`. # @param body [RestrictionPolicyUpdateRequest] Restriction policy payload # @param opts [Hash] the optional parameters + # @option opts [String] :allow_self_lockout Allows admins (users with the `user_access_manage` permission) to remove their own access from the resource if set to `true`. By default, this is set to `false`, preventing admins from locking themselves out. # @return [Array<(RestrictionPolicyResponse, Integer, Hash)>] RestrictionPolicyResponse data, response status code and response headers def update_restriction_policy_with_http_info(resource_id, body, opts = {}) @@ -214,6 +215,7 @@ def update_restriction_policy_with_http_info(resource_id, body, opts = {}) # query parameters query_params = opts[:query_params] || {} + query_params[:'allow_self_lockout'] = opts[:'allow_self_lockout'] if !opts[:'allow_self_lockout'].nil? # header parameters header_params = opts[:header_params] || {}