Class: DatadogAPIClient::V2::CSMAgentsAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::CSMAgentsAPI
- Defined in:
- lib/datadog_api_client/v2/api/csm_agents_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ CSMAgentsAPI
constructor
A new instance of CSMAgentsAPI.
-
#list_all_csm_agents(opts = {}) ⇒ Object
Get all CSM Agents.
-
#list_all_csm_agents_with_http_info(opts = {}) ⇒ Array<(CsmAgentsResponse, Integer, Hash)>
Get all CSM Agents.
-
#list_all_csm_serverless_agents(opts = {}) ⇒ Object
Get all CSM Serverless Agents.
-
#list_all_csm_serverless_agents_with_http_info(opts = {}) ⇒ Array<(CsmAgentsResponse, Integer, Hash)>
Get all CSM Serverless Agents.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ CSMAgentsAPI
Returns a new instance of CSMAgentsAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/csm_agents_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/csm_agents_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#list_all_csm_agents(opts = {}) ⇒ Object
Get all CSM Agents.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/csm_agents_api.rb', line 29 def list_all_csm_agents(opts = {}) data, _status_code, _headers = list_all_csm_agents_with_http_info(opts) data end |
#list_all_csm_agents_with_http_info(opts = {}) ⇒ Array<(CsmAgentsResponse, Integer, Hash)>
Get all CSM Agents.
Get the list of all CSM Agents running on your hosts and containers.
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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/datadog_api_client/v2/api/csm_agents_api.rb', line 44 def list_all_csm_agents_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CSMAgentsAPI.list_all_csm_agents ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 1000000 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CSMAgentsAPI.list_all_csm_agents, must be smaller than or equal to 1000000.' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CSMAgentsAPI.list_all_csm_agents, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling CSMAgentsAPI.list_all_csm_agents, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 0 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling CSMAgentsAPI.list_all_csm_agents, must be greater than or equal to 0.' end allowable_values = ['asc', 'desc'] if @api_client.config.client_side_validation && opts[:'order_direction'] && !allowable_values.include?(opts[:'order_direction']) fail ArgumentError, "invalid value for \"order_direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/csm/onboarding/agents' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'order_direction'] = opts[:'order_direction'] if !opts[:'order_direction'].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] || 'CsmAgentsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_all_csm_agents, :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: CSMAgentsAPI#list_all_csm_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_all_csm_serverless_agents(opts = {}) ⇒ Object
Get all CSM Serverless Agents.
113 114 115 116 |
# File 'lib/datadog_api_client/v2/api/csm_agents_api.rb', line 113 def list_all_csm_serverless_agents(opts = {}) data, _status_code, _headers = list_all_csm_serverless_agents_with_http_info(opts) data end |
#list_all_csm_serverless_agents_with_http_info(opts = {}) ⇒ Array<(CsmAgentsResponse, Integer, Hash)>
Get all CSM Serverless Agents.
Get the list of all CSM Serverless Agents running on your hosts and containers.
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 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/datadog_api_client/v2/api/csm_agents_api.rb', line 128 def list_all_csm_serverless_agents_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CSMAgentsAPI.list_all_csm_serverless_agents ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 1000000 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CSMAgentsAPI.list_all_csm_serverless_agents, must be smaller than or equal to 1000000.' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CSMAgentsAPI.list_all_csm_serverless_agents, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling CSMAgentsAPI.list_all_csm_serverless_agents, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 0 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling CSMAgentsAPI.list_all_csm_serverless_agents, must be greater than or equal to 0.' end allowable_values = ['asc', 'desc'] if @api_client.config.client_side_validation && opts[:'order_direction'] && !allowable_values.include?(opts[:'order_direction']) fail ArgumentError, "invalid value for \"order_direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/csm/onboarding/serverless/agents' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'order_direction'] = opts[:'order_direction'] if !opts[:'order_direction'].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] || 'CsmAgentsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_all_csm_serverless_agents, :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: CSMAgentsAPI#list_all_csm_serverless_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |