Class: DatadogAPIClient::V2::TeamsAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::TeamsAPI
- Defined in:
- lib/datadog_api_client/v2/api/teams_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_member_team(super_team_id, body, opts = {}) ⇒ Object
Add a member team.
-
#add_member_team_with_http_info(super_team_id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#add_team_hierarchy_link(body, opts = {}) ⇒ Object
Create a team hierarchy link.
-
#add_team_hierarchy_link_with_http_info(body, opts = {}) ⇒ Array<(TeamHierarchyLinkResponse, Integer, Hash)>
Create a team hierarchy link.
-
#create_team(body, opts = {}) ⇒ Object
Create a team.
-
#create_team_connections(body, opts = {}) ⇒ Object
Create team connections.
-
#create_team_connections_with_http_info(body, opts = {}) ⇒ Array<(TeamConnectionsResponse, Integer, Hash)>
Create team connections.
-
#create_team_link(team_id, body, opts = {}) ⇒ Object
Create a team link.
-
#create_team_link_with_http_info(team_id, body, opts = {}) ⇒ Array<(TeamLinkResponse, Integer, Hash)>
Create a team link.
-
#create_team_membership(team_id, body, opts = {}) ⇒ Object
Add a user to a team.
-
#create_team_membership_with_http_info(team_id, body, opts = {}) ⇒ Array<(UserTeamResponse, Integer, Hash)>
Add a user to a team.
-
#create_team_notification_rule(team_id, body, opts = {}) ⇒ Object
Create team notification rule.
-
#create_team_notification_rule_with_http_info(team_id, body, opts = {}) ⇒ Array<(TeamNotificationRuleResponse, Integer, Hash)>
Create team notification rule.
-
#create_team_with_http_info(body, opts = {}) ⇒ Array<(TeamResponse, Integer, Hash)>
Create a team.
-
#delete_team(team_id, opts = {}) ⇒ Object
Remove a team.
-
#delete_team_connections(body, opts = {}) ⇒ Object
Delete team connections.
-
#delete_team_connections_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete team connections.
-
#delete_team_link(team_id, link_id, opts = {}) ⇒ Object
Remove a team link.
-
#delete_team_link_with_http_info(team_id, link_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a team link.
-
#delete_team_membership(team_id, user_id, opts = {}) ⇒ Object
Remove a user from a team.
-
#delete_team_membership_with_http_info(team_id, user_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a user from a team.
-
#delete_team_notification_rule(team_id, rule_id, opts = {}) ⇒ Object
Delete team notification rule.
-
#delete_team_notification_rule_with_http_info(team_id, rule_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete team notification rule.
-
#delete_team_with_http_info(team_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a team.
-
#get_team(team_id, opts = {}) ⇒ Object
Get a team.
-
#get_team_hierarchy_link(link_id, opts = {}) ⇒ Object
Get a team hierarchy link.
-
#get_team_hierarchy_link_with_http_info(link_id, opts = {}) ⇒ Array<(TeamHierarchyLinkResponse, Integer, Hash)>
Get a team hierarchy link.
-
#get_team_link(team_id, link_id, opts = {}) ⇒ Object
Get a team link.
-
#get_team_link_with_http_info(team_id, link_id, opts = {}) ⇒ Array<(TeamLinkResponse, Integer, Hash)>
Get a team link.
-
#get_team_links(team_id, opts = {}) ⇒ Object
Get links for a team.
-
#get_team_links_with_http_info(team_id, opts = {}) ⇒ Array<(TeamLinksResponse, Integer, Hash)>
Get links for a team.
-
#get_team_memberships(team_id, opts = {}) ⇒ Object
Get team memberships.
-
#get_team_memberships_with_http_info(team_id, opts = {}) ⇒ Array<(UserTeamsResponse, Integer, Hash)>
Get team memberships.
-
#get_team_memberships_with_pagination(team_id, opts = {}) {|UserTeam| ... } ⇒ Object
Get team memberships.
-
#get_team_notification_rule(team_id, rule_id, opts = {}) ⇒ Object
Get team notification rule.
-
#get_team_notification_rule_with_http_info(team_id, rule_id, opts = {}) ⇒ Array<(TeamNotificationRuleResponse, Integer, Hash)>
Get team notification rule.
-
#get_team_notification_rules(team_id, opts = {}) ⇒ Object
Get team notification rules.
-
#get_team_notification_rules_with_http_info(team_id, opts = {}) ⇒ Array<(TeamNotificationRulesResponse, Integer, Hash)>
Get team notification rules.
-
#get_team_permission_settings(team_id, opts = {}) ⇒ Object
Get permission settings for a team.
-
#get_team_permission_settings_with_http_info(team_id, opts = {}) ⇒ Array<(TeamPermissionSettingsResponse, Integer, Hash)>
Get permission settings for a team.
-
#get_team_sync(filter_source, opts = {}) ⇒ Object
Get team sync configurations.
-
#get_team_sync_with_http_info(filter_source, opts = {}) ⇒ Array<(TeamSyncResponse, Integer, Hash)>
Get team sync configurations.
-
#get_team_with_http_info(team_id, opts = {}) ⇒ Array<(TeamResponse, Integer, Hash)>
Get a team.
-
#get_user_memberships(user_uuid, opts = {}) ⇒ Object
Get user memberships.
-
#get_user_memberships_with_http_info(user_uuid, opts = {}) ⇒ Array<(UserTeamsResponse, Integer, Hash)>
Get user memberships.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ TeamsAPI
constructor
A new instance of TeamsAPI.
-
#list_member_teams(super_team_id, opts = {}) ⇒ Object
Get all member teams.
-
#list_member_teams_with_http_info(super_team_id, opts = {}) ⇒ Array<(TeamsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#list_member_teams_with_pagination(super_team_id, opts = {}) {|Team| ... } ⇒ Object
Get all member teams.
-
#list_team_connections(opts = {}) ⇒ Object
List team connections.
-
#list_team_connections_with_http_info(opts = {}) ⇒ Array<(TeamConnectionsResponse, Integer, Hash)>
List team connections.
-
#list_team_connections_with_pagination(opts = {}) {|TeamConnection| ... } ⇒ Object
List team connections.
-
#list_team_hierarchy_links(opts = {}) ⇒ Object
Get team hierarchy links.
-
#list_team_hierarchy_links_with_http_info(opts = {}) ⇒ Array<(TeamHierarchyLinksResponse, Integer, Hash)>
Get team hierarchy links.
-
#list_team_hierarchy_links_with_pagination(opts = {}) {|TeamHierarchyLink| ... } ⇒ Object
Get team hierarchy links.
-
#list_teams(opts = {}) ⇒ Object
Get all teams.
-
#list_teams_with_http_info(opts = {}) ⇒ Array<(TeamsResponse, Integer, Hash)>
Get all teams.
-
#list_teams_with_pagination(opts = {}) {|Team| ... } ⇒ Object
Get all teams.
-
#remove_member_team(super_team_id, member_team_id, opts = {}) ⇒ Object
Remove a member team.
-
#remove_member_team_with_http_info(super_team_id, member_team_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#remove_team_hierarchy_link(link_id, opts = {}) ⇒ Object
Remove a team hierarchy link.
-
#remove_team_hierarchy_link_with_http_info(link_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a team hierarchy link.
-
#sync_teams(body, opts = {}) ⇒ Object
Link Teams with GitHub Teams.
-
#sync_teams_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Link Teams with GitHub Teams.
-
#update_team(team_id, body, opts = {}) ⇒ Object
Update a team.
-
#update_team_link(team_id, link_id, body, opts = {}) ⇒ Object
Update a team link.
-
#update_team_link_with_http_info(team_id, link_id, body, opts = {}) ⇒ Array<(TeamLinkResponse, Integer, Hash)>
Update a team link.
-
#update_team_membership(team_id, user_id, body, opts = {}) ⇒ Object
Update a user's membership attributes on a team.
-
#update_team_membership_with_http_info(team_id, user_id, body, opts = {}) ⇒ Array<(UserTeamResponse, Integer, Hash)>
Update a user's membership attributes on a team.
-
#update_team_notification_rule(team_id, rule_id, body, opts = {}) ⇒ Object
Update team notification rule.
-
#update_team_notification_rule_with_http_info(team_id, rule_id, body, opts = {}) ⇒ Array<(TeamNotificationRuleResponse, Integer, Hash)>
Update team notification rule.
-
#update_team_permission_setting(team_id, action, body, opts = {}) ⇒ Object
Update permission setting for team.
-
#update_team_permission_setting_with_http_info(team_id, action, body, opts = {}) ⇒ Array<(TeamPermissionSettingResponse, Integer, Hash)>
Update permission setting for team.
-
#update_team_with_http_info(team_id, body, opts = {}) ⇒ Array<(TeamResponse, Integer, Hash)>
Update a team.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ TeamsAPI
Returns a new instance of TeamsAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 22 def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#add_member_team(super_team_id, body, opts = {}) ⇒ Object
Add a member team.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 29 def add_member_team(super_team_id, body, opts = {}) add_member_team_with_http_info(super_team_id, body, opts) nil end |
#add_member_team_with_http_info(super_team_id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
This API is deprecated.
Add a member team.
Add a member team.
Adds the team given by the id in the body as a member team of the super team.
Note: This API is deprecated. For creating team hierarchy links, use the team hierarchy links API: POST /api/v2/team-hierarchy-links.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 47 def add_member_team_with_http_info(super_team_id, body, opts = {}) warn "[DEPRECATION] `AddMemberTeam` is deprecated." unstable_enabled = @api_client.config.unstable_operations["v2.add_member_team".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.add_member_team") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.add_member_team")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.add_member_team ...' end # verify the required parameter 'super_team_id' is set if @api_client.config.client_side_validation && super_team_id.nil? fail ArgumentError, "Missing the required parameter 'super_team_id' when calling TeamsAPI.add_member_team" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.add_member_team" end # resource path local_var_path = '/api/v2/team/{super_team_id}/member_teams'.sub('{super_team_id}', CGI.escape(super_team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :add_member_team, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#add_member_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_team_hierarchy_link(body, opts = {}) ⇒ Object
Create a team hierarchy link.
113 114 115 116 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 113 def add_team_hierarchy_link(body, opts = {}) data, _status_code, _headers = add_team_hierarchy_link_with_http_info(body, opts) data end |
#add_team_hierarchy_link_with_http_info(body, opts = {}) ⇒ Array<(TeamHierarchyLinkResponse, Integer, Hash)>
Create a team hierarchy link.
Create a new team hierarchy link between a parent team and a sub team.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 125 def add_team_hierarchy_link_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.add_team_hierarchy_link ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.add_team_hierarchy_link" end # resource path local_var_path = '/api/v2/team-hierarchy-links' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamHierarchyLinkResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :add_team_hierarchy_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#add_team_hierarchy_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_team(body, opts = {}) ⇒ Object
Create a team.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 29 def create_team(body, opts = {}) data, _status_code, _headers = create_team_with_http_info(body, opts) data end |
#create_team_connections(body, opts = {}) ⇒ Object
Create team connections.
248 249 250 251 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 248 def create_team_connections(body, opts = {}) data, _status_code, _headers = create_team_connections_with_http_info(body, opts) data end |
#create_team_connections_with_http_info(body, opts = {}) ⇒ Array<(TeamConnectionsResponse, Integer, Hash)>
Create team connections.
Create multiple team connections.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 260 def create_team_connections_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_connections ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_connections" end # resource path local_var_path = '/api/v2/team/connections' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_team_connections, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#create_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_team_link(team_id, body, opts = {}) ⇒ Object
Create a team link.
97 98 99 100 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 97 def create_team_link(team_id, body, opts = {}) data, _status_code, _headers = create_team_link_with_http_info(team_id, body, opts) data end |
#create_team_link_with_http_info(team_id, body, opts = {}) ⇒ Array<(TeamLinkResponse, Integer, Hash)>
Create a team link.
Add a new link to a team.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 110 def create_team_link_with_http_info(team_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_link ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.create_team_link" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_link" end # resource path local_var_path = '/api/v2/team/{team_id}/links'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamLinkResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_team_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#create_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_team_membership(team_id, body, opts = {}) ⇒ Object
Add a user to a team.
169 170 171 172 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 169 def create_team_membership(team_id, body, opts = {}) data, _status_code, _headers = create_team_membership_with_http_info(team_id, body, opts) data end |
#create_team_membership_with_http_info(team_id, body, opts = {}) ⇒ Array<(UserTeamResponse, Integer, Hash)>
Add a user to a team.
Add a user to a team.
Note: Each team has a setting that determines who is allowed to modify membership of the team. The user_access_manage permission generally grants access to modify membership of any team. To get the full picture, see Team Membership documentation.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 182 def create_team_membership_with_http_info(team_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_membership ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.create_team_membership" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_membership" end # resource path local_var_path = '/api/v2/team/{team_id}/memberships'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'UserTeamResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_team_membership, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#create_team_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_team_notification_rule(team_id, body, opts = {}) ⇒ Object
Create team notification rule.
461 462 463 464 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 461 def create_team_notification_rule(team_id, body, opts = {}) data, _status_code, _headers = create_team_notification_rule_with_http_info(team_id, body, opts) data end |
#create_team_notification_rule_with_http_info(team_id, body, opts = {}) ⇒ Array<(TeamNotificationRuleResponse, Integer, Hash)>
Create team notification rule.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 471 def create_team_notification_rule_with_http_info(team_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_notification_rule ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.create_team_notification_rule" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_notification_rule" end # resource path local_var_path = '/api/v2/team/{team_id}/notification-rules'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamNotificationRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_team_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#create_team_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_team_with_http_info(body, opts = {}) ⇒ Array<(TeamResponse, Integer, Hash)>
Create a team.
Create a new team.
User IDs passed through the users relationship field are added to the team.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 42 def create_team_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.create_team ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team" end # resource path local_var_path = '/api/v2/team' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_team, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#create_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_team(team_id, opts = {}) ⇒ Object
Remove a team.
241 242 243 244 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 241 def delete_team(team_id, opts = {}) delete_team_with_http_info(team_id, opts) nil end |
#delete_team_connections(body, opts = {}) ⇒ Object
Delete team connections.
595 596 597 598 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 595 def delete_team_connections(body, opts = {}) delete_team_connections_with_http_info(body, opts) nil end |
#delete_team_connections_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete team connections.
Delete multiple team connections.
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 607 def delete_team_connections_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_connections ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.delete_team_connections" end # resource path local_var_path = '/api/v2/team/connections' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_team_connections, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#delete_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_team_link(team_id, link_id, opts = {}) ⇒ Object
Remove a team link.
306 307 308 309 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 306 def delete_team_link(team_id, link_id, opts = {}) delete_team_link_with_http_info(team_id, link_id, opts) nil end |
#delete_team_link_with_http_info(team_id, link_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a team link.
Remove a link from a team.
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 319 def delete_team_link_with_http_info(team_id, link_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_link ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.delete_team_link" end # verify the required parameter 'link_id' is set if @api_client.config.client_side_validation && link_id.nil? fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.delete_team_link" end # resource path local_var_path = '/api/v2/team/{team_id}/links/{link_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_team_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#delete_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_team_membership(team_id, user_id, opts = {}) ⇒ Object
Remove a user from a team.
376 377 378 379 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 376 def delete_team_membership(team_id, user_id, opts = {}) delete_team_membership_with_http_info(team_id, user_id, opts) nil end |
#delete_team_membership_with_http_info(team_id, user_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a user from a team.
Remove a user from a team.
Note: Each team has a setting that determines who is allowed to modify membership of the team. The user_access_manage permission generally grants access to modify membership of any team. To get the full picture, see Team Membership documentation.
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 389 def delete_team_membership_with_http_info(team_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_membership ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.delete_team_membership" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsAPI.delete_team_membership" end # resource path local_var_path = '/api/v2/team/{team_id}/memberships/{user_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_team_membership, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#delete_team_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_team_notification_rule(team_id, rule_id, opts = {}) ⇒ Object
Delete team notification rule.
804 805 806 807 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 804 def delete_team_notification_rule(team_id, rule_id, opts = {}) delete_team_notification_rule_with_http_info(team_id, rule_id, opts) nil end |
#delete_team_notification_rule_with_http_info(team_id, rule_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete team notification rule.
814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 814 def delete_team_notification_rule_with_http_info(team_id, rule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_notification_rule ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.delete_team_notification_rule" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling TeamsAPI.delete_team_notification_rule" end # resource path local_var_path = '/api/v2/team/{team_id}/notification-rules/{rule_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_team_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#delete_team_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_team_with_http_info(team_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a team.
Remove a team using the team's id.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 253 def delete_team_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.delete_team" end # resource path local_var_path = '/api/v2/team/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_team, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#delete_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team(team_id, opts = {}) ⇒ Object
Get a team.
446 447 448 449 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 446 def get_team(team_id, opts = {}) data, _status_code, _headers = get_team_with_http_info(team_id, opts) data end |
#get_team_hierarchy_link(link_id, opts = {}) ⇒ Object
Get a team hierarchy link.
936 937 938 939 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 936 def get_team_hierarchy_link(link_id, opts = {}) data, _status_code, _headers = get_team_hierarchy_link_with_http_info(link_id, opts) data end |
#get_team_hierarchy_link_with_http_info(link_id, opts = {}) ⇒ Array<(TeamHierarchyLinkResponse, Integer, Hash)>
Get a team hierarchy link.
Get a single team hierarchy link for the given link_id.
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 948 def get_team_hierarchy_link_with_http_info(link_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_hierarchy_link ...' end # verify the required parameter 'link_id' is set if @api_client.config.client_side_validation && link_id.nil? fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.get_team_hierarchy_link" end # resource path local_var_path = '/api/v2/team-hierarchy-links/{link_id}'.sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamHierarchyLinkResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_hierarchy_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_hierarchy_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_link(team_id, link_id, opts = {}) ⇒ Object
Get a team link.
511 512 513 514 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 511 def get_team_link(team_id, link_id, opts = {}) data, _status_code, _headers = get_team_link_with_http_info(team_id, link_id, opts) data end |
#get_team_link_with_http_info(team_id, link_id, opts = {}) ⇒ Array<(TeamLinkResponse, Integer, Hash)>
Get a team link.
Get a single link for a team.
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 524 def get_team_link_with_http_info(team_id, link_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_link ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_link" end # verify the required parameter 'link_id' is set if @api_client.config.client_side_validation && link_id.nil? fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.get_team_link" end # resource path local_var_path = '/api/v2/team/{team_id}/links/{link_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamLinkResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_links(team_id, opts = {}) ⇒ Object
Get links for a team.
581 582 583 584 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 581 def get_team_links(team_id, opts = {}) data, _status_code, _headers = get_team_links_with_http_info(team_id, opts) data end |
#get_team_links_with_http_info(team_id, opts = {}) ⇒ Array<(TeamLinksResponse, Integer, Hash)>
Get links for a team.
Get all links for a given team.
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 593 def get_team_links_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_links ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_links" end # resource path local_var_path = '/api/v2/team/{team_id}/links'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamLinksResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_links, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_memberships(team_id, opts = {}) ⇒ Object
Get team memberships.
646 647 648 649 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 646 def get_team_memberships(team_id, opts = {}) data, _status_code, _headers = get_team_memberships_with_http_info(team_id, opts) data end |
#get_team_memberships_with_http_info(team_id, opts = {}) ⇒ Array<(UserTeamsResponse, Integer, Hash)>
Get team memberships.
Get a paginated list of members for a team
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 662 def get_team_memberships_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_memberships ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_memberships" end allowable_values = ['manager_name', '-manager_name', 'name', '-name', 'handle', '-handle', 'email', '-email'] 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 # resource path local_var_path = '/api/v2/team/{team_id}/memberships'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'filter[keyword]'] = opts[:'filter_keyword'] if !opts[:'filter_keyword'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UserTeamsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_memberships, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_memberships_with_pagination(team_id, opts = {}) {|UserTeam| ... } ⇒ Object
Get team memberships.
Provide a paginated version of #get_team_memberships, returning all items.
To use it you need to use a block: get_team_memberships_with_pagination { |item| p item }
727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 727 def get_team_memberships_with_pagination(team_id, opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) while true do response = get_team_memberships(team_id, opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) end end |
#get_team_notification_rule(team_id, rule_id, opts = {}) ⇒ Object
Get team notification rule.
1235 1236 1237 1238 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1235 def get_team_notification_rule(team_id, rule_id, opts = {}) data, _status_code, _headers = get_team_notification_rule_with_http_info(team_id, rule_id, opts) data end |
#get_team_notification_rule_with_http_info(team_id, rule_id, opts = {}) ⇒ Array<(TeamNotificationRuleResponse, Integer, Hash)>
Get team notification rule.
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1245 def get_team_notification_rule_with_http_info(team_id, rule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_notification_rule ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_notification_rule" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling TeamsAPI.get_team_notification_rule" end # resource path local_var_path = '/api/v2/team/{team_id}/notification-rules/{rule_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamNotificationRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_notification_rules(team_id, opts = {}) ⇒ Object
Get team notification rules.
1302 1303 1304 1305 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1302 def get_team_notification_rules(team_id, opts = {}) data, _status_code, _headers = get_team_notification_rules_with_http_info(team_id, opts) data end |
#get_team_notification_rules_with_http_info(team_id, opts = {}) ⇒ Array<(TeamNotificationRulesResponse, Integer, Hash)>
Get team notification rules.
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1311 def get_team_notification_rules_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_notification_rules ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_notification_rules" end # resource path local_var_path = '/api/v2/team/{team_id}/notification-rules'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamNotificationRulesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_notification_rules, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_permission_settings(team_id, opts = {}) ⇒ Object
Get permission settings for a team.
745 746 747 748 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 745 def (team_id, opts = {}) data, _status_code, _headers = (team_id, opts) data end |
#get_team_permission_settings_with_http_info(team_id, opts = {}) ⇒ Array<(TeamPermissionSettingsResponse, Integer, Hash)>
Get permission settings for a team.
Get all permission settings for a given team.
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 757 def (team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_permission_settings ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_permission_settings" end # resource path local_var_path = '/api/v2/team/{team_id}/permission-settings'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamPermissionSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_permission_settings, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_permission_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_sync(filter_source, opts = {}) ⇒ Object
Get team sync configurations.
1429 1430 1431 1432 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1429 def get_team_sync(filter_source, opts = {}) data, _status_code, _headers = get_team_sync_with_http_info(filter_source, opts) data end |
#get_team_sync_with_http_info(filter_source, opts = {}) ⇒ Array<(TeamSyncResponse, Integer, Hash)>
Get team sync configurations.
Get all team synchronization configurations. Returns a list of configurations used for linking or provisioning teams with external sources like GitHub.
1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1442 def get_team_sync_with_http_info(filter_source, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_sync ...' end # verify the required parameter 'filter_source' is set if @api_client.config.client_side_validation && filter_source.nil? fail ArgumentError, "Missing the required parameter 'filter_source' when calling TeamsAPI.get_team_sync" end # verify enum value allowable_values = ['github'] if @api_client.config.client_side_validation && !allowable_values.include?(filter_source) fail ArgumentError, "invalid value for \"filter_source\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/team/sync' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[source]'] = filter_source # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamSyncResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team_sync, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_with_http_info(team_id, opts = {}) ⇒ Array<(TeamResponse, Integer, Hash)>
Get a team.
Get a single team using the team's id.
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 458 def get_team_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team" end # resource path local_var_path = '/api/v2/team/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_team, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_memberships(user_uuid, opts = {}) ⇒ Object
Get user memberships.
810 811 812 813 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 810 def get_user_memberships(user_uuid, opts = {}) data, _status_code, _headers = get_user_memberships_with_http_info(user_uuid, opts) data end |
#get_user_memberships_with_http_info(user_uuid, opts = {}) ⇒ Array<(UserTeamsResponse, Integer, Hash)>
Get user memberships.
Get a list of memberships for a user
822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 822 def get_user_memberships_with_http_info(user_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.get_user_memberships ...' end # verify the required parameter 'user_uuid' is set if @api_client.config.client_side_validation && user_uuid.nil? fail ArgumentError, "Missing the required parameter 'user_uuid' when calling TeamsAPI.get_user_memberships" end # resource path local_var_path = '/api/v2/users/{user_uuid}/memberships'.sub('{user_uuid}', CGI.escape(user_uuid.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UserTeamsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_user_memberships, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#get_user_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_member_teams(super_team_id, opts = {}) ⇒ Object
Get all member teams.
1566 1567 1568 1569 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1566 def list_member_teams(super_team_id, opts = {}) data, _status_code, _headers = list_member_teams_with_http_info(super_team_id, opts) data end |
#list_member_teams_with_http_info(super_team_id, opts = {}) ⇒ Array<(TeamsResponse, Integer, Hash)>
This API is deprecated.
Get all member teams.
Get all member teams.
Note: This API is deprecated. For team hierarchy relationships (parent-child
teams), use the team hierarchy links API: GET /api/v2/team-hierarchy-links.
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1586 def list_member_teams_with_http_info(super_team_id, opts = {}) warn "[DEPRECATION] `ListMemberTeams` is deprecated." unstable_enabled = @api_client.config.unstable_operations["v2.list_member_teams".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_member_teams") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_member_teams")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.list_member_teams ...' end # verify the required parameter 'super_team_id' is set if @api_client.config.client_side_validation && super_team_id.nil? fail ArgumentError, "Missing the required parameter 'super_team_id' when calling TeamsAPI.list_member_teams" end # resource path local_var_path = '/api/v2/team/{super_team_id}/member_teams'.sub('{super_team_id}', CGI.escape(super_team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'fields[team]'] = @api_client.build_collection_param(opts[:'fields_team'], :csv) if !opts[:'fields_team'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_member_teams, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#list_member_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_member_teams_with_pagination(super_team_id, opts = {}) {|Team| ... } ⇒ Object
Get all member teams.
Provide a paginated version of #list_member_teams, returning all items.
To use it you need to use a block: list_member_teams_with_pagination { |item| p item }
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1653 def list_member_teams_with_pagination(super_team_id, opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) while true do response = list_member_teams(super_team_id, opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) end end |
#list_team_connections(opts = {}) ⇒ Object
List team connections.
1671 1672 1673 1674 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1671 def list_team_connections(opts = {}) data, _status_code, _headers = list_team_connections_with_http_info(opts) data end |
#list_team_connections_with_http_info(opts = {}) ⇒ Array<(TeamConnectionsResponse, Integer, Hash)>
List team connections.
Returns all team connections.
1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1688 def list_team_connections_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.list_team_connections ...' end # resource path local_var_path = '/api/v2/team/connections' # query parameters query_params = opts[:query_params] || {} query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'filter[sources]'] = @api_client.build_collection_param(opts[:'filter_sources'], :csv) if !opts[:'filter_sources'].nil? query_params[:'filter[team_ids]'] = @api_client.build_collection_param(opts[:'filter_team_ids'], :csv) if !opts[:'filter_team_ids'].nil? query_params[:'filter[connected_team_ids]'] = @api_client.build_collection_param(opts[:'filter_connected_team_ids'], :csv) if !opts[:'filter_connected_team_ids'].nil? query_params[:'filter[connection_ids]'] = @api_client.build_collection_param(opts[:'filter_connection_ids'], :csv) if !opts[:'filter_connection_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_team_connections, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#list_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_team_connections_with_pagination(opts = {}) {|TeamConnection| ... } ⇒ Object
List team connections.
Provide a paginated version of #list_team_connections, returning all items.
To use it you need to use a block: list_team_connections_with_pagination { |item| p item }
1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1747 def list_team_connections_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) while true do response = list_team_connections(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) end end |
#list_team_hierarchy_links(opts = {}) ⇒ Object
Get team hierarchy links.
1765 1766 1767 1768 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1765 def list_team_hierarchy_links(opts = {}) data, _status_code, _headers = list_team_hierarchy_links_with_http_info(opts) data end |
#list_team_hierarchy_links_with_http_info(opts = {}) ⇒ Array<(TeamHierarchyLinksResponse, Integer, Hash)>
Get team hierarchy links.
List all team hierarchy links that match the provided filters.
1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1780 def list_team_hierarchy_links_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.list_team_hierarchy_links ...' end # resource path local_var_path = '/api/v2/team-hierarchy-links' # query parameters query_params = opts[:query_params] || {} query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'filter[parent_team]'] = opts[:'filter_parent_team'] if !opts[:'filter_parent_team'].nil? query_params[:'filter[sub_team]'] = opts[:'filter_sub_team'] if !opts[:'filter_sub_team'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamHierarchyLinksResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_team_hierarchy_links, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#list_team_hierarchy_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_team_hierarchy_links_with_pagination(opts = {}) {|TeamHierarchyLink| ... } ⇒ Object
Get team hierarchy links.
Provide a paginated version of #list_team_hierarchy_links, returning all items.
To use it you need to use a block: list_team_hierarchy_links_with_pagination { |item| p item }
1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1837 def list_team_hierarchy_links_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) while true do response = list_team_hierarchy_links(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) end end |
#list_teams(opts = {}) ⇒ Object
Get all teams.
875 876 877 878 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 875 def list_teams(opts = {}) data, _status_code, _headers = list_teams_with_http_info(opts) data end |
#list_teams_with_http_info(opts = {}) ⇒ Array<(TeamsResponse, Integer, Hash)>
Get all teams.
Get all teams.
Can be used to search for teams using the filter[keyword] and filter[me] query parameters.
894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 894 def list_teams_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.list_teams ...' end allowable_values = ['name', '-name', 'user_count', '-user_count'] 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 # resource path local_var_path = '/api/v2/team' # query parameters query_params = opts[:query_params] || {} query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil? query_params[:'filter[keyword]'] = opts[:'filter_keyword'] if !opts[:'filter_keyword'].nil? query_params[:'filter[me]'] = opts[:'filter_me'] if !opts[:'filter_me'].nil? query_params[:'fields[team]'] = @api_client.build_collection_param(opts[:'fields_team'], :csv) if !opts[:'fields_team'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_teams, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) [:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#list_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_teams_with_pagination(opts = {}) {|Team| ... } ⇒ Object
Get all teams.
Provide a paginated version of #list_teams, returning all items.
To use it you need to use a block: list_teams_with_pagination { |item| p item }
959 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 959 def list_teams_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) while true do response = list_teams(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) end end |
#remove_member_team(super_team_id, member_team_id, opts = {}) ⇒ Object
Remove a member team.
1957 1958 1959 1960 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1957 def remove_member_team(super_team_id, member_team_id, opts = {}) remove_member_team_with_http_info(super_team_id, member_team_id, opts) nil end |
#remove_member_team_with_http_info(super_team_id, member_team_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
This API is deprecated.
Remove a member team.
Remove a super team's member team identified by member_team_id.
Note: This API is deprecated. For deleting team hierarchy links, use the team hierarchy links API: DELETE /api/v2/team-hierarchy-links/{link_id}.
1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1974 def remove_member_team_with_http_info(super_team_id, member_team_id, opts = {}) warn "[DEPRECATION] `RemoveMemberTeam` is deprecated." unstable_enabled = @api_client.config.unstable_operations["v2.remove_member_team".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.remove_member_team") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.remove_member_team")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.remove_member_team ...' end # verify the required parameter 'super_team_id' is set if @api_client.config.client_side_validation && super_team_id.nil? fail ArgumentError, "Missing the required parameter 'super_team_id' when calling TeamsAPI.remove_member_team" end # verify the required parameter 'member_team_id' is set if @api_client.config.client_side_validation && member_team_id.nil? fail ArgumentError, "Missing the required parameter 'member_team_id' when calling TeamsAPI.remove_member_team" end # resource path local_var_path = '/api/v2/team/{super_team_id}/member_teams/{member_team_id}'.sub('{super_team_id}', CGI.escape(super_team_id.to_s).gsub('%2F', '/')).sub('{member_team_id}', CGI.escape(member_team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :remove_member_team, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#remove_member_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_team_hierarchy_link(link_id, opts = {}) ⇒ Object
Remove a team hierarchy link.
2038 2039 2040 2041 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 2038 def remove_team_hierarchy_link(link_id, opts = {}) remove_team_hierarchy_link_with_http_info(link_id, opts) nil end |
#remove_team_hierarchy_link_with_http_info(link_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a team hierarchy link.
Remove a team hierarchy link by the given link_id.
2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 2050 def remove_team_hierarchy_link_with_http_info(link_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.remove_team_hierarchy_link ...' end # verify the required parameter 'link_id' is set if @api_client.config.client_side_validation && link_id.nil? fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.remove_team_hierarchy_link" end # resource path local_var_path = '/api/v2/team-hierarchy-links/{link_id}'.sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :remove_team_hierarchy_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#remove_team_hierarchy_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sync_teams(body, opts = {}) ⇒ Object
Link Teams with GitHub Teams.
2103 2104 2105 2106 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 2103 def sync_teams(body, opts = {}) sync_teams_with_http_info(body, opts) nil end |
#sync_teams_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Link Teams with GitHub Teams.
This endpoint attempts to link your existing Datadog teams with GitHub teams by matching their names. It evaluates all current Datadog teams and compares them against teams in the GitHub organization connected to your Datadog account, based on Datadog Team handle and GitHub Team slug (lowercased and kebab-cased).
This operation is read-only on the GitHub side, no teams will be modified or created.
A GitHub organization must be connected to your Datadog account,
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
using a normalized exact match; case is ignored and spaces are removed. No modifications are made
to teams in GitHub. This only creates new teams in Datadog when type is set to provision.
2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 2125 def sync_teams_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.sync_teams ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.sync_teams" end # resource path local_var_path = '/api/v2/team/sync' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :sync_teams, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#sync_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_team(team_id, body, opts = {}) ⇒ Object
Update a team.
977 978 979 980 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 977 def update_team(team_id, body, opts = {}) data, _status_code, _headers = update_team_with_http_info(team_id, body, opts) data end |
#update_team_link(team_id, link_id, body, opts = {}) ⇒ Object
Update a team link.
1050 1051 1052 1053 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1050 def update_team_link(team_id, link_id, body, opts = {}) data, _status_code, _headers = update_team_link_with_http_info(team_id, link_id, body, opts) data end |
#update_team_link_with_http_info(team_id, link_id, body, opts = {}) ⇒ Array<(TeamLinkResponse, Integer, Hash)>
Update a team link.
Update a team link.
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1064 def update_team_link_with_http_info(team_id, link_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.update_team_link ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team_link" end # verify the required parameter 'link_id' is set if @api_client.config.client_side_validation && link_id.nil? fail ArgumentError, "Missing the required parameter 'link_id' when calling TeamsAPI.update_team_link" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team_link" end # resource path local_var_path = '/api/v2/team/{team_id}/links/{link_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamLinkResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_team_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#update_team_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_team_membership(team_id, user_id, body, opts = {}) ⇒ Object
Update a user's membership attributes on a team.
1127 1128 1129 1130 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1127 def update_team_membership(team_id, user_id, body, opts = {}) data, _status_code, _headers = update_team_membership_with_http_info(team_id, user_id, body, opts) data end |
#update_team_membership_with_http_info(team_id, user_id, body, opts = {}) ⇒ Array<(UserTeamResponse, Integer, Hash)>
Update a user's membership attributes on a team.
Update a user's membership attributes on a team.
Note: Each team has a setting that determines who is allowed to modify membership of the team. The user_access_manage permission generally grants access to modify membership of any team. To get the full picture, see Team Membership documentation.
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1141 def update_team_membership_with_http_info(team_id, user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.update_team_membership ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team_membership" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsAPI.update_team_membership" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team_membership" end # resource path local_var_path = '/api/v2/team/{team_id}/memberships/{user_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'UserTeamResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_team_membership, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#update_team_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_team_notification_rule(team_id, rule_id, body, opts = {}) ⇒ Object
Update team notification rule.
2409 2410 2411 2412 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 2409 def update_team_notification_rule(team_id, rule_id, body, opts = {}) data, _status_code, _headers = update_team_notification_rule_with_http_info(team_id, rule_id, body, opts) data end |
#update_team_notification_rule_with_http_info(team_id, rule_id, body, opts = {}) ⇒ Array<(TeamNotificationRuleResponse, Integer, Hash)>
Update team notification rule.
2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 2420 def update_team_notification_rule_with_http_info(team_id, rule_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.update_team_notification_rule ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team_notification_rule" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling TeamsAPI.update_team_notification_rule" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team_notification_rule" end # resource path local_var_path = '/api/v2/team/{team_id}/notification-rules/{rule_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamNotificationRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_team_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#update_team_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_team_permission_setting(team_id, action, body, opts = {}) ⇒ Object
Update permission setting for team.
1204 1205 1206 1207 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1204 def (team_id, action, body, opts = {}) data, _status_code, _headers = (team_id, action, body, opts) data end |
#update_team_permission_setting_with_http_info(team_id, action, body, opts = {}) ⇒ Array<(TeamPermissionSettingResponse, Integer, Hash)>
Update permission setting for team.
Update a team permission setting for a given team.
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 1218 def (team_id, action, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.update_team_permission_setting ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team_permission_setting" end # verify the required parameter 'action' is set if @api_client.config.client_side_validation && action.nil? fail ArgumentError, "Missing the required parameter 'action' when calling TeamsAPI.update_team_permission_setting" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team_permission_setting" end # resource path local_var_path = '/api/v2/team/{team_id}/permission-settings/{action}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')).sub('{action}', CGI.escape(action.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamPermissionSettingResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_team_permission_setting, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#update_team_permission_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_team_with_http_info(team_id, body, opts = {}) ⇒ Array<(TeamResponse, Integer, Hash)>
Update a team.
Update a team using the team's id.
If the team_links relationship is present, the associated links are updated to be in the order they appear in the array, and any existing team links not present are removed.
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 |
# File 'lib/datadog_api_client/v2/api/teams_api.rb', line 991 def update_team_with_http_info(team_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsAPI.update_team ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.update_team" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.update_team" end # resource path local_var_path = '/api/v2/team/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'TeamResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_team, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsAPI#update_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |