Class: DatadogAPIClient::V2::AIGatewayAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::AIGatewayAPI
- Defined in:
- lib/datadog_api_client/v2/api/ai_gateway_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#bulk_create_ai_gateway_models(provider_id, body, opts = {}) ⇒ Object
Add multiple models to an AI Gateway provider.
-
#bulk_create_ai_gateway_models_with_http_info(provider_id, body, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryListResponse, Integer, Hash)>
Add multiple models to an AI Gateway provider.
-
#create_ai_gateway_budget(body, opts = {}) ⇒ Object
Create an AI Gateway budget.
-
#create_ai_gateway_budget_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayBudgetResponse, Integer, Hash)>
Create an AI Gateway budget.
-
#create_ai_gateway_data_capture_override(body, opts = {}) ⇒ Object
Create an AI Gateway data capture override.
-
#create_ai_gateway_data_capture_override_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayCaptureOverrideResponse, Integer, Hash)>
Create an AI Gateway data capture override.
-
#create_ai_gateway_model(provider_id, body, opts = {}) ⇒ Object
Add a model to an AI Gateway provider.
-
#create_ai_gateway_model_group(body, opts = {}) ⇒ Object
Create an AI Gateway model group.
-
#create_ai_gateway_model_group_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayModelGroupResponse, Integer, Hash)>
Create an AI Gateway model group.
-
#create_ai_gateway_model_with_http_info(provider_id, body, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryResponse, Integer, Hash)>
Add a model to an AI Gateway provider.
-
#create_ai_gateway_provider(body, opts = {}) ⇒ Object
Create an AI Gateway provider.
-
#create_ai_gateway_provider_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayProviderResponse, Integer, Hash)>
Create an AI Gateway provider.
-
#create_ai_gateway_rate_limit(body, opts = {}) ⇒ Object
Create an AI Gateway rate limit.
-
#create_ai_gateway_rate_limit_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayRateLimitResponse, Integer, Hash)>
Create an AI Gateway rate limit.
-
#create_ai_gateway_routing_rule(body, opts = {}) ⇒ Object
Create an AI Gateway routing rule.
-
#create_ai_gateway_routing_rule_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayRoutingRuleResponse, Integer, Hash)>
Create an AI Gateway routing rule.
-
#delete_ai_gateway_budget(id, opts = {}) ⇒ Object
Archive an AI Gateway budget.
-
#delete_ai_gateway_budget_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Archive an AI Gateway budget.
-
#delete_ai_gateway_data_capture_override(id, body, opts = {}) ⇒ Object
Delete an AI Gateway data capture override.
-
#delete_ai_gateway_data_capture_override_with_http_info(id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway data capture override.
-
#delete_ai_gateway_model(provider_id, canonical, opts = {}) ⇒ Object
Delete a model from an AI Gateway provider.
-
#delete_ai_gateway_model_group(id, opts = {}) ⇒ Object
Delete an AI Gateway model group.
-
#delete_ai_gateway_model_group_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway model group.
-
#delete_ai_gateway_model_pricing(provider_id, canonical, opts = {}) ⇒ Object
Delete a model pricing override.
-
#delete_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a model pricing override.
-
#delete_ai_gateway_model_with_http_info(provider_id, canonical, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a model from an AI Gateway provider.
-
#delete_ai_gateway_policy(inbound, opts = {}) ⇒ Object
Delete an AI Gateway routing policy.
-
#delete_ai_gateway_policy_with_http_info(inbound, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway routing policy.
-
#delete_ai_gateway_provider(id, opts = {}) ⇒ Object
Delete an AI Gateway provider.
-
#delete_ai_gateway_provider_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway provider.
-
#delete_ai_gateway_rate_limit(id, opts = {}) ⇒ Object
Archive an AI Gateway rate limit.
-
#delete_ai_gateway_rate_limit_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Archive an AI Gateway rate limit.
-
#delete_ai_gateway_routing_rule(slug, opts = {}) ⇒ Object
Delete an AI Gateway routing rule.
-
#delete_ai_gateway_routing_rule_with_http_info(slug, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway routing rule.
-
#get_ai_gateway_budget(id, opts = {}) ⇒ Object
Get an AI Gateway budget.
-
#get_ai_gateway_budget_current_period(id, opts = {}) ⇒ Object
Get an AI Gateway budget's current period.
-
#get_ai_gateway_budget_current_period_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetPeriodResponse, Integer, Hash)>
Get an AI Gateway budget's current period.
-
#get_ai_gateway_budget_instances_summary(id, opts = {}) ⇒ Object
Get an AI Gateway budget instance summary.
-
#get_ai_gateway_budget_instances_summary_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetInstancesSummaryResponse, Integer, Hash)>
Get an AI Gateway budget instance summary.
-
#get_ai_gateway_budget_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetResponse, Integer, Hash)>
Get an AI Gateway budget.
-
#get_ai_gateway_data_capture_configuration(opts = {}) ⇒ Object
Get the AI Gateway data capture configuration.
-
#get_ai_gateway_data_capture_configuration_with_http_info(opts = {}) ⇒ Array<(AiGatewayCaptureConfigurationResponse, Integer, Hash)>
Get the AI Gateway data capture configuration.
-
#get_ai_gateway_governance(opts = {}) ⇒ Object
Get AI Gateway governance controls.
-
#get_ai_gateway_governance_with_http_info(opts = {}) ⇒ Array<(AiGatewayGovernanceResponse, Integer, Hash)>
Get AI Gateway governance controls.
-
#get_ai_gateway_model_group(id, opts = {}) ⇒ Object
Get an AI Gateway model group.
-
#get_ai_gateway_model_group_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayModelGroupResponse, Integer, Hash)>
Get an AI Gateway model group.
-
#get_ai_gateway_model_pricing(provider_id, canonical, opts = {}) ⇒ Object
Get a model pricing override.
-
#get_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts = {}) ⇒ Array<(AiGatewayModelPricingResponse, Integer, Hash)>
Get a model pricing override.
-
#get_ai_gateway_policy(inbound, opts = {}) ⇒ Object
Get an AI Gateway routing policy.
-
#get_ai_gateway_policy_with_http_info(inbound, opts = {}) ⇒ Array<(AiGatewayPolicyResponse, Integer, Hash)>
Get an AI Gateway routing policy.
-
#get_ai_gateway_provider(id, opts = {}) ⇒ Object
Get an AI Gateway provider.
-
#get_ai_gateway_provider_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayProviderResponse, Integer, Hash)>
Get an AI Gateway provider.
-
#get_ai_gateway_rate_limit(id, opts = {}) ⇒ Object
Get an AI Gateway rate limit.
-
#get_ai_gateway_rate_limit_usage(opts = {}) ⇒ Object
Get AI Gateway rate limit usage.
-
#get_ai_gateway_rate_limit_usage_with_http_info(opts = {}) ⇒ Array<(AiGatewayRateLimitUsageListResponse, Integer, Hash)>
Get AI Gateway rate limit usage.
-
#get_ai_gateway_rate_limit_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayRateLimitResponse, Integer, Hash)>
Get an AI Gateway rate limit.
-
#get_ai_gateway_routing_rule(slug, opts = {}) ⇒ Object
Get an AI Gateway routing rule.
-
#get_ai_gateway_routing_rule_with_http_info(slug, opts = {}) ⇒ Array<(AiGatewayRoutingRuleResponse, Integer, Hash)>
Get an AI Gateway routing rule.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ AIGatewayAPI
constructor
A new instance of AIGatewayAPI.
-
#list_ai_gateway_budget_instance_dimensions(id, opts = {}) ⇒ Object
List AI Gateway budget instance dimension values.
-
#list_ai_gateway_budget_instance_dimensions_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceDimensionListResponse, Integer, Hash)>
List AI Gateway budget instance dimension values.
-
#list_ai_gateway_budget_instances(id, opts = {}) ⇒ Object
List AI Gateway budget instances.
-
#list_ai_gateway_budget_instances_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceListResponse, Integer, Hash)>
List AI Gateway budget instances.
-
#list_ai_gateway_budgets(opts = {}) ⇒ Object
List AI Gateway budgets.
-
#list_ai_gateway_budgets_with_http_info(opts = {}) ⇒ Array<(AiGatewayBudgetListResponse, Integer, Hash)>
List AI Gateway budgets.
-
#list_ai_gateway_model_groups(opts = {}) ⇒ Object
List AI Gateway model groups.
-
#list_ai_gateway_model_groups_with_http_info(opts = {}) ⇒ Array<(AiGatewayModelGroupListResponse, Integer, Hash)>
List AI Gateway model groups.
-
#list_ai_gateway_models(provider_id, opts = {}) ⇒ Object
List models for an AI Gateway provider.
-
#list_ai_gateway_models_by_canonical(opts = {}) ⇒ Object
List AI Gateway models by canonical ID.
-
#list_ai_gateway_models_by_canonical_with_http_info(opts = {}) ⇒ Array<(AiGatewayModelsByCanonicalListResponse, Integer, Hash)>
List AI Gateway models by canonical ID.
-
#list_ai_gateway_models_with_http_info(provider_id, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryListResponse, Integer, Hash)>
List models for an AI Gateway provider.
-
#list_ai_gateway_policies(opts = {}) ⇒ Object
List AI Gateway routing policies.
-
#list_ai_gateway_policies_with_http_info(opts = {}) ⇒ Array<(AiGatewayPolicyListResponse, Integer, Hash)>
List AI Gateway routing policies.
-
#list_ai_gateway_provider_models(integration_type, integration_account_id, opts = {}) ⇒ Object
List models available from a provider integration.
-
#list_ai_gateway_provider_models_with_http_info(integration_type, integration_account_id, opts = {}) ⇒ Array<(AiGatewayDiscoveredModelListResponse, Integer, Hash)>
List models available from a provider integration.
-
#list_ai_gateway_providers(opts = {}) ⇒ Object
List AI Gateway providers.
-
#list_ai_gateway_providers_with_http_info(opts = {}) ⇒ Array<(AiGatewayProviderListResponse, Integer, Hash)>
List AI Gateway providers.
-
#list_ai_gateway_rate_limits(opts = {}) ⇒ Object
List AI Gateway rate limits.
-
#list_ai_gateway_rate_limits_with_http_info(opts = {}) ⇒ Array<(AiGatewayRateLimitListResponse, Integer, Hash)>
List AI Gateway rate limits.
-
#list_ai_gateway_routing_rules(opts = {}) ⇒ Object
List AI Gateway routing rules.
-
#list_ai_gateway_routing_rules_with_http_info(opts = {}) ⇒ Array<(AiGatewayRoutingRuleListResponse, Integer, Hash)>
List AI Gateway routing rules.
-
#override_ai_gateway_budget_instance_capacity(id, body, opts = {}) ⇒ Object
Override a budget instance's capacity.
-
#override_ai_gateway_budget_instance_capacity_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceResponse, Integer, Hash)>
Override a budget instance's capacity.
-
#reset_ai_gateway_budget_instance_spend(id, body, opts = {}) ⇒ Object
Reset a budget instance's spend.
-
#reset_ai_gateway_budget_instance_spend_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceResponse, Integer, Hash)>
Reset a budget instance's spend.
-
#update_ai_gateway_budget(id, body, opts = {}) ⇒ Object
Update an AI Gateway budget.
-
#update_ai_gateway_budget_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayBudgetResponse, Integer, Hash)>
Update an AI Gateway budget.
-
#update_ai_gateway_data_capture_override(id, body, opts = {}) ⇒ Object
Replace an AI Gateway data capture override.
-
#update_ai_gateway_data_capture_override_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayCaptureOverrideResponse, Integer, Hash)>
Replace an AI Gateway data capture override.
-
#update_ai_gateway_governance(body, opts = {}) ⇒ Object
Replace AI Gateway governance controls.
-
#update_ai_gateway_governance_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayGovernanceResponse, Integer, Hash)>
Replace AI Gateway governance controls.
-
#update_ai_gateway_model(provider_id, canonical, body, opts = {}) ⇒ Object
Update a model for an AI Gateway provider.
-
#update_ai_gateway_model_group(id, body, opts = {}) ⇒ Object
Update an AI Gateway model group.
-
#update_ai_gateway_model_group_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayModelGroupResponse, Integer, Hash)>
Update an AI Gateway model group.
-
#update_ai_gateway_model_pricing(provider_id, canonical, body, opts = {}) ⇒ Object
Set a model pricing override.
-
#update_ai_gateway_model_pricing_with_http_info(provider_id, canonical, body, opts = {}) ⇒ Array<(AiGatewayModelPricingResponse, Integer, Hash)>
Set a model pricing override.
-
#update_ai_gateway_model_with_http_info(provider_id, canonical, body, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryResponse, Integer, Hash)>
Update a model for an AI Gateway provider.
-
#update_ai_gateway_provider(id, body, opts = {}) ⇒ Object
Update an AI Gateway provider.
-
#update_ai_gateway_provider_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayProviderResponse, Integer, Hash)>
Update an AI Gateway provider.
-
#update_ai_gateway_rate_limit(id, body, opts = {}) ⇒ Object
Update an AI Gateway rate limit.
-
#update_ai_gateway_rate_limit_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayRateLimitResponse, Integer, Hash)>
Update an AI Gateway rate limit.
-
#update_ai_gateway_routing_rule(slug, body, opts = {}) ⇒ Object
Update an AI Gateway routing rule.
-
#update_ai_gateway_routing_rule_with_http_info(slug, body, opts = {}) ⇒ Array<(AiGatewayRoutingRuleResponse, Integer, Hash)>
Update an AI Gateway routing rule.
-
#upsert_ai_gateway_policy(body, opts = {}) ⇒ Object
Create or replace an AI Gateway routing policy.
-
#upsert_ai_gateway_policy_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayPolicyResponse, Integer, Hash)>
Create or replace an AI Gateway routing policy.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ AIGatewayAPI
Returns a new instance of AIGatewayAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_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/ai_gateway_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#bulk_create_ai_gateway_models(provider_id, body, opts = {}) ⇒ Object
Add multiple models to an AI Gateway provider.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 29 def bulk_create_ai_gateway_models(provider_id, body, opts = {}) data, _status_code, _headers = bulk_create_ai_gateway_models_with_http_info(provider_id, body, opts) data end |
#bulk_create_ai_gateway_models_with_http_info(provider_id, body, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryListResponse, Integer, Hash)>
Add multiple models to an AI Gateway provider.
Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
Add multiple manually managed model catalog entries to a provider in a single request. Manually managed
entries are not modified by automatic catalog synchronization.
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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 44 def bulk_create_ai_gateway_models_with_http_info(provider_id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.bulk_create_ai_gateway_models".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.bulk_create_ai_gateway_models") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.bulk_create_ai_gateway_models")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.bulk_create_ai_gateway_models ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.bulk_create_ai_gateway_models" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.bulk_create_ai_gateway_models, must be greater than or equal to 1.' 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 AIGatewayAPI.bulk_create_ai_gateway_models" end # resource path local_var_path = '/api/v2/providers/{provider_id}/models/bulk'.sub('{provider_id}', CGI.escape(provider_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] || 'AiGatewayModelCatalogEntryListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :bulk_create_ai_gateway_models, :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: AIGatewayAPI#bulk_create_ai_gateway_models\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ai_gateway_budget(body, opts = {}) ⇒ Object
Create an AI Gateway budget.
112 113 114 115 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 112 def create_ai_gateway_budget(body, opts = {}) data, _status_code, _headers = create_ai_gateway_budget_with_http_info(body, opts) data end |
#create_ai_gateway_budget_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayBudgetResponse, Integer, Hash)>
Create an AI Gateway budget.
Create a spend budget. Scope tags may include provider, model, and custom dimensions. Reserved metadata keys are rejected.
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 176 177 178 179 180 181 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 125 def create_ai_gateway_budget_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_ai_gateway_budget".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ai_gateway_budget") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ai_gateway_budget")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.create_ai_gateway_budget ...' 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 AIGatewayAPI.create_ai_gateway_budget" end # resource path local_var_path = '/api/v2/budgets' # 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] || 'AiGatewayBudgetResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_ai_gateway_budget, :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: AIGatewayAPI#create_ai_gateway_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ai_gateway_data_capture_override(body, opts = {}) ⇒ Object
Create an AI Gateway data capture override.
186 187 188 189 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 186 def create_ai_gateway_data_capture_override(body, opts = {}) data, _status_code, _headers = create_ai_gateway_data_capture_override_with_http_info(body, opts) data end |
#create_ai_gateway_data_capture_override_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayCaptureOverrideResponse, Integer, Hash)>
Create an AI Gateway data capture override.
Create a scoped override with a client-generated UUID and the current configuration_revision. If the override can enable full capture for more traffic, set confirm_full_capture to true. Returns HTTP 409 when configuration_revision is stale, the UUID already exists, or the organization has 100 overrides. Missing configuration_revision or required full-capture confirmation returns HTTP 400. Retrying an accepted create with the same UUID returns HTTP 409. To undo a create, read the current configuration revision and delete the override using its returned override revision.
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 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 198 def create_ai_gateway_data_capture_override_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_ai_gateway_data_capture_override".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ai_gateway_data_capture_override") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ai_gateway_data_capture_override")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.create_ai_gateway_data_capture_override ...' 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 AIGatewayAPI.create_ai_gateway_data_capture_override" end # resource path local_var_path = '/api/v2/data-capture/overrides' # 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] || 'AiGatewayCaptureOverrideResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_ai_gateway_data_capture_override, :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: AIGatewayAPI#create_ai_gateway_data_capture_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ai_gateway_model(provider_id, body, opts = {}) ⇒ Object
Add a model to an AI Gateway provider.
259 260 261 262 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 259 def create_ai_gateway_model(provider_id, body, opts = {}) data, _status_code, _headers = create_ai_gateway_model_with_http_info(provider_id, body, opts) data end |
#create_ai_gateway_model_group(body, opts = {}) ⇒ Object
Create an AI Gateway model group.
342 343 344 345 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 342 def create_ai_gateway_model_group(body, opts = {}) data, _status_code, _headers = create_ai_gateway_model_group_with_http_info(body, opts) data end |
#create_ai_gateway_model_group_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayModelGroupResponse, Integer, Hash)>
Create an AI Gateway model group.
Create an AI Gateway model group from a name and any combination of model catalog entries and routing rules, with optional fast-mode and reasoning limits and initial access bindings.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 354 def create_ai_gateway_model_group_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_ai_gateway_model_group".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ai_gateway_model_group") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ai_gateway_model_group")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.create_ai_gateway_model_group ...' 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 AIGatewayAPI.create_ai_gateway_model_group" end # resource path local_var_path = '/api/v2/model-groups' # 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] || 'AiGatewayModelGroupResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_ai_gateway_model_group, :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: AIGatewayAPI#create_ai_gateway_model_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ai_gateway_model_with_http_info(provider_id, body, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryResponse, Integer, Hash)>
Add a model to an AI Gateway provider.
Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
Add a manually managed model catalog entry to a provider. Manually managed entries are not modified by
automatic catalog synchronization.
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 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 274 def create_ai_gateway_model_with_http_info(provider_id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_ai_gateway_model".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ai_gateway_model") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ai_gateway_model")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.create_ai_gateway_model ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.create_ai_gateway_model" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.create_ai_gateway_model, must be greater than or equal to 1.' 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 AIGatewayAPI.create_ai_gateway_model" end # resource path local_var_path = '/api/v2/providers/{provider_id}/models'.sub('{provider_id}', CGI.escape(provider_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] || 'AiGatewayModelCatalogEntryResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_ai_gateway_model, :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: AIGatewayAPI#create_ai_gateway_model\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ai_gateway_provider(body, opts = {}) ⇒ Object
Create an AI Gateway provider.
415 416 417 418 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 415 def create_ai_gateway_provider(body, opts = {}) data, _status_code, _headers = create_ai_gateway_provider_with_http_info(body, opts) data end |
#create_ai_gateway_provider_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayProviderResponse, Integer, Hash)>
Create an AI Gateway provider.
Creating a provider requires ai_gateway_config_write. No provider View check applies before creation.
Create a provider and its initial model catalog. All discovered models are enabled; optional models are
added as manually managed entries. The slug is the immutable routing identifier.
Provider and initial catalog rows are saved in one transaction. Initial sharing is unavailable:
supplying initial_bindings returns 503 with stage initial_permissions and outcome not_saved.
A failed database commit can return 503 with stage database_commit and outcome unknown; check the
provider list before retrying. Creation without initial_bindings keeps normal unrestricted defaults.
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 433 def create_ai_gateway_provider_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_ai_gateway_provider".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ai_gateway_provider") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ai_gateway_provider")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.create_ai_gateway_provider ...' 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 AIGatewayAPI.create_ai_gateway_provider" end # resource path local_var_path = '/api/v2/providers' # 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] || 'AiGatewayProviderResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_ai_gateway_provider, :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: AIGatewayAPI#create_ai_gateway_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ai_gateway_rate_limit(body, opts = {}) ⇒ Object
Create an AI Gateway rate limit.
494 495 496 497 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 494 def create_ai_gateway_rate_limit(body, opts = {}) data, _status_code, _headers = create_ai_gateway_rate_limit_with_http_info(body, opts) data end |
#create_ai_gateway_rate_limit_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayRateLimitResponse, Integer, Hash)>
Create an AI Gateway rate limit.
Create a rate limit. All requests matching its scope share one allowance, and every matching rate limit applies. Returns 409 when another active rate limit has the same user, Team, and tags, or when the organization already has the maximum number of rate limits.
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 506 def create_ai_gateway_rate_limit_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_ai_gateway_rate_limit".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ai_gateway_rate_limit") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ai_gateway_rate_limit")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.create_ai_gateway_rate_limit ...' 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 AIGatewayAPI.create_ai_gateway_rate_limit" end # resource path local_var_path = '/api/v2/rate-limits' # 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] || 'AiGatewayRateLimitResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_ai_gateway_rate_limit, :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: AIGatewayAPI#create_ai_gateway_rate_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ai_gateway_routing_rule(body, opts = {}) ⇒ Object
Create an AI Gateway routing rule.
567 568 569 570 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 567 def create_ai_gateway_routing_rule(body, opts = {}) data, _status_code, _headers = create_ai_gateway_routing_rule_with_http_info(body, opts) data end |
#create_ai_gateway_routing_rule_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayRoutingRuleResponse, Integer, Hash)>
Create an AI Gateway routing rule.
Create an organization-owned route with ai_gateway_config_write. New provider/model and route references require View. New routes use standard unrestricted defaults. To restrict configuration access, create the route and then apply a restriction policy using its numeric route_id. Sharing follows standard restriction-policy propagation and does not grant or revoke policy-authorized inference. Data capture overrides are managed independently. Each tier has an ordering, which defaults to configured. A weighted_affinity tier distributes first-choice assignments by relative target weights (1 to 10000, default 1) and accepts only distinct model targets with an explicit provider. Weights need not total 100. Configured tiers must omit weights or set them to null.
579 580 581 582 583 584 585 586 587 588 589 590 591 592 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 579 def create_ai_gateway_routing_rule_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_ai_gateway_routing_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ai_gateway_routing_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ai_gateway_routing_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.create_ai_gateway_routing_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 AIGatewayAPI.create_ai_gateway_routing_rule" end # resource path local_var_path = '/api/v2/routing-rules' # 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] || 'AiGatewayRoutingRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_ai_gateway_routing_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: AIGatewayAPI#create_ai_gateway_routing_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_budget(id, opts = {}) ⇒ Object
Archive an AI Gateway budget.
640 641 642 643 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 640 def delete_ai_gateway_budget(id, opts = {}) delete_ai_gateway_budget_with_http_info(id, opts) nil end |
#delete_ai_gateway_budget_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Archive an AI Gateway budget.
Archive a spend budget by ID while retaining its accounting history.
652 653 654 655 656 657 658 659 660 661 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 652 def delete_ai_gateway_budget_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_budget".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_budget") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_budget")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.delete_ai_gateway_budget" end # resource path local_var_path = '/api/v2/budgets/{id}'.sub('{id}', CGI.escape(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_ai_gateway_budget, :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: AIGatewayAPI#delete_ai_gateway_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_data_capture_override(id, body, opts = {}) ⇒ Object
Delete an AI Gateway data capture override.
711 712 713 714 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 711 def delete_ai_gateway_data_capture_override(id, body, opts = {}) delete_ai_gateway_data_capture_override_with_http_info(id, body, opts) nil end |
#delete_ai_gateway_data_capture_override_with_http_info(id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway data capture override.
Delete an override using its revision and the current configuration_revision. If deleting the override can enable full capture for affected traffic, set confirm_full_capture to true. Returns HTTP 409 when configuration_revision or the override revision is stale, including a concurrent change during deletion. Missing revisions or required full-capture confirmation returns HTTP 400.
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 724 def delete_ai_gateway_data_capture_override_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_data_capture_override".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_data_capture_override") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_data_capture_override")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_data_capture_override ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.delete_ai_gateway_data_capture_override" 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 AIGatewayAPI.delete_ai_gateway_data_capture_override" end # resource path local_var_path = '/api/v2/data-capture/overrides/{id}'.sub('{id}', CGI.escape(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 => :delete_ai_gateway_data_capture_override, :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: AIGatewayAPI#delete_ai_gateway_data_capture_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_model(provider_id, canonical, opts = {}) ⇒ Object
Delete a model from an AI Gateway provider.
789 790 791 792 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 789 def delete_ai_gateway_model(provider_id, canonical, opts = {}) delete_ai_gateway_model_with_http_info(provider_id, canonical, opts) nil end |
#delete_ai_gateway_model_group(id, opts = {}) ⇒ Object
Delete an AI Gateway model group.
872 873 874 875 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 872 def delete_ai_gateway_model_group(id, opts = {}) delete_ai_gateway_model_group_with_http_info(id, opts) nil end |
#delete_ai_gateway_model_group_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway model group.
Delete a named model group. The organization-wide policy cannot be deleted. Requires configuration write permission and edit access to the group.
884 885 886 887 888 889 890 891 892 893 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 884 def delete_ai_gateway_model_group_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_model_group".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_model_group") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_model_group")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_model_group ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.delete_ai_gateway_model_group" end # resource path local_var_path = '/api/v2/model-groups/{id}'.sub('{id}', CGI.escape(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_ai_gateway_model_group, :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: AIGatewayAPI#delete_ai_gateway_model_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_model_pricing(provider_id, canonical, opts = {}) ⇒ Object
Delete a model pricing override.
943 944 945 946 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 943 def delete_ai_gateway_model_pricing(provider_id, canonical, opts = {}) delete_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts) nil end |
#delete_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a model pricing override.
Clear a custom provider model's pricing override. Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
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 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 956 def delete_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_model_pricing".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_model_pricing") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_model_pricing")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_model_pricing ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.delete_ai_gateway_model_pricing" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.delete_ai_gateway_model_pricing, must be greater than or equal to 1.' end # verify the required parameter 'canonical' is set if @api_client.config.client_side_validation && canonical.nil? fail ArgumentError, "Missing the required parameter 'canonical' when calling AIGatewayAPI.delete_ai_gateway_model_pricing" end if @api_client.config.client_side_validation && canonical.to_s.length > 256 fail ArgumentError, 'invalid value for "canonical" when calling AIGatewayAPI.delete_ai_gateway_model_pricing, the character length must be smaller than or equal to 256.' end # resource path local_var_path = '/api/v2/providers/{provider_id}/models/{canonical}/pricing'.sub('{provider_id}', CGI.escape(provider_id.to_s).gsub('%2F', '/')).sub('{canonical}', CGI.escape(canonical.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_ai_gateway_model_pricing, :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: AIGatewayAPI#delete_ai_gateway_model_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_model_with_http_info(provider_id, canonical, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a model from an AI Gateway provider.
Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
Delete a manually managed model catalog entry by its canonical model ID. Discovered entries are read-only.
803 804 805 806 807 808 809 810 811 812 813 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 867 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 803 def delete_ai_gateway_model_with_http_info(provider_id, canonical, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_model".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_model") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_model")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_model ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.delete_ai_gateway_model" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.delete_ai_gateway_model, must be greater than or equal to 1.' end # verify the required parameter 'canonical' is set if @api_client.config.client_side_validation && canonical.nil? fail ArgumentError, "Missing the required parameter 'canonical' when calling AIGatewayAPI.delete_ai_gateway_model" end if @api_client.config.client_side_validation && canonical.to_s.length > 256 fail ArgumentError, 'invalid value for "canonical" when calling AIGatewayAPI.delete_ai_gateway_model, the character length must be smaller than or equal to 256.' end # resource path local_var_path = '/api/v2/providers/{provider_id}/models/{canonical}'.sub('{provider_id}', CGI.escape(provider_id.to_s).gsub('%2F', '/')).sub('{canonical}', CGI.escape(canonical.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_ai_gateway_model, :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: AIGatewayAPI#delete_ai_gateway_model\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_policy(inbound, opts = {}) ⇒ Object
Delete an AI Gateway routing policy.
1025 1026 1027 1028 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1025 def delete_ai_gateway_policy(inbound, opts = {}) delete_ai_gateway_policy_with_http_info(inbound, opts) nil end |
#delete_ai_gateway_policy_with_http_info(inbound, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway routing policy.
Delete the routing policy document for a specific inbound pattern.
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1038 def delete_ai_gateway_policy_with_http_info(inbound, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_policy".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_policy") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_policy")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_policy ...' end # verify the required parameter 'inbound' is set if @api_client.config.client_side_validation && inbound.nil? fail ArgumentError, "Missing the required parameter 'inbound' when calling AIGatewayAPI.delete_ai_gateway_policy" end if @api_client.config.client_side_validation && inbound.to_s.length > 256 fail ArgumentError, 'invalid value for "inbound" when calling AIGatewayAPI.delete_ai_gateway_policy, the character length must be smaller than or equal to 256.' end # resource path local_var_path = '/api/v2/policies/{inbound}'.sub('{inbound}', CGI.escape(inbound.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil? # 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_ai_gateway_policy, :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: AIGatewayAPI#delete_ai_gateway_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_provider(id, opts = {}) ⇒ Object
Delete an AI Gateway provider.
1101 1102 1103 1104 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1101 def delete_ai_gateway_provider(id, opts = {}) delete_ai_gateway_provider_with_http_info(id, opts) nil end |
#delete_ai_gateway_provider_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway provider.
Requires ai_gateway_config_write and provider View/Edit. Models and pricing inherit provider access. Every affected route and policy membership requires the corresponding Edit permission; force=true never bypasses authorization. Providers used by routing rules return provider_in_use with HTTP 409. Each JSON:API error item's meta contains blocked, restricted_dependencies, policies, rules_to_delete, and rules_to_update. Visible policy entries contain id, name, and editable; visible route entries contain id, slug, and editable. Hidden dependencies are omitted from every collection and reported only by restricted_dependencies. A blocked response changes no configuration; an authorized editor must first remove the blocking references. Retry with force=true to confirm an authorized cascade that removes provider targets and deletes rules left without targets. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted.
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1114 def delete_ai_gateway_provider_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_provider".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_provider") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_provider")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_provider ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.delete_ai_gateway_provider" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling AIGatewayAPI.delete_ai_gateway_provider, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/providers/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil? # 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_ai_gateway_provider, :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: AIGatewayAPI#delete_ai_gateway_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_rate_limit(id, opts = {}) ⇒ Object
Archive an AI Gateway rate limit.
1177 1178 1179 1180 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1177 def delete_ai_gateway_rate_limit(id, opts = {}) delete_ai_gateway_rate_limit_with_http_info(id, opts) nil end |
#delete_ai_gateway_rate_limit_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Archive an AI Gateway rate limit.
Archive a rate limit by ID. An archived rate limit no longer appears in lists or lookups, and its alert monitor is deleted.
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1189 def delete_ai_gateway_rate_limit_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_rate_limit".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_rate_limit") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_rate_limit")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_rate_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.delete_ai_gateway_rate_limit" end # resource path local_var_path = '/api/v2/rate-limits/{id}'.sub('{id}', CGI.escape(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_ai_gateway_rate_limit, :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: AIGatewayAPI#delete_ai_gateway_rate_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_gateway_routing_rule(slug, opts = {}) ⇒ Object
Delete an AI Gateway routing rule.
1248 1249 1250 1251 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1248 def delete_ai_gateway_routing_rule(slug, opts = {}) delete_ai_gateway_routing_rule_with_http_info(slug, opts) nil end |
#delete_ai_gateway_routing_rule_with_http_info(slug, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI Gateway routing rule.
Delete a route with ai_gateway_config_write and route View/Edit. Every affected route and policy membership requires the corresponding Edit permission. The force=true parameter confirms impact and never bypasses authorization. A denied or unavailable check changes no configuration. Visible dependencies include editable; hidden dependencies are omitted and reported only by restricted_dependencies. A blocked response means an authorized editor must first remove blocking references. Each JSON:API error item's meta contains blocked, restricted_dependencies, policies, rules_to_delete, and rules_to_update. Visible policy entries contain id, name, and editable. Route deletion entries contain rule, reason, and editable; update entries contain rule, removed_tiers, and editable. Each rule contains route_id, slug, tiers, created_at, and updated_at with hidden nested selections redacted. The removed_tiers array identifies original tier numbers removed entirely by the cascade. Already-authorized in-flight operations may finish. Referenced rules require force=true. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted. Restriction cleanup occurs only after confirmed deletion. Cleanup failure returns 500 with configuration_deleted=true and permissions_cleanup_failed=true; refresh instead of assuming the route still exists.
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 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1261 def delete_ai_gateway_routing_rule_with_http_info(slug, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_ai_gateway_routing_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_ai_gateway_routing_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_ai_gateway_routing_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.delete_ai_gateway_routing_rule ...' end # verify the required parameter 'slug' is set if @api_client.config.client_side_validation && slug.nil? fail ArgumentError, "Missing the required parameter 'slug' when calling AIGatewayAPI.delete_ai_gateway_routing_rule" end if @api_client.config.client_side_validation && slug.to_s.length > 128 fail ArgumentError, 'invalid value for "slug" when calling AIGatewayAPI.delete_ai_gateway_routing_rule, the character length must be smaller than or equal to 128.' end # resource path local_var_path = '/api/v2/routing-rules' # query parameters query_params = opts[:query_params] || {} query_params[:'slug'] = slug query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil? # 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_ai_gateway_routing_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: AIGatewayAPI#delete_ai_gateway_routing_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_budget(id, opts = {}) ⇒ Object
Get an AI Gateway budget.
1325 1326 1327 1328 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1325 def get_ai_gateway_budget(id, opts = {}) data, _status_code, _headers = get_ai_gateway_budget_with_http_info(id, opts) data end |
#get_ai_gateway_budget_current_period(id, opts = {}) ⇒ Object
Get an AI Gateway budget's current period.
1396 1397 1398 1399 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1396 def get_ai_gateway_budget_current_period(id, opts = {}) data, _status_code, _headers = get_ai_gateway_budget_current_period_with_http_info(id, opts) data end |
#get_ai_gateway_budget_current_period_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetPeriodResponse, Integer, Hash)>
Get an AI Gateway budget's current period.
Get the active accounting window, enforced capacity, and current spend.
1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1408 def get_ai_gateway_budget_current_period_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_budget_current_period".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_budget_current_period") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_budget_current_period")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_budget_current_period ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.get_ai_gateway_budget_current_period" end # resource path local_var_path = '/api/v2/budgets/{id}/current-period'.sub('{id}', CGI.escape(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] || 'AiGatewayBudgetPeriodResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_budget_current_period, :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: AIGatewayAPI#get_ai_gateway_budget_current_period\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_budget_instances_summary(id, opts = {}) ⇒ Object
Get an AI Gateway budget instance summary.
1467 1468 1469 1470 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1467 def get_ai_gateway_budget_instances_summary(id, opts = {}) data, _status_code, _headers = get_ai_gateway_budget_instances_summary_with_http_info(id, opts) data end |
#get_ai_gateway_budget_instances_summary_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetInstancesSummaryResponse, Integer, Hash)>
Get an AI Gateway budget instance summary.
Aggregate counters for an accounting window, including total spend and the numbers of instances at or above the warning threshold and capacity. Use split_dim to aggregate only counters that match every given dimension value.
1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1481 def get_ai_gateway_budget_instances_summary_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_budget_instances_summary".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_budget_instances_summary") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_budget_instances_summary")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_budget_instances_summary ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.get_ai_gateway_budget_instances_summary" end # resource path local_var_path = '/api/v2/budgets/{id}/instances/summary'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'window'] = opts[:'window'] if !opts[:'window'].nil? query_params[:'split_dim'] = @api_client.build_collection_param(opts[:'split_dim'], :multi) if !opts[:'split_dim'].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] || 'AiGatewayBudgetInstancesSummaryResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_budget_instances_summary, :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: AIGatewayAPI#get_ai_gateway_budget_instances_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_budget_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetResponse, Integer, Hash)>
Get an AI Gateway budget.
Get a spend budget by ID, including its capacity, scope, reset window, warning threshold, and enforcement mode.
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1337 def get_ai_gateway_budget_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_budget".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_budget") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_budget")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.get_ai_gateway_budget" end # resource path local_var_path = '/api/v2/budgets/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayBudgetResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_budget, :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: AIGatewayAPI#get_ai_gateway_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_data_capture_configuration(opts = {}) ⇒ Object
Get the AI Gateway data capture configuration.
1543 1544 1545 1546 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1543 def get_ai_gateway_data_capture_configuration(opts = {}) data, _status_code, _headers = get_ai_gateway_data_capture_configuration_with_http_info(opts) data end |
#get_ai_gateway_data_capture_configuration_with_http_info(opts = {}) ⇒ Array<(AiGatewayCaptureConfigurationResponse, Integer, Hash)>
Get the AI Gateway data capture configuration.
Get the organization default mode, scoped capture overrides, and configuration revision.
1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1554 def get_ai_gateway_data_capture_configuration_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_data_capture_configuration".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_data_capture_configuration") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_data_capture_configuration")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_data_capture_configuration ...' end # resource path local_var_path = '/api/v2/data-capture/configuration' # 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] || 'AiGatewayCaptureConfigurationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_data_capture_configuration, :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: AIGatewayAPI#get_ai_gateway_data_capture_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_governance(opts = {}) ⇒ Object
Get AI Gateway governance controls.
1609 1610 1611 1612 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1609 def get_ai_gateway_governance(opts = {}) data, _status_code, _headers = get_ai_gateway_governance_with_http_info(opts) data end |
#get_ai_gateway_governance_with_http_info(opts = {}) ⇒ Array<(AiGatewayGovernanceResponse, Integer, Hash)>
Get AI Gateway governance controls.
Get the organization-wide AI Gateway governance settings, which are the default data capture mode and whether requests must reach providers covered by a zero data retention agreement.
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 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1620 def get_ai_gateway_governance_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_governance".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_governance") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_governance")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_governance ...' end # resource path local_var_path = '/api/v2/governance' # 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] || 'AiGatewayGovernanceResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_governance, :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: AIGatewayAPI#get_ai_gateway_governance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_model_group(id, opts = {}) ⇒ Object
Get an AI Gateway model group.
1675 1676 1677 1678 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1675 def get_ai_gateway_model_group(id, opts = {}) data, _status_code, _headers = get_ai_gateway_model_group_with_http_info(id, opts) data end |
#get_ai_gateway_model_group_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayModelGroupResponse, Integer, Hash)>
Get an AI Gateway model group.
Get a named policy or the explicit organization-wide policy by id "default". Requires configuration read permission; named policies also require view access. Provider selections cover current and future models and are returned separately from individual model selections.
1687 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 1739 1740 1741 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1687 def get_ai_gateway_model_group_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_model_group".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_model_group") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_model_group")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_model_group ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.get_ai_gateway_model_group" end # resource path local_var_path = '/api/v2/model-groups/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayModelGroupResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_model_group, :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: AIGatewayAPI#get_ai_gateway_model_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_model_pricing(provider_id, canonical, opts = {}) ⇒ Object
Get a model pricing override.
1746 1747 1748 1749 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1746 def get_ai_gateway_model_pricing(provider_id, canonical, opts = {}) data, _status_code, _headers = get_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts) data end |
#get_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts = {}) ⇒ Array<(AiGatewayModelPricingResponse, Integer, Hash)>
Get a model pricing override.
Get a custom provider model's pricing override and effective pricing source. Requires ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404.
1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 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 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1759 def get_ai_gateway_model_pricing_with_http_info(provider_id, canonical, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_model_pricing".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_model_pricing") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_model_pricing")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_model_pricing ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.get_ai_gateway_model_pricing" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.get_ai_gateway_model_pricing, must be greater than or equal to 1.' end # verify the required parameter 'canonical' is set if @api_client.config.client_side_validation && canonical.nil? fail ArgumentError, "Missing the required parameter 'canonical' when calling AIGatewayAPI.get_ai_gateway_model_pricing" end if @api_client.config.client_side_validation && canonical.to_s.length > 256 fail ArgumentError, 'invalid value for "canonical" when calling AIGatewayAPI.get_ai_gateway_model_pricing, the character length must be smaller than or equal to 256.' end # resource path local_var_path = '/api/v2/providers/{provider_id}/models/{canonical}/pricing'.sub('{provider_id}', CGI.escape(provider_id.to_s).gsub('%2F', '/')).sub('{canonical}', CGI.escape(canonical.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] || 'AiGatewayModelPricingResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_model_pricing, :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: AIGatewayAPI#get_ai_gateway_model_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_policy(inbound, opts = {}) ⇒ Object
Get an AI Gateway routing policy.
1828 1829 1830 1831 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1828 def get_ai_gateway_policy(inbound, opts = {}) data, _status_code, _headers = get_ai_gateway_policy_with_http_info(inbound, opts) data end |
#get_ai_gateway_policy_with_http_info(inbound, opts = {}) ⇒ Array<(AiGatewayPolicyResponse, Integer, Hash)>
Get an AI Gateway routing policy.
Get the routing policy document for a specific inbound pattern.
1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1841 def get_ai_gateway_policy_with_http_info(inbound, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_policy".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_policy") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_policy")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_policy ...' end # verify the required parameter 'inbound' is set if @api_client.config.client_side_validation && inbound.nil? fail ArgumentError, "Missing the required parameter 'inbound' when calling AIGatewayAPI.get_ai_gateway_policy" end if @api_client.config.client_side_validation && inbound.to_s.length > 256 fail ArgumentError, 'invalid value for "inbound" when calling AIGatewayAPI.get_ai_gateway_policy, the character length must be smaller than or equal to 256.' end # resource path local_var_path = '/api/v2/policies/{inbound}'.sub('{inbound}', CGI.escape(inbound.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].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] || 'AiGatewayPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_policy, :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: AIGatewayAPI#get_ai_gateway_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_provider(id, opts = {}) ⇒ Object
Get an AI Gateway provider.
1904 1905 1906 1907 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1904 def get_ai_gateway_provider(id, opts = {}) data, _status_code, _headers = get_ai_gateway_provider_with_http_info(id, opts) data end |
#get_ai_gateway_provider_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayProviderResponse, Integer, Hash)>
Get an AI Gateway provider.
Get a provider by ID, including its routing slug, integration account, and cost multiplier. Credentials stay in the integration account and are never returned. Requires ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404.
1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1916 def get_ai_gateway_provider_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_provider".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_provider") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_provider")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_provider ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.get_ai_gateway_provider" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling AIGatewayAPI.get_ai_gateway_provider, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/providers/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayProviderResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_provider, :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: AIGatewayAPI#get_ai_gateway_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_rate_limit(id, opts = {}) ⇒ Object
Get an AI Gateway rate limit.
1978 1979 1980 1981 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1978 def get_ai_gateway_rate_limit(id, opts = {}) data, _status_code, _headers = get_ai_gateway_rate_limit_with_http_info(id, opts) data end |
#get_ai_gateway_rate_limit_usage(opts = {}) ⇒ Object
Get AI Gateway rate limit usage.
2049 2050 2051 2052 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2049 def get_ai_gateway_rate_limit_usage(opts = {}) data, _status_code, _headers = get_ai_gateway_rate_limit_usage_with_http_info(opts) data end |
#get_ai_gateway_rate_limit_usage_with_http_info(opts = {}) ⇒ Array<(AiGatewayRateLimitUsageListResponse, Integer, Hash)>
Get AI Gateway rate limit usage.
Get live usage for the organization's rate limits. Returns requests and tokens counted in the rolling one-minute window and requests limited in the last 15 minutes for each enabled rate limit, plus untracked (traffic no enforced rate limit covers) and total (all gateway traffic).
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 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2060 def get_ai_gateway_rate_limit_usage_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_rate_limit_usage".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_rate_limit_usage") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_rate_limit_usage")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_rate_limit_usage ...' end # resource path local_var_path = '/api/v2/rate-limits/usage' # 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] || 'AiGatewayRateLimitUsageListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_rate_limit_usage, :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: AIGatewayAPI#get_ai_gateway_rate_limit_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_rate_limit_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayRateLimitResponse, Integer, Hash)>
Get an AI Gateway rate limit.
Get a rate limit by ID, including its scope, per-minute request and token limits, and whether it is enabled.
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 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 1990 def get_ai_gateway_rate_limit_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_rate_limit".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_rate_limit") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_rate_limit")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_rate_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.get_ai_gateway_rate_limit" end # resource path local_var_path = '/api/v2/rate-limits/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayRateLimitResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_rate_limit, :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: AIGatewayAPI#get_ai_gateway_rate_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_gateway_routing_rule(slug, opts = {}) ⇒ Object
Get an AI Gateway routing rule.
2115 2116 2117 2118 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2115 def get_ai_gateway_routing_rule(slug, opts = {}) data, _status_code, _headers = get_ai_gateway_routing_rule_with_http_info(slug, opts) data end |
#get_ai_gateway_routing_rule_with_http_info(slug, opts = {}) ⇒ Array<(AiGatewayRoutingRuleResponse, Integer, Hash)>
Get an AI Gateway routing rule.
Get a routing rule by slug with ai_gateway_config_read and route View. Hidden and missing routes both return 404. Hidden target identities are omitted; parent-local target IDs remain available for retention.
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 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2127 def get_ai_gateway_routing_rule_with_http_info(slug, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_ai_gateway_routing_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_ai_gateway_routing_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_ai_gateway_routing_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.get_ai_gateway_routing_rule ...' end # verify the required parameter 'slug' is set if @api_client.config.client_side_validation && slug.nil? fail ArgumentError, "Missing the required parameter 'slug' when calling AIGatewayAPI.get_ai_gateway_routing_rule" end if @api_client.config.client_side_validation && slug.to_s.length > 128 fail ArgumentError, 'invalid value for "slug" when calling AIGatewayAPI.get_ai_gateway_routing_rule, the character length must be smaller than or equal to 128.' end # resource path local_var_path = '/api/v2/routing-rules/get' # query parameters query_params = opts[:query_params] || {} query_params[:'slug'] = slug # 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] || 'AiGatewayRoutingRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ai_gateway_routing_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: AIGatewayAPI#get_ai_gateway_routing_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_budget_instance_dimensions(id, opts = {}) ⇒ Object
List AI Gateway budget instance dimension values.
2190 2191 2192 2193 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2190 def list_ai_gateway_budget_instance_dimensions(id, opts = {}) data, _status_code, _headers = list_ai_gateway_budget_instance_dimensions_with_http_info(id, opts) data end |
#list_ai_gateway_budget_instance_dimensions_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceDimensionListResponse, Integer, Hash)>
List AI Gateway budget instance dimension values.
Search the values that a template budget's split dimensions take across its instance counters in an accounting window. Each dimension returns its top values by spend, with counter counts. Use query or value to narrow results and limit to cap them. The truncated field reports whether more values matched. Each dimension's values are counted under the other dimensions' split_dim filters, so a dimension's own filter does not hide its alternatives. Legacy fixed-scope budgets return an empty list.
2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2208 def list_ai_gateway_budget_instance_dimensions_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_budget_instance_dimensions".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_budget_instance_dimensions") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_budget_instance_dimensions")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_budget_instance_dimensions ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.list_ai_gateway_budget_instance_dimensions" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AIGatewayAPI.list_ai_gateway_budget_instance_dimensions, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AIGatewayAPI.list_ai_gateway_budget_instance_dimensions, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/budgets/{id}/instances/dimensions'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'window'] = opts[:'window'] if !opts[:'window'].nil? query_params[:'split_dim'] = @api_client.build_collection_param(opts[:'split_dim'], :multi) if !opts[:'split_dim'].nil? query_params[:'dim'] = @api_client.build_collection_param(opts[:'dim'], :multi) if !opts[:'dim'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'value'] = @api_client.build_collection_param(opts[:'value'], :multi) if !opts[:'value'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'AiGatewayBudgetInstanceDimensionListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_budget_instance_dimensions, :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: AIGatewayAPI#list_ai_gateway_budget_instance_dimensions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_budget_instances(id, opts = {}) ⇒ Object
List AI Gateway budget instances.
2280 2281 2282 2283 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2280 def list_ai_gateway_budget_instances(id, opts = {}) data, _status_code, _headers = list_ai_gateway_budget_instances_with_http_info(id, opts) data end |
#list_ai_gateway_budget_instances_with_http_info(id, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceListResponse, Integer, Hash)>
List AI Gateway budget instances.
List instance counters for an accounting window. Legacy fixed-scope budgets return one pooled row with an empty instance_key. Omit window to use the current window. Use split_dim to keep only counters that match every given dimension value.
2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2297 def list_ai_gateway_budget_instances_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_budget_instances".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_budget_instances") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_budget_instances")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_budget_instances ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.list_ai_gateway_budget_instances" end allowable_values = ['spend_desc', 'spend_asc', 'key_asc'] 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 if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AIGatewayAPI.list_ai_gateway_budget_instances, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AIGatewayAPI.list_ai_gateway_budget_instances, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AIGatewayAPI.list_ai_gateway_budget_instances, must be greater than or equal to 0.' end # resource path local_var_path = '/api/v2/budgets/{id}/instances'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'window'] = opts[:'window'] if !opts[:'window'].nil? query_params[:'split_dim'] = @api_client.build_collection_param(opts[:'split_dim'], :multi) if !opts[:'split_dim'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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] || 'AiGatewayBudgetInstanceListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_budget_instances, :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: AIGatewayAPI#list_ai_gateway_budget_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_budgets(opts = {}) ⇒ Object
List AI Gateway budgets.
2375 2376 2377 2378 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2375 def list_ai_gateway_budgets(opts = {}) data, _status_code, _headers = list_ai_gateway_budgets_with_http_info(opts) data end |
#list_ai_gateway_budgets_with_http_info(opts = {}) ⇒ Array<(AiGatewayBudgetListResponse, Integer, Hash)>
List AI Gateway budgets.
List spend budgets for the organization, including active-window spend and effective capacity.
2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2386 def list_ai_gateway_budgets_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_budgets".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_budgets") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_budgets")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_budgets ...' end # resource path local_var_path = '/api/v2/budgets' # 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] || 'AiGatewayBudgetListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_budgets, :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: AIGatewayAPI#list_ai_gateway_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_model_groups(opts = {}) ⇒ Object
List AI Gateway model groups.
2441 2442 2443 2444 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2441 def list_ai_gateway_model_groups(opts = {}) data, _status_code, _headers = list_ai_gateway_model_groups_with_http_info(opts) data end |
#list_ai_gateway_model_groups_with_http_info(opts = {}) ⇒ Array<(AiGatewayModelGroupListResponse, Integer, Hash)>
List AI Gateway model groups.
List model groups the user can view. The organization-wide policy has id "default" and explicit model, provider, and route selections. Missing or empty selections grant no organization-wide access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named policies retain their access bindings. Requires configuration read permission; named policies also require view access.
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 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2452 def list_ai_gateway_model_groups_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_model_groups".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_model_groups") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_model_groups")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_model_groups ...' end # resource path local_var_path = '/api/v2/model-groups' # 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] || 'AiGatewayModelGroupListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_model_groups, :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: AIGatewayAPI#list_ai_gateway_model_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_models(provider_id, opts = {}) ⇒ Object
List models for an AI Gateway provider.
2507 2508 2509 2510 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2507 def list_ai_gateway_models(provider_id, opts = {}) data, _status_code, _headers = list_ai_gateway_models_with_http_info(provider_id, opts) data end |
#list_ai_gateway_models_by_canonical(opts = {}) ⇒ Object
List AI Gateway models by canonical ID.
2581 2582 2583 2584 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2581 def list_ai_gateway_models_by_canonical(opts = {}) data, _status_code, _headers = list_ai_gateway_models_by_canonical_with_http_info(opts) data end |
#list_ai_gateway_models_by_canonical_with_http_info(opts = {}) ⇒ Array<(AiGatewayModelsByCanonicalListResponse, Integer, Hash)>
List AI Gateway models by canonical ID.
List all model catalog entries grouped by canonical model ID. Requires ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404.
2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2592 def list_ai_gateway_models_by_canonical_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_models_by_canonical".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_models_by_canonical") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_models_by_canonical")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_models_by_canonical ...' end # resource path local_var_path = '/api/v2/models' # 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] || 'AiGatewayModelsByCanonicalListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_models_by_canonical, :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: AIGatewayAPI#list_ai_gateway_models_by_canonical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_models_with_http_info(provider_id, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryListResponse, Integer, Hash)>
List models for an AI Gateway provider.
List all model catalog entries for a provider. Requires ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404.
2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2519 def list_ai_gateway_models_with_http_info(provider_id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_models".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_models") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_models")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_models ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.list_ai_gateway_models" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.list_ai_gateway_models, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/providers/{provider_id}/models'.sub('{provider_id}', CGI.escape(provider_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] || 'AiGatewayModelCatalogEntryListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_models, :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: AIGatewayAPI#list_ai_gateway_models\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_policies(opts = {}) ⇒ Object
List AI Gateway routing policies.
2647 2648 2649 2650 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2647 def list_ai_gateway_policies(opts = {}) data, _status_code, _headers = list_ai_gateway_policies_with_http_info(opts) data end |
#list_ai_gateway_policies_with_http_info(opts = {}) ⇒ Array<(AiGatewayPolicyListResponse, Integer, Hash)>
List AI Gateway routing policies.
List all routing policy documents for the organization. Pass user_id to filter by user scope.
2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2659 def list_ai_gateway_policies_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_policies".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_policies") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_policies")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_policies ...' end # resource path local_var_path = '/api/v2/policies' # query parameters query_params = opts[:query_params] || {} query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].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] || 'AiGatewayPolicyListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_policies, :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: AIGatewayAPI#list_ai_gateway_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_provider_models(integration_type, integration_account_id, opts = {}) ⇒ Object
List models available from a provider integration.
2715 2716 2717 2718 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2715 def list_ai_gateway_provider_models(integration_type, integration_account_id, opts = {}) data, _status_code, _headers = list_ai_gateway_provider_models_with_http_info(integration_type, integration_account_id, opts) data end |
#list_ai_gateway_provider_models_with_http_info(integration_type, integration_account_id, opts = {}) ⇒ Array<(AiGatewayDiscoveredModelListResponse, Integer, Hash)>
List models available from a provider integration.
List live models available to a provider integration account that supports model discovery.
2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2732 def list_ai_gateway_provider_models_with_http_info(integration_type, integration_account_id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_provider_models".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_provider_models") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_provider_models")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_provider_models ...' end # verify the required parameter 'integration_type' is set if @api_client.config.client_side_validation && integration_type.nil? fail ArgumentError, "Missing the required parameter 'integration_type' when calling AIGatewayAPI.list_ai_gateway_provider_models" end # verify the required parameter 'integration_account_id' is set if @api_client.config.client_side_validation && integration_account_id.nil? fail ArgumentError, "Missing the required parameter 'integration_account_id' when calling AIGatewayAPI.list_ai_gateway_provider_models" end if @api_client.config.client_side_validation && integration_account_id.to_s.length > 256 fail ArgumentError, 'invalid value for "integration_account_id" when calling AIGatewayAPI.list_ai_gateway_provider_models, the character length must be smaller than or equal to 256.' end # resource path local_var_path = '/api/v2/provider-models' # query parameters query_params = opts[:query_params] || {} query_params[:'integration_type'] = integration_type query_params[:'integration_account_id'] = integration_account_id query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil? query_params[:'bedrock_region'] = opts[:'bedrock_region'] if !opts[:'bedrock_region'].nil? query_params[:'foundry_resource_id'] = opts[:'foundry_resource_id'] if !opts[:'foundry_resource_id'].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] || 'AiGatewayDiscoveredModelListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_provider_models, :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: AIGatewayAPI#list_ai_gateway_provider_models\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_providers(opts = {}) ⇒ Object
List AI Gateway providers.
2804 2805 2806 2807 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2804 def list_ai_gateway_providers(opts = {}) data, _status_code, _headers = list_ai_gateway_providers_with_http_info(opts) data end |
#list_ai_gateway_providers_with_http_info(opts = {}) ⇒ Array<(AiGatewayProviderListResponse, Integer, Hash)>
List AI Gateway providers.
List the model providers connected to the organization. Credentials stay in each provider's integration account and are never returned. Requires ai_gateway_config_read and provider View. Catalog and pricing metadata inherit provider access. Lists omit hidden entries; direct reads of hidden resources return 404.
2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2815 def list_ai_gateway_providers_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_providers".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_providers") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_providers")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_providers ...' end # resource path local_var_path = '/api/v2/providers' # 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] || 'AiGatewayProviderListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_providers, :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: AIGatewayAPI#list_ai_gateway_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_rate_limits(opts = {}) ⇒ Object
List AI Gateway rate limits.
2870 2871 2872 2873 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2870 def list_ai_gateway_rate_limits(opts = {}) data, _status_code, _headers = list_ai_gateway_rate_limits_with_http_info(opts) data end |
#list_ai_gateway_rate_limits_with_http_info(opts = {}) ⇒ Array<(AiGatewayRateLimitListResponse, Integer, Hash)>
List AI Gateway rate limits.
List the organization's AI Gateway rate limits.
2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2881 def list_ai_gateway_rate_limits_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_rate_limits".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_rate_limits") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_rate_limits")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_rate_limits ...' end # resource path local_var_path = '/api/v2/rate-limits' # 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] || 'AiGatewayRateLimitListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_rate_limits, :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: AIGatewayAPI#list_ai_gateway_rate_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_gateway_routing_rules(opts = {}) ⇒ Object
List AI Gateway routing rules.
2936 2937 2938 2939 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2936 def list_ai_gateway_routing_rules(opts = {}) data, _status_code, _headers = list_ai_gateway_routing_rules_with_http_info(opts) data end |
#list_ai_gateway_routing_rules_with_http_info(opts = {}) ⇒ Array<(AiGatewayRoutingRuleListResponse, Integer, Hash)>
List AI Gateway routing rules.
List the organization's routing rules that the caller has View access to. Requires ai_gateway_config_read. Hidden route references are omitted from nested targets.
2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 2947 def list_ai_gateway_routing_rules_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_ai_gateway_routing_rules".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_ai_gateway_routing_rules") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_ai_gateway_routing_rules")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.list_ai_gateway_routing_rules ...' end # resource path local_var_path = '/api/v2/routing-rules' # 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] || 'AiGatewayRoutingRuleListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_ai_gateway_routing_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: AIGatewayAPI#list_ai_gateway_routing_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#override_ai_gateway_budget_instance_capacity(id, body, opts = {}) ⇒ Object
Override a budget instance's capacity.
3002 3003 3004 3005 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3002 def override_ai_gateway_budget_instance_capacity(id, body, opts = {}) data, _status_code, _headers = override_ai_gateway_budget_instance_capacity_with_http_info(id, body, opts) data end |
#override_ai_gateway_budget_instance_capacity_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceResponse, Integer, Hash)>
Override a budget instance's capacity.
Override active-period capacity for one instance of a template budget, identified by its instance_key. Other instances and the budget's default capacity are unchanged. The override is retained in the budget adjustment audit history. Returns 404 when the instance has no counter in the active period. Not supported for legacy fixed-scope budgets.
3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3015 def override_ai_gateway_budget_instance_capacity_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.override_ai_gateway_budget_instance_capacity".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.override_ai_gateway_budget_instance_capacity") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.override_ai_gateway_budget_instance_capacity")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.override_ai_gateway_budget_instance_capacity ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.override_ai_gateway_budget_instance_capacity" 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 AIGatewayAPI.override_ai_gateway_budget_instance_capacity" end # resource path local_var_path = '/api/v2/budgets/{id}/instances/capacity'.sub('{id}', CGI.escape(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] || 'AiGatewayBudgetInstanceResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :override_ai_gateway_budget_instance_capacity, :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: AIGatewayAPI#override_ai_gateway_budget_instance_capacity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reset_ai_gateway_budget_instance_spend(id, body, opts = {}) ⇒ Object
Reset a budget instance's spend.
3080 3081 3082 3083 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3080 def reset_ai_gateway_budget_instance_spend(id, body, opts = {}) data, _status_code, _headers = reset_ai_gateway_budget_instance_spend_with_http_info(id, body, opts) data end |
#reset_ai_gateway_budget_instance_spend_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayBudgetInstanceResponse, Integer, Hash)>
Reset a budget instance's spend.
Reset active-period spend for one instance of a template budget, identified by its instance_key. The reset is retained in the budget adjustment audit history. Returns 404 when the instance has no counter in the active period. Not supported for legacy fixed-scope budgets.
3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3093 def reset_ai_gateway_budget_instance_spend_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.reset_ai_gateway_budget_instance_spend".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.reset_ai_gateway_budget_instance_spend") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.reset_ai_gateway_budget_instance_spend")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.reset_ai_gateway_budget_instance_spend ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.reset_ai_gateway_budget_instance_spend" 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 AIGatewayAPI.reset_ai_gateway_budget_instance_spend" end # resource path local_var_path = '/api/v2/budgets/{id}/instances/reset'.sub('{id}', CGI.escape(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] || 'AiGatewayBudgetInstanceResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :reset_ai_gateway_budget_instance_spend, :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: AIGatewayAPI#reset_ai_gateway_budget_instance_spend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_budget(id, body, opts = {}) ⇒ Object
Update an AI Gateway budget.
3158 3159 3160 3161 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3158 def update_ai_gateway_budget(id, body, opts = {}) data, _status_code, _headers = update_ai_gateway_budget_with_http_info(id, body, opts) data end |
#update_ai_gateway_budget_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayBudgetResponse, Integer, Hash)>
Update an AI Gateway budget.
Update a budget's mutable definition. Capacity changes apply to future accounting periods
unless apply_to_current_period is true.
3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3172 def update_ai_gateway_budget_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_budget".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_budget") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_budget")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.update_ai_gateway_budget" 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 AIGatewayAPI.update_ai_gateway_budget" end # resource path local_var_path = '/api/v2/budgets/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayBudgetResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_budget, :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: AIGatewayAPI#update_ai_gateway_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_data_capture_override(id, body, opts = {}) ⇒ Object
Replace an AI Gateway data capture override.
3237 3238 3239 3240 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3237 def update_ai_gateway_data_capture_override(id, body, opts = {}) data, _status_code, _headers = update_ai_gateway_data_capture_override_with_http_info(id, body, opts) data end |
#update_ai_gateway_data_capture_override_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayCaptureOverrideResponse, Integer, Hash)>
Replace an AI Gateway data capture override.
Replace an override using its revision and the current configuration_revision. Changes to capture overrides don't affect routing rules. Returns HTTP 409 when configuration_revision or the override revision is stale, including a concurrent change during replacement. Missing revisions or required full-capture confirmation returns HTTP 400.
3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3250 def update_ai_gateway_data_capture_override_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_data_capture_override".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_data_capture_override") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_data_capture_override")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_data_capture_override ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.update_ai_gateway_data_capture_override" 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 AIGatewayAPI.update_ai_gateway_data_capture_override" end # resource path local_var_path = '/api/v2/data-capture/overrides/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayCaptureOverrideResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_data_capture_override, :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: AIGatewayAPI#update_ai_gateway_data_capture_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_governance(body, opts = {}) ⇒ Object
Replace AI Gateway governance controls.
3315 3316 3317 3318 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3315 def update_ai_gateway_governance(body, opts = {}) data, _status_code, _headers = update_ai_gateway_governance_with_http_info(body, opts) data end |
#update_ai_gateway_governance_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayGovernanceResponse, Integer, Hash)>
Replace AI Gateway governance controls.
Replace the organization-wide AI Gateway governance settings, which are the default data capture mode and whether requests must reach providers covered by a zero data retention agreement.
3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3327 def update_ai_gateway_governance_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_governance".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_governance") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_governance")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_governance ...' 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 AIGatewayAPI.update_ai_gateway_governance" end # resource path local_var_path = '/api/v2/governance' # 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] || 'AiGatewayGovernanceResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_governance, :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: AIGatewayAPI#update_ai_gateway_governance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_model(provider_id, canonical, body, opts = {}) ⇒ Object
Update a model for an AI Gateway provider.
3388 3389 3390 3391 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3388 def update_ai_gateway_model(provider_id, canonical, body, opts = {}) data, _status_code, _headers = update_ai_gateway_model_with_http_info(provider_id, canonical, body, opts) data end |
#update_ai_gateway_model_group(id, body, opts = {}) ⇒ Object
Update an AI Gateway model group.
3477 3478 3479 3480 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3477 def update_ai_gateway_model_group(id, body, opts = {}) data, _status_code, _headers = update_ai_gateway_model_group_with_http_info(id, body, opts) data end |
#update_ai_gateway_model_group_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayModelGroupResponse, Integer, Hash)>
Update an AI Gateway model group.
Update a model group. For id "default", save membership and request options atomically with expected_revision. Empty selections grant no organization-wide access. Applicable authorized named policies override organization-wide request options; a rejected named-policy request cannot fall back to organization-wide options. The organization-wide audience is fixed and grants resource use only. Requires configuration write permission; named policies also require edit access.
3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3490 def update_ai_gateway_model_group_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_model_group".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_model_group") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_model_group")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_model_group ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.update_ai_gateway_model_group" 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 AIGatewayAPI.update_ai_gateway_model_group" end # resource path local_var_path = '/api/v2/model-groups/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayModelGroupResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_model_group, :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: AIGatewayAPI#update_ai_gateway_model_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_model_pricing(provider_id, canonical, body, opts = {}) ⇒ Object
Set a model pricing override.
3555 3556 3557 3558 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3555 def update_ai_gateway_model_pricing(provider_id, canonical, body, opts = {}) data, _status_code, _headers = update_ai_gateway_model_pricing_with_http_info(provider_id, canonical, body, opts) data end |
#update_ai_gateway_model_pricing_with_http_info(provider_id, canonical, body, opts = {}) ⇒ Array<(AiGatewayModelPricingResponse, Integer, Hash)>
Set a model pricing override.
Set a custom provider model's pricing override. Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3569 def update_ai_gateway_model_pricing_with_http_info(provider_id, canonical, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_model_pricing".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_model_pricing") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_model_pricing")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_model_pricing ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.update_ai_gateway_model_pricing" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.update_ai_gateway_model_pricing, must be greater than or equal to 1.' end # verify the required parameter 'canonical' is set if @api_client.config.client_side_validation && canonical.nil? fail ArgumentError, "Missing the required parameter 'canonical' when calling AIGatewayAPI.update_ai_gateway_model_pricing" end if @api_client.config.client_side_validation && canonical.to_s.length > 256 fail ArgumentError, 'invalid value for "canonical" when calling AIGatewayAPI.update_ai_gateway_model_pricing, the character length must be smaller than or equal to 256.' 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 AIGatewayAPI.update_ai_gateway_model_pricing" end # resource path local_var_path = '/api/v2/providers/{provider_id}/models/{canonical}/pricing'.sub('{provider_id}', CGI.escape(provider_id.to_s).gsub('%2F', '/')).sub('{canonical}', CGI.escape(canonical.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] || 'AiGatewayModelPricingResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_model_pricing, :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: AIGatewayAPI#update_ai_gateway_model_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_model_with_http_info(provider_id, canonical, body, opts = {}) ⇒ Array<(AiGatewayModelCatalogEntryResponse, Integer, Hash)>
Update a model for an AI Gateway provider.
Update a manually managed model catalog entry. Discovered entries are read-only. Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3402 def update_ai_gateway_model_with_http_info(provider_id, canonical, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_model".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_model") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_model")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_model ...' end # verify the required parameter 'provider_id' is set if @api_client.config.client_side_validation && provider_id.nil? fail ArgumentError, "Missing the required parameter 'provider_id' when calling AIGatewayAPI.update_ai_gateway_model" end if @api_client.config.client_side_validation && provider_id < 1 fail ArgumentError, 'invalid value for "provider_id" when calling AIGatewayAPI.update_ai_gateway_model, must be greater than or equal to 1.' end # verify the required parameter 'canonical' is set if @api_client.config.client_side_validation && canonical.nil? fail ArgumentError, "Missing the required parameter 'canonical' when calling AIGatewayAPI.update_ai_gateway_model" end if @api_client.config.client_side_validation && canonical.to_s.length > 256 fail ArgumentError, 'invalid value for "canonical" when calling AIGatewayAPI.update_ai_gateway_model, the character length must be smaller than or equal to 256.' 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 AIGatewayAPI.update_ai_gateway_model" end # resource path local_var_path = '/api/v2/providers/{provider_id}/models/{canonical}'.sub('{provider_id}', CGI.escape(provider_id.to_s).gsub('%2F', '/')).sub('{canonical}', CGI.escape(canonical.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] || 'AiGatewayModelCatalogEntryResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_model, :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: AIGatewayAPI#update_ai_gateway_model\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_provider(id, body, opts = {}) ⇒ Object
Update an AI Gateway provider.
3644 3645 3646 3647 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3644 def update_ai_gateway_provider(id, body, opts = {}) data, _status_code, _headers = update_ai_gateway_provider_with_http_info(id, body, opts) data end |
#update_ai_gateway_provider_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayProviderResponse, Integer, Hash)>
Update an AI Gateway provider.
Update a provider's display name or cost multiplier. Provider type, integration settings, and slug are immutable. Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3657 def update_ai_gateway_provider_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_provider".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_provider") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_provider")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_provider ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.update_ai_gateway_provider" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling AIGatewayAPI.update_ai_gateway_provider, must be greater than or equal to 1.' 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 AIGatewayAPI.update_ai_gateway_provider" end # resource path local_var_path = '/api/v2/providers/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayProviderResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_provider, :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: AIGatewayAPI#update_ai_gateway_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_rate_limit(id, body, opts = {}) ⇒ Object
Update an AI Gateway rate limit.
3725 3726 3727 3728 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3725 def update_ai_gateway_rate_limit(id, body, opts = {}) data, _status_code, _headers = update_ai_gateway_rate_limit_with_http_info(id, body, opts) data end |
#update_ai_gateway_rate_limit_with_http_info(id, body, opts = {}) ⇒ Array<(AiGatewayRateLimitResponse, Integer, Hash)>
Update an AI Gateway rate limit.
Update a rate limit. Only the attributes sent are changed. Scope stays editable, and changes never reset current usage. Returns 409 when the rule was changed concurrently or the new scope duplicates another rule.
3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3738 def update_ai_gateway_rate_limit_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_rate_limit".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_rate_limit") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_rate_limit")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_rate_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AIGatewayAPI.update_ai_gateway_rate_limit" 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 AIGatewayAPI.update_ai_gateway_rate_limit" end # resource path local_var_path = '/api/v2/rate-limits/{id}'.sub('{id}', CGI.escape(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] || 'AiGatewayRateLimitResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_rate_limit, :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: AIGatewayAPI#update_ai_gateway_rate_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ai_gateway_routing_rule(slug, body, opts = {}) ⇒ Object
Update an AI Gateway routing rule.
3803 3804 3805 3806 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3803 def update_ai_gateway_routing_rule(slug, body, opts = {}) data, _status_code, _headers = update_ai_gateway_routing_rule_with_http_info(slug, body, opts) data end |
#update_ai_gateway_routing_rule_with_http_info(slug, body, opts = {}) ⇒ Array<(AiGatewayRoutingRuleResponse, Integer, Hash)>
Update an AI Gateway routing rule.
Update a route with ai_gateway_config_write and route View/Edit. The slug is immutable; data capture is managed independently. Omitting tiers preserves the entire graph. When tiers are supplied, saved parent-local target IDs retain omitted destination and reasoning, weight, rubric, and default settings. Omitted ordering/classifier settings preserve the saved same-position tier. Explicit null resets nullable settings. New references require View on their resources. A hidden target omitted from tiers must be explicitly listed in removed_target_ids, otherwise the update fails without changes. expected_updated_at rejects stale updates with 409. Sharing-only saves do not replace target rows. Hidden and missing routes return the same 404; visible non-editors receive 403. Inference authorization is unchanged.
3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3816 def update_ai_gateway_routing_rule_with_http_info(slug, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_ai_gateway_routing_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_ai_gateway_routing_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_ai_gateway_routing_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.update_ai_gateway_routing_rule ...' end # verify the required parameter 'slug' is set if @api_client.config.client_side_validation && slug.nil? fail ArgumentError, "Missing the required parameter 'slug' when calling AIGatewayAPI.update_ai_gateway_routing_rule" end if @api_client.config.client_side_validation && slug.to_s.length > 128 fail ArgumentError, 'invalid value for "slug" when calling AIGatewayAPI.update_ai_gateway_routing_rule, the character length must be smaller than or equal to 128.' 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 AIGatewayAPI.update_ai_gateway_routing_rule" end # resource path local_var_path = '/api/v2/routing-rules' # query parameters query_params = opts[:query_params] || {} query_params[:'slug'] = slug # 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] || 'AiGatewayRoutingRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_ai_gateway_routing_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: AIGatewayAPI#update_ai_gateway_routing_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upsert_ai_gateway_policy(body, opts = {}) ⇒ Object
Create or replace an AI Gateway routing policy.
3885 3886 3887 3888 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3885 def upsert_ai_gateway_policy(body, opts = {}) data, _status_code, _headers = upsert_ai_gateway_policy_with_http_info(body, opts) data end |
#upsert_ai_gateway_policy_with_http_info(body, opts = {}) ⇒ Array<(AiGatewayPolicyResponse, Integer, Hash)>
Create or replace an AI Gateway routing policy.
Create or replace the routing policy document for an inbound pattern. Pass user_id to scope the policy to a user.
3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 |
# File 'lib/datadog_api_client/v2/api/ai_gateway_api.rb', line 3898 def upsert_ai_gateway_policy_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.upsert_ai_gateway_policy".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.upsert_ai_gateway_policy") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.upsert_ai_gateway_policy")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIGatewayAPI.upsert_ai_gateway_policy ...' 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 AIGatewayAPI.upsert_ai_gateway_policy" end # resource path local_var_path = '/api/v2/policies' # query parameters query_params = opts[:query_params] || {} query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil? # 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] || 'AiGatewayPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :upsert_ai_gateway_policy, :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: AIGatewayAPI#upsert_ai_gateway_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |