Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 71 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34360,6 +34360,15 @@ components:
description: Indicates whether feature flag changes require approval in this environment.
example: false
type: boolean
subject_authorization_oidc_provider_id:
description: >-
The ID of a Custom OIDC provider, formatted as a nonzero UUID. Required when `subject_authorization_state` is `enabled`. If omitted or `null`, no provider is associated. A non-null ID must be registered in the current organization and site, even when subject authorization is disabled. An unregistered ID returns `400 Bad Request`, and an unavailable registry returns `503 Service Unavailable`. Saving does not verify provider eligibility or key publication.
example: "550e8400-e29b-41d4-a716-446655440003"
format: uuid
nullable: true
type: string
subject_authorization_state:
$ref: "#/components/schemas/EnvironmentSubjectAuthorizationState"
required:
- name
- queries
Expand Down Expand Up @@ -49837,6 +49846,15 @@ components:
description: Indicates whether feature flag changes require approval in this environment.
example: false
type: boolean
subject_authorization_oidc_provider_id:
description: >-
The associated Custom OIDC provider ID, or `null` when no provider is associated. Disabled environments may retain a provider association.
example: "550e8400-e29b-41d4-a716-446655440003"
format: uuid
nullable: true
type: string
subject_authorization_state:
$ref: "#/components/schemas/EnvironmentSubjectAuthorizationState"
updated_at:
description: The timestamp when the environment was last updated.
example: "2023-01-01T00:00:00Z"
Expand All @@ -49853,6 +49871,17 @@ components:
required:
- data
type: object
EnvironmentSubjectAuthorizationState:
description: >-
Whether assignment requests for this environment require subject authorization. Allowed values are `disabled` and `enabled`. Enabling requires a provider ID formatted as a nonzero UUID. If omitted on create, defaults to `disabled`. If omitted on update, the stored state is preserved. `null` is not accepted. This setting applies only to the current Datadog site and is not copied to other sites. Before you enable it, configure an eligible Custom OIDC provider in the same organization and site, and verify that the provider's keys are published. Assignment requests fail when the required verification configuration is unavailable.
enum:
- disabled
- enabled
example: disabled
type: string
x-enum-varnames:
- DISABLED
- ENABLED
EnvironmentsPaginationMeta:
description: Pagination metadata for environments.
properties:
Expand Down Expand Up @@ -62077,6 +62106,14 @@ components:
type: boolean
status:
$ref: "#/components/schemas/FeatureFlagStatus"
subject_authorization_oidc_provider_id:
description: The environment's associated Custom OIDC provider ID, or `null` when no provider is associated.
example: "550e8400-e29b-41d4-a716-446655440003"
format: uuid
nullable: true
type: string
subject_authorization_state:
$ref: "#/components/schemas/EnvironmentSubjectAuthorizationState"
required:
- environment_id
- status
Expand Down Expand Up @@ -62142,6 +62179,14 @@ components:
type: boolean
status:
$ref: "#/components/schemas/FeatureFlagStatus"
subject_authorization_oidc_provider_id:
description: The environment's associated Custom OIDC provider ID, or `null` when no provider is associated.
example: "550e8400-e29b-41d4-a716-446655440003"
format: uuid
nullable: true
type: string
subject_authorization_state:
$ref: "#/components/schemas/EnvironmentSubjectAuthorizationState"
required:
- environment_id
- status
Expand Down Expand Up @@ -158469,6 +158514,15 @@ components:
Indicates whether feature flag changes require approval in this environment. If omitted, resets to false. Include the existing value to preserve it.
example: true
type: boolean
subject_authorization_oidc_provider_id:
description: >-
The ID of a Custom OIDC provider, formatted as a nonzero UUID. If omitted, the stored association is preserved. Set to `null` to clear the association, which is allowed only when the resulting `subject_authorization_state` is `disabled`. A new non-null ID must be registered in the current organization and site, even when subject authorization is disabled. An unregistered ID returns `400 Bad Request`, and an unavailable registry returns `503 Service Unavailable`. Omitted, cleared, and unchanged IDs skip this check, including when you enable a retained provider. An ID that matches the stored ID in a different format, such as different letter case, is treated as unchanged. Saving does not verify provider eligibility or key publication.
example: "550e8400-e29b-41d4-a716-446655440003"
format: uuid
nullable: true
type: string
subject_authorization_state:
$ref: "#/components/schemas/EnvironmentSubjectAuthorizationState"
type: object
UpdateEnvironmentData:
description: Data for updating an environment.
Expand Down Expand Up @@ -197690,7 +197744,9 @@ paths:
- feature_flag_environment_config_read
post:
description: |-
Creates a new environment for organizing feature flags.
Creates an environment for organizing feature flags. A non-null subject authorization provider ID
must be registered in the current organization and site, even when authorization is disabled. An unknown
ID returns `400 Bad Request`; an unavailable registry returns `503 Service Unavailable`.
operationId: CreateFeatureFlagsEnvironment
requestBody:
content:
Expand Down Expand Up @@ -197725,6 +197781,8 @@ paths:
- staging
- canary
require_feature_flag_approval: false
subject_authorization_oidc_provider_id:
subject_authorization_state: disabled
id: 00000000-0000-0000-0000-000000000017
type: environments
schema:
Expand Down Expand Up @@ -197819,6 +197877,8 @@ paths:
queries:
- staging
require_feature_flag_approval: false
subject_authorization_oidc_provider_id:
subject_authorization_state: disabled
id: 00000000-0000-0000-0000-000000000018
type: environments
schema:
Expand Down Expand Up @@ -197855,14 +197915,14 @@ paths:
Updates an environment's name, DD_ENV values, and settings.


Every request must include `name` and `queries`, even when changing only `observe_full_evaluation_data`.
Every request must include `name` and `queries`, even when changing only subject authorization or evaluation data settings.

To preserve the current name and DD_ENV values, get the environment first and include those values in the request.


Omitting `is_production` or `require_feature_flag_approval` resets that setting to `false`.

Include their current values to preserve them. Omitting `observe_full_evaluation_data` preserves its current value.
Include their current values to preserve them. Omitting `observe_full_evaluation_data` preserves its current value. Omitting either subject authorization field preserves its stored value. Set `subject_authorization_oidc_provider_id` to `null` to clear the association while subject authorization is disabled. The following requests return `400 Bad Request`: enabling subject authorization without a provider, an unrecognized `subject_authorization_state` value, a malformed or zero UUID provider ID, or an unregistered provider ID. If the provider registry is unavailable, a new provider ID returns `503 Service Unavailable`. Omitted, cleared, or unchanged provider IDs skip the registry check, including when enabling a retained provider. Saving does not verify provider eligibility or key publication, so a successful save does not mean the environment is ready for assignment requests. Concurrent policy changes return `409 Conflict`; reload the environment and retry.
operationId: UpdateFeatureFlagsEnvironment
parameters:
- $ref: "#/components/parameters/environment_id"
Expand Down Expand Up @@ -197901,6 +197961,8 @@ paths:
- production
- prod-us
require_feature_flag_approval: true
subject_authorization_oidc_provider_id:
subject_authorization_state: disabled
id: 00000000-0000-0000-0000-000000000019
type: environments
schema:
Expand All @@ -197924,6 +197986,12 @@ paths:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Not Found
"409":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Conflict
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,10 @@ public CompletableFuture<EnvironmentResponse> createFeatureFlagsEnvironmentAsync
}

/**
* Creates a new environment for organizing feature flags.
* Creates an environment for organizing feature flags. A non-null subject authorization provider
* ID must be registered in the current organization and site, even when authorization is
* disabled. An unknown ID returns <code>400 Bad Request</code>; an unavailable registry returns
* <code>503 Service Unavailable</code>.
*
* @param body (required)
* @return ApiResponse&lt;EnvironmentResponse&gt;
Expand Down Expand Up @@ -4428,12 +4431,23 @@ public CompletableFuture<EnvironmentResponse> updateFeatureFlagsEnvironmentAsync
* Updates an environment's name, DD_ENV values, and settings.
*
* <p>Every request must include <code>name</code> and <code>queries</code>, even when changing
* only <code>observe_full_evaluation_data</code>. To preserve the current name and DD_ENV values,
* get the environment first and include those values in the request.
* only subject authorization or evaluation data settings. To preserve the current name and DD_ENV
* values, get the environment first and include those values in the request.
*
* <p>Omitting <code>is_production</code> or <code>require_feature_flag_approval</code> resets
* that setting to <code>false</code>. Include their current values to preserve them. Omitting
* <code>observe_full_evaluation_data</code> preserves its current value.
* <code>observe_full_evaluation_data</code> preserves its current value. Omitting either subject
* authorization field preserves its stored value. Set <code>
* subject_authorization_oidc_provider_id</code> to <code>null</code> to clear the association
* while subject authorization is disabled. The following requests return <code>400 Bad Request
* </code>: enabling subject authorization without a provider, an unrecognized <code>
* subject_authorization_state</code> value, a malformed or zero UUID provider ID, or an
* unregistered provider ID. If the provider registry is unavailable, a new provider ID returns
* <code>503 Service Unavailable</code>. Omitted, cleared, or unchanged provider IDs skip the
* registry check, including when enabling a retained provider. Saving does not verify provider
* eligibility or key publication, so a successful save does not mean the environment is ready for
* assignment requests. Concurrent policy changes return <code>409 Conflict</code>; reload the
* environment and retry.
*
* @param environmentId The ID of the environment. (required)
* @param body (required)
Expand All @@ -4447,6 +4461,7 @@ public CompletableFuture<EnvironmentResponse> updateFeatureFlagsEnvironmentAsync
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
* <tr><td> 409 </td><td> Conflict </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import org.openapitools.jackson.nullable.JsonNullable;

/** Attributes for creating a new environment. */
@JsonPropertyOrder({
CreateEnvironmentAttributes.JSON_PROPERTY_IS_PRODUCTION,
CreateEnvironmentAttributes.JSON_PROPERTY_NAME,
CreateEnvironmentAttributes.JSON_PROPERTY_OBSERVE_FULL_EVALUATION_DATA,
CreateEnvironmentAttributes.JSON_PROPERTY_QUERIES,
CreateEnvironmentAttributes.JSON_PROPERTY_REQUIRE_FEATURE_FLAG_APPROVAL
CreateEnvironmentAttributes.JSON_PROPERTY_REQUIRE_FEATURE_FLAG_APPROVAL,
CreateEnvironmentAttributes.JSON_PROPERTY_SUBJECT_AUTHORIZATION_OIDC_PROVIDER_ID,
CreateEnvironmentAttributes.JSON_PROPERTY_SUBJECT_AUTHORIZATION_STATE
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -48,6 +52,14 @@ public class CreateEnvironmentAttributes {
"require_feature_flag_approval";
private Boolean requireFeatureFlagApproval = false;

public static final String JSON_PROPERTY_SUBJECT_AUTHORIZATION_OIDC_PROVIDER_ID =
"subject_authorization_oidc_provider_id";
private JsonNullable<UUID> subjectAuthorizationOidcProviderId = JsonNullable.<UUID>undefined();

public static final String JSON_PROPERTY_SUBJECT_AUTHORIZATION_STATE =
"subject_authorization_state";
private EnvironmentSubjectAuthorizationState subjectAuthorizationState;

public CreateEnvironmentAttributes() {}

@JsonCreator
Expand Down Expand Up @@ -173,6 +185,80 @@ public void setRequireFeatureFlagApproval(Boolean requireFeatureFlagApproval) {
this.requireFeatureFlagApproval = requireFeatureFlagApproval;
}

public CreateEnvironmentAttributes subjectAuthorizationOidcProviderId(
UUID subjectAuthorizationOidcProviderId) {
this.subjectAuthorizationOidcProviderId =
JsonNullable.<UUID>of(subjectAuthorizationOidcProviderId);
return this;
}

/**
* The ID of a Custom OIDC provider, formatted as a nonzero UUID. Required when <code>
* subject_authorization_state</code> is <code>enabled</code>. If omitted or <code>null</code>, no
* provider is associated. A non-null ID must be registered in the current organization and site,
* even when subject authorization is disabled. An unregistered ID returns <code>400 Bad Request
* </code>, and an unavailable registry returns <code>503 Service Unavailable</code>. Saving does
* not verify provider eligibility or key publication.
*
* @return subjectAuthorizationOidcProviderId
*/
@jakarta.annotation.Nullable
@JsonIgnore
public UUID getSubjectAuthorizationOidcProviderId() {
return subjectAuthorizationOidcProviderId.orElse(null);
}

@JsonProperty(JSON_PROPERTY_SUBJECT_AUTHORIZATION_OIDC_PROVIDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<UUID> getSubjectAuthorizationOidcProviderId_JsonNullable() {
return subjectAuthorizationOidcProviderId;
}

@JsonProperty(JSON_PROPERTY_SUBJECT_AUTHORIZATION_OIDC_PROVIDER_ID)
public void setSubjectAuthorizationOidcProviderId_JsonNullable(
JsonNullable<UUID> subjectAuthorizationOidcProviderId) {
this.subjectAuthorizationOidcProviderId = subjectAuthorizationOidcProviderId;
}

public void setSubjectAuthorizationOidcProviderId(UUID subjectAuthorizationOidcProviderId) {
this.subjectAuthorizationOidcProviderId =
JsonNullable.<UUID>of(subjectAuthorizationOidcProviderId);
}

public CreateEnvironmentAttributes subjectAuthorizationState(
EnvironmentSubjectAuthorizationState subjectAuthorizationState) {
this.subjectAuthorizationState = subjectAuthorizationState;
this.unparsed |= !subjectAuthorizationState.isValid();
return this;
}

/**
* Whether assignment requests for this environment require subject authorization. Allowed values
* are <code>disabled</code> and <code>enabled</code>. Enabling requires a provider ID formatted
* as a nonzero UUID. If omitted on create, defaults to <code>disabled</code>. If omitted on
* update, the stored state is preserved. <code>null</code> is not accepted. This setting applies
* only to the current Datadog site and is not copied to other sites. Before you enable it,
* configure an eligible Custom OIDC provider in the same organization and site, and verify that
* the provider's keys are published. Assignment requests fail when the required verification
* configuration is unavailable.
*
* @return subjectAuthorizationState
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUBJECT_AUTHORIZATION_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnvironmentSubjectAuthorizationState getSubjectAuthorizationState() {
return subjectAuthorizationState;
}

public void setSubjectAuthorizationState(
EnvironmentSubjectAuthorizationState subjectAuthorizationState) {
if (!subjectAuthorizationState.isValid()) {
this.unparsed = true;
}
this.subjectAuthorizationState = subjectAuthorizationState;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -236,6 +322,11 @@ public boolean equals(Object o) {
&& Objects.equals(this.queries, createEnvironmentAttributes.queries)
&& Objects.equals(
this.requireFeatureFlagApproval, createEnvironmentAttributes.requireFeatureFlagApproval)
&& Objects.equals(
this.subjectAuthorizationOidcProviderId,
createEnvironmentAttributes.subjectAuthorizationOidcProviderId)
&& Objects.equals(
this.subjectAuthorizationState, createEnvironmentAttributes.subjectAuthorizationState)
&& Objects.equals(
this.additionalProperties, createEnvironmentAttributes.additionalProperties);
}
Expand All @@ -248,6 +339,8 @@ public int hashCode() {
observeFullEvaluationData,
queries,
requireFeatureFlagApproval,
subjectAuthorizationOidcProviderId,
subjectAuthorizationState,
additionalProperties);
}

Expand All @@ -264,6 +357,12 @@ public String toString() {
sb.append(" requireFeatureFlagApproval: ")
.append(toIndentedString(requireFeatureFlagApproval))
.append("\n");
sb.append(" subjectAuthorizationOidcProviderId: ")
.append(toIndentedString(subjectAuthorizationOidcProviderId))
.append("\n");
sb.append(" subjectAuthorizationState: ")
.append(toIndentedString(subjectAuthorizationState))
.append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Loading
Loading