Skip to content

Commit 3293447

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ef18f6d of spec repo
1 parent 7a520a2 commit 3293447

12 files changed

Lines changed: 625 additions & 24 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55072,6 +55072,40 @@ components:
5507255072
type: string
5507355073
x-enum-varnames:
5507455074
- MANAGED_ORGS
55075+
MaxSessionDurationType:
55076+
description: Data type of a maximum session duration update.
55077+
enum: [max_session_duration]
55078+
example: max_session_duration
55079+
type: string
55080+
x-enum-varnames:
55081+
- MAX_SESSION_DURATION
55082+
MaxSessionDurationUpdateAttributes:
55083+
description: Writable attributes for the maximum session duration.
55084+
properties:
55085+
max_session_duration:
55086+
description: The maximum session duration, in seconds.
55087+
example: 604800
55088+
format: int64
55089+
minimum: 1
55090+
type: integer
55091+
required: [max_session_duration]
55092+
type: object
55093+
MaxSessionDurationUpdateData:
55094+
description: A maximum session duration update operation.
55095+
properties:
55096+
attributes:
55097+
$ref: "#/components/schemas/MaxSessionDurationUpdateAttributes"
55098+
type:
55099+
$ref: "#/components/schemas/MaxSessionDurationType"
55100+
required: [type, attributes]
55101+
type: object
55102+
MaxSessionDurationUpdateRequest:
55103+
description: A request to update the maximum session duration for an organization.
55104+
properties:
55105+
data:
55106+
$ref: "#/components/schemas/MaxSessionDurationUpdateData"
55107+
required: [data]
55108+
type: object
5507555109
McpScanRequest:
5507655110
description: The top-level request object for submitting an MCP SCA dependency scan.
5507755111
properties:
@@ -140664,6 +140698,45 @@ paths:
140664140698
x-unstable: |-
140665140699
**Note**: This endpoint is in preview and is subject to change.
140666140700
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
140701+
/api/v2/login/org_configs/max_session_duration:
140702+
put:
140703+
description: Update the maximum session duration for the current organization. The duration is specified in seconds.
140704+
operationId: UpdateLoginOrgConfigsMaxSessionDuration
140705+
requestBody:
140706+
content:
140707+
application/json:
140708+
examples:
140709+
default:
140710+
value:
140711+
data:
140712+
attributes:
140713+
max_session_duration: 604800
140714+
type: max_session_duration
140715+
schema:
140716+
$ref: "#/components/schemas/MaxSessionDurationUpdateRequest"
140717+
required: true
140718+
responses:
140719+
"204":
140720+
description: No Content
140721+
"400":
140722+
$ref: "#/components/responses/BadRequestResponse"
140723+
"401":
140724+
$ref: "#/components/responses/UnauthorizedResponse"
140725+
"403":
140726+
$ref: "#/components/responses/ForbiddenResponse"
140727+
"429":
140728+
$ref: "#/components/responses/TooManyRequestsResponse"
140729+
security:
140730+
- apiKeyAuth: []
140731+
appKeyAuth: []
140732+
- AuthZ:
140733+
- org_management
140734+
summary: Update the maximum session duration
140735+
tags: [Organizations]
140736+
"x-permission":
140737+
operator: OR
140738+
permissions:
140739+
- org_management
140667140740
/api/v2/logs:
140668140741
post:
140669140742
description: |-
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Update the maximum session duration returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
5+
6+
body = DatadogAPIClient::V2::MaxSessionDurationUpdateRequest.new({
7+
data: DatadogAPIClient::V2::MaxSessionDurationUpdateData.new({
8+
attributes: DatadogAPIClient::V2::MaxSessionDurationUpdateAttributes.new({
9+
max_session_duration: 604800,
10+
}),
11+
type: DatadogAPIClient::V2::MaxSessionDurationType::MAX_SESSION_DURATION,
12+
}),
13+
})
14+
api_instance.update_login_org_configs_max_session_duration(body)

features/scenarios_model_mapping.rb

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,6 +3740,32 @@
37403740
"v2.UpdateIPAllowlist" => {
37413741
"body" => "IPAllowlistUpdateRequest",
37423742
},
3743+
"v2.UpdateLoginOrgConfigsMaxSessionDuration" => {
3744+
"body" => "MaxSessionDurationUpdateRequest",
3745+
},
3746+
"v2.ListOrgs" => {
3747+
"filter_name" => "String",
3748+
},
3749+
"v2.UpdateOrgSamlConfigurations" => {
3750+
"body" => "OrgSAMLPreferencesUpdateRequest",
3751+
},
3752+
"v2.GetOrgConfig" => {
3753+
"org_config_name" => "String",
3754+
},
3755+
"v2.UpdateOrgConfig" => {
3756+
"org_config_name" => "String",
3757+
"body" => "OrgConfigWriteRequest",
3758+
},
3759+
"v2.UploadIdPMetadata" => {
3760+
"idp_file" => "File",
3761+
},
3762+
"v2.GetSAMLConfiguration" => {
3763+
"saml_config_uuid" => "String",
3764+
},
3765+
"v2.UpdateSAMLConfiguration" => {
3766+
"saml_config_uuid" => "String",
3767+
"body" => "SAMLConfigurationUpdateRequest",
3768+
},
37433769
"v2.SubmitLog" => {
37443770
"content_encoding" => "ContentEncoding",
37453771
"ddtags" => "String",
@@ -4261,29 +4287,6 @@
42614287
"v2.ResolveOnCallPage" => {
42624288
"page_id" => "UUID",
42634289
},
4264-
"v2.ListOrgs" => {
4265-
"filter_name" => "String",
4266-
},
4267-
"v2.UpdateOrgSamlConfigurations" => {
4268-
"body" => "OrgSAMLPreferencesUpdateRequest",
4269-
},
4270-
"v2.GetOrgConfig" => {
4271-
"org_config_name" => "String",
4272-
},
4273-
"v2.UpdateOrgConfig" => {
4274-
"org_config_name" => "String",
4275-
"body" => "OrgConfigWriteRequest",
4276-
},
4277-
"v2.UploadIdPMetadata" => {
4278-
"idp_file" => "File",
4279-
},
4280-
"v2.GetSAMLConfiguration" => {
4281-
"saml_config_uuid" => "String",
4282-
},
4283-
"v2.UpdateSAMLConfiguration" => {
4284-
"saml_config_uuid" => "String",
4285-
"body" => "SAMLConfigurationUpdateRequest",
4286-
},
42874290
"v2.DisableCustomerOrg" => {
42884291
"body" => "CustomerOrgDisableRequest",
42894292
},

features/v2/organizations.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,20 @@ Feature: Organizations
147147
When the request is sent
148148
Then the response status is 404 Not Found
149149

150+
@generated @skip @team:DataDog/delegated-auth-login
151+
Scenario: Update the maximum session duration returns "Bad Request" response
152+
Given new "UpdateLoginOrgConfigsMaxSessionDuration" request
153+
And body with value {"data": {"attributes": {"max_session_duration": 604800}, "type": "max_session_duration"}}
154+
When the request is sent
155+
Then the response status is 400 Bad Request
156+
157+
@generated @skip @team:DataDog/delegated-auth-login
158+
Scenario: Update the maximum session duration returns "No Content" response
159+
Given new "UpdateLoginOrgConfigsMaxSessionDuration" request
160+
And body with value {"data": {"attributes": {"max_session_duration": 604800}, "type": "max_session_duration"}}
161+
When the request is sent
162+
Then the response status is 204 No Content
163+
150164
@skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-terraform-config @skip-typescript @skip-validation @team:DataDog/delegated-auth-login
151165
Scenario: Upload IdP metadata returns "Bad Request - caused by either malformed XML or invalid SAML IdP metadata" response
152166
Given new "UploadIdPMetadata" request

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4427,6 +4427,12 @@
44274427
"type": "safe"
44284428
}
44294429
},
4430+
"UpdateLoginOrgConfigsMaxSessionDuration": {
4431+
"tag": "Organizations",
4432+
"undo": {
4433+
"type": "idempotent"
4434+
}
4435+
},
44304436
"SubmitLog": {
44314437
"tag": "Logs",
44324438
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ def initialize
519519
"v2.update_jira_issue_template": false,
520520
"v2.create_tenancy_config": false,
521521
"v2.get_tenancy_configs": false,
522+
"v2.update_org_saml_configurations": false,
522523
"v2.add_role_to_restriction_query": false,
523524
"v2.create_restriction_query": false,
524525
"v2.delete_restriction_query": false,
@@ -558,7 +559,6 @@ def initialize
558559
"v2.get_scopes_restriction": false,
559560
"v2.register_o_auth_client": false,
560561
"v2.upsert_scopes_restriction": false,
561-
"v2.update_org_saml_configurations": false,
562562
"v2.disable_customer_org": false,
563563
"v2.bulk_update_org_group_memberships": false,
564564
"v2.create_org_group": false,

lib/datadog_api_client/inflector.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4384,6 +4384,10 @@ def overrides
43844384
"v2.managed_orgs_relationship_to_orgs" => "ManagedOrgsRelationshipToOrgs",
43854385
"v2.managed_orgs_response" => "ManagedOrgsResponse",
43864386
"v2.managed_orgs_type" => "ManagedOrgsType",
4387+
"v2.max_session_duration_type" => "MaxSessionDurationType",
4388+
"v2.max_session_duration_update_attributes" => "MaxSessionDurationUpdateAttributes",
4389+
"v2.max_session_duration_update_data" => "MaxSessionDurationUpdateData",
4390+
"v2.max_session_duration_update_request" => "MaxSessionDurationUpdateRequest",
43874391
"v2.mcp_scan_request" => "McpScanRequest",
43884392
"v2.mcp_scan_request_data" => "McpScanRequestData",
43894393
"v2.mcp_scan_request_data_attributes" => "McpScanRequestDataAttributes",

lib/datadog_api_client/v2/api/organizations_api.rb

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,73 @@ def list_saml_configurations_with_http_info(opts = {})
335335
return data, status_code, headers
336336
end
337337

338+
# Update the maximum session duration.
339+
#
340+
# @see #update_login_org_configs_max_session_duration_with_http_info
341+
def update_login_org_configs_max_session_duration(body, opts = {})
342+
update_login_org_configs_max_session_duration_with_http_info(body, opts)
343+
nil
344+
end
345+
346+
# Update the maximum session duration.
347+
#
348+
# Update the maximum session duration for the current organization. The duration is specified in seconds.
349+
#
350+
# @param body [MaxSessionDurationUpdateRequest]
351+
# @param opts [Hash] the optional parameters
352+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
353+
def update_login_org_configs_max_session_duration_with_http_info(body, opts = {})
354+
355+
if @api_client.config.debugging
356+
@api_client.config.logger.debug 'Calling API: OrganizationsAPI.update_login_org_configs_max_session_duration ...'
357+
end
358+
# verify the required parameter 'body' is set
359+
if @api_client.config.client_side_validation && body.nil?
360+
fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationsAPI.update_login_org_configs_max_session_duration"
361+
end
362+
# resource path
363+
local_var_path = '/api/v2/login/org_configs/max_session_duration'
364+
365+
# query parameters
366+
query_params = opts[:query_params] || {}
367+
368+
# header parameters
369+
header_params = opts[:header_params] || {}
370+
# HTTP header 'Accept' (if needed)
371+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
372+
# HTTP header 'Content-Type'
373+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
374+
375+
# form parameters
376+
form_params = opts[:form_params] || {}
377+
378+
# http body (model)
379+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
380+
381+
# return_type
382+
return_type = opts[:debug_return_type]
383+
384+
# auth_names
385+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
386+
387+
new_options = opts.merge(
388+
:operation => :update_login_org_configs_max_session_duration,
389+
:header_params => header_params,
390+
:query_params => query_params,
391+
:form_params => form_params,
392+
:body => post_body,
393+
:auth_names => auth_names,
394+
:return_type => return_type,
395+
:api_version => "V2"
396+
)
397+
398+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
399+
if @api_client.config.debugging
400+
@api_client.config.logger.debug "API called: OrganizationsAPI#update_login_org_configs_max_session_duration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
401+
end
402+
return data, status_code, headers
403+
end
404+
338405
# Update a specific Org Config.
339406
#
340407
# @see #update_org_config_with_http_info
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# Data type of a maximum session duration update.
21+
class MaxSessionDurationType
22+
include BaseEnumModel
23+
24+
MAX_SESSION_DURATION = "max_session_duration".freeze
25+
end
26+
end

0 commit comments

Comments
 (0)