@@ -883,6 +883,84 @@ def get_team_permission_settings_with_http_info(team_id, opts = {})
883883 return data , status_code , headers
884884 end
885885
886+ # Get team sync configurations.
887+ #
888+ # @see #get_team_sync_with_http_info
889+ def get_team_sync ( filter_source , opts = { } )
890+ data , _status_code , _headers = get_team_sync_with_http_info ( filter_source , opts )
891+ data
892+ end
893+
894+ # Get team sync configurations.
895+ #
896+ # Get all team synchronization configurations.
897+ # Returns a list of configurations used for linking or provisioning teams with external sources like GitHub.
898+ #
899+ # @param filter_source [TeamSyncAttributesSource] Filter by the external source platform for team synchronization
900+ # @param opts [Hash] the optional parameters
901+ # @return [Array<(TeamSyncResponse, Integer, Hash)>] TeamSyncResponse data, response status code and response headers
902+ def get_team_sync_with_http_info ( filter_source , opts = { } )
903+ unstable_enabled = @api_client . config . unstable_operations [ "v2.get_team_sync" . to_sym ]
904+ if unstable_enabled
905+ @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "v2.get_team_sync" )
906+ else
907+ raise DatadogAPIClient ::APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "v2.get_team_sync" ) )
908+ end
909+
910+ if @api_client . config . debugging
911+ @api_client . config . logger . debug 'Calling API: TeamsAPI.get_team_sync ...'
912+ end
913+ # verify the required parameter 'filter_source' is set
914+ if @api_client . config . client_side_validation && filter_source . nil?
915+ fail ArgumentError , "Missing the required parameter 'filter_source' when calling TeamsAPI.get_team_sync"
916+ end
917+ # verify enum value
918+ allowable_values = [ 'github' ]
919+ if @api_client . config . client_side_validation && !allowable_values . include? ( filter_source )
920+ fail ArgumentError , "invalid value for \" filter_source\" , must be one of #{ allowable_values } "
921+ end
922+ # resource path
923+ local_var_path = '/api/v2/team/sync'
924+
925+ # query parameters
926+ query_params = opts [ :query_params ] || { }
927+ query_params [ :'filter[source]' ] = filter_source
928+
929+ # header parameters
930+ header_params = opts [ :header_params ] || { }
931+ # HTTP header 'Accept' (if needed)
932+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
933+
934+ # form parameters
935+ form_params = opts [ :form_params ] || { }
936+
937+ # http body (model)
938+ post_body = opts [ :debug_body ]
939+
940+ # return_type
941+ return_type = opts [ :debug_return_type ] || 'TeamSyncResponse'
942+
943+ # auth_names
944+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ]
945+
946+ new_options = opts . merge (
947+ :operation => :get_team_sync ,
948+ :header_params => header_params ,
949+ :query_params => query_params ,
950+ :form_params => form_params ,
951+ :body => post_body ,
952+ :auth_names => auth_names ,
953+ :return_type => return_type ,
954+ :api_version => "V2"
955+ )
956+
957+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
958+ if @api_client . config . debugging
959+ @api_client . config . logger . debug "API called: TeamsAPI#get_team_sync\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
960+ end
961+ return data , status_code , headers
962+ end
963+
886964 # Get user memberships.
887965 #
888966 # @see #get_user_memberships_with_http_info
@@ -1245,7 +1323,7 @@ def sync_teams(body, opts = {})
12451323 # [A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
12461324 # and the GitHub App integrated with Datadog must have the `Members Read` permission. Matching is performed by comparing the Datadog team handle to the GitHub team slug
12471325 # using a normalized exact match; case is ignored and spaces are removed. No modifications are made
1248- # to teams in GitHub. This will not create new Teams in Datadog.
1326+ # to teams in GitHub. This only creates new teams in Datadog when type is set to `provision` .
12491327 #
12501328 # @param body [TeamSyncRequest]
12511329 # @param opts [Hash] the optional parameters
0 commit comments