Skip to content

Commit 4277871

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit dc891fc of spec repo
1 parent 2c5157f commit 4277871

35 files changed

+3976
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 738 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Grant role to a restriction query returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.add_role_to_restriction_query".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
9+
body = DatadogAPIClient::V2::RelationshipToRole.new({
10+
data: DatadogAPIClient::V2::RelationshipToRoleData.new({
11+
id: "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
12+
type: DatadogAPIClient::V2::RolesType::ROLES,
13+
}),
14+
})
15+
api_instance.add_role_to_restriction_query("restriction_query_id", body)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Create a restriction query returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_restriction_query".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
9+
body = DatadogAPIClient::V2::RestrictionQueryCreatePayload.new({
10+
data: DatadogAPIClient::V2::RestrictionQueryCreateData.new({
11+
attributes: DatadogAPIClient::V2::RestrictionQueryCreateAttributes.new({
12+
restriction_query: "env:sandbox",
13+
}),
14+
type: DatadogAPIClient::V2::LogsRestrictionQueriesType::LOGS_RESTRICTION_QUERIES,
15+
}),
16+
})
17+
p api_instance.create_restriction_query(body)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Delete a restriction query returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_restriction_query".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
api_instance.delete_restriction_query("restriction_query_id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get a restriction query returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_restriction_query".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
p api_instance.get_restriction_query("restriction_query_id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get restriction query for a given role returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_role_restriction_query".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
p api_instance.get_role_restriction_query("role_id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List restriction queries returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_restriction_queries".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
p api_instance.list_restriction_queries()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List roles for a restriction query returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_restriction_query_roles".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
p api_instance.list_restriction_query_roles("restriction_query_id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get all restriction queries for a given user returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_user_restriction_queries".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
p api_instance.list_user_restriction_queries("user_id")
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Revoke role from a restriction query returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.remove_role_from_restriction_query".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LogsRestrictionQueriesAPI.new
8+
9+
body = DatadogAPIClient::V2::RelationshipToRole.new({
10+
data: DatadogAPIClient::V2::RelationshipToRoleData.new({
11+
id: "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
12+
type: DatadogAPIClient::V2::RolesType::ROLES,
13+
}),
14+
})
15+
api_instance.remove_role_from_restriction_query("restriction_query_id", body)

0 commit comments

Comments
 (0)