From 5b2e01759479023a6d3e12e9529a07987c93e075 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 18 Feb 2026 20:20:39 +0000 Subject: [PATCH] Regenerate client from commit e717de8 of spec repo --- .generator/schemas/v2/openapi.yaml | 55 ++++++++++++++++++- .../api/client/v2/model/RoleAttributes.java | 45 ++++++++++++++- .../client/v2/model/RoleCloneAttributes.java | 48 +++++++++++++++- .../client/v2/model/RoleCreateAttributes.java | 47 +++++++++++++++- .../client/v2/model/RoleUpdateAttributes.java | 46 +++++++++++++++- .../datadog/api/client/v2/api/roles.feature | 12 ++-- 6 files changed, 241 insertions(+), 12 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a86914eb798..b3730cdf48c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -49734,6 +49734,18 @@ components: description: The name of the role. The name is neither unique nor a stable identifier of the role. type: string + receives_permissions_from: + description: 'The managed role from which this role automatically inherits + new permissions. + + Specify one of the following: "Datadog Admin Role", "Datadog Standard + Role", or "Datadog Read Only Role". + + If empty or not specified, the role does not automatically inherit permissions + from any managed role.' + items: + type: string + type: array user_count: description: Number of users with that role. format: int64 @@ -49759,6 +49771,18 @@ components: description: Name of the new role that is cloned. example: cloned-role type: string + receives_permissions_from: + description: 'The managed role from which this role automatically inherits + new permissions. + + Specify one of the following: "Datadog Admin Role", "Datadog Standard + Role", or "Datadog Read Only Role". + + If empty or not specified, the role does not automatically inherit permissions + from any managed role.' + items: + type: string + type: array required: - name type: object @@ -49787,6 +49811,18 @@ components: description: Name of the role. example: developers type: string + receives_permissions_from: + description: 'The managed role from which this role automatically inherits + new permissions. + + Specify one of the following: "Datadog Admin Role", "Datadog Standard + Role", or "Datadog Read Only Role". + + If empty or not specified, the role does not automatically inherit permissions + from any managed role.' + items: + type: string + type: array required: - name type: object @@ -49908,6 +49944,18 @@ components: name: description: Name of the role. type: string + receives_permissions_from: + description: 'The managed role from which this role automatically inherits + new permissions. + + Specify one of the following: "Datadog Admin Role", "Datadog Standard + Role", or "Datadog Read Only Role". + + If empty or not specified, the role does not automatically inherit permissions + from any managed role.' + items: + type: string + type: array user_count: description: The user count. format: int32 @@ -104429,7 +104477,12 @@ tags: read access on a specific log index to a role can be done in Datadog from the - [Pipelines page](https://app.datadoghq.com/logs/pipelines).' + [Pipelines page](https://app.datadoghq.com/logs/pipelines). + + + Roles can also be managed in bulk through the Datadog UI, which provides + + the capability to assign a single permission to multiple roles simultaneously.' name: Roles - description: Auto-generated tag Rum Audience Management name: Rum Audience Management diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java index d57a3a09b48..d42b52995c8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleAttributes.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; @@ -22,6 +24,7 @@ RoleAttributes.JSON_PROPERTY_CREATED_AT, RoleAttributes.JSON_PROPERTY_MODIFIED_AT, RoleAttributes.JSON_PROPERTY_NAME, + RoleAttributes.JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM, RoleAttributes.JSON_PROPERTY_USER_COUNT }) @jakarta.annotation.Generated( @@ -37,6 +40,9 @@ public class RoleAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM = "receives_permissions_from"; + private List receivesPermissionsFrom = null; + public static final String JSON_PROPERTY_USER_COUNT = "user_count"; private Long userCount; @@ -85,6 +91,38 @@ public void setName(String name) { this.name = name; } + public RoleAttributes receivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + return this; + } + + public RoleAttributes addReceivesPermissionsFromItem(String receivesPermissionsFromItem) { + if (this.receivesPermissionsFrom == null) { + this.receivesPermissionsFrom = new ArrayList<>(); + } + this.receivesPermissionsFrom.add(receivesPermissionsFromItem); + return this; + } + + /** + * The managed role from which this role automatically inherits new permissions. Specify one of + * the following: "Datadog Admin Role", "Datadog Standard Role", or "Datadog Read Only Role". If + * empty or not specified, the role does not automatically inherit permissions from any managed + * role. + * + * @return receivesPermissionsFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReceivesPermissionsFrom() { + return receivesPermissionsFrom; + } + + public void setReceivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + } + /** * Number of users with that role. * @@ -156,13 +194,15 @@ public boolean equals(Object o) { return Objects.equals(this.createdAt, roleAttributes.createdAt) && Objects.equals(this.modifiedAt, roleAttributes.modifiedAt) && Objects.equals(this.name, roleAttributes.name) + && Objects.equals(this.receivesPermissionsFrom, roleAttributes.receivesPermissionsFrom) && Objects.equals(this.userCount, roleAttributes.userCount) && Objects.equals(this.additionalProperties, roleAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(createdAt, modifiedAt, name, userCount, additionalProperties); + return Objects.hash( + createdAt, modifiedAt, name, receivesPermissionsFrom, userCount, additionalProperties); } @Override @@ -172,6 +212,9 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" receivesPermissionsFrom: ") + .append(toIndentedString(receivesPermissionsFrom)) + .append("\n"); sb.append(" userCount: ").append(toIndentedString(userCount)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java index 4b9cc9ef9fd..cd50623895e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCloneAttributes.java @@ -13,12 +13,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; /** Attributes required to create a new role by cloning an existing one. */ -@JsonPropertyOrder({RoleCloneAttributes.JSON_PROPERTY_NAME}) +@JsonPropertyOrder({ + RoleCloneAttributes.JSON_PROPERTY_NAME, + RoleCloneAttributes.JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RoleCloneAttributes { @@ -26,6 +31,9 @@ public class RoleCloneAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM = "receives_permissions_from"; + private List receivesPermissionsFrom = null; + public RoleCloneAttributes() {} @JsonCreator @@ -54,6 +62,38 @@ public void setName(String name) { this.name = name; } + public RoleCloneAttributes receivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + return this; + } + + public RoleCloneAttributes addReceivesPermissionsFromItem(String receivesPermissionsFromItem) { + if (this.receivesPermissionsFrom == null) { + this.receivesPermissionsFrom = new ArrayList<>(); + } + this.receivesPermissionsFrom.add(receivesPermissionsFromItem); + return this; + } + + /** + * The managed role from which this role automatically inherits new permissions. Specify one of + * the following: "Datadog Admin Role", "Datadog Standard Role", or "Datadog Read Only Role". If + * empty or not specified, the role does not automatically inherit permissions from any managed + * role. + * + * @return receivesPermissionsFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReceivesPermissionsFrom() { + return receivesPermissionsFrom; + } + + public void setReceivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -111,12 +151,13 @@ public boolean equals(Object o) { } RoleCloneAttributes roleCloneAttributes = (RoleCloneAttributes) o; return Objects.equals(this.name, roleCloneAttributes.name) + && Objects.equals(this.receivesPermissionsFrom, roleCloneAttributes.receivesPermissionsFrom) && Objects.equals(this.additionalProperties, roleCloneAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, additionalProperties); + return Objects.hash(name, receivesPermissionsFrom, additionalProperties); } @Override @@ -124,6 +165,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RoleCloneAttributes {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" receivesPermissionsFrom: ") + .append(toIndentedString(receivesPermissionsFrom)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java index 3189e450a2d..2a839f59922 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleCreateAttributes.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; @@ -22,7 +24,8 @@ @JsonPropertyOrder({ RoleCreateAttributes.JSON_PROPERTY_CREATED_AT, RoleCreateAttributes.JSON_PROPERTY_MODIFIED_AT, - RoleCreateAttributes.JSON_PROPERTY_NAME + RoleCreateAttributes.JSON_PROPERTY_NAME, + RoleCreateAttributes.JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -37,6 +40,9 @@ public class RoleCreateAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM = "receives_permissions_from"; + private List receivesPermissionsFrom = null; + public RoleCreateAttributes() {} @JsonCreator @@ -89,6 +95,38 @@ public void setName(String name) { this.name = name; } + public RoleCreateAttributes receivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + return this; + } + + public RoleCreateAttributes addReceivesPermissionsFromItem(String receivesPermissionsFromItem) { + if (this.receivesPermissionsFrom == null) { + this.receivesPermissionsFrom = new ArrayList<>(); + } + this.receivesPermissionsFrom.add(receivesPermissionsFromItem); + return this; + } + + /** + * The managed role from which this role automatically inherits new permissions. Specify one of + * the following: "Datadog Admin Role", "Datadog Standard Role", or "Datadog Read Only Role". If + * empty or not specified, the role does not automatically inherit permissions from any managed + * role. + * + * @return receivesPermissionsFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReceivesPermissionsFrom() { + return receivesPermissionsFrom; + } + + public void setReceivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -148,12 +186,14 @@ public boolean equals(Object o) { return Objects.equals(this.createdAt, roleCreateAttributes.createdAt) && Objects.equals(this.modifiedAt, roleCreateAttributes.modifiedAt) && Objects.equals(this.name, roleCreateAttributes.name) + && Objects.equals( + this.receivesPermissionsFrom, roleCreateAttributes.receivesPermissionsFrom) && Objects.equals(this.additionalProperties, roleCreateAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(createdAt, modifiedAt, name, additionalProperties); + return Objects.hash(createdAt, modifiedAt, name, receivesPermissionsFrom, additionalProperties); } @Override @@ -163,6 +203,9 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" receivesPermissionsFrom: ") + .append(toIndentedString(receivesPermissionsFrom)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java index 56feb01c40d..93cc3398b04 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RoleUpdateAttributes.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; @@ -22,6 +24,7 @@ RoleUpdateAttributes.JSON_PROPERTY_CREATED_AT, RoleUpdateAttributes.JSON_PROPERTY_MODIFIED_AT, RoleUpdateAttributes.JSON_PROPERTY_NAME, + RoleUpdateAttributes.JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM, RoleUpdateAttributes.JSON_PROPERTY_USER_COUNT }) @jakarta.annotation.Generated( @@ -37,6 +40,9 @@ public class RoleUpdateAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM = "receives_permissions_from"; + private List receivesPermissionsFrom = null; + public static final String JSON_PROPERTY_USER_COUNT = "user_count"; private Integer userCount; @@ -85,6 +91,38 @@ public void setName(String name) { this.name = name; } + public RoleUpdateAttributes receivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + return this; + } + + public RoleUpdateAttributes addReceivesPermissionsFromItem(String receivesPermissionsFromItem) { + if (this.receivesPermissionsFrom == null) { + this.receivesPermissionsFrom = new ArrayList<>(); + } + this.receivesPermissionsFrom.add(receivesPermissionsFromItem); + return this; + } + + /** + * The managed role from which this role automatically inherits new permissions. Specify one of + * the following: "Datadog Admin Role", "Datadog Standard Role", or "Datadog Read Only Role". If + * empty or not specified, the role does not automatically inherit permissions from any managed + * role. + * + * @return receivesPermissionsFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVES_PERMISSIONS_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReceivesPermissionsFrom() { + return receivesPermissionsFrom; + } + + public void setReceivesPermissionsFrom(List receivesPermissionsFrom) { + this.receivesPermissionsFrom = receivesPermissionsFrom; + } + public RoleUpdateAttributes userCount(Integer userCount) { this.userCount = userCount; return this; @@ -165,13 +203,16 @@ public boolean equals(Object o) { return Objects.equals(this.createdAt, roleUpdateAttributes.createdAt) && Objects.equals(this.modifiedAt, roleUpdateAttributes.modifiedAt) && Objects.equals(this.name, roleUpdateAttributes.name) + && Objects.equals( + this.receivesPermissionsFrom, roleUpdateAttributes.receivesPermissionsFrom) && Objects.equals(this.userCount, roleUpdateAttributes.userCount) && Objects.equals(this.additionalProperties, roleUpdateAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(createdAt, modifiedAt, name, userCount, additionalProperties); + return Objects.hash( + createdAt, modifiedAt, name, receivesPermissionsFrom, userCount, additionalProperties); } @Override @@ -181,6 +222,9 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" receivesPermissionsFrom: ") + .append(toIndentedString(receivesPermissionsFrom)) + .append("\n"); sb.append(" userCount: ").append(toIndentedString(userCount)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/test/resources/com/datadog/api/client/v2/api/roles.feature b/src/test/resources/com/datadog/api/client/v2/api/roles.feature index 4c62839977e..48d61dae9ce 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/roles.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/roles.feature @@ -6,7 +6,9 @@ Feature: Roles account assets can be granted to roles in the Datadog application without using this API. For example, granting read access on a specific log index to a role can be done in Datadog from the [Pipelines - page](https://app.datadoghq.com/logs/pipelines). + page](https://app.datadoghq.com/logs/pipelines). Roles can also be + managed in bulk through the Datadog UI, which provides the capability to + assign a single permission to multiple roles simultaneously. Background: Given a valid "apiKeyAuth" key in the system @@ -64,7 +66,7 @@ Feature: Roles Scenario: Create a new role by cloning an existing role returns "Not found" response Given new "CloneRole" request And request contains "role_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "cloned-role"}, "type": "roles"}} + And body with value {"data": {"attributes": {"name": "cloned-role", "receives_permissions_from": []}, "type": "roles"}} When the request is sent Then the response status is 404 Not found @@ -81,14 +83,14 @@ Feature: Roles @generated @skip @team:DataDog/aaa-core-access Scenario: Create role returns "Bad Request" response Given new "CreateRole" request - And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}} + And body with value {"data": {"attributes": {"name": "developers", "receives_permissions_from": []}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/aaa-core-access Scenario: Create role returns "OK" response Given new "CreateRole" request - And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}} + And body with value {"data": {"attributes": {"name": "developers", "receives_permissions_from": []}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}} When the request is sent Then the response status is 200 OK @@ -335,6 +337,6 @@ Feature: Roles Scenario: Update a role returns "Unprocessable Entity" response Given new "UpdateRole" request And request contains "role_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "id": "00000000-0000-1111-0000-000000000000", "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}} + And body with value {"data": {"attributes": {"receives_permissions_from": []}, "id": "00000000-0000-1111-0000-000000000000", "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}} When the request is sent Then the response status is 422 Unprocessable Entity