diff --git a/.apigentools-info b/.apigentools-info index cd694687fd68..12360120a419 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-06-03 16:54:49.684837", - "spec_repo_commit": "df6778e5" + "regenerated": "2024-06-04 17:14:15.132008", + "spec_repo_commit": "19bb17df" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-06-03 16:54:49.702609", - "spec_repo_commit": "df6778e5" + "regenerated": "2024-06-04 17:14:15.149962", + "spec_repo_commit": "19bb17df" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5c5d9ab0ae22..19f88ccf6cae 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1376,6 +1376,15 @@ components: team: $ref: '#/components/schemas/RelationshipToTeam' type: object + AuthNMappingResourceType: + description: The type of resource being mapped to. + enum: + - role + - team + type: string + x-enum-varnames: + - ROLE + - TEAM AuthNMappingResponse: description: AuthN Mapping response from the API. properties: @@ -24104,6 +24113,11 @@ paths: required: false schema: type: string + - description: Filter by mapping resource type. Defaults to "role" if not specified. + in: query + name: resource_type + schema: + $ref: '#/components/schemas/AuthNMappingResourceType' responses: '200': content: diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 95ad1f81ed7d..b648054cb23d 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -939,6 +939,7 @@ "page_number" => "Integer", "sort" => "AuthNMappingsSort", "filter" => "String", + "resource_type" => "AuthNMappingResourceType", }, "v2.CreateAuthNMapping" => { "body" => "AuthNMappingCreateRequest", diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index aa7aa13c9e24..add8a8726120 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -912,6 +912,7 @@ def overrides "v2.authn_mapping_relationships" => "AuthNMappingRelationships", "v2.authn_mapping_relationship_to_role" => "AuthNMappingRelationshipToRole", "v2.authn_mapping_relationship_to_team" => "AuthNMappingRelationshipToTeam", + "v2.authn_mapping_resource_type" => "AuthNMappingResourceType", "v2.authn_mapping_response" => "AuthNMappingResponse", "v2.authn_mappings_response" => "AuthNMappingsResponse", "v2.authn_mappings_sort" => "AuthNMappingsSort", diff --git a/lib/datadog_api_client/v2/api/authn_mappings_api.rb b/lib/datadog_api_client/v2/api/authn_mappings_api.rb index 134abfe86d48..48774b2372b6 100644 --- a/lib/datadog_api_client/v2/api/authn_mappings_api.rb +++ b/lib/datadog_api_client/v2/api/authn_mappings_api.rb @@ -237,6 +237,7 @@ def list_authn_mappings(opts = {}) # @option opts [Integer] :page_number Specific page number to return. # @option opts [AuthNMappingsSort] :sort Sort AuthN Mappings depending on the given field. # @option opts [String] :filter Filter all mappings by the given string. + # @option opts [AuthNMappingResourceType] :resource_type Filter by mapping resource type. Defaults to "role" if not specified. # @return [Array<(AuthNMappingsResponse, Integer, Hash)>] AuthNMappingsResponse data, response status code and response headers def list_authn_mappings_with_http_info(opts = {}) @@ -247,6 +248,10 @@ def list_authn_mappings_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end + allowable_values = ['role', 'team'] + if @api_client.config.client_side_validation && opts[:'resource_type'] && !allowable_values.include?(opts[:'resource_type']) + fail ArgumentError, "invalid value for \"resource_type\", must be one of #{allowable_values}" + end # resource path local_var_path = '/api/v2/authn_mappings' @@ -256,6 +261,7 @@ def list_authn_mappings_with_http_info(opts = {}) query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/datadog_api_client/v2/models/authn_mapping_resource_type.rb b/lib/datadog_api_client/v2/models/authn_mapping_resource_type.rb new file mode 100644 index 000000000000..142d8487cf98 --- /dev/null +++ b/lib/datadog_api_client/v2/models/authn_mapping_resource_type.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of resource being mapped to. + class AuthNMappingResourceType + include BaseEnumModel + + ROLE = "role".freeze + TEAM = "team".freeze + end +end